flectra/addons/l10n_nl/models/account_journal.py
flectra-admin 769eafb483 [INIT] Inception of Flectra from Odoo
Flectra is Forked from Odoo v11 commit : (6135e82d73)
2018-01-16 11:45:59 +05:30

20 lines
668 B
Python

# -*- coding: utf-8 -*-
from odoo import api, fields, models, _
class AccountJournal(models.Model):
_inherit = 'account.journal'
@api.model
def _prepare_liquidity_account(self, name, company, currency_id, type):
account_vals = super(AccountJournal, self)._prepare_liquidity_account(name, company, currency_id, type)
# Ensure the newly liquidity accounts have the right account tag in order to be part
# of the Dutch financial reports.
tag_ids = account_vals.get('tag_ids', [])
tag_ids.append((4, self.env.ref('l10n_nl.account_tag_25').id))
account_vals['tag_ids'] = tag_ids
return account_vals