mirror of
https://github.com/OCA/intrastat-extrastat.git
synced 2025-02-16 17:13:41 +02:00
intrastat field on account.fiscal.position is now a selection field with 3 values : b2b/b2c/no Add views on account.fiscal.position.template
19 lines
672 B
Python
19 lines
672 B
Python
# Copyright 2020-2022 Akretion France (http://www.akretion.com/)
|
|
# @author: <alexis.delattre@akretion.com>
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
from odoo import api, fields, models
|
|
|
|
|
|
class AccountFiscalPositionTemplate(models.Model):
|
|
_inherit = "account.fiscal.position.template"
|
|
|
|
intrastat = fields.Selection(
|
|
"_intrastat_selection",
|
|
help="When set to B2B or B2C, the invoices with this fiscal position will "
|
|
"be taken into account for the generation of the intrastat reports.",
|
|
)
|
|
|
|
@api.model
|
|
def _intrastat_selection(self):
|
|
return self.env["account.fiscal.position"]._intrastat_selection()
|