summaryrefslogtreecommitdiff
path: root/addons/hr_org_chart/controllers/hr_org_chart.py
diff options
context:
space:
mode:
authorjbm-odoo <jbm@odoo.com>2019-04-24 12:33:20 +0000
committerYannick Tivisse <yti@odoo.com>2019-06-25 10:28:26 +0000
commitccf4fc244a62067a49d3dc411fa689c4bc7ceeed (patch)
tree5c7c75bf96e84abb622536f4d9368aa23457546c /addons/hr_org_chart/controllers/hr_org_chart.py
parent1e8db023685108a137593188e653d6bf8f8298a9 (diff)
[IMP] hr_expense: Allow modifications depending on the stage
Purpose ======= When an Expense report hits the "Approved" stage, the Accountant can no longer edit the account / tax / analytic account fields. However, this information can still be modified from the Expense itself, impacting directly the related Expense report anyway. In any case, it makes sense for an accountant to be able to edit this type of information, as it is likely that an employee or a manager will input the wrong accounts. On the other hand, once the Journal entries are posted, the Expense report should not be editable anymore. Specifications ============== For the Expense report (hr.expense.sheet model): If the report is in the "Approved" stage AND the user has at least the Accounting / Accountant access right level The following fields should be editable - Taxes (tax_ids) - Bill reference (reference) - Account (account_id) - Analytic account (analytic_account_id) If the user has a lower access right level => the fields listed above remain in read only. If it is in the "Posted" stage (regardless of the access right level of the user): The following fields should be in read only: - Taxes (tax_ids) - Account (account_id) - Analytic account (analytic_account_id) The "Bill reference" (reference) field should still be editable (current behavior). Based on the Expense report's stage and the access right level of the user, the fields of the related Expenses should also be editable (or not). closes odoo/odoo#32918 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/hr_org_chart/controllers/hr_org_chart.py')
0 files changed, 0 insertions, 0 deletions