Files
odoo_source/addons/l10n_be/models/account_journal.py
T
william 1493a01b5d [IMP] account: get default payment ref format with country
Task 2297165

Set the payment reference standard to the one of the country of the
company by default.
The module l10n_be_invoice_bba has been merged into l10n_be as it was
auto_installed, it will not be problematic not being able to uninstall
it, and the order of installation of modules made it so that the
journals were created before l10n_be_invoice_bba was installed. This
caused the value to be set to 'odoo' on a fresh database instead of 'be'
2020-09-10 11:50:53 +00:00

12 lines
382 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class AccountJournal(models.Model):
_inherit = 'account.journal'
invoice_reference_model = fields.Selection(selection_add=[
('be', 'Belgium')
], ondelete={'be': lambda recs: recs.write({'invoice_reference_model': 'odoo'})})