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>
8 lines
215 B
Python
8 lines
215 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from . import hr_expense_refuse_reason
|
|
from . import account_payment_register
|
|
from . import hr_expense_approve_duplicate
|
|
from . import hr_expense_split_wizard
|
|
from . import hr_expense_split
|