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'
12 lines
382 B
Python
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'})})
|