Fields `amount_type` on `account.tax` and `account.tax.template` are already defined in the `account` module. Redefining them here (with the same parameters) breaks every other module that would have used `selection_add=` on those fields. Actually, it is the case in `account_tax_python`, and thus, all the localizations/customizations that depend on it were broken by this one. (issue spotted by 11.0-nightly) Closes #19812 #20596
29 lines
1.3 KiB
Python
29 lines
1.3 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import fields, models
|
|
|
|
|
|
class AccountTaxTemplate(models.Model):
|
|
""" Add fields used to define some brazilian taxes """
|
|
_inherit = 'account.tax.template'
|
|
|
|
tax_discount = fields.Boolean(string='Discount this Tax in Prince',
|
|
help="Mark it for (ICMS, PIS e etc.).")
|
|
base_reduction = fields.Float(string='Redution', digits=0, required=True,
|
|
help="Um percentual decimal em % entre 0-1.", default=0)
|
|
amount_mva = fields.Float(string='MVA Percent', digits=0, required=True,
|
|
help="Um percentual decimal em % entre 0-1.", default=0)
|
|
|
|
|
|
class AccountTax(models.Model):
|
|
""" Add fields used to define some brazilian taxes """
|
|
_inherit = 'account.tax'
|
|
|
|
tax_discount = fields.Boolean(string='Discount this Tax in Prince',
|
|
help="Mark it for (ICMS, PIS e etc.).")
|
|
base_reduction = fields.Float(string='Redution', digits=0, required=True,
|
|
help="Um percentual decimal em % entre 0-1.", default=0)
|
|
amount_mva = fields.Float(string='MVA Percent', digits=0, required=True,
|
|
help="Um percentual decimal em % entre 0-1.", default=0)
|