From 59a8a1cd8eec1af59df2d62d7c3b10b7cff3dfc9 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 17 May 2018 12:50:18 +0200 Subject: [PATCH] [FIX] account: accounting advisers can create taxes Since revision 4acec418ce1548b404333f0de4a7f57bd803ce9e it was no longer possible for an accounting adviser to create taxes. This is because when creating a taxes, as the related field `hide_tax_exigibility` wasn't readonly, it attempted to write on the field `tax_exigibility` of the model `res.company`, and the adviser do not has that access right. There is no reason for this field not to be readonly, as it is used only to compute an invisible attrs for the tax form view. opw-1846265 --- addons/account/models/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account.py b/addons/account/models/account.py index a39497d7216..4642cacd9b5 100644 --- a/addons/account/models/account.py +++ b/addons/account/models/account.py @@ -767,7 +767,7 @@ class AccountTax(models.Model): tag_ids = fields.Many2many('account.account.tag', 'account_tax_account_tag', string='Tags', help="Optional tags you may want to assign for custom reporting") tax_group_id = fields.Many2one('account.tax.group', string="Tax Group", default=_default_tax_group, required=True) # Technical field to make the 'tax_exigibility' field invisible if the same named field is set to false in 'res.company' model - hide_tax_exigibility = fields.Boolean(string='Hide Use Cash Basis Option', related='company_id.tax_exigibility') + hide_tax_exigibility = fields.Boolean(string='Hide Use Cash Basis Option', related='company_id.tax_exigibility', readonly=True) tax_exigibility = fields.Selection( [('on_invoice', 'Based on Invoice'), ('on_payment', 'Based on Payment'),