Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] hr_expense: enable change account for no-access users
Steps to reproduce: - install Expense and Accounting - create 3 separate Expense categories ( this will create a related product of 'service' type) with a different Expense account and Vendor tax on it. - Configuring different Taxes are important to replicate the issue - Create a 'test' user who has no access to apps - login a 'test' user and create an expense for one of the categories and save it. - Update the expense to a different category and click 'submit to Manager' Issue: The account_id of the expense is not updated Reason: Multiple fields are computed using the same method `_compute_from_product_id_company_id`. The field being read-only=False https://github.com/odoo/odoo/blob/c38cf4c2038d15890d5d50ec05fd5cb4f9f379b1/addons/hr_expense/views/hr_expense_views.xml#L199 It is protected during the write; that is, considered as user input Solution: Duplicate the field is it will not be read-only and put it as invisible Split the compute method opw-3336796 X-original-commit: 6664ccb Part-of: odoo#127794
- Loading branch information