diff options
| author | Denis Ledoux <dle@odoo.com> | 2016-03-08 17:42:01 +0100 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2016-03-08 17:55:52 +0100 |
| commit | 9fa597c9c28b165122b1ceb744af10da042c08ef (patch) | |
| tree | 7aeb8937b4e892f2cee1286c104221e005f659bc /doc/reference/javascript.rst | |
| parent | 002722b967e7256569b42436ae55ade4cbf56528 (diff) | |
[FIX] point_of_sale: sessions closing performances
`account.move.line.company_id` is a related
to `account_id.company_id`
`account.bank.statement.company_id` is a related
to `journal_id.company_id`
Any attempt to set the `company_id` value
when creating or writing records for these models
will result to the update of the value in
the related record (the update of `company_id` in the
`account.account and the `account.journal`), which
will result in the update of the `company_id` value in all
records in which this related record is used
(in all `account.move.line` where this `account_id` is used,
in all `account.bank.statement` where this `journal_id` is used).
In other words, the more a database had `account.move.line`
or `account.bank.statement` records, the more
it took time for the pos sessions to be closed.
To force a company for an `account.move.line`
(`account.bank.statement`), you must just
set the correct `account_id`(`journal_id`)
in the first place.
For instance, for the `account_id`, passing
`force_company` in the context ensure to choose
the `account.account` from the right company
property.
See
`local_context = dict(context or {}, force_company=company_id)`
which is set in `_confirm_orders` just before calling
`_create_account_move_line` which retrieve
the account from the
`property_account_receivable_id` property.
opw-671362
Diffstat (limited to 'doc/reference/javascript.rst')
0 files changed, 0 insertions, 0 deletions
