Files
odoo_source/addons/hr_expense/security/ir.model.access.csv
T
sofiagvaladze d70000bf21 [IMP] hr_expense/sale_expense: allow splitting an expense
Purpose: Sometimes, taxes are distinct on parts of the expense
(for example alcohol and food).
Therefore the expense should be split in two.

In order to split the expense, we added an wizard.
When creating a new expense from the split, we also
copy the attachments.

'hr.expense.split' has to have the similar logic and dependencies between
the fields as 'hr.expense' does. For example, in case we change the
product_id to the product that has cost defined on it, it should have
the same behavior as expense has. In particular, the 'total_price'
will be set and the user should not be able to modify the amount.

Similarly, if we change the product_id to the one that has no tax defined
on it, then split tax_ids should be cleared out and be set to readonly.
Similar logic goes to sale_order_id (Customer to Reinvoice'),
we should not be able to set it, in case the product can not be re-invoiced.

All of the above constraints leads to the amount of similar code to to the 'hr.expense.split' side.
But it could not have been avoided, if we want the smooth flow.

task - 2831024

closes odoo/odoo#90770

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-06-02 08:02:04 +02:00

2.5 KiB

1idnamemodel_id:idgroup_id:idperm_readperm_writeperm_createperm_unlink
2access_hr_expense_employeehr.expense.employeemodel_hr_expensebase.group_user1111
3access_hr_expense_sheet_employeehr.expense.sheet.employeemodel_hr_expense_sheetbase.group_user1111
4access_hr_expense_userhr.expense.usermodel_hr_expensehr_expense.group_hr_expense_team_approver1111
5access_hr_expense_sheet_userhr.expense.sheet.usermodel_hr_expense_sheethr_expense.group_hr_expense_team_approver1111
6access_hr_expense_managerhr.expense.managermodel_hr_expensehr_expense.group_hr_expense_manager1111
7access_hr_expense_sheet_managerhr.expense.sheet.managermodel_hr_expense_sheethr_expense.group_hr_expense_manager1111
8access_product_product_hr_expense_userproduct.product.hr.expense.userproduct.model_product_producthr_expense.group_hr_expense_manager1111
9access_product_template_hr_expense_userproduct.template.hr.expense.userproduct.model_product_templatehr_expense.group_hr_expense_manager1111
10access_uom_uom_hr_expense_useruom.uom.hr.expense.useruom.model_uom_uomhr_expense.group_hr_expense_team_approver1111
11access_account_journal_useraccount.journal.useraccount.model_account_journalhr_expense.group_hr_expense_team_approver1111
12access_account_journal_employeeaccount.journal.employeeaccount.model_account_journalbase.group_user1000
13access_account_move_useraccount.move.hr.expense.approveraccount.model_account_movehr_expense.group_hr_expense_team_approver1000
14access_account_move_line_useraccount.move.line.hr.expense.approveraccount.model_account_move_linehr_expense.group_hr_expense_team_approver1000
15access_account_analytic_line_useraccount.analytic.line.useraccount.model_account_analytic_linehr_expense.group_hr_expense_team_approver1111
16access_mail_activity_type_expense_usermail.activity.type.expense.usermail.model_mail_activity_typehr_expense.group_hr_expense_manager1111
17access_hr_expense_refuse_wizardaccess.hr.expense.refuse.wizardmodel_hr_expense_refuse_wizardhr_expense.group_hr_expense_team_approver1110
18access_hr_expense_approve_duplicateaccess.hr.expense.approve.duplicatemodel_hr_expense_approve_duplicatehr_expense.group_hr_expense_team_approver1110
19access_hr_expense_split_wizard_manageraccess.hr.expense.split.wizard.managermodel_hr_expense_split_wizardbase.group_user1110
20access_hr_expense_split_manageraccess.hr.expense.split.managermodel_hr_expense_splitbase.group_user1111