Files
odoo_source/addons/hr_expense/models/res_company.py
T
Damien Bouvy 1f8e265e43 [IMP] hr_expense: allow default for the company journal
Revision 26a5653f48 introduced
the possibility to set up a default journal for accounting
entries created by "employee-paid" expenses

This commit adds the same possibility for the "company-paid"
expenses (because why allow it for one and not the other?).

closes odoo/odoo#99993

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-09-13 09:31:30 +02:00

23 lines
817 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
expense_journal_id = fields.Many2one(
"account.journal",
string="Default Expense Journal",
check_company=True,
domain="[('type', '=', 'purchase'), ('company_id', '=', company_id)]",
help="The company's default journal used when an employee expense is created.",
)
company_expense_journal_id = fields.Many2one(
"account.journal",
string="Default Company Expense Journal",
check_company=True,
domain="[('type', 'in', ['cash', 'bank']), ('company_id', '=', company_id)]",
help="The company's default journal used when a company expense is created.",
)