Files
account-financial-tools/account_tax_analysis/models/account_tax.py
Denis Robinet (ACSONE) f8beaebc78 [10.0][MIG] account_tax_analysis
Change compared to 8.0:
* period_id has been replace by operations an the date field
* tax_code_id has been replaced by analysis_tax, a computed fields based an the tax analysis_name, based on description and name
2018-06-22 11:27:03 +02:00

22 lines
577 B
Python

# -*- coding: utf-8 -*-
# Copyright 2018 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AccountTax(models.Model):
_inherit = 'account.tax'
analysis_name = fields.Char(compute="_compute_analysis_name")
@api.multi
@api.depends("name", "description")
def _compute_analysis_name(self):
for tax in self:
if tax.description:
tax.analysis_name = "%s - %s" % (tax.description, tax.name)
else:
tax.analysis_name = tax.name