diff options
| author | Denis Ledoux <dle@odoo.com> | 2018-05-17 12:50:18 +0200 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2018-05-17 12:56:00 +0200 |
| commit | 59a8a1cd8eec1af59df2d62d7c3b10b7cff3dfc9 (patch) | |
| tree | 314e99ca90befe5605e2171f5ed5a304e0a22d3c /addons | |
| parent | 7313ce7d3c3700bc4184c27c397887824e7fecc3 (diff) | |
[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
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/account/models/account.py | 2 |
1 files changed, 1 insertions, 1 deletions
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'), |
