summaryrefslogtreecommitdiff
path: root/addons/l10n_fi/models/account_journal.py
blob: aab269d803575b1d95c25fc9cb6dc72b89b4a740 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields


class AccountJournal(models.Model):

    _inherit = 'account.journal'

    invoice_reference_model = fields.Selection(selection_add=[
        ('fi', 'Finnish Standard Reference'),
        ('fi_rf', 'Finnish Creditor Reference (RF)'),
    ], ondelete={'fi': lambda recs: recs.write({'invoice_reference_model': 'odoo'}),
                 'fi_rf': lambda recs: recs.write({'invoice_reference_model': 'odoo'})})