hr_expense_account_split/models/product_template.py
2026-03-31 17:25:04 +07:00

25 lines
1.1 KiB
Python

from odoo import fields, models
class ProductTemplate(models.Model):
_inherit = 'product.template'
property_account_expense_employee_id = fields.Many2one(
'account.account',
string="Expense Account (Employee)",
company_dependent=True,
domain="[('account_type', 'not in', ('asset_receivable', 'liability_payable', 'asset_cash', 'liability_credit_card')), ('deprecated', '=', False)]",
help="Account used for expenses paid by the employee (to be reimbursed)."
)
property_account_expense_company_id = fields.Many2one(
'account.account',
string="Expense Account (Company)",
company_dependent=True,
domain="[('account_type', 'not in', ('asset_receivable', 'liability_payable', 'asset_cash', 'liability_credit_card')), ('deprecated', '=', False)]",
help="Account used for expenses paid by the company."
)
receipt_due_days = fields.Integer(
string="Receipt Due Days",
default=0,
help="Number of days the employee has to submit the receipt after the expense is paid."
)