From dcca2e8b9da685c13ba3fe8d3196b8e83fb429ba Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 3 Apr 2018 12:11:30 +0200 Subject: [PATCH] [FIX] account: fix test Complement of 802339c12d1984d1f29e574378cd8df2471ab098 --- addons/account/models/account_analytic_line.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account/models/account_analytic_line.py b/addons/account/models/account_analytic_line.py index b8756ac06ce..4e610fd6dcf 100644 --- a/addons/account/models/account_analytic_line.py +++ b/addons/account/models/account_analytic_line.py @@ -12,7 +12,8 @@ class AccountAnalyticLine(models.Model): product_uom_id = fields.Many2one('uom.uom', string='Unit of Measure') product_id = fields.Many2one('product.product', string='Product') general_account_id = fields.Many2one('account.account', string='Financial Account', ondelete='restrict', readonly=True, - related='move_id.account_id', store=True, domain=[('deprecated', '=', False)]) + related='move_id.account_id', store=True, domain=[('deprecated', '=', False)], + compute_sudo=True) move_id = fields.Many2one('account.move.line', string='Journal Item', ondelete='cascade', index=True) code = fields.Char(size=8) ref = fields.Char(string='Ref.')