[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
This commit is contained in:
qdp-odoo
2016-08-10 14:44:56 +02:00
parent b2fb497a4c
commit 123ee27e40
-2
View File
@@ -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')):