diff options
| author | Goffin Simon <sig@odoo.com> | 2020-10-21 10:33:39 +0000 |
|---|---|---|
| committer | Laurent Smet <las@odoo.com> | 2020-10-29 09:07:44 +0000 |
| commit | 5f46c50442dbe42bc534718719a6b19ee087eab0 (patch) | |
| tree | b840c5b02bf34c9e291178c265da5872b0a63188 | |
| parent | 122e4e66d3bebdad08d4d42fd09d4e5d97f8a2b0 (diff) | |
[FIX] account: Auto-complete with analytic account
Steps to reproduce the bug:
- Create a vendor bill VB1 with one line L1
- Set an analytic account AA on L1
- Post VB1
- Create a new vendor bill VB2
- Set VB1 on the field Auto-complete
Bug:
The created line L2 on VB2 had no analytic account
PS: In 12.0, the analytic account was kept when using Auto-complete field
opw:2359432
closes odoo/odoo#60497
X-original-commit: 454429d4ae6dbf4730dfb8c9c46ecf35dfd4b503
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Co-authored-by: smetl <las@odoo.com>
| -rw-r--r-- | addons/account/models/account_move.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index 8ef9a09d00f..9ec89df0a37 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -2925,9 +2925,9 @@ class AccountMoveLine(models.Model): # ==== Analytic fields ==== analytic_line_ids = fields.One2many('account.analytic.line', 'move_id', string='Analytic lines') analytic_account_id = fields.Many2one('account.analytic.account', string='Analytic Account', - index=True, compute="_compute_analytic_account", store=True, readonly=False, check_company=True) + index=True, compute="_compute_analytic_account", store=True, readonly=False, check_company=True, copy=True) analytic_tag_ids = fields.Many2many('account.analytic.tag', string='Analytic Tags', - compute="_compute_analytic_account", store=True, readonly=False, check_company=True) + compute="_compute_analytic_account", store=True, readonly=False, check_company=True, copy=True) # ==== Onchange / display purpose fields ==== recompute_tax_line = fields.Boolean(store=False, readonly=True, |
