mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX+IMP] account_chart_update: Several things
* search on code first to match tax codes The tax code code should be more discriminant that the tax code name. * compare more fields in tax codes * deletion of tax codes removed from templates For tax codes, it make sense to propose deletion, since tax codes are normally defined by the tax authority and the user does not customize them. * update accounts on taxes even if an update of the account was not requested Useful when the chart of taxes changes but the chart of account need not be updated. * depth-first search of tax codes This helps creating parents before children. * compare more fields in taxes * add active field on tax code Deactivate tax codes which are not in the template. * deactivate taxes that are not in the template * multi-company criteria for taxes * avoid inserting duplicates in presence of inactive taxes or tax codes
This commit is contained in:
committed by
Luis J. Salvatierra
parent
1f48ac7fd6
commit
ef73f5ad50
27
account_chart_update/model/account_tax_code.py
Normal file
27
account_chart_update/model/account_tax_code.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (c) 2014 ACSONE SA/NV (http://acsone.eu)
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published
|
||||
# by the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp import models, fields
|
||||
|
||||
|
||||
class AccountTaxCode(models.Model):
|
||||
_inherit = 'account.tax.code'
|
||||
|
||||
active = fields.Boolean('Active', default=True)
|
||||
Reference in New Issue
Block a user