[FIX] account: extend the scope of the template tax too for the usage
closes odoo/odoo#35622 Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
This commit is contained in:
@@ -11,6 +11,12 @@ from odoo.exceptions import UserError, ValidationError
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.tests.common import Form
|
||||
|
||||
TYPE_TAX_USE = [
|
||||
('sale', 'Sales'),
|
||||
('purchase', 'Purchases'),
|
||||
('none', 'None'),
|
||||
]
|
||||
|
||||
|
||||
class AccountAccountType(models.Model):
|
||||
_name = "account.account.type"
|
||||
@@ -1035,7 +1041,7 @@ class AccountTax(models.Model):
|
||||
return self.env['account.tax.group'].search([], limit=1)
|
||||
|
||||
name = fields.Char(string='Tax Name', required=True)
|
||||
type_tax_use = fields.Selection([('sale', 'Sales'), ('purchase', 'Purchases'), ('none', 'None'), ('adjustment', 'Adjustment')], string='Tax Scope', required=True, default="sale",
|
||||
type_tax_use = fields.Selection(TYPE_TAX_USE, string='Tax Scope', required=True, default="sale",
|
||||
help="Determines where the tax is selectable. Note : 'None' means a tax can't be used by itself, however it can still be used in a group. 'adjustment' is used to perform tax adjustment.")
|
||||
amount_type = fields.Selection(default='percent', string="Tax Computation", required=True,
|
||||
selection=[('group', 'Group of Taxes'), ('fixed', 'Fixed'), ('percent', 'Percentage of Price'), ('division', 'Percentage of Price Tax Included')],
|
||||
|
||||
@@ -5,6 +5,7 @@ from odoo import api, fields, models, _
|
||||
from odoo import SUPERUSER_ID
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
from odoo.http import request
|
||||
from odoo.addons.account.models.account import TYPE_TAX_USE
|
||||
|
||||
import logging
|
||||
|
||||
@@ -802,7 +803,7 @@ class AccountTaxTemplate(models.Model):
|
||||
chart_template_id = fields.Many2one('account.chart.template', string='Chart Template', required=True)
|
||||
|
||||
name = fields.Char(string='Tax Name', required=True)
|
||||
type_tax_use = fields.Selection([('sale', 'Sales'), ('purchase', 'Purchases'), ('none', 'None')], string='Tax Scope', required=True, default="sale",
|
||||
type_tax_use = fields.Selection(TYPE_TAX_USE, string='Tax Scope', required=True, default="sale",
|
||||
help="Determines where the tax is selectable. Note : 'None' means a tax can't be used by itself, however it can still be used in a group.")
|
||||
amount_type = fields.Selection(default='percent', string="Tax Computation", required=True,
|
||||
selection=[('group', 'Group of Taxes'), ('fixed', 'Fixed'), ('percent', 'Percentage of Price'), ('division', 'Percentage of Price Tax Included')])
|
||||
|
||||
Reference in New Issue
Block a user