From 123ee27e409cab5ddb3aadfd7edc833d4adae343 Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Wed, 10 Aug 2016 11:11:32 +0200 Subject: [PATCH] [FIX] account: allow to force the 'tax_line_id' and 'tax_ids' fields of account.move.line by a write. This restriction in the code has no reason and is already enforced by a readonly=1 attribute on those fields in the account.move.line.form view --- addons/account/models/account_move.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index ad3ae7607d6..e423e15689c 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -1111,8 +1111,6 @@ class AccountMoveLine(models.Model): @api.multi def write(self, vals): - if vals.get('tax_line_id') or vals.get('tax_ids'): - raise UserError(_('You cannot change the tax, you should remove and recreate lines.')) if ('account_id' in vals) and self.env['account.account'].browse(vals['account_id']).deprecated: raise UserError(_('You cannot use deprecated account.')) if any(key in vals for key in ('account_id', 'journal_id', 'date', 'move_id', 'debit', 'credit')):