| 1 |
|
| 2 |
|
| 3 |
from odoo import api, models, Command |
| 4 |
|
| 5 |
|
| 6 |
class AccountJournal(models.Model): |
| 7 |
_inherit = 'account.journal' |
| 8 |
|
| 9 |
@api.model |
| 10 |
def _prepare_liquidity_account_vals(self, company, code, vals): |
| 11 |
''' Set Balance Sheet and SAF-T tags on new bank and cash accounts.''' |
| 12 |
|
| 13 |
account_vals = super()._prepare_liquidity_account_vals(company, code, vals) |
| 14 |
|
| 15 |
if company.account_fiscal_country_id.code == 'AT': |
| 16 |
account_vals.setdefault('tag_ids', []) |
| 17 |
account_vals['tag_ids'] += [ |
| 18 |
Command.link(self.env.ref('l10n_at.account_tag_l10n_at_ABIV').id), |
| 19 |
Command.link(self.env.ref('l10n_at.account_tag_external_code_2300').id), |
| 20 |
] |
| 21 |
|
| 22 |
return account_vals |