From e3fee0f5cfb7004f2d9ca167785a6705a7cd2ee6 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 21 Mar 2016 00:56:14 +0100 Subject: [PATCH 01/29] Add modules base_unece, account_tax_unece, account_payment_unece and product_uom_unece --- account_tax_unece/README.rst | 64 ++++ account_tax_unece/__init__.py | 3 + account_tax_unece/__openerp__.py | 21 ++ account_tax_unece/data/unece_tax_categ.xml | 101 ++++++ account_tax_unece/data/unece_tax_type.xml | 325 ++++++++++++++++++++ account_tax_unece/models/__init__.py | 4 + account_tax_unece/models/account_tax.py | 29 ++ account_tax_unece/models/unece_code_list.py | 15 + account_tax_unece/views/account_tax.xml | 26 ++ 9 files changed, 588 insertions(+) create mode 100644 account_tax_unece/README.rst create mode 100644 account_tax_unece/__init__.py create mode 100644 account_tax_unece/__openerp__.py create mode 100644 account_tax_unece/data/unece_tax_categ.xml create mode 100644 account_tax_unece/data/unece_tax_type.xml create mode 100644 account_tax_unece/models/__init__.py create mode 100644 account_tax_unece/models/account_tax.py create mode 100644 account_tax_unece/models/unece_code_list.py create mode 100644 account_tax_unece/views/account_tax.xml diff --git a/account_tax_unece/README.rst b/account_tax_unece/README.rst new file mode 100644 index 00000000..fe1e0817 --- /dev/null +++ b/account_tax_unece/README.rst @@ -0,0 +1,64 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +============= +Account UNECE +============= + +This module adds two fields *UNECE Type Code* and *UNECE Category Code* on taxes to allow the use of the standards written by the `United Nations Economic Commission for Europe `_ (which has 56 members states in Europe, America and Central Asia, cf `Wikipedia `_): + +* the UNECE Tax Type code is defined in the `DataElement 5153 `_, +* the UNECE Tax Category Code is defined in the `DataElement 5305 `_. + +This codification is part of the UNCL (United Nations Code List). This codification is used for example in the two main international standards for electronic invoicing: + +* `Cross Industry Invoice `_ (CII), +* `Universal Business Language `_ (UBL). + +Configuration +============= + +Go to the menu *Accounting > Configuration > Taxes > Taxes* and configure the *UNECE Type Code* (default value is *VAT*) and the *UNECE Category Code*. + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/101/8.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed `feedback +`_. + +Credits +======= + +Contributors +------------ + +* Alexis de Lattre + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/account_tax_unece/__init__.py b/account_tax_unece/__init__.py new file mode 100644 index 00000000..cde864ba --- /dev/null +++ b/account_tax_unece/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models diff --git a/account_tax_unece/__openerp__.py b/account_tax_unece/__openerp__.py new file mode 100644 index 00000000..671dc8c1 --- /dev/null +++ b/account_tax_unece/__openerp__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# © 2016 Akretion (http://www.akretion.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +# @author Alexis de Lattre + +{ + 'name': 'Account Tax UNECE', + 'version': '8.0.1.0.0', + 'category': 'Accounting & Finance', + 'license': 'AGPL-3', + 'summary': 'UNECE nomenclature for taxes', + 'author': 'Akretion,Odoo Community Association (OCA)', + 'website': 'http://www.akretion.com', + 'depends': ['account', 'base_unece'], + 'data': [ + 'views/account_tax.xml', + 'data/unece_tax_type.xml', + 'data/unece_tax_categ.xml', + ], + 'installable': True, +} diff --git a/account_tax_unece/data/unece_tax_categ.xml b/account_tax_unece/data/unece_tax_categ.xml new file mode 100644 index 00000000..bd9d443f --- /dev/null +++ b/account_tax_unece/data/unece_tax_categ.xml @@ -0,0 +1,101 @@ + + + + + + + + tax_categ + A + Mixed tax rate + Self explanatory. + + + + tax_categ + AA + Lower rate + Tax rate is lower than standard rate. + + + + tax_categ + AB + Exempt for resale + A tax category code indicating the item is tax exempt when the item is bought for future resale. + + + + tax_categ + AC + Value Added Tax (VAT) not now due for payment + A code to indicate that the Value Added Tax (VAT) amount which is due on the current invoice is to be paid on receipt of a separate VAT payment request. + + + + tax_categ + AD + Value Added Tax (VAT) due from a previous invoice + A code to indicate that the Value Added Tax (VAT) amount of a previous invoice is to be paid. + + + + tax_categ + B + Transferred (VAT) + VAT not to be paid to the issuer of the invoice but directly to relevant tax authority. + + + + tax_categ + C + Duty paid by supplier + Duty associated with shipment of goods is paid by the supplier; customer receives goods with duty paid. + + + + tax_categ + E + Exempt from tax + Self explanatory. + + + + tax_categ + G + Free export item, tax not charged + Self explanatory. + + + + tax_categ + H + Higher rate + Self explanatory. + + + + tax_categ + O + Services outside scope of tax + Self explanatory. + + + + tax_categ + S + Standard rate + Self explanatory. + + + + tax_categ + Z + Zero rated goods + Self explanatory. + + + + + diff --git a/account_tax_unece/data/unece_tax_type.xml b/account_tax_unece/data/unece_tax_type.xml new file mode 100644 index 00000000..15035df6 --- /dev/null +++ b/account_tax_unece/data/unece_tax_type.xml @@ -0,0 +1,325 @@ + + + + + + + + tax_type + AAA + Petroleum tax + Self explanatory. + + + + tax_type + AAB + Provisional countervailing duty cash + Countervailing duty paid in cash prior to a formal finding of subsidization by Customs. + + + + tax_type + AAC + Provisional countervailing duty bond + Countervailing duty paid by posting a bond during an investigation period prior to a formal decision on subsidization by Customs. + + + + tax_type + AAD + Tobacco tax + A tax levied on tobacco products. + + + + tax_type + ADD + Anti-dumping duty + Duty applied to goods ruled to have been dumped in an import market at a price lower than that in the exporter's domestic market. + + + + tax_type + BOL + Stamp duty (Imposta di Bollo) + Tax required in Italy, which may be fixed or graduated in various circumstances (e.g. VAT exempt documents or bank receipts). + + + + tax_type + CAP + Agricultural levy + Levy imposed on agricultural products where there is a difference between the selling price between trading countries. + + + + tax_type + CAR + Car tax + Self explanatory. + + + + tax_type + COC + Paper consortium tax (Italy) + + + + + tax_type + CST + Commodity specific tax + Tax related to a specified commodity, e.g. illuminants, salts. + + + + tax_type + CUD + Customs duty + Duties laid down in the Customs tariff, to which goods are liable on entering or leaving the Customs territory (CCC). + + + + tax_type + CVD + Countervailing duty + A duty on imported goods applied for compensate for subsidies granted to those goods in the exporting country. + + + + tax_type + ENV + Environmental tax + Tax assessed for funding or assuring environmental protection or clean-up. + + + + tax_type + EXC + Excise duty + Customs or fiscal authorities code to identify a specific or ad valorem levy on a specific commodity, applied either domestically or at time of importation. + + + + tax_type + EXP + Agricultural export rebate + Monetary rebate given to the seller in certain circumstances when agricultural products are exported. + + + + tax_type + FET + Federal excise tax + Tax levied by the federal government on the manufacture of specific items. + + + + tax_type + FRE + Free + Self explanatory. + + + + tax_type + GCN + General construction tax + General tax for construction. + + + + tax_type + GST + Goods and services tax + Tax levied on the final consumption of goods and services throughout the production and distribution chain. + + + + tax_type + ILL + Illuminants tax + Tax of illuminants. + + + + tax_type + IMP + Import tax + Tax assessed on imports. + + + + tax_type + IND + Individual tax + Self explanatory. + + + + tax_type + LAC + Business license fee + Government assessed charge for permit to do business. + + + + tax_type + LCN + Local construction tax + Local tax for construction. + + + + tax_type + LDP + Light dues payable + Fee levied on a vessel to pay for port navigation lights. + + + + tax_type + LOC + Local sales tax + Assessment charges on sale of goods or services by city, borough country or other taxing authorities below state or provincial level. + + + + tax_type + LST + Lust tax + Tax imposed for clean-up of leaky underground storage tanks. + + + + tax_type + MCA + Monetary compensatory amount + Levy on Common Agricultural Policy (European Union) goods used to compensate for fluctuating currencies between member states. + + + + tax_type + MCD + Miscellaneous cash deposit + Duty paid and held on deposit, by Customs, during an investigation period prior to a final decision being made on any aspect related to imported goods (except valuation) by Customs. + + + + tax_type + OTH + Other taxes + Unspecified, miscellaneous tax charges. + + + + tax_type + PDB + Provisional duty bond + Anti-dumping duty paid by posting a bond during an investigation period prior to a formal decision on dumping by Customs. + + + + tax_type + PDC + Provisional duty cash + Anti-dumping duty paid in cash prior to a formal finding of dumping by Customs. + + + + tax_type + PRF + Preference duty + Self explanatory. + + + + tax_type + SCN + Special construction tax + Special tax for construction. + + + + tax_type + SSS + Shifted social securities + Social securities share of the invoice amount to be paid directly to the social securities collector. + + + + tax_type + STT + State/provincial sales tax + All applicable sale taxes by authorities at the state or provincial level, below national level. + + + + tax_type + SUP + Suspended duty + Duty suspended or deferred from payment. + + + + tax_type + SUR + Surtax + A tax or duty applied on and in addition to existing duties and taxes. + + + + tax_type + SWT + Shifted wage tax + Wage tax share of the invoice amount to be paid directly to the tax collector(s office). + + + + tax_type + TAC + Alcohol mark tax + Self explanatory. + + + + tax_type + TOT + Total + Self explanatory. + + + + tax_type + TOX + Turnover tax + Tax levied on the total sales/turnover of a corporation. + + + + tax_type + TTA + Tonnage taxes + Tax levied based on the vessel's net tonnage. + + + + tax_type + VAD + Valuation deposit + Duty paid and held on deposit, by Customs, during an investigation period prior to a formal decision on valuation of the goods being made. + + + + tax_type + VAT + Value added tax + A tax on domestic or imported goods applied to the value added at each stage in the production/distribution cycle. + + + + + diff --git a/account_tax_unece/models/__init__.py b/account_tax_unece/models/__init__.py new file mode 100644 index 00000000..35672566 --- /dev/null +++ b/account_tax_unece/models/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- + +from . import unece_code_list +from . import account_tax diff --git a/account_tax_unece/models/account_tax.py b/account_tax_unece/models/account_tax.py new file mode 100644 index 00000000..526856a5 --- /dev/null +++ b/account_tax_unece/models/account_tax.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# © 2016 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openerp import models, fields + + +class AccountTax(models.Model): + _inherit = 'account.tax' + + unece_type_id = fields.Many2one( + 'unece.code.list', string='UNECE Tax Type', + domain=[('type', '=', 'tax_type')], + help="Select the Tax Type Code of the official " + "nomenclature of the United Nations Economic " + "Commission for Europe (UNECE), DataElement 5153") + unece_type_code = fields.Char( + related='unece_type_id.code', store=True, + string='UNECE Type Code') + unece_categ_id = fields.Many2one( + 'unece.code.list', string='UNECE Tax Category', + domain=[('type', '=', 'tax_categ')], + help="Select the Tax Category Code of the official " + "nomenclature of the United Nations Economic " + "Commission for Europe (UNECE), DataElement 5305") + unece_categ_code = fields.Char( + related='unece_categ_id.code', store=True, + string='UNECE Category Code') diff --git a/account_tax_unece/models/unece_code_list.py b/account_tax_unece/models/unece_code_list.py new file mode 100644 index 00000000..320b8e60 --- /dev/null +++ b/account_tax_unece/models/unece_code_list.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# © 2016 Akretion (http://www.akretion.com) +# @author: Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openerp import models, fields + + +class UneceCodeList(models.Model): + _inherit = 'unece.code.list' + + type = fields.Selection(selection_add=[ + ('tax_type', 'Tax Types (UNCL 5153)'), + ('tax_categ', 'Tax Categories (UNCL 5305)'), + ]) diff --git a/account_tax_unece/views/account_tax.xml b/account_tax_unece/views/account_tax.xml new file mode 100644 index 00000000..dd30fefb --- /dev/null +++ b/account_tax_unece/views/account_tax.xml @@ -0,0 +1,26 @@ + + + + + + + + + unece.account.tax.form + account.tax + + + + + + + + + + + + From f2bfc2662fe8dea6dc8ea26bf09813d129161a47 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Sat, 19 Nov 2016 01:51:03 +0100 Subject: [PATCH 02/29] Port *unece* modules to odoo 10 --- account_tax_unece/README.rst | 10 +++------- .../{__openerp__.py => __manifest__.py} | 2 +- account_tax_unece/data/unece_tax_categ.xml | 6 ++---- account_tax_unece/data/unece_tax_type.xml | 6 ++---- account_tax_unece/models/account_tax.py | 6 +++--- account_tax_unece/models/unece_code_list.py | 2 +- account_tax_unece/views/account_tax.xml | 20 +++++++++---------- 7 files changed, 21 insertions(+), 31 deletions(-) rename account_tax_unece/{__openerp__.py => __manifest__.py} (95%) diff --git a/account_tax_unece/README.rst b/account_tax_unece/README.rst index fe1e0817..fd3661b4 100644 --- a/account_tax_unece/README.rst +++ b/account_tax_unece/README.rst @@ -19,14 +19,14 @@ This codification is part of the UNCL (United Nations Code List). This codificat Configuration ============= -Go to the menu *Accounting > Configuration > Taxes > Taxes* and configure the *UNECE Type Code* (default value is *VAT*) and the *UNECE Category Code*. +Go to the menu *Accounting > Configuration > Accounting > Taxes* and configure the *UNECE Type Code* (the value should be *VAT* for most of your taxes) and the *UNECE Category Code*. Usage ===== .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/101/8.0 + :target: https://runbot.odoo-community.org/runbot/101/10.0 Bug Tracker =========== @@ -34,11 +34,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed `feedback -`_. +help us smashing it by providing a detailed and welcomed feedback. Credits ======= diff --git a/account_tax_unece/__openerp__.py b/account_tax_unece/__manifest__.py similarity index 95% rename from account_tax_unece/__openerp__.py rename to account_tax_unece/__manifest__.py index 671dc8c1..fc49fd10 100644 --- a/account_tax_unece/__openerp__.py +++ b/account_tax_unece/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Account Tax UNECE', - 'version': '8.0.1.0.0', + 'version': '10.0.1.0.0', 'category': 'Accounting & Finance', 'license': 'AGPL-3', 'summary': 'UNECE nomenclature for taxes', diff --git a/account_tax_unece/data/unece_tax_categ.xml b/account_tax_unece/data/unece_tax_categ.xml index bd9d443f..cc0a8859 100644 --- a/account_tax_unece/data/unece_tax_categ.xml +++ b/account_tax_unece/data/unece_tax_categ.xml @@ -1,6 +1,5 @@ - - + @@ -97,5 +96,4 @@ Source : http://www.unece.org/trade/untdid/d97a/uncl/uncl5305.htm --> - - + diff --git a/account_tax_unece/data/unece_tax_type.xml b/account_tax_unece/data/unece_tax_type.xml index 15035df6..62210a18 100644 --- a/account_tax_unece/data/unece_tax_type.xml +++ b/account_tax_unece/data/unece_tax_type.xml @@ -1,6 +1,5 @@ - - + @@ -321,5 +320,4 @@ Source : http://www.unece.org/trade/untdid/d97b/uncl/uncl5153.htm --> - - + diff --git a/account_tax_unece/models/account_tax.py b/account_tax_unece/models/account_tax.py index 526856a5..78ae51bc 100644 --- a/account_tax_unece/models/account_tax.py +++ b/account_tax_unece/models/account_tax.py @@ -3,7 +3,7 @@ # @author: Alexis de Lattre # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import models, fields +from odoo import models, fields class AccountTax(models.Model): @@ -11,7 +11,7 @@ class AccountTax(models.Model): unece_type_id = fields.Many2one( 'unece.code.list', string='UNECE Tax Type', - domain=[('type', '=', 'tax_type')], + domain=[('type', '=', 'tax_type')], ondelete='restrict', help="Select the Tax Type Code of the official " "nomenclature of the United Nations Economic " "Commission for Europe (UNECE), DataElement 5153") @@ -20,7 +20,7 @@ class AccountTax(models.Model): string='UNECE Type Code') unece_categ_id = fields.Many2one( 'unece.code.list', string='UNECE Tax Category', - domain=[('type', '=', 'tax_categ')], + domain=[('type', '=', 'tax_categ')], ondelete='restrict', help="Select the Tax Category Code of the official " "nomenclature of the United Nations Economic " "Commission for Europe (UNECE), DataElement 5305") diff --git a/account_tax_unece/models/unece_code_list.py b/account_tax_unece/models/unece_code_list.py index 320b8e60..1f4e51c9 100644 --- a/account_tax_unece/models/unece_code_list.py +++ b/account_tax_unece/models/unece_code_list.py @@ -3,7 +3,7 @@ # @author: Alexis de Lattre # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import models, fields +from odoo import models, fields class UneceCodeList(models.Model): diff --git a/account_tax_unece/views/account_tax.xml b/account_tax_unece/views/account_tax.xml index dd30fefb..490d468d 100644 --- a/account_tax_unece/views/account_tax.xml +++ b/account_tax_unece/views/account_tax.xml @@ -1,12 +1,11 @@ - - + @@ -14,13 +13,12 @@ account.tax - - - - + + + + - - + From 9425799ad4471817ffba94a4f418dab40b6cf73d Mon Sep 17 00:00:00 2001 From: Andrea Date: Mon, 4 Sep 2017 16:30:00 +0200 Subject: [PATCH 03/29] Add unece type and category to tax template --- account_tax_unece/README.rst | 1 + account_tax_unece/__manifest__.py | 3 +- account_tax_unece/models/__init__.py | 1 + .../models/account_tax_template.py | 31 +++++++++++++++++++ .../views/account_tax_template.xml | 26 ++++++++++++++++ 5 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 account_tax_unece/models/account_tax_template.py create mode 100644 account_tax_unece/views/account_tax_template.xml diff --git a/account_tax_unece/README.rst b/account_tax_unece/README.rst index fd3661b4..ee88cc11 100644 --- a/account_tax_unece/README.rst +++ b/account_tax_unece/README.rst @@ -43,6 +43,7 @@ Contributors ------------ * Alexis de Lattre +* Andrea Stirpe Maintainer ---------- diff --git a/account_tax_unece/__manifest__.py b/account_tax_unece/__manifest__.py index fc49fd10..918bf5c1 100644 --- a/account_tax_unece/__manifest__.py +++ b/account_tax_unece/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Account Tax UNECE', - 'version': '10.0.1.0.0', + 'version': '10.0.1.1.0', 'category': 'Accounting & Finance', 'license': 'AGPL-3', 'summary': 'UNECE nomenclature for taxes', @@ -14,6 +14,7 @@ 'depends': ['account', 'base_unece'], 'data': [ 'views/account_tax.xml', + 'views/account_tax_template.xml', 'data/unece_tax_type.xml', 'data/unece_tax_categ.xml', ], diff --git a/account_tax_unece/models/__init__.py b/account_tax_unece/models/__init__.py index 35672566..fd6b4fa2 100644 --- a/account_tax_unece/models/__init__.py +++ b/account_tax_unece/models/__init__.py @@ -2,3 +2,4 @@ from . import unece_code_list from . import account_tax +from . import account_tax_template diff --git a/account_tax_unece/models/account_tax_template.py b/account_tax_unece/models/account_tax_template.py new file mode 100644 index 00000000..d21a3004 --- /dev/null +++ b/account_tax_unece/models/account_tax_template.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Copyright 2017 Onestein () +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class AccountTaxTemplate(models.Model): + _inherit = 'account.tax.template' + + unece_type_id = fields.Many2one( + 'unece.code.list', string='UNECE Tax Type', + domain=[('type', '=', 'tax_type')], + help="Select the Tax Type Code of the official " + "nomenclature of the United Nations Economic " + "Commission for Europe (UNECE), DataElement 5153" + ) + unece_categ_id = fields.Many2one( + 'unece.code.list', string='UNECE Tax Category', + domain=[('type', '=', 'tax_categ')], + help="Select the Tax Category Code of the official " + "nomenclature of the United Nations Economic " + "Commission for Europe (UNECE), DataElement 5305" + ) + + def _get_tax_vals(self, company): + self.ensure_one() + res = super(AccountTaxTemplate, self)._get_tax_vals(company) + res['unece_type_id'] = self.unece_type_id.id or False + res['unece_categ_id'] = self.unece_categ_id.id or False + return res diff --git a/account_tax_unece/views/account_tax_template.xml b/account_tax_unece/views/account_tax_template.xml new file mode 100644 index 00000000..1072bda2 --- /dev/null +++ b/account_tax_unece/views/account_tax_template.xml @@ -0,0 +1,26 @@ + + + + + + + account.tax.template + + + + + + + + + + + + + + + + + + From 5edee66946cd72662f16b13bb29373bf2fe671ca Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 13 Oct 2017 21:41:23 +0200 Subject: [PATCH 04/29] [10.0] Add field 'UNECE Due date' on taxes and corresponding nomenclature (#26) --- account_tax_unece/__manifest__.py | 3 +- account_tax_unece/data/unece_date.xml | 32 ++++++++ account_tax_unece/data/unece_tax_categ.xml | 72 ++++++++++++++++-- account_tax_unece/data/unece_tax_type.xml | 81 ++++++++++++++++++--- account_tax_unece/models/account_tax.py | 18 ++++- account_tax_unece/models/unece_code_list.py | 3 +- account_tax_unece/views/account_tax.xml | 3 +- 7 files changed, 189 insertions(+), 23 deletions(-) create mode 100644 account_tax_unece/data/unece_date.xml diff --git a/account_tax_unece/__manifest__.py b/account_tax_unece/__manifest__.py index 918bf5c1..275957fa 100644 --- a/account_tax_unece/__manifest__.py +++ b/account_tax_unece/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Account Tax UNECE', - 'version': '10.0.1.1.0', + 'version': '10.0.1.1.1', 'category': 'Accounting & Finance', 'license': 'AGPL-3', 'summary': 'UNECE nomenclature for taxes', @@ -17,6 +17,7 @@ 'views/account_tax_template.xml', 'data/unece_tax_type.xml', 'data/unece_tax_categ.xml', + 'data/unece_date.xml', ], 'installable': True, } diff --git a/account_tax_unece/data/unece_date.xml b/account_tax_unece/data/unece_date.xml new file mode 100644 index 00000000..06927a6f --- /dev/null +++ b/account_tax_unece/data/unece_date.xml @@ -0,0 +1,32 @@ + + + + + + + + + date + 5 + Date of invoice + Payment time reference is date of invoice. + + + + date + 72 + Payment date + Date when a payment was made. + + + + diff --git a/account_tax_unece/data/unece_tax_categ.xml b/account_tax_unece/data/unece_tax_categ.xml index cc0a8859..c2a01ca3 100644 --- a/account_tax_unece/data/unece_tax_categ.xml +++ b/account_tax_unece/data/unece_tax_categ.xml @@ -2,13 +2,13 @@ +Source : https://www.unece.org/fileadmin/DAM/trade/untdid/d16b/tred/tred5305.htm --> tax_categ A Mixed tax rate - Self explanatory. + Code specifying that the rate is based on mixed tax. @@ -39,6 +39,13 @@ Source : http://www.unece.org/trade/untdid/d97a/uncl/uncl5305.htm --> A code to indicate that the Value Added Tax (VAT) amount of a previous invoice is to be paid. + + tax_categ + AE + VAT Reverse Charge + Code specifying that the standard VAT rate is levied from the invoicee. + + tax_categ B @@ -53,46 +60,95 @@ Source : http://www.unece.org/trade/untdid/d97a/uncl/uncl5305.htm --> Duty associated with shipment of goods is paid by the supplier; customer receives goods with duty paid. + + tax_categ + D + Value Added Tax (VAT) margin scheme - travel agents + Indication that the VAT margin scheme for travel agents is applied. + + tax_categ E Exempt from tax - Self explanatory. + Code specifying that taxes are not applicable. + + + + tax_categ + F + Value Added Tax (VAT) margin scheme - second-hand goods + Indication that the VAT margin scheme for second-hand goods is applied. tax_categ G Free export item, tax not charged - Self explanatory. + Code specifying that the item is free export and taxes are not charged. tax_categ H Higher rate - Self explanatory. + Code specifying a higher rate of duty or tax or fee. + + + + tax_categ + I + Value Added Tax (VAT) margin scheme - works of art + Indication that the VAT margin scheme for works of art is applied. + + + + tax_categ + J + Value Added Tax (VAT) margin scheme - collector's items and antiques + Indication that the VAT margin scheme for collector's items and antiques is applied. + + + + tax_categ + K + VAT exempt for EEA intra-community supply of goods and services + A tax category code indicating the item is VAT exempt due to an intra-community supply in the European Economic Area. + + + + tax_categ + L + Canary Islands general indirect tax + Impuesto General Indirecto Canario (IGIC) is an indirect tax levied on goods and services supplied in the Canary Islands (Spain) by traders and professionals, as well as on import of goods. + + + + tax_categ + M + Tax for production, services and importation in Ceuta and Melilla + Impuesto sobre la Producción, los Servicios y la Importación (IPSI) is an indirect municipal tax, levied on the production, processing and import of all kinds of movable tangible property, the supply of services and the transfer of immovable property located in the cities of Ceuta and Melilla. tax_categ O Services outside scope of tax - Self explanatory. + Code specifying that taxes are not applicable to the services. tax_categ S Standard rate - Self explanatory. + Code specifying the standard rate. tax_categ Z Zero rated goods - Self explanatory. + Code specifying that the goods are at a zero rate. diff --git a/account_tax_unece/data/unece_tax_type.xml b/account_tax_unece/data/unece_tax_type.xml index 62210a18..d0c1261a 100644 --- a/account_tax_unece/data/unece_tax_type.xml +++ b/account_tax_unece/data/unece_tax_type.xml @@ -2,13 +2,13 @@ +Source : https://www.unece.org/fileadmin/DAM/trade/untdid/d16b/tred/tred5153.htm --> tax_type AAA Petroleum tax - Self explanatory. + A tax levied on the volume of petroleum being transacted. @@ -32,6 +32,69 @@ Source : http://www.unece.org/trade/untdid/d97b/uncl/uncl5153.htm --> A tax levied on tobacco products. + + tax_type + AAE + Energy fee + General fee or tax for the use of energy. + + + + tax_type + AAF + Coffee tax + A tax levied specifically on coffee products. + + + + tax_type + AAG + Harmonised sales tax, Canadian + A harmonized sales tax consisting of a goods and service tax, a Canadian provincial sales tax and, as applicable, a Quebec sales tax which is recoverable. + + + + tax_type + AAH + Quebec sales tax + A sales tax charged within the Canadian province of Quebec which is recoverable. + + + + tax_type + AAI + Canadian provincial sales tax + A sales tax charged within Canadian provinces which is non-recoverable. + + + + tax_type + AAJ + Tax on replacement part + A tax levied on a replacement part, where the original part is returned. + + + + tax_type + AAK + Mineral oil tax + Tax that is levied specifically on products containing mineral oil. + + + + tax_type + AAL + Special tax + To indicate a special type of tax. + + + + tax_type + AAM + Insurance tax + A tax levied specifically on insurances. + + tax_type ADD @@ -57,7 +120,7 @@ Source : http://www.unece.org/trade/untdid/d97b/uncl/uncl5153.htm --> tax_type CAR Car tax - Self explanatory. + A tax that is levied on the value of the automobile. @@ -120,7 +183,7 @@ Source : http://www.unece.org/trade/untdid/d97b/uncl/uncl5153.htm --> tax_type FRE Free - Self explanatory. + No tax levied. @@ -155,7 +218,7 @@ Source : http://www.unece.org/trade/untdid/d97b/uncl/uncl5153.htm --> tax_type IND Individual tax - Self explanatory. + A tax levied based on an individual's ability to pay. @@ -232,7 +295,7 @@ Source : http://www.unece.org/trade/untdid/d97b/uncl/uncl5153.htm --> tax_type PRF Preference duty - Self explanatory. + Duties laid down in the Customs tariff, to which goods are liable on entering or leaving the Customs territory falling under a preferential regime such as Generalised System of Preferences (GSP). @@ -274,21 +337,21 @@ Source : http://www.unece.org/trade/untdid/d97b/uncl/uncl5153.htm --> tax_type SWT Shifted wage tax - Wage tax share of the invoice amount to be paid directly to the tax collector(s office). + Wage tax share of the invoice amount to be paid directly to the tax collector's office). tax_type TAC Alcohol mark tax - Self explanatory. + A tax levied based on the type of alcohol being obtained. tax_type TOT Total - Self explanatory. + The summary amount of all taxes. diff --git a/account_tax_unece/models/account_tax.py b/account_tax_unece/models/account_tax.py index 78ae51bc..ba7a01ab 100644 --- a/account_tax_unece/models/account_tax.py +++ b/account_tax_unece/models/account_tax.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © 2016 Akretion (http://www.akretion.com) +# © 2016-2017 Akretion (http://www.akretion.com) # @author: Alexis de Lattre # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). @@ -16,7 +16,7 @@ class AccountTax(models.Model): "nomenclature of the United Nations Economic " "Commission for Europe (UNECE), DataElement 5153") unece_type_code = fields.Char( - related='unece_type_id.code', store=True, + related='unece_type_id.code', store=True, readonly=True, string='UNECE Type Code') unece_categ_id = fields.Many2one( 'unece.code.list', string='UNECE Tax Category', @@ -25,5 +25,17 @@ class AccountTax(models.Model): "nomenclature of the United Nations Economic " "Commission for Europe (UNECE), DataElement 5305") unece_categ_code = fields.Char( - related='unece_categ_id.code', store=True, + related='unece_categ_id.code', store=True, readonly=True, string='UNECE Category Code') + unece_due_date_id = fields.Many2one( + 'unece.code.list', string='UNECE Due Date', + domain=[('type', '=', 'date')], ondelete='restrict', + help="Select the due date of that tax from the official " + "nomenclature of the United Nations Economic " + "Commission for Europe (UNECE), DataElement 2005. For a " + "sale VAT tax, it is the date on which that VAT is due to the " + "fiscal administration. For a purchase VAT tax, it is the date " + "on which that VAT can be deducted.") + unece_due_date_code = fields.Char( + related='unece_due_date_id.code', store=True, readonly=True, + string='UNECE Due Date Code') diff --git a/account_tax_unece/models/unece_code_list.py b/account_tax_unece/models/unece_code_list.py index 1f4e51c9..04ca136a 100644 --- a/account_tax_unece/models/unece_code_list.py +++ b/account_tax_unece/models/unece_code_list.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © 2016 Akretion (http://www.akretion.com) +# © 2016-2017 Akretion (http://www.akretion.com) # @author: Alexis de Lattre # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). @@ -12,4 +12,5 @@ class UneceCodeList(models.Model): type = fields.Selection(selection_add=[ ('tax_type', 'Tax Types (UNCL 5153)'), ('tax_categ', 'Tax Categories (UNCL 5305)'), + ('date', 'Date, Time or Period Qualifier (UNTDID 2005)'), ]) diff --git a/account_tax_unece/views/account_tax.xml b/account_tax_unece/views/account_tax.xml index 490d468d..93c8533d 100644 --- a/account_tax_unece/views/account_tax.xml +++ b/account_tax_unece/views/account_tax.xml @@ -1,6 +1,6 @@ @@ -16,6 +16,7 @@ + From 0b3b92dc4b01b053889d1865f696e1980940bb56 Mon Sep 17 00:00:00 2001 From: Andrea Date: Thu, 18 Jan 2018 16:03:55 +0100 Subject: [PATCH 05/29] [11.0][MIG] account_tax_unece: porting to V11 --- account_tax_unece/README.rst | 8 ++++---- account_tax_unece/__init__.py | 2 +- account_tax_unece/__manifest__.py | 7 +++---- account_tax_unece/models/__init__.py | 2 +- account_tax_unece/models/account_tax.py | 5 ++--- account_tax_unece/models/account_tax_template.py | 10 ++++++---- account_tax_unece/models/unece_code_list.py | 5 ++--- account_tax_unece/views/account_tax.xml | 2 +- 8 files changed, 20 insertions(+), 21 deletions(-) diff --git a/account_tax_unece/README.rst b/account_tax_unece/README.rst index ee88cc11..f0e8ad51 100644 --- a/account_tax_unece/README.rst +++ b/account_tax_unece/README.rst @@ -1,5 +1,5 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl :alt: License: AGPL-3 ============= @@ -26,7 +26,7 @@ Usage .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/101/10.0 + :target: https://runbot.odoo-community.org/runbot/101/11.0 Bug Tracker =========== @@ -34,7 +34,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed feedback. +help us smash it by providing detailed and welcomed feedback. Credits ======= diff --git a/account_tax_unece/__init__.py b/account_tax_unece/__init__.py index cde864ba..31660d6a 100644 --- a/account_tax_unece/__init__.py +++ b/account_tax_unece/__init__.py @@ -1,3 +1,3 @@ -# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import models diff --git a/account_tax_unece/__manifest__.py b/account_tax_unece/__manifest__.py index 275957fa..dbc4a56f 100644 --- a/account_tax_unece/__manifest__.py +++ b/account_tax_unece/__manifest__.py @@ -1,11 +1,10 @@ -# -*- coding: utf-8 -*- -# © 2016 Akretion (http://www.akretion.com) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +# Copyright 2016 Akretion (http://www.akretion.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). # @author Alexis de Lattre { 'name': 'Account Tax UNECE', - 'version': '10.0.1.1.1', + 'version': '11.0.1.1.1', 'category': 'Accounting & Finance', 'license': 'AGPL-3', 'summary': 'UNECE nomenclature for taxes', diff --git a/account_tax_unece/models/__init__.py b/account_tax_unece/models/__init__.py index fd6b4fa2..b2b7c90d 100644 --- a/account_tax_unece/models/__init__.py +++ b/account_tax_unece/models/__init__.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import unece_code_list from . import account_tax diff --git a/account_tax_unece/models/account_tax.py b/account_tax_unece/models/account_tax.py index ba7a01ab..c951fea7 100644 --- a/account_tax_unece/models/account_tax.py +++ b/account_tax_unece/models/account_tax.py @@ -1,7 +1,6 @@ -# -*- coding: utf-8 -*- -# © 2016-2017 Akretion (http://www.akretion.com) +# Copyright 2016-2017 Akretion (http://www.akretion.com) # @author: Alexis de Lattre -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import models, fields diff --git a/account_tax_unece/models/account_tax_template.py b/account_tax_unece/models/account_tax_template.py index d21a3004..c6d74234 100644 --- a/account_tax_unece/models/account_tax_template.py +++ b/account_tax_unece/models/account_tax_template.py @@ -1,6 +1,5 @@ -# -*- coding: utf-8 -*- # Copyright 2017 Onestein () -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import fields, models @@ -23,9 +22,12 @@ class AccountTaxTemplate(models.Model): "Commission for Europe (UNECE), DataElement 5305" ) - def _get_tax_vals(self, company): + def _get_tax_vals(self, company, tax_template_to_tax): self.ensure_one() - res = super(AccountTaxTemplate, self)._get_tax_vals(company) + res = super(AccountTaxTemplate, self)._get_tax_vals( + company, + tax_template_to_tax + ) res['unece_type_id'] = self.unece_type_id.id or False res['unece_categ_id'] = self.unece_categ_id.id or False return res diff --git a/account_tax_unece/models/unece_code_list.py b/account_tax_unece/models/unece_code_list.py index 04ca136a..796c4e09 100644 --- a/account_tax_unece/models/unece_code_list.py +++ b/account_tax_unece/models/unece_code_list.py @@ -1,7 +1,6 @@ -# -*- coding: utf-8 -*- -# © 2016-2017 Akretion (http://www.akretion.com) +# Copyright 2016-2017 Akretion (http://www.akretion.com) # @author: Alexis de Lattre -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import models, fields diff --git a/account_tax_unece/views/account_tax.xml b/account_tax_unece/views/account_tax.xml index 93c8533d..5b821484 100644 --- a/account_tax_unece/views/account_tax.xml +++ b/account_tax_unece/views/account_tax.xml @@ -1,6 +1,6 @@ From 6d3d06f69823459738064d12137e1df3b1156623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levent=20Karaka=C5=9F?= Date: Sun, 16 Dec 2018 18:25:51 +0300 Subject: [PATCH 06/29] [MIG] account_tax_unece: Migration to 12.0 --- account_tax_unece/README.rst | 4 +- account_tax_unece/__manifest__.py | 2 +- account_tax_unece/tests/__init__.py | 3 + .../tests/test_account_invoice.py | 94 +++++++++++++++++++ 4 files changed, 100 insertions(+), 3 deletions(-) create mode 100755 account_tax_unece/tests/__init__.py create mode 100755 account_tax_unece/tests/test_account_invoice.py diff --git a/account_tax_unece/README.rst b/account_tax_unece/README.rst index f0e8ad51..28a636bc 100644 --- a/account_tax_unece/README.rst +++ b/account_tax_unece/README.rst @@ -26,7 +26,7 @@ Usage .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/101/11.0 + :target: https://runbot.odoo-community.org/runbot/101/12.0 Bug Tracker =========== @@ -58,4 +58,4 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit https://odoo-community.org. +To contribute to this module, please visit https://odoo-community.org. diff --git a/account_tax_unece/__manifest__.py b/account_tax_unece/__manifest__.py index dbc4a56f..eb3c0d66 100644 --- a/account_tax_unece/__manifest__.py +++ b/account_tax_unece/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Account Tax UNECE', - 'version': '11.0.1.1.1', + 'version': '12.0.1.0.0', 'category': 'Accounting & Finance', 'license': 'AGPL-3', 'summary': 'UNECE nomenclature for taxes', diff --git a/account_tax_unece/tests/__init__.py b/account_tax_unece/tests/__init__.py new file mode 100755 index 00000000..383b00bc --- /dev/null +++ b/account_tax_unece/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import test_account_invoice diff --git a/account_tax_unece/tests/test_account_invoice.py b/account_tax_unece/tests/test_account_invoice.py new file mode 100755 index 00000000..b51fba82 --- /dev/null +++ b/account_tax_unece/tests/test_account_invoice.py @@ -0,0 +1,94 @@ +# Copyright 2017 Akretion (Alexis de Lattre ) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo.tests.common import HttpCase + + +class TestAccountInvoice(HttpCase): + + # Since odoo v9, there are no more demo invoices. + # This method is used by both account_invoice_ubl and + # account_invoice_factur-x. As those 2 modules use account_payment_unece, + # it allows to factorise the code. + # Creating a new invoice in automated tests requires so many lines of code + # that I decided to mutualise the code here. + def test_only_create_invoice( + self, product=False, qty=1, price=12.42, discount=0, + validate=True): + aio = self.env['account.invoice'] + ailo = self.env['account.invoice.line'] + aao = self.env['account.account'] + ato = self.env['account.tax'] + company = self.env.ref('base.main_company') + account_receivable = aao.search([ + ('code', '=', '411100'), + ('company_id', '=', company.id), + ], limit=1) + if not account_receivable: + account_receivable = aao.create({ + "code": '411100', + "name": "Debtors - (test)", + "company_id": company.id, + "reconcile": True, + "user_type_id": + self.env.ref('account.data_account_type_receivable').id, + }) + account_revenue = aao.search([ + ('code', '=', '707100'), + ('company_id', '=', company.id), + ], limit=1) + if not account_revenue: + account_revenue = aao.create({ + "code": '707100', + "name": "Product Sales - (test)", + "company_id": company.id, + "user_type_id": + self.env.ref('account.data_account_type_revenue').id, + }) + taxes = ato.search([ + ('company_id', '=', company.id), + ('type_tax_use', '=', 'sale'), + ('unece_type_id', '!=', False), + ('unece_categ_id', '!=', False), + ('amount_type', '=', 'percent')]) + if taxes: + tax = taxes[0] + else: + unece_type_id = self.env.ref('account_tax_unece.tax_type_vat').id + unece_categ_id = self.env.ref('account_tax_unece.tax_categ_s').id + tax = ato.create({ + 'name': u'German VAT purchase 18.0%', + 'description': 'DE-VAT-sale-18.0', + 'company_id': company.id, + 'type_tax_use': 'sale', + 'price_include': False, + 'amount': 18, + 'amount_type': 'percent', + 'unece_type_id': unece_type_id, + 'unece_categ_id': unece_categ_id, + }) + # validate invoice + invoice = aio.create({ + 'partner_id': self.env.ref("base.res_partner_2").id, + 'currency_id': self.env.ref("base.EUR").id, + 'type': 'out_invoice', + 'company_id': company.id, + 'account_id': account_receivable.id, + 'name': 'SO1242', + }) + if not product: + product = self.env.ref("product.product_product_4") + ailo.create({ + 'product_id': product.id, + 'uom_id': product.uom_id.id, + 'quantity': qty, + 'price_unit': price, + 'discount': discount, + 'invoice_id': invoice.id, + 'name': product.name, + 'account_id': account_revenue.id, + 'invoice_line_tax_ids': [(6, 0, [tax.id])], + }) + if validate: + invoice.action_invoice_open() + return invoice From 8197ecf62c4bc04cf4fa90bd71e4fca46d526255 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 20 Feb 2019 11:50:31 +0100 Subject: [PATCH 07/29] Add unece_due_date_id on account.tax.template --- account_tax_unece/models/account_tax_template.py | 11 +++++++++++ account_tax_unece/views/account_tax_template.xml | 1 + 2 files changed, 12 insertions(+) diff --git a/account_tax_unece/models/account_tax_template.py b/account_tax_unece/models/account_tax_template.py index c6d74234..149f8c1c 100644 --- a/account_tax_unece/models/account_tax_template.py +++ b/account_tax_unece/models/account_tax_template.py @@ -21,6 +21,16 @@ class AccountTaxTemplate(models.Model): "nomenclature of the United Nations Economic " "Commission for Europe (UNECE), DataElement 5305" ) + unece_due_date_id = fields.Many2one( + 'unece.code.list', string='UNECE Due Date', + domain=[('type', '=', 'date')], + help="Select the due date of that tax from the official " + "nomenclature of the United Nations Economic " + "Commission for Europe (UNECE), DataElement 2005. For a " + "sale VAT tax, it is the date on which that VAT is due to the " + "fiscal administration. For a purchase VAT tax, it is the date " + "on which that VAT can be deducted." + ) def _get_tax_vals(self, company, tax_template_to_tax): self.ensure_one() @@ -30,4 +40,5 @@ def _get_tax_vals(self, company, tax_template_to_tax): ) res['unece_type_id'] = self.unece_type_id.id or False res['unece_categ_id'] = self.unece_categ_id.id or False + res['unece_due_date_id'] = self.unece_due_date_id.id or False return res diff --git a/account_tax_unece/views/account_tax_template.xml b/account_tax_unece/views/account_tax_template.xml index 1072bda2..c60bc8c4 100644 --- a/account_tax_unece/views/account_tax_template.xml +++ b/account_tax_unece/views/account_tax_template.xml @@ -14,6 +14,7 @@ + From 70b262791142272bf0d63c4a1a85cd2921bfe30a Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Fri, 22 Feb 2019 16:47:14 +0100 Subject: [PATCH 08/29] [IMP] account_tax_unece: README by fragments --- account_tax_unece/README.rst | 104 ++-- account_tax_unece/i18n/account_tax_unece.pot | 111 +++++ account_tax_unece/readme/CONFIGURE.rst | 7 + account_tax_unece/readme/CONTRIBUTORS.rst | 4 + account_tax_unece/readme/DESCRIPTION.rst | 17 + account_tax_unece/static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 451 ++++++++++++++++++ 7 files changed, 663 insertions(+), 31 deletions(-) create mode 100644 account_tax_unece/i18n/account_tax_unece.pot create mode 100644 account_tax_unece/readme/CONFIGURE.rst create mode 100644 account_tax_unece/readme/CONTRIBUTORS.rst create mode 100644 account_tax_unece/readme/DESCRIPTION.rst create mode 100644 account_tax_unece/static/description/icon.png create mode 100644 account_tax_unece/static/description/index.html diff --git a/account_tax_unece/README.rst b/account_tax_unece/README.rst index 28a636bc..22b2fe02 100644 --- a/account_tax_unece/README.rst +++ b/account_tax_unece/README.rst @@ -1,61 +1,103 @@ -.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png - :target: https://www.gnu.org/licenses/agpl - :alt: License: AGPL-3 - -============= -Account UNECE -============= - -This module adds two fields *UNECE Type Code* and *UNECE Category Code* on taxes to allow the use of the standards written by the `United Nations Economic Commission for Europe `_ (which has 56 members states in Europe, America and Central Asia, cf `Wikipedia `_): - -* the UNECE Tax Type code is defined in the `DataElement 5153 `_, -* the UNECE Tax Category Code is defined in the `DataElement 5305 `_. - -This codification is part of the UNCL (United Nations Code List). This codification is used for example in the two main international standards for electronic invoicing: +================= +Account Tax UNECE +================= + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcommunity--data--files-lightgray.png?logo=github + :target: https://github.com/OCA/community-data-files/tree/12.0/account_tax_unece + :alt: OCA/community-data-files +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/community-data-files-12-0/community-data-files-12-0-account_tax_unece + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/101/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module adds two fields *UNECE Type Code* and *UNECE Category Code* on +taxes to allow the use of the standards written by the +`United Nations Economic Commission for Europe `_ (which +has 56 members states in Europe, America and Central Asia, cf +`Wikipedia `_): + +* the UNECE Tax Type code is defined in the + `DataElement 5153 `_, +* the UNECE Tax Category Code is defined in the + `DataElement 5305 `_. + +This codification is part of the UNCL (United Nations Code List). This +codification is used for example in the two main international standards for +electronic invoicing: * `Cross Industry Invoice `_ (CII), * `Universal Business Language `_ (UBL). +**Table of contents** + +.. contents:: + :local: + Configuration ============= -Go to the menu *Accounting > Configuration > Accounting > Taxes* and configure the *UNECE Type Code* (the value should be *VAT* for most of your taxes) and the *UNECE Category Code*. - -Usage -===== +#. Go to the menu *Accounting > Configuration > Accounting > Taxes* +#. Set the field *UNECE Type Code* (the value should be *VAT* for most of your + taxes). +#. Set the field *UNECE Category Code*. -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/101/12.0 +There are localization modules that fill this information for specific chart +of accounts, so this step shouldn't be needed if installed. Bug Tracker =========== -Bugs are tracked on `GitHub Issues -`_. In case of trouble, please -check there if your issue has already been reported. If you spotted it first, -help us smash it by providing detailed and welcomed feedback. +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= +Authors +~~~~~~~ + +* Akretion + Contributors ------------- +~~~~~~~~~~~~ * Alexis de Lattre * Andrea Stirpe +* Levent Karakaş +* Pedro M. Baeza + +Maintainers +~~~~~~~~~~~ -Maintainer ----------- +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit https://odoo-community.org. +This module is part of the `OCA/community-data-files `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_tax_unece/i18n/account_tax_unece.pot b/account_tax_unece/i18n/account_tax_unece.pot new file mode 100644 index 00000000..8999a149 --- /dev/null +++ b/account_tax_unece/i18n/account_tax_unece.pot @@ -0,0 +1,111 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_tax_unece +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_tax_unece +#: selection:unece.code.list,type:0 +msgid "Date, Time or Period Qualifier (UNTDID 2005)" +msgstr "" + +#. module: account_tax_unece +#: selection:unece.code.list,type:0 +msgid "Payment Means (UNCL 4461)" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,help:account_tax_unece.field_account_tax__unece_categ_id +#: model:ir.model.fields,help:account_tax_unece.field_account_tax_template__unece_categ_id +msgid "Select the Tax Category Code of the official nomenclature of the United Nations Economic Commission for Europe (UNECE), DataElement 5305" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,help:account_tax_unece.field_account_tax__unece_type_id +#: model:ir.model.fields,help:account_tax_unece.field_account_tax_template__unece_type_id +msgid "Select the Tax Type Code of the official nomenclature of the United Nations Economic Commission for Europe (UNECE), DataElement 5153" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,help:account_tax_unece.field_account_tax__unece_due_date_id +#: model:ir.model.fields,help:account_tax_unece.field_account_tax_template__unece_due_date_id +msgid "Select the due date of that tax from the official nomenclature of the United Nations Economic Commission for Europe (UNECE), DataElement 2005. For a sale VAT tax, it is the date on which that VAT is due to the fiscal administration. For a purchase VAT tax, it is the date on which that VAT can be deducted." +msgstr "" + +#. module: account_tax_unece +#: model:ir.model,name:account_tax_unece.model_account_tax +msgid "Tax" +msgstr "" + +#. module: account_tax_unece +#: selection:unece.code.list,type:0 +msgid "Tax Categories (UNCL 5305)" +msgstr "" + +#. module: account_tax_unece +#: selection:unece.code.list,type:0 +msgid "Tax Types (UNCL 5153)" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model,name:account_tax_unece.model_account_tax_template +msgid "Templates for Taxes" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_unece_code_list__type +msgid "Type" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_categ_code +msgid "UNECE Category Code" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_due_date_id +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__unece_due_date_id +msgid "UNECE Due Date" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_due_date_code +msgid "UNECE Due Date Code" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_categ_id +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__unece_categ_id +msgid "UNECE Tax Category" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_type_id +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__unece_type_id +msgid "UNECE Tax Type" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_type_code +msgid "UNECE Type Code" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model,name:account_tax_unece.model_unece_code_list +msgid "UNECE nomenclatures" +msgstr "" + +#. module: account_tax_unece +#: model_terms:ir.ui.view,arch_db:account_tax_unece.view_tax_template_form +msgid "Unece" +msgstr "" + diff --git a/account_tax_unece/readme/CONFIGURE.rst b/account_tax_unece/readme/CONFIGURE.rst new file mode 100644 index 00000000..850eb6e8 --- /dev/null +++ b/account_tax_unece/readme/CONFIGURE.rst @@ -0,0 +1,7 @@ +#. Go to the menu *Accounting > Configuration > Accounting > Taxes* +#. Set the field *UNECE Type Code* (the value should be *VAT* for most of your + taxes). +#. Set the field *UNECE Category Code*. + +There are localization modules that fill this information for specific chart +of accounts, so this step shouldn't be needed if installed. diff --git a/account_tax_unece/readme/CONTRIBUTORS.rst b/account_tax_unece/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..d61ce358 --- /dev/null +++ b/account_tax_unece/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* Alexis de Lattre +* Andrea Stirpe +* Levent Karakaş +* Pedro M. Baeza diff --git a/account_tax_unece/readme/DESCRIPTION.rst b/account_tax_unece/readme/DESCRIPTION.rst new file mode 100644 index 00000000..2790dfdc --- /dev/null +++ b/account_tax_unece/readme/DESCRIPTION.rst @@ -0,0 +1,17 @@ +This module adds two fields *UNECE Type Code* and *UNECE Category Code* on +taxes to allow the use of the standards written by the +`United Nations Economic Commission for Europe `_ (which +has 56 members states in Europe, America and Central Asia, cf +`Wikipedia `_): + +* the UNECE Tax Type code is defined in the + `DataElement 5153 `_, +* the UNECE Tax Category Code is defined in the + `DataElement 5305 `_. + +This codification is part of the UNCL (United Nations Code List). This +codification is used for example in the two main international standards for +electronic invoicing: + +* `Cross Industry Invoice `_ (CII), +* `Universal Business Language `_ (UBL). diff --git a/account_tax_unece/static/description/icon.png b/account_tax_unece/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 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 z 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 Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/account_tax_unece/static/description/index.html b/account_tax_unece/static/description/index.html new file mode 100644 index 00000000..e6b68747 --- /dev/null +++ b/account_tax_unece/static/description/index.html @@ -0,0 +1,451 @@ + + + + + + +Account Tax UNECE + + + +
+

Account Tax UNECE

+ + +

Beta License: AGPL-3 OCA/community-data-files Translate me on Weblate Try me on Runbot

+

This module adds two fields UNECE Type Code and UNECE Category Code on +taxes to allow the use of the standards written by the +United Nations Economic Commission for Europe (which +has 56 members states in Europe, America and Central Asia, cf +Wikipedia):

+ +

This codification is part of the UNCL (United Nations Code List). This +codification is used for example in the two main international standards for +electronic invoicing:

+ +

Table of contents

+ +
+

Configuration

+
    +
  1. Go to the menu Accounting > Configuration > Accounting > Taxes
  2. +
  3. Set the field UNECE Type Code (the value should be VAT for most of your +taxes).
  4. +
  5. Set the field UNECE Category Code.
  6. +
+

There are localization modules that fill this information for specific chart +of accounts, so this step shouldn’t be needed if installed.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Akretion
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/community-data-files project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + From eecc15ea1df10c25e13ff89625b92aa8a2021e4c Mon Sep 17 00:00:00 2001 From: Andrea Date: Wed, 23 Oct 2019 11:11:42 +0200 Subject: [PATCH 09/29] [13.0][MIG] account_tax_unece --- account_tax_unece/README.rst | 10 +- account_tax_unece/__manifest__.py | 32 ++-- account_tax_unece/i18n/account_tax_unece.pot | 33 ++-- account_tax_unece/models/account_tax.py | 52 ++++-- .../models/account_tax_template.py | 36 ++-- account_tax_unece/models/unece_code_list.py | 16 +- .../static/description/index.html | 6 +- account_tax_unece/tests/__init__.py | 0 .../tests/test_account_invoice.py | 158 ++++++++++-------- 9 files changed, 192 insertions(+), 151 deletions(-) mode change 100755 => 100644 account_tax_unece/tests/__init__.py mode change 100755 => 100644 account_tax_unece/tests/test_account_invoice.py diff --git a/account_tax_unece/README.rst b/account_tax_unece/README.rst index 22b2fe02..10b1868b 100644 --- a/account_tax_unece/README.rst +++ b/account_tax_unece/README.rst @@ -14,13 +14,13 @@ Account Tax UNECE :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcommunity--data--files-lightgray.png?logo=github - :target: https://github.com/OCA/community-data-files/tree/12.0/account_tax_unece + :target: https://github.com/OCA/community-data-files/tree/13.0/account_tax_unece :alt: OCA/community-data-files .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/community-data-files-12-0/community-data-files-12-0-account_tax_unece + :target: https://translation.odoo-community.org/projects/community-data-files-13-0/community-data-files-13-0-account_tax_unece :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/101/12.0 + :target: https://runbot.odoo-community.org/runbot/101/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -65,7 +65,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -98,6 +98,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/community-data-files `_ project on GitHub. +This module is part of the `OCA/community-data-files `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_tax_unece/__manifest__.py b/account_tax_unece/__manifest__.py index eb3c0d66..9269ee43 100644 --- a/account_tax_unece/__manifest__.py +++ b/account_tax_unece/__manifest__.py @@ -3,20 +3,20 @@ # @author Alexis de Lattre { - 'name': 'Account Tax UNECE', - 'version': '12.0.1.0.0', - 'category': 'Accounting & Finance', - 'license': 'AGPL-3', - 'summary': 'UNECE nomenclature for taxes', - 'author': 'Akretion,Odoo Community Association (OCA)', - 'website': 'http://www.akretion.com', - 'depends': ['account', 'base_unece'], - 'data': [ - 'views/account_tax.xml', - 'views/account_tax_template.xml', - 'data/unece_tax_type.xml', - 'data/unece_tax_categ.xml', - 'data/unece_date.xml', - ], - 'installable': True, + "name": "Account Tax UNECE", + "version": "13.0.1.0.0", + "category": "Accounting & Finance", + "license": "AGPL-3", + "summary": "UNECE nomenclature for taxes", + "author": "Akretion,Odoo Community Association (OCA)", + "website": "http://www.akretion.com", + "depends": ["account", "base_unece"], + "data": [ + "views/account_tax.xml", + "views/account_tax_template.xml", + "data/unece_tax_type.xml", + "data/unece_tax_categ.xml", + "data/unece_date.xml", + ], + "installable": True, } diff --git a/account_tax_unece/i18n/account_tax_unece.pot b/account_tax_unece/i18n/account_tax_unece.pot index 8999a149..4a6618b7 100644 --- a/account_tax_unece/i18n/account_tax_unece.pot +++ b/account_tax_unece/i18n/account_tax_unece.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * account_tax_unece +# * account_tax_unece # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -14,31 +14,35 @@ msgstr "" "Plural-Forms: \n" #. module: account_tax_unece -#: selection:unece.code.list,type:0 +#: model:ir.model.fields.selection,name:account_tax_unece.selection__unece_code_list__type__date msgid "Date, Time or Period Qualifier (UNTDID 2005)" msgstr "" -#. module: account_tax_unece -#: selection:unece.code.list,type:0 -msgid "Payment Means (UNCL 4461)" -msgstr "" - #. module: account_tax_unece #: model:ir.model.fields,help:account_tax_unece.field_account_tax__unece_categ_id #: model:ir.model.fields,help:account_tax_unece.field_account_tax_template__unece_categ_id -msgid "Select the Tax Category Code of the official nomenclature of the United Nations Economic Commission for Europe (UNECE), DataElement 5305" +msgid "" +"Select the Tax Category Code of the official nomenclature of the United " +"Nations Economic Commission for Europe (UNECE), DataElement 5305" msgstr "" #. module: account_tax_unece #: model:ir.model.fields,help:account_tax_unece.field_account_tax__unece_type_id #: model:ir.model.fields,help:account_tax_unece.field_account_tax_template__unece_type_id -msgid "Select the Tax Type Code of the official nomenclature of the United Nations Economic Commission for Europe (UNECE), DataElement 5153" +msgid "" +"Select the Tax Type Code of the official nomenclature of the United Nations " +"Economic Commission for Europe (UNECE), DataElement 5153" msgstr "" #. module: account_tax_unece #: model:ir.model.fields,help:account_tax_unece.field_account_tax__unece_due_date_id #: model:ir.model.fields,help:account_tax_unece.field_account_tax_template__unece_due_date_id -msgid "Select the due date of that tax from the official nomenclature of the United Nations Economic Commission for Europe (UNECE), DataElement 2005. For a sale VAT tax, it is the date on which that VAT is due to the fiscal administration. For a purchase VAT tax, it is the date on which that VAT can be deducted." +msgid "" +"Select the due date of that tax from the official nomenclature of the United" +" Nations Economic Commission for Europe (UNECE), DataElement 2005. For a " +"sale VAT tax, it is the date on which that VAT is due to the fiscal " +"administration. For a purchase VAT tax, it is the date on which that VAT can" +" be deducted." msgstr "" #. module: account_tax_unece @@ -47,12 +51,12 @@ msgid "Tax" msgstr "" #. module: account_tax_unece -#: selection:unece.code.list,type:0 +#: model:ir.model.fields.selection,name:account_tax_unece.selection__unece_code_list__type__tax_categ msgid "Tax Categories (UNCL 5305)" msgstr "" #. module: account_tax_unece -#: selection:unece.code.list,type:0 +#: model:ir.model.fields.selection,name:account_tax_unece.selection__unece_code_list__type__tax_type msgid "Tax Types (UNCL 5153)" msgstr "" @@ -108,4 +112,3 @@ msgstr "" #: model_terms:ir.ui.view,arch_db:account_tax_unece.view_tax_template_form msgid "Unece" msgstr "" - diff --git a/account_tax_unece/models/account_tax.py b/account_tax_unece/models/account_tax.py index c951fea7..2f86b97b 100644 --- a/account_tax_unece/models/account_tax.py +++ b/account_tax_unece/models/account_tax.py @@ -2,39 +2,57 @@ # @author: Alexis de Lattre # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo import models, fields +from odoo import fields, models class AccountTax(models.Model): - _inherit = 'account.tax' + _inherit = "account.tax" unece_type_id = fields.Many2one( - 'unece.code.list', string='UNECE Tax Type', - domain=[('type', '=', 'tax_type')], ondelete='restrict', + "unece.code.list", + string="UNECE Tax Type", + domain=[("type", "=", "tax_type")], + ondelete="restrict", help="Select the Tax Type Code of the official " "nomenclature of the United Nations Economic " - "Commission for Europe (UNECE), DataElement 5153") + "Commission for Europe (UNECE), DataElement 5153", + ) unece_type_code = fields.Char( - related='unece_type_id.code', store=True, readonly=True, - string='UNECE Type Code') + related="unece_type_id.code", + store=True, + readonly=True, + string="UNECE Type Code", + ) unece_categ_id = fields.Many2one( - 'unece.code.list', string='UNECE Tax Category', - domain=[('type', '=', 'tax_categ')], ondelete='restrict', + "unece.code.list", + string="UNECE Tax Category", + domain=[("type", "=", "tax_categ")], + ondelete="restrict", help="Select the Tax Category Code of the official " "nomenclature of the United Nations Economic " - "Commission for Europe (UNECE), DataElement 5305") + "Commission for Europe (UNECE), DataElement 5305", + ) unece_categ_code = fields.Char( - related='unece_categ_id.code', store=True, readonly=True, - string='UNECE Category Code') + related="unece_categ_id.code", + store=True, + readonly=True, + string="UNECE Category Code", + ) unece_due_date_id = fields.Many2one( - 'unece.code.list', string='UNECE Due Date', - domain=[('type', '=', 'date')], ondelete='restrict', + "unece.code.list", + string="UNECE Due Date", + domain=[("type", "=", "date")], + ondelete="restrict", help="Select the due date of that tax from the official " "nomenclature of the United Nations Economic " "Commission for Europe (UNECE), DataElement 2005. For a " "sale VAT tax, it is the date on which that VAT is due to the " "fiscal administration. For a purchase VAT tax, it is the date " - "on which that VAT can be deducted.") + "on which that VAT can be deducted.", + ) unece_due_date_code = fields.Char( - related='unece_due_date_id.code', store=True, readonly=True, - string='UNECE Due Date Code') + related="unece_due_date_id.code", + store=True, + readonly=True, + string="UNECE Due Date Code", + ) diff --git a/account_tax_unece/models/account_tax_template.py b/account_tax_unece/models/account_tax_template.py index 149f8c1c..372b960d 100644 --- a/account_tax_unece/models/account_tax_template.py +++ b/account_tax_unece/models/account_tax_template.py @@ -1,44 +1,44 @@ -# Copyright 2017 Onestein () +# Copyright 2017-2019 Onestein () # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import fields, models class AccountTaxTemplate(models.Model): - _inherit = 'account.tax.template' + _inherit = "account.tax.template" unece_type_id = fields.Many2one( - 'unece.code.list', string='UNECE Tax Type', - domain=[('type', '=', 'tax_type')], + "unece.code.list", + string="UNECE Tax Type", + domain=[("type", "=", "tax_type")], help="Select the Tax Type Code of the official " "nomenclature of the United Nations Economic " - "Commission for Europe (UNECE), DataElement 5153" + "Commission for Europe (UNECE), DataElement 5153", ) unece_categ_id = fields.Many2one( - 'unece.code.list', string='UNECE Tax Category', - domain=[('type', '=', 'tax_categ')], + "unece.code.list", + string="UNECE Tax Category", + domain=[("type", "=", "tax_categ")], help="Select the Tax Category Code of the official " "nomenclature of the United Nations Economic " - "Commission for Europe (UNECE), DataElement 5305" + "Commission for Europe (UNECE), DataElement 5305", ) unece_due_date_id = fields.Many2one( - 'unece.code.list', string='UNECE Due Date', - domain=[('type', '=', 'date')], + "unece.code.list", + string="UNECE Due Date", + domain=[("type", "=", "date")], help="Select the due date of that tax from the official " "nomenclature of the United Nations Economic " "Commission for Europe (UNECE), DataElement 2005. For a " "sale VAT tax, it is the date on which that VAT is due to the " "fiscal administration. For a purchase VAT tax, it is the date " - "on which that VAT can be deducted." + "on which that VAT can be deducted.", ) def _get_tax_vals(self, company, tax_template_to_tax): self.ensure_one() - res = super(AccountTaxTemplate, self)._get_tax_vals( - company, - tax_template_to_tax - ) - res['unece_type_id'] = self.unece_type_id.id or False - res['unece_categ_id'] = self.unece_categ_id.id or False - res['unece_due_date_id'] = self.unece_due_date_id.id or False + res = super()._get_tax_vals(company, tax_template_to_tax) + res["unece_type_id"] = self.unece_type_id.id + res["unece_categ_id"] = self.unece_categ_id.id + res["unece_due_date_id"] = self.unece_due_date_id.id return res diff --git a/account_tax_unece/models/unece_code_list.py b/account_tax_unece/models/unece_code_list.py index 796c4e09..f5c374b1 100644 --- a/account_tax_unece/models/unece_code_list.py +++ b/account_tax_unece/models/unece_code_list.py @@ -2,14 +2,16 @@ # @author: Alexis de Lattre # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo import models, fields +from odoo import fields, models class UneceCodeList(models.Model): - _inherit = 'unece.code.list' + _inherit = "unece.code.list" - type = fields.Selection(selection_add=[ - ('tax_type', 'Tax Types (UNCL 5153)'), - ('tax_categ', 'Tax Categories (UNCL 5305)'), - ('date', 'Date, Time or Period Qualifier (UNTDID 2005)'), - ]) + type = fields.Selection( + selection_add=[ + ("tax_type", "Tax Types (UNCL 5153)"), + ("tax_categ", "Tax Categories (UNCL 5305)"), + ("date", "Date, Time or Period Qualifier (UNTDID 2005)"), + ] + ) diff --git a/account_tax_unece/static/description/index.html b/account_tax_unece/static/description/index.html index e6b68747..8f20544f 100644 --- a/account_tax_unece/static/description/index.html +++ b/account_tax_unece/static/description/index.html @@ -367,7 +367,7 @@

Account Tax UNECE

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/community-data-files Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/community-data-files Translate me on Weblate Try me on Runbot

This module adds two fields UNECE Type Code and UNECE Category Code on taxes to allow the use of the standards written by the United Nations Economic Commission for Europe (which @@ -415,7 +415,7 @@

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -442,7 +442,7 @@

Maintainers

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/community-data-files project on GitHub.

+

This module is part of the OCA/community-data-files project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/account_tax_unece/tests/__init__.py b/account_tax_unece/tests/__init__.py old mode 100755 new mode 100644 diff --git a/account_tax_unece/tests/test_account_invoice.py b/account_tax_unece/tests/test_account_invoice.py old mode 100755 new mode 100644 index b51fba82..6a67a179 --- a/account_tax_unece/tests/test_account_invoice.py +++ b/account_tax_unece/tests/test_account_invoice.py @@ -1,4 +1,5 @@ # Copyright 2017 Akretion (Alexis de Lattre ) +# Copyright 2019 Onestein () # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo.tests.common import HttpCase @@ -13,82 +14,99 @@ class TestAccountInvoice(HttpCase): # Creating a new invoice in automated tests requires so many lines of code # that I decided to mutualise the code here. def test_only_create_invoice( - self, product=False, qty=1, price=12.42, discount=0, - validate=True): - aio = self.env['account.invoice'] - ailo = self.env['account.invoice.line'] - aao = self.env['account.account'] - ato = self.env['account.tax'] - company = self.env.ref('base.main_company') - account_receivable = aao.search([ - ('code', '=', '411100'), - ('company_id', '=', company.id), - ], limit=1) - if not account_receivable: - account_receivable = aao.create({ - "code": '411100', - "name": "Debtors - (test)", - "company_id": company.id, - "reconcile": True, - "user_type_id": - self.env.ref('account.data_account_type_receivable').id, - }) - account_revenue = aao.search([ - ('code', '=', '707100'), - ('company_id', '=', company.id), - ], limit=1) + self, product=False, qty=1, price=12.42, discount=0, validate=True + ): + aio = self.env["account.move"] + aao = self.env["account.account"] + ato = self.env["account.tax"] + company = self.env.ref("base.main_company") + account_revenue = aao.search( + [("code", "=", "707100"), ("company_id", "=", company.id)], limit=1 + ) if not account_revenue: - account_revenue = aao.create({ - "code": '707100', - "name": "Product Sales - (test)", - "company_id": company.id, - "user_type_id": - self.env.ref('account.data_account_type_revenue').id, - }) - taxes = ato.search([ - ('company_id', '=', company.id), - ('type_tax_use', '=', 'sale'), - ('unece_type_id', '!=', False), - ('unece_categ_id', '!=', False), - ('amount_type', '=', 'percent')]) + account_revenue = aao.create( + { + "code": "707100", + "name": "Product Sales - (test)", + "company_id": company.id, + "user_type_id": self.env.ref( + "account.data_account_type_revenue" + ).id, + } + ) + taxes = ato.search( + [ + ("company_id", "=", company.id), + ("type_tax_use", "=", "sale"), + ("unece_type_id", "!=", False), + ("unece_categ_id", "!=", False), + ("amount_type", "=", "percent"), + ] + ) if taxes: tax = taxes[0] else: - unece_type_id = self.env.ref('account_tax_unece.tax_type_vat').id - unece_categ_id = self.env.ref('account_tax_unece.tax_categ_s').id - tax = ato.create({ - 'name': u'German VAT purchase 18.0%', - 'description': 'DE-VAT-sale-18.0', - 'company_id': company.id, - 'type_tax_use': 'sale', - 'price_include': False, - 'amount': 18, - 'amount_type': 'percent', - 'unece_type_id': unece_type_id, - 'unece_categ_id': unece_categ_id, - }) + unece_type_id = self.env.ref("account_tax_unece.tax_type_vat").id + unece_categ_id = self.env.ref("account_tax_unece.tax_categ_s").id + tax = ato.create( + { + "name": u"German VAT purchase 18.0%", + "description": "DE-VAT-sale-18.0", + "company_id": company.id, + "type_tax_use": "sale", + "price_include": False, + "amount": 18, + "amount_type": "percent", + "unece_type_id": unece_type_id, + "unece_categ_id": unece_categ_id, + } + ) # validate invoice - invoice = aio.create({ - 'partner_id': self.env.ref("base.res_partner_2").id, - 'currency_id': self.env.ref("base.EUR").id, - 'type': 'out_invoice', - 'company_id': company.id, - 'account_id': account_receivable.id, - 'name': 'SO1242', - }) if not product: product = self.env.ref("product.product_product_4") - ailo.create({ - 'product_id': product.id, - 'uom_id': product.uom_id.id, - 'quantity': qty, - 'price_unit': price, - 'discount': discount, - 'invoice_id': invoice.id, - 'name': product.name, - 'account_id': account_revenue.id, - 'invoice_line_tax_ids': [(6, 0, [tax.id])], - }) + invoice = aio.create( + { + "partner_id": self.env.ref("base.res_partner_2").id, + "currency_id": self.env.ref("base.EUR").id, + "type": "out_invoice", + "company_id": company.id, + "name": "SO1242", + "invoice_line_ids": [ + ( + 0, + 0, + { + "product_id": product.id, + "product_uom_id": product.uom_id.id, + "quantity": qty, + "price_unit": price, + "discount": discount, + "name": product.name, + "account_id": account_revenue.id, + "tax_ids": [(6, 0, [tax.id])], + }, + ) + ], + } + ) if validate: - invoice.action_invoice_open() + invoice.action_post() return invoice + + def test_get_tax_vals(self): + tax_templates = self.env["account.tax.template"].search([]) + for template in tax_templates: + template.unece_type_id = self.env.ref("account_tax_unece.tax_type_aaa") + template.unece_categ_id = self.env.ref("account_tax_unece.tax_categ_a") + template.unece_due_date_id = self.env.ref("account_tax_unece.date_5") + res = template._get_tax_vals(self.env.company, {}) + self.assertTrue(res["unece_type_id"]) + self.assertTrue(res["unece_categ_id"]) + self.assertTrue(res["unece_due_date_id"]) + template.unece_type_id = False + template.unece_categ_id = False + template.unece_due_date_id = False + res = template._get_tax_vals(self.env.company, {}) + self.assertFalse(res["unece_type_id"]) + self.assertFalse(res["unece_categ_id"]) + self.assertFalse(res["unece_due_date_id"]) From d90186e75a39767469d01b42a4d29058d11e67dd Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Mon, 18 Jan 2021 17:38:54 +0100 Subject: [PATCH 10/29] [IMP] account_tax_unece: black, isort, prettier --- account_tax_unece/__manifest__.py | 2 +- account_tax_unece/data/unece_date.xml | 2 +- account_tax_unece/data/unece_tax_categ.xml | 82 ++++++--- account_tax_unece/data/unece_tax_type.xml | 156 +++++++++++++----- account_tax_unece/views/account_tax.xml | 11 +- .../views/account_tax_template.xml | 5 +- 6 files changed, 186 insertions(+), 72 deletions(-) diff --git a/account_tax_unece/__manifest__.py b/account_tax_unece/__manifest__.py index 9269ee43..931a195a 100644 --- a/account_tax_unece/__manifest__.py +++ b/account_tax_unece/__manifest__.py @@ -9,7 +9,7 @@ "license": "AGPL-3", "summary": "UNECE nomenclature for taxes", "author": "Akretion,Odoo Community Association (OCA)", - "website": "http://www.akretion.com", + "website": "https://github.com/OCA/community-data-files", "depends": ["account", "base_unece"], "data": [ "views/account_tax.xml", diff --git a/account_tax_unece/data/unece_date.xml b/account_tax_unece/data/unece_date.xml index 06927a6f..49ef9fe4 100644 --- a/account_tax_unece/data/unece_date.xml +++ b/account_tax_unece/data/unece_date.xml @@ -1,4 +1,4 @@ - + - unece.account.tax.form account.tax - + - - - + + + diff --git a/account_tax_unece/views/account_tax_template.xml b/account_tax_unece/views/account_tax_template.xml index c60bc8c4..9d033774 100644 --- a/account_tax_unece/views/account_tax_template.xml +++ b/account_tax_unece/views/account_tax_template.xml @@ -1,12 +1,11 @@ - + - account.tax.template - + From 9933b791c6d0c2495deee2a42269561348664272 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 18 Jan 2021 17:45:34 +0100 Subject: [PATCH 11/29] [MIG] account_tax_unece: Migration to 14.0 --- account_tax_unece/__manifest__.py | 7 +- account_tax_unece/data/unece_date.xml | 32 - account_tax_unece/data/unece_tax_categ.xml | 374 ++++---- account_tax_unece/data/unece_tax_type.xml | 886 +++++++++--------- account_tax_unece/models/account_tax.py | 23 +- .../models/account_tax_template.py | 14 +- account_tax_unece/models/unece_code_list.py | 9 +- account_tax_unece/tests/__init__.py | 2 +- .../tests/test_account_invoice.py | 112 --- account_tax_unece/tests/test_tax_unece.py | 21 + account_tax_unece/views/account_tax.xml | 37 +- .../views/account_tax_template.xml | 19 +- 12 files changed, 677 insertions(+), 859 deletions(-) delete mode 100644 account_tax_unece/data/unece_date.xml delete mode 100644 account_tax_unece/tests/test_account_invoice.py create mode 100644 account_tax_unece/tests/test_tax_unece.py diff --git a/account_tax_unece/__manifest__.py b/account_tax_unece/__manifest__.py index 931a195a..3c743609 100644 --- a/account_tax_unece/__manifest__.py +++ b/account_tax_unece/__manifest__.py @@ -1,14 +1,16 @@ -# Copyright 2016 Akretion (http://www.akretion.com) +# Copyright 2016-2020 Akretion France (http://www.akretion.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). # @author Alexis de Lattre { "name": "Account Tax UNECE", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "category": "Accounting & Finance", "license": "AGPL-3", + "development_status": "Production/Stable", "summary": "UNECE nomenclature for taxes", "author": "Akretion,Odoo Community Association (OCA)", + "maintainers": ["alexis-via"], "website": "https://github.com/OCA/community-data-files", "depends": ["account", "base_unece"], "data": [ @@ -16,7 +18,6 @@ "views/account_tax_template.xml", "data/unece_tax_type.xml", "data/unece_tax_categ.xml", - "data/unece_date.xml", ], "installable": True, } diff --git a/account_tax_unece/data/unece_date.xml b/account_tax_unece/data/unece_date.xml deleted file mode 100644 index 49ef9fe4..00000000 --- a/account_tax_unece/data/unece_date.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - date - 5 - Date of invoice - Payment time reference is date of invoice. - - - - date - 72 - Payment date - Date when a payment was made. - - - - diff --git a/account_tax_unece/data/unece_tax_categ.xml b/account_tax_unece/data/unece_tax_categ.xml index e537d435..87ab26b1 100644 --- a/account_tax_unece/data/unece_tax_categ.xml +++ b/account_tax_unece/data/unece_tax_categ.xml @@ -1,195 +1,187 @@ - - - - - tax_categ - A - Mixed tax rate - Code specifying that the rate is based on mixed tax. - - - - tax_categ - AA - Lower rate - Tax rate is lower than standard rate. - - - - tax_categ - AB - Exempt for resale - A tax category code indicating the item is tax exempt when the item is bought for future resale. - - - - tax_categ - AC - Value Added Tax (VAT) not now due for payment - A code to indicate that the Value Added Tax (VAT) amount which is due on the current invoice is to be paid on receipt of a separate VAT payment request. - - - - tax_categ - AD - Value Added Tax (VAT) due from a previous invoice - A code to indicate that the Value Added Tax (VAT) amount of a previous invoice is to be paid. - - - - tax_categ - AE - VAT Reverse Charge - Code specifying that the standard VAT rate is levied from the invoicee. - - - - tax_categ - B - Transferred (VAT) - VAT not to be paid to the issuer of the invoice but directly to relevant tax authority. - - - - tax_categ - C - Duty paid by supplier - Duty associated with shipment of goods is paid by the supplier; customer receives goods with duty paid. - - - - tax_categ - D - Value Added Tax (VAT) margin scheme - travel agents - Indication that the VAT margin scheme for travel agents is applied. - - - - tax_categ - E - Exempt from tax - Code specifying that taxes are not applicable. - - - - tax_categ - F - Value Added Tax (VAT) margin scheme - second-hand goods - Indication that the VAT margin scheme for second-hand goods is applied. - - - - tax_categ - G - Free export item, tax not charged - Code specifying that the item is free export and taxes are not charged. - - - - tax_categ - H - Higher rate - Code specifying a higher rate of duty or tax or fee. - - - - tax_categ - I - Value Added Tax (VAT) margin scheme - works of art - Indication that the VAT margin scheme for works of art is applied. - - - - tax_categ - J - Value Added Tax (VAT) margin scheme - collector's items and antiques - Indication that the VAT margin scheme for collector's items and antiques is applied. - - - - tax_categ - K - VAT exempt for EEA intra-community supply of goods and services - A tax category code indicating the item is VAT exempt due to an intra-community supply in the European Economic Area. - - - - tax_categ - L - Canary Islands general indirect tax - Impuesto General Indirecto Canario (IGIC) is an indirect tax levied on goods and services supplied in the Canary Islands (Spain) by traders and professionals, as well as on import of goods. - - - - tax_categ - M - Tax for production, services and importation in Ceuta and Melilla - Impuesto sobre la Producción, los Servicios y la Importación (IPSI) is an indirect municipal tax, levied on the production, processing and import of all kinds of movable tangible property, the supply of services and the transfer of immovable property located in the cities of Ceuta and Melilla. - - - - tax_categ - O - Services outside scope of tax - Code specifying that taxes are not applicable to the services. - - - - tax_categ - S - Standard rate - Code specifying the standard rate. - - - - tax_categ - Z - Zero rated goods - Code specifying that the goods are at a zero rate. - - - + + tax_categ + A + Mixed tax rate + + Code specifying that the rate is based on mixed tax. + + + + tax_categ + AA + Lower rate + Tax rate is lower than standard rate. + + + tax_categ + AB + Exempt for resale + + A tax category code indicating the item is tax exempt when the item is + bought for future resale. + + + + tax_categ + AC + Value Added Tax (VAT) not now due for payment + + A code to indicate that the Value Added Tax (VAT) amount which is due on the + current invoice is to be paid on receipt of a separate VAT payment request. + + + + tax_categ + AD + Value Added Tax (VAT) due from a previous invoice + + A code to indicate that the Value Added Tax (VAT) amount of a previous + invoice is to be paid. + + + + tax_categ + AE + VAT Reverse Charge + + Code specifying that the standard VAT rate is levied from the invoicee. + + + + tax_categ + B + Transferred (VAT) + + VAT not to be paid to the issuer of the invoice but directly to relevant tax + authority. + + + + tax_categ + C + Duty paid by supplier + + Duty associated with shipment of goods is paid by the supplier; customer + receives goods with duty paid. + + + + tax_categ + D + Value Added Tax (VAT) margin scheme - travel agents + + Indication that the VAT margin scheme for travel agents is applied. + + + + tax_categ + E + Exempt from tax + Code specifying that taxes are not applicable. + + + tax_categ + F + + Value Added Tax (VAT) margin scheme - second-hand goods + + + Indication that the VAT margin scheme for second-hand goods is applied. + + + + tax_categ + G + Free export item, tax not charged + + Code specifying that the item is free export and taxes are not charged. + + + + tax_categ + H + Higher rate + + Code specifying a higher rate of duty or tax or fee. + + + + tax_categ + I + Value Added Tax (VAT) margin scheme - works of art + + Indication that the VAT margin scheme for works of art is applied. + + + + tax_categ + J + + Value Added Tax (VAT) margin scheme - collector's items and antiques + + + Indication that the VAT margin scheme for collector's items and antiques is + applied. + + + + tax_categ + K + + VAT exempt for EEA intra-community supply of goods and services + + + A tax category code indicating the item is VAT exempt due to an + intra-community supply in the European Economic Area. + + + + tax_categ + L + Canary Islands general indirect tax + + Impuesto General Indirecto Canario (IGIC) is an indirect tax levied on goods + and services supplied in the Canary Islands (Spain) by traders and + professionals, as well as on import of goods. + + + + tax_categ + M + + Tax for production, services and importation in Ceuta and Melilla + + + Impuesto sobre la Producción, los Servicios y la Importación (IPSI) is an + indirect municipal tax, levied on the production, processing and import of + all kinds of movable tangible property, the supply of services and the + transfer of immovable property located in the cities of Ceuta and Melilla. + + + + tax_categ + O + Services outside scope of tax + + Code specifying that taxes are not applicable to the services. + + + + tax_categ + S + Standard rate + Code specifying the standard rate. + + + tax_categ + Z + Zero rated goods + + Code specifying that the goods are at a zero rate. + + diff --git a/account_tax_unece/data/unece_tax_type.xml b/account_tax_unece/data/unece_tax_type.xml index 91b0bd0b..c48ce3bb 100644 --- a/account_tax_unece/data/unece_tax_type.xml +++ b/account_tax_unece/data/unece_tax_type.xml @@ -1,462 +1,432 @@ - - - - - tax_type - AAA - Petroleum tax - A tax levied on the volume of petroleum being transacted. - - - - tax_type - AAB - Provisional countervailing duty cash - Countervailing duty paid in cash prior to a formal finding of subsidization by Customs. - - - - tax_type - AAC - Provisional countervailing duty bond - Countervailing duty paid by posting a bond during an investigation period prior to a formal decision on subsidization by Customs. - - - - tax_type - AAD - Tobacco tax - A tax levied on tobacco products. - - - - tax_type - AAE - Energy fee - General fee or tax for the use of energy. - - - - tax_type - AAF - Coffee tax - A tax levied specifically on coffee products. - - - - tax_type - AAG - Harmonised sales tax, Canadian - A harmonized sales tax consisting of a goods and service tax, a Canadian provincial sales tax and, as applicable, a Quebec sales tax which is recoverable. - - - - tax_type - AAH - Quebec sales tax - A sales tax charged within the Canadian province of Quebec which is recoverable. - - - - tax_type - AAI - Canadian provincial sales tax - A sales tax charged within Canadian provinces which is non-recoverable. - - - - tax_type - AAJ - Tax on replacement part - A tax levied on a replacement part, where the original part is returned. - - - - tax_type - AAK - Mineral oil tax - Tax that is levied specifically on products containing mineral oil. - - - - tax_type - AAL - Special tax - To indicate a special type of tax. - - - - tax_type - AAM - Insurance tax - A tax levied specifically on insurances. - - - - tax_type - ADD - Anti-dumping duty - Duty applied to goods ruled to have been dumped in an import market at a price lower than that in the exporter's domestic market. - - - - tax_type - BOL - Stamp duty (Imposta di Bollo) - Tax required in Italy, which may be fixed or graduated in various circumstances (e.g. VAT exempt documents or bank receipts). - - - - tax_type - CAP - Agricultural levy - Levy imposed on agricultural products where there is a difference between the selling price between trading countries. - - - - tax_type - CAR - Car tax - A tax that is levied on the value of the automobile. - - - - tax_type - COC - Paper consortium tax (Italy) - - - - - tax_type - CST - Commodity specific tax - Tax related to a specified commodity, e.g. illuminants, salts. - - - - tax_type - CUD - Customs duty - Duties laid down in the Customs tariff, to which goods are liable on entering or leaving the Customs territory (CCC). - - - - tax_type - CVD - Countervailing duty - A duty on imported goods applied for compensate for subsidies granted to those goods in the exporting country. - - - - tax_type - ENV - Environmental tax - Tax assessed for funding or assuring environmental protection or clean-up. - - - - tax_type - EXC - Excise duty - Customs or fiscal authorities code to identify a specific or ad valorem levy on a specific commodity, applied either domestically or at time of importation. - - - - tax_type - EXP - Agricultural export rebate - Monetary rebate given to the seller in certain circumstances when agricultural products are exported. - - - - tax_type - FET - Federal excise tax - Tax levied by the federal government on the manufacture of specific items. - - - - tax_type - FRE - Free - No tax levied. - - - - tax_type - GCN - General construction tax - General tax for construction. - - - - tax_type - GST - Goods and services tax - Tax levied on the final consumption of goods and services throughout the production and distribution chain. - - - - tax_type - ILL - Illuminants tax - Tax of illuminants. - - - - tax_type - IMP - Import tax - Tax assessed on imports. - - - - tax_type - IND - Individual tax - A tax levied based on an individual's ability to pay. - - - - tax_type - LAC - Business license fee - Government assessed charge for permit to do business. - - - - tax_type - LCN - Local construction tax - Local tax for construction. - - - - tax_type - LDP - Light dues payable - Fee levied on a vessel to pay for port navigation lights. - - - - tax_type - LOC - Local sales tax - Assessment charges on sale of goods or services by city, borough country or other taxing authorities below state or provincial level. - - - - tax_type - LST - Lust tax - Tax imposed for clean-up of leaky underground storage tanks. - - - - tax_type - MCA - Monetary compensatory amount - Levy on Common Agricultural Policy (European Union) goods used to compensate for fluctuating currencies between member states. - - - - tax_type - MCD - Miscellaneous cash deposit - Duty paid and held on deposit, by Customs, during an investigation period prior to a final decision being made on any aspect related to imported goods (except valuation) by Customs. - - - - tax_type - OTH - Other taxes - Unspecified, miscellaneous tax charges. - - - - tax_type - PDB - Provisional duty bond - Anti-dumping duty paid by posting a bond during an investigation period prior to a formal decision on dumping by Customs. - - - - tax_type - PDC - Provisional duty cash - Anti-dumping duty paid in cash prior to a formal finding of dumping by Customs. - - - - tax_type - PRF - Preference duty - Duties laid down in the Customs tariff, to which goods are liable on entering or leaving the Customs territory falling under a preferential regime such as Generalised System of Preferences (GSP). - - - - tax_type - SCN - Special construction tax - Special tax for construction. - - - - tax_type - SSS - Shifted social securities - Social securities share of the invoice amount to be paid directly to the social securities collector. - - - - tax_type - STT - State/provincial sales tax - All applicable sale taxes by authorities at the state or provincial level, below national level. - - - - tax_type - SUP - Suspended duty - Duty suspended or deferred from payment. - - - - tax_type - SUR - Surtax - A tax or duty applied on and in addition to existing duties and taxes. - - - - tax_type - SWT - Shifted wage tax - Wage tax share of the invoice amount to be paid directly to the tax collector's office). - - - - tax_type - TAC - Alcohol mark tax - A tax levied based on the type of alcohol being obtained. - - - - tax_type - TOT - Total - The summary amount of all taxes. - - - - tax_type - TOX - Turnover tax - Tax levied on the total sales/turnover of a corporation. - - - - tax_type - TTA - Tonnage taxes - Tax levied based on the vessel's net tonnage. - - - - tax_type - VAD - Valuation deposit - Duty paid and held on deposit, by Customs, during an investigation period prior to a formal decision on valuation of the goods being made. - - - - tax_type - VAT - Value added tax - A tax on domestic or imported goods applied to the value added at each stage in the production/distribution cycle. - - - + + tax_type + AAA + Petroleum tax + + A tax levied on the volume of petroleum being transacted. + + + + tax_type + AAB + Provisional countervailing duty cash + + Countervailing duty paid in cash prior to a formal finding of subsidization + by Customs. + + + + tax_type + AAC + Provisional countervailing duty bond + + Countervailing duty paid by posting a bond during an investigation period + prior to a formal decision on subsidization by Customs. + + + + tax_type + AAD + Tobacco tax + A tax levied on tobacco products. + + + tax_type + AAE + Energy fee + General fee or tax for the use of energy. + + + tax_type + AAF + Coffee tax + A tax levied specifically on coffee products. + + + tax_type + AAG + Harmonised sales tax, Canadian + + A harmonized sales tax consisting of a goods and service tax, a Canadian + provincial sales tax and, as applicable, a Quebec sales tax which is + recoverable. + + + + tax_type + AAH + Quebec sales tax + + A sales tax charged within the Canadian province of Quebec which is + recoverable. + + + + tax_type + AAI + Canadian provincial sales tax + + A sales tax charged within Canadian provinces which is non-recoverable. + + + + tax_type + AAJ + Tax on replacement part + + A tax levied on a replacement part, where the original part is returned. + + + + tax_type + AAK + Mineral oil tax + + Tax that is levied specifically on products containing mineral oil. + + + + tax_type + AAL + Special tax + To indicate a special type of tax. + + + tax_type + AAM + Insurance tax + A tax levied specifically on insurances. + + + tax_type + ADD + Anti-dumping duty + + Duty applied to goods ruled to have been dumped in an import market at a + price lower than that in the exporter's domestic market. + + + + tax_type + BOL + Stamp duty (Imposta di Bollo) + + Tax required in Italy, which may be fixed or graduated in various + circumstances (e.g. VAT exempt documents or bank receipts). + + + + tax_type + CAP + Agricultural levy + + Levy imposed on agricultural products where there is a difference between + the selling price between trading countries. + + + + tax_type + CAR + Car tax + + A tax that is levied on the value of the automobile. + + + + tax_type + COC + Paper consortium tax (Italy) + + + + tax_type + CST + Commodity specific tax + + Tax related to a specified commodity, e.g. illuminants, salts. + + + + tax_type + CUD + Customs duty + + Duties laid down in the Customs tariff, to which goods are liable on + entering or leaving the Customs territory (CCC). + + + + tax_type + CVD + Countervailing duty + + A duty on imported goods applied for compensate for subsidies granted to + those goods in the exporting country. + + + + tax_type + ENV + Environmental tax + + Tax assessed for funding or assuring environmental protection or clean-up. + + + + tax_type + EXC + Excise duty + + Customs or fiscal authorities code to identify a specific or ad valorem levy + on a specific commodity, applied either domestically or at time of + importation. + + + + tax_type + EXP + Agricultural export rebate + + Monetary rebate given to the seller in certain circumstances when + agricultural products are exported. + + + + tax_type + FET + Federal excise tax + + Tax levied by the federal government on the manufacture of specific items. + + + + tax_type + FRE + Free + No tax levied. + + + tax_type + GCN + General construction tax + General tax for construction. + + + tax_type + GST + Goods and services tax + + Tax levied on the final consumption of goods and services throughout the + production and distribution chain. + + + + tax_type + ILL + Illuminants tax + Tax of illuminants. + + + tax_type + IMP + Import tax + Tax assessed on imports. + + + tax_type + IND + Individual tax + + A tax levied based on an individual's ability to pay. + + + + tax_type + LAC + Business license fee + + Government assessed charge for permit to do business. + + + + tax_type + LCN + Local construction tax + Local tax for construction. + + + tax_type + LDP + Light dues payable + + Fee levied on a vessel to pay for port navigation lights. + + + + tax_type + LOC + Local sales tax + + Assessment charges on sale of goods or services by city, borough country or + other taxing authorities below state or provincial level. + + + + tax_type + LST + Lust tax + + Tax imposed for clean-up of leaky underground storage tanks. + + + + tax_type + MCA + Monetary compensatory amount + + Levy on Common Agricultural Policy (European Union) goods used to compensate + for fluctuating currencies between member states. + + + + tax_type + MCD + Miscellaneous cash deposit + + Duty paid and held on deposit, by Customs, during an investigation period + prior to a final decision being made on any aspect related to imported goods + (except valuation) by Customs. + + + + tax_type + OTH + Other taxes + Unspecified, miscellaneous tax charges. + + + tax_type + PDB + Provisional duty bond + + Anti-dumping duty paid by posting a bond during an investigation period + prior to a formal decision on dumping by Customs. + + + + tax_type + PDC + Provisional duty cash + + Anti-dumping duty paid in cash prior to a formal finding of dumping by + Customs. + + + + tax_type + PRF + Preference duty + + Duties laid down in the Customs tariff, to which goods are liable on + entering or leaving the Customs territory falling under a preferential + regime such as Generalised System of Preferences (GSP). + + + + tax_type + SCN + Special construction tax + Special tax for construction. + + + tax_type + SSS + Shifted social securities + + Social securities share of the invoice amount to be paid directly to the + social securities collector. + + + + tax_type + STT + State/provincial sales tax + + All applicable sale taxes by authorities at the state or provincial level, + below national level. + + + + tax_type + SUP + Suspended duty + Duty suspended or deferred from payment. + + + tax_type + SUR + Surtax + + A tax or duty applied on and in addition to existing duties and taxes. + + + + tax_type + SWT + Shifted wage tax + + Wage tax share of the invoice amount to be paid directly to the tax + collector's office). + + + + tax_type + TAC + Alcohol mark tax + + A tax levied based on the type of alcohol being obtained. + + + + tax_type + TOT + Total + The summary amount of all taxes. + + + tax_type + TOX + Turnover tax + + Tax levied on the total sales/turnover of a corporation. + + + + tax_type + TTA + Tonnage taxes + Tax levied based on the vessel's net tonnage. + + + tax_type + VAD + Valuation deposit + + Duty paid and held on deposit, by Customs, during an investigation period + prior to a formal decision on valuation of the goods being made. + + + + tax_type + VAT + Value added tax + + A tax on domestic or imported goods applied to the value added at each stage + in the production/distribution cycle. + + diff --git a/account_tax_unece/models/account_tax.py b/account_tax_unece/models/account_tax.py index 2f86b97b..eb7ff763 100644 --- a/account_tax_unece/models/account_tax.py +++ b/account_tax_unece/models/account_tax.py @@ -1,4 +1,4 @@ -# Copyright 2016-2017 Akretion (http://www.akretion.com) +# Copyright 2016-2020 Akretion France (http://www.akretion.com) # @author: Alexis de Lattre # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). @@ -38,21 +38,6 @@ class AccountTax(models.Model): readonly=True, string="UNECE Category Code", ) - unece_due_date_id = fields.Many2one( - "unece.code.list", - string="UNECE Due Date", - domain=[("type", "=", "date")], - ondelete="restrict", - help="Select the due date of that tax from the official " - "nomenclature of the United Nations Economic " - "Commission for Europe (UNECE), DataElement 2005. For a " - "sale VAT tax, it is the date on which that VAT is due to the " - "fiscal administration. For a purchase VAT tax, it is the date " - "on which that VAT can be deducted.", - ) - unece_due_date_code = fields.Char( - related="unece_due_date_id.code", - store=True, - readonly=True, - string="UNECE Due Date Code", - ) + # We now have a selection field "tax_exigibility" + # with 2 possible values: "on_invoice" or "on_payment" + # So we don't need unece_due_date_id any more diff --git a/account_tax_unece/models/account_tax_template.py b/account_tax_unece/models/account_tax_template.py index 372b960d..4b65a971 100644 --- a/account_tax_unece/models/account_tax_template.py +++ b/account_tax_unece/models/account_tax_template.py @@ -1,4 +1,4 @@ -# Copyright 2017-2019 Onestein () +# Copyright 2017-2020 Onestein () # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import fields, models @@ -23,22 +23,10 @@ class AccountTaxTemplate(models.Model): "nomenclature of the United Nations Economic " "Commission for Europe (UNECE), DataElement 5305", ) - unece_due_date_id = fields.Many2one( - "unece.code.list", - string="UNECE Due Date", - domain=[("type", "=", "date")], - help="Select the due date of that tax from the official " - "nomenclature of the United Nations Economic " - "Commission for Europe (UNECE), DataElement 2005. For a " - "sale VAT tax, it is the date on which that VAT is due to the " - "fiscal administration. For a purchase VAT tax, it is the date " - "on which that VAT can be deducted.", - ) def _get_tax_vals(self, company, tax_template_to_tax): self.ensure_one() res = super()._get_tax_vals(company, tax_template_to_tax) res["unece_type_id"] = self.unece_type_id.id res["unece_categ_id"] = self.unece_categ_id.id - res["unece_due_date_id"] = self.unece_due_date_id.id return res diff --git a/account_tax_unece/models/unece_code_list.py b/account_tax_unece/models/unece_code_list.py index f5c374b1..b857f2f6 100644 --- a/account_tax_unece/models/unece_code_list.py +++ b/account_tax_unece/models/unece_code_list.py @@ -1,4 +1,4 @@ -# Copyright 2016-2017 Akretion (http://www.akretion.com) +# Copyright 2016-2020 Akretion France (http://www.akretion.com) # @author: Alexis de Lattre # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). @@ -12,6 +12,9 @@ class UneceCodeList(models.Model): selection_add=[ ("tax_type", "Tax Types (UNCL 5153)"), ("tax_categ", "Tax Categories (UNCL 5305)"), - ("date", "Date, Time or Period Qualifier (UNTDID 2005)"), - ] + ], + ondelete={ + "tax_type": "cascade", + "tax_categ": "cascade", + }, ) diff --git a/account_tax_unece/tests/__init__.py b/account_tax_unece/tests/__init__.py index 383b00bc..263526ad 100644 --- a/account_tax_unece/tests/__init__.py +++ b/account_tax_unece/tests/__init__.py @@ -1,3 +1,3 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from . import test_account_invoice +from . import test_tax_unece diff --git a/account_tax_unece/tests/test_account_invoice.py b/account_tax_unece/tests/test_account_invoice.py deleted file mode 100644 index 6a67a179..00000000 --- a/account_tax_unece/tests/test_account_invoice.py +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright 2017 Akretion (Alexis de Lattre ) -# Copyright 2019 Onestein () -# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). - -from odoo.tests.common import HttpCase - - -class TestAccountInvoice(HttpCase): - - # Since odoo v9, there are no more demo invoices. - # This method is used by both account_invoice_ubl and - # account_invoice_factur-x. As those 2 modules use account_payment_unece, - # it allows to factorise the code. - # Creating a new invoice in automated tests requires so many lines of code - # that I decided to mutualise the code here. - def test_only_create_invoice( - self, product=False, qty=1, price=12.42, discount=0, validate=True - ): - aio = self.env["account.move"] - aao = self.env["account.account"] - ato = self.env["account.tax"] - company = self.env.ref("base.main_company") - account_revenue = aao.search( - [("code", "=", "707100"), ("company_id", "=", company.id)], limit=1 - ) - if not account_revenue: - account_revenue = aao.create( - { - "code": "707100", - "name": "Product Sales - (test)", - "company_id": company.id, - "user_type_id": self.env.ref( - "account.data_account_type_revenue" - ).id, - } - ) - taxes = ato.search( - [ - ("company_id", "=", company.id), - ("type_tax_use", "=", "sale"), - ("unece_type_id", "!=", False), - ("unece_categ_id", "!=", False), - ("amount_type", "=", "percent"), - ] - ) - if taxes: - tax = taxes[0] - else: - unece_type_id = self.env.ref("account_tax_unece.tax_type_vat").id - unece_categ_id = self.env.ref("account_tax_unece.tax_categ_s").id - tax = ato.create( - { - "name": u"German VAT purchase 18.0%", - "description": "DE-VAT-sale-18.0", - "company_id": company.id, - "type_tax_use": "sale", - "price_include": False, - "amount": 18, - "amount_type": "percent", - "unece_type_id": unece_type_id, - "unece_categ_id": unece_categ_id, - } - ) - # validate invoice - if not product: - product = self.env.ref("product.product_product_4") - invoice = aio.create( - { - "partner_id": self.env.ref("base.res_partner_2").id, - "currency_id": self.env.ref("base.EUR").id, - "type": "out_invoice", - "company_id": company.id, - "name": "SO1242", - "invoice_line_ids": [ - ( - 0, - 0, - { - "product_id": product.id, - "product_uom_id": product.uom_id.id, - "quantity": qty, - "price_unit": price, - "discount": discount, - "name": product.name, - "account_id": account_revenue.id, - "tax_ids": [(6, 0, [tax.id])], - }, - ) - ], - } - ) - if validate: - invoice.action_post() - return invoice - - def test_get_tax_vals(self): - tax_templates = self.env["account.tax.template"].search([]) - for template in tax_templates: - template.unece_type_id = self.env.ref("account_tax_unece.tax_type_aaa") - template.unece_categ_id = self.env.ref("account_tax_unece.tax_categ_a") - template.unece_due_date_id = self.env.ref("account_tax_unece.date_5") - res = template._get_tax_vals(self.env.company, {}) - self.assertTrue(res["unece_type_id"]) - self.assertTrue(res["unece_categ_id"]) - self.assertTrue(res["unece_due_date_id"]) - template.unece_type_id = False - template.unece_categ_id = False - template.unece_due_date_id = False - res = template._get_tax_vals(self.env.company, {}) - self.assertFalse(res["unece_type_id"]) - self.assertFalse(res["unece_categ_id"]) - self.assertFalse(res["unece_due_date_id"]) diff --git a/account_tax_unece/tests/test_tax_unece.py b/account_tax_unece/tests/test_tax_unece.py new file mode 100644 index 00000000..1ea04aa6 --- /dev/null +++ b/account_tax_unece/tests/test_tax_unece.py @@ -0,0 +1,21 @@ +# Copyright 2017-2020 Akretion (Alexis de Lattre ) +# Copyright 2019-2020 Onestein () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo.tests.common import HttpCase + + +class TestTaxUnece(HttpCase): + def test_get_tax_vals(self): + tax_templates = self.env["account.tax.template"].search([]) + for template in tax_templates: + template.unece_type_id = self.env.ref("account_tax_unece.tax_type_aaa") + template.unece_categ_id = self.env.ref("account_tax_unece.tax_categ_a") + res = template._get_tax_vals(self.env.company, {}) + self.assertTrue(res["unece_type_id"]) + self.assertTrue(res["unece_categ_id"]) + template.unece_type_id = False + template.unece_categ_id = False + res = template._get_tax_vals(self.env.company, {}) + self.assertFalse(res["unece_type_id"]) + self.assertFalse(res["unece_categ_id"]) diff --git a/account_tax_unece/views/account_tax.xml b/account_tax_unece/views/account_tax.xml index d5501675..15c8eb9e 100644 --- a/account_tax_unece/views/account_tax.xml +++ b/account_tax_unece/views/account_tax.xml @@ -1,24 +1,27 @@ - - - - unece.account.tax.form - account.tax - - - - - - - - - - - + + unece.account.tax.form + account.tax + + + + + + + + + + diff --git a/account_tax_unece/views/account_tax_template.xml b/account_tax_unece/views/account_tax_template.xml index 9d033774..22aa9a60 100644 --- a/account_tax_unece/views/account_tax_template.xml +++ b/account_tax_unece/views/account_tax_template.xml @@ -1,8 +1,7 @@ - - account.tax.template @@ -10,17 +9,17 @@ - - - - - - - + + - From e1cae4eebb36b6342cc3afb7fed0c9b0cbe3cacb Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 10 Dec 2020 23:13:18 +0100 Subject: [PATCH 12/29] account_tax_unece: add speeddict methods Improve code for unece_due_date_code, to make it easier to inherit if needed for some countries --- account_tax_unece/README.rst | 22 +++++--- account_tax_unece/i18n/account_tax_unece.pot | 52 ++++++++--------- account_tax_unece/models/__init__.py | 1 + account_tax_unece/models/account_tax.py | 34 ++++++++++- account_tax_unece/models/res_company.py | 56 +++++++++++++++++++ .../static/description/index.html | 8 ++- 6 files changed, 136 insertions(+), 37 deletions(-) create mode 100644 account_tax_unece/models/res_company.py diff --git a/account_tax_unece/README.rst b/account_tax_unece/README.rst index 10b1868b..44322644 100644 --- a/account_tax_unece/README.rst +++ b/account_tax_unece/README.rst @@ -7,20 +7,20 @@ Account Tax UNECE !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png :target: https://odoo-community.org/page/development-status - :alt: Beta + :alt: Production/Stable .. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcommunity--data--files-lightgray.png?logo=github - :target: https://github.com/OCA/community-data-files/tree/13.0/account_tax_unece + :target: https://github.com/OCA/community-data-files/tree/14.0/account_tax_unece :alt: OCA/community-data-files .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/community-data-files-13-0/community-data-files-13-0-account_tax_unece + :target: https://translation.odoo-community.org/projects/community-data-files-14-0/community-data-files-14-0-account_tax_unece :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/101/13.0 + :target: https://runbot.odoo-community.org/runbot/101/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -65,7 +65,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -98,6 +98,14 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/community-data-files `_ project on GitHub. +.. |maintainer-alexis-via| image:: https://github.com/alexis-via.png?size=40px + :target: https://github.com/alexis-via + :alt: alexis-via + +Current `maintainer `__: + +|maintainer-alexis-via| + +This module is part of the `OCA/community-data-files `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_tax_unece/i18n/account_tax_unece.pot b/account_tax_unece/i18n/account_tax_unece.pot index 4a6618b7..8bd11eb3 100644 --- a/account_tax_unece/i18n/account_tax_unece.pot +++ b/account_tax_unece/i18n/account_tax_unece.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" +"Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -14,8 +14,32 @@ msgstr "" "Plural-Forms: \n" #. module: account_tax_unece -#: model:ir.model.fields.selection,name:account_tax_unece.selection__unece_code_list__type__date -msgid "Date, Time or Period Qualifier (UNTDID 2005)" +#: model:ir.model,name:account_tax_unece.model_res_company +msgid "Companies" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__display_name +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__display_name +#: model:ir.model.fields,field_description:account_tax_unece.field_res_company__display_name +#: model:ir.model.fields,field_description:account_tax_unece.field_unece_code_list__display_name +msgid "Display Name" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__id +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__id +#: model:ir.model.fields,field_description:account_tax_unece.field_res_company__id +#: model:ir.model.fields,field_description:account_tax_unece.field_unece_code_list__id +msgid "ID" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax____last_update +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template____last_update +#: model:ir.model.fields,field_description:account_tax_unece.field_res_company____last_update +#: model:ir.model.fields,field_description:account_tax_unece.field_unece_code_list____last_update +msgid "Last Modified on" msgstr "" #. module: account_tax_unece @@ -34,17 +58,6 @@ msgid "" "Economic Commission for Europe (UNECE), DataElement 5153" msgstr "" -#. module: account_tax_unece -#: model:ir.model.fields,help:account_tax_unece.field_account_tax__unece_due_date_id -#: model:ir.model.fields,help:account_tax_unece.field_account_tax_template__unece_due_date_id -msgid "" -"Select the due date of that tax from the official nomenclature of the United" -" Nations Economic Commission for Europe (UNECE), DataElement 2005. For a " -"sale VAT tax, it is the date on which that VAT is due to the fiscal " -"administration. For a purchase VAT tax, it is the date on which that VAT can" -" be deducted." -msgstr "" - #. module: account_tax_unece #: model:ir.model,name:account_tax_unece.model_account_tax msgid "Tax" @@ -75,17 +88,6 @@ msgstr "" msgid "UNECE Category Code" msgstr "" -#. module: account_tax_unece -#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_due_date_id -#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__unece_due_date_id -msgid "UNECE Due Date" -msgstr "" - -#. module: account_tax_unece -#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_due_date_code -msgid "UNECE Due Date Code" -msgstr "" - #. module: account_tax_unece #: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_categ_id #: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__unece_categ_id diff --git a/account_tax_unece/models/__init__.py b/account_tax_unece/models/__init__.py index b2b7c90d..a1ad4f81 100644 --- a/account_tax_unece/models/__init__.py +++ b/account_tax_unece/models/__init__.py @@ -3,3 +3,4 @@ from . import unece_code_list from . import account_tax from . import account_tax_template +from . import res_company diff --git a/account_tax_unece/models/account_tax.py b/account_tax_unece/models/account_tax.py index eb7ff763..5699b2f1 100644 --- a/account_tax_unece/models/account_tax.py +++ b/account_tax_unece/models/account_tax.py @@ -2,7 +2,7 @@ # @author: Alexis de Lattre # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo import fields, models +from odoo import api, fields, models class AccountTax(models.Model): @@ -40,4 +40,34 @@ class AccountTax(models.Model): ) # We now have a selection field "tax_exigibility" # with 2 possible values: "on_invoice" or "on_payment" - # So we don't need unece_due_date_id any more + # So we don't need the field unece_due_date_id any more. + # We replace it by _get_unece_due_date_type_code() below. + + @api.model + def _get_unece_code_from_tax_exigibility(self, tax_exigibility): + mapping = { + "on_invoice": "5", + "on_payment": "72", + } + return mapping.get(tax_exigibility) + + @api.model + def _get_tax_exigibility_from_unece_code(self, unece_code): + if isinstance(unece_code, int): + unece_code = str(unece_code) + mapping = { + "5": "on_invoice", + "29": "on_invoice", + "72": "on_payment", + } + if unece_code in mapping: + return mapping[unece_code] + else: + return None + + def _get_unece_due_date_type_code(self): + self.ensure_one() + if self.tax_exigibility: + return self._get_unece_code_from_tax_exigibility(self.tax_exigibility) + else: + return None diff --git a/account_tax_unece/models/res_company.py b/account_tax_unece/models/res_company.py new file mode 100644 index 00000000..2682b311 --- /dev/null +++ b/account_tax_unece/models/res_company.py @@ -0,0 +1,56 @@ +# Copyright 2020 Akretion France (http://www.akretion.com) +# @author: Alexis de Lattre +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import models + + +class ResCompany(models.Model): + _inherit = "res.company" + + def _get_tax_unece_speeddict(self): + self.ensure_one() + res = {} + tax_obj = self.env["account.tax"] + all_taxes = tax_obj.with_context(active_test=False).search_read( + [("company_id", "=", self.id)], + [ + "unece_type_code", + "unece_categ_code", + "tax_exigibility", + "amount", + "amount_type", + "name", + "display_name", + ], + ) + for tax in all_taxes: + res[tax["id"]] = { + "unece_type_code": tax["unece_type_code"] or None, + "unece_categ_code": tax["unece_categ_code"] or None, + "unece_due_date_code": None, + "amount_type": tax["amount_type"], + "amount": tax["amount"], + "name": tax["name"], + "display_name": tax["display_name"], + } + if tax["tax_exigibility"]: + res[tax["id"]][ + "unece_due_date_code" + ] = tax_obj._get_unece_code_from_tax_exigibility(tax["tax_exigibility"]) + return res + + def _get_fiscal_position_speeddict(self, lang): + self.ensure_one() + res = {} + fp_obj = self.env["account.fiscal.position"] + fpositions = fp_obj.with_context(lang=lang, active_test=False).search_read( + [("company_id", "=", self.id)], ["name", "display_name", "note"] + ) + for fp in fpositions: + res[fp["id"]] = { + "name": fp["name"], + "display_name": fp["display_name"], + "note": fp["note"], # supposed to store the exemption reason + } + return res diff --git a/account_tax_unece/static/description/index.html b/account_tax_unece/static/description/index.html index 8f20544f..3496755c 100644 --- a/account_tax_unece/static/description/index.html +++ b/account_tax_unece/static/description/index.html @@ -367,7 +367,7 @@

Account Tax UNECE

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/community-data-files Translate me on Weblate Try me on Runbot

+

Production/Stable License: AGPL-3 OCA/community-data-files Translate me on Weblate Try me on Runbot

This module adds two fields UNECE Type Code and UNECE Category Code on taxes to allow the use of the standards written by the United Nations Economic Commission for Europe (which @@ -415,7 +415,7 @@

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -442,7 +442,9 @@

Maintainers

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/community-data-files project on GitHub.

+

Current maintainer:

+

alexis-via

+

This module is part of the OCA/community-data-files project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

From 0f61a9a6845c46aa95e5c48144596dfd703af4a2 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 19 Nov 2021 14:24:57 +0100 Subject: [PATCH 13/29] account_tax_unece: script for v13 to v14 migration --- account_tax_unece/14.0.1.0.0/pre-migration.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 account_tax_unece/14.0.1.0.0/pre-migration.py diff --git a/account_tax_unece/14.0.1.0.0/pre-migration.py b/account_tax_unece/14.0.1.0.0/pre-migration.py new file mode 100644 index 00000000..db78c16b --- /dev/null +++ b/account_tax_unece/14.0.1.0.0/pre-migration.py @@ -0,0 +1,14 @@ +# Copyright 2021 Akretion France (http://www.akretion.com/) +# @author: Alexis de Lattre +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + # The field unece_due_date_id was present in v13 with ondelete='restrict' + # and dropped in v14. So we need to set to to null to avoid an error + # when odoo will try to delete the entries in unece.code.list + sql = "UPDATE account_tax SET unece_due_date_id=null, unece_due_date_code=null" + openupgrade.logged_query(env.cr, sql) From b9218397b18860a43afc2a4a6349b87d9b8e967e Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 1 Feb 2022 19:09:36 +0100 Subject: [PATCH 14/29] [FIX] account_tax_unece: mig script directory --- account_tax_unece/{ => migrations}/14.0.1.0.0/pre-migration.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename account_tax_unece/{ => migrations}/14.0.1.0.0/pre-migration.py (100%) diff --git a/account_tax_unece/14.0.1.0.0/pre-migration.py b/account_tax_unece/migrations/14.0.1.0.0/pre-migration.py similarity index 100% rename from account_tax_unece/14.0.1.0.0/pre-migration.py rename to account_tax_unece/migrations/14.0.1.0.0/pre-migration.py From 8f9cfd05e87878c8769816d7c85949bd8726d6d6 Mon Sep 17 00:00:00 2001 From: Maria Sparenberg Date: Thu, 16 Jun 2022 13:34:18 +0000 Subject: [PATCH 15/29] Added translation using Weblate (German) --- account_tax_unece/i18n/de.po | 117 +++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 account_tax_unece/i18n/de.po diff --git a/account_tax_unece/i18n/de.po b/account_tax_unece/i18n/de.po new file mode 100644 index 00000000..806fcd10 --- /dev/null +++ b/account_tax_unece/i18n/de.po @@ -0,0 +1,117 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_tax_unece +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: account_tax_unece +#: model:ir.model,name:account_tax_unece.model_res_company +msgid "Companies" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__display_name +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__display_name +#: model:ir.model.fields,field_description:account_tax_unece.field_res_company__display_name +#: model:ir.model.fields,field_description:account_tax_unece.field_unece_code_list__display_name +msgid "Display Name" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__id +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__id +#: model:ir.model.fields,field_description:account_tax_unece.field_res_company__id +#: model:ir.model.fields,field_description:account_tax_unece.field_unece_code_list__id +msgid "ID" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax____last_update +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template____last_update +#: model:ir.model.fields,field_description:account_tax_unece.field_res_company____last_update +#: model:ir.model.fields,field_description:account_tax_unece.field_unece_code_list____last_update +msgid "Last Modified on" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,help:account_tax_unece.field_account_tax__unece_categ_id +#: model:ir.model.fields,help:account_tax_unece.field_account_tax_template__unece_categ_id +msgid "" +"Select the Tax Category Code of the official nomenclature of the United " +"Nations Economic Commission for Europe (UNECE), DataElement 5305" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,help:account_tax_unece.field_account_tax__unece_type_id +#: model:ir.model.fields,help:account_tax_unece.field_account_tax_template__unece_type_id +msgid "" +"Select the Tax Type Code of the official nomenclature of the United Nations " +"Economic Commission for Europe (UNECE), DataElement 5153" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model,name:account_tax_unece.model_account_tax +msgid "Tax" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields.selection,name:account_tax_unece.selection__unece_code_list__type__tax_categ +msgid "Tax Categories (UNCL 5305)" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields.selection,name:account_tax_unece.selection__unece_code_list__type__tax_type +msgid "Tax Types (UNCL 5153)" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model,name:account_tax_unece.model_account_tax_template +msgid "Templates for Taxes" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_unece_code_list__type +msgid "Type" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_categ_code +msgid "UNECE Category Code" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_categ_id +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__unece_categ_id +msgid "UNECE Tax Category" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_type_id +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__unece_type_id +msgid "UNECE Tax Type" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_type_code +msgid "UNECE Type Code" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model,name:account_tax_unece.model_unece_code_list +msgid "UNECE nomenclatures" +msgstr "" + +#. module: account_tax_unece +#: model_terms:ir.ui.view,arch_db:account_tax_unece.view_tax_template_form +msgid "Unece" +msgstr "" From 40ca1646de69c1c8734010f82996a6e0602c6572 Mon Sep 17 00:00:00 2001 From: syera bonneaux Date: Fri, 4 Nov 2022 14:55:13 +0100 Subject: [PATCH 16/29] [MIG] account_tax_unece: Migration to 16.0 --- account_tax_unece/__manifest__.py | 2 +- .../migrations/14.0.1.0.0/pre-migration.py | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) delete mode 100644 account_tax_unece/migrations/14.0.1.0.0/pre-migration.py diff --git a/account_tax_unece/__manifest__.py b/account_tax_unece/__manifest__.py index 3c743609..110776eb 100644 --- a/account_tax_unece/__manifest__.py +++ b/account_tax_unece/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Account Tax UNECE", - "version": "14.0.1.0.0", + "version": "16.0.1.0.0", "category": "Accounting & Finance", "license": "AGPL-3", "development_status": "Production/Stable", diff --git a/account_tax_unece/migrations/14.0.1.0.0/pre-migration.py b/account_tax_unece/migrations/14.0.1.0.0/pre-migration.py deleted file mode 100644 index db78c16b..00000000 --- a/account_tax_unece/migrations/14.0.1.0.0/pre-migration.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2021 Akretion France (http://www.akretion.com/) -# @author: Alexis de Lattre -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from openupgradelib import openupgrade - - -@openupgrade.migrate() -def migrate(env, version): - # The field unece_due_date_id was present in v13 with ondelete='restrict' - # and dropped in v14. So we need to set to to null to avoid an error - # when odoo will try to delete the entries in unece.code.list - sql = "UPDATE account_tax SET unece_due_date_id=null, unece_due_date_code=null" - openupgrade.logged_query(env.cr, sql) From 6cc49acc4b433aa3a4e6f91e0974b303ed764042 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 1 Dec 2022 11:48:07 +0100 Subject: [PATCH 17/29] account_tax_unece: add a unit test --- account_tax_unece/README.rst | 10 +++---- account_tax_unece/i18n/account_tax_unece.pot | 26 +------------------ .../static/description/index.html | 6 ++--- account_tax_unece/tests/test_tax_unece.py | 7 +++++ 4 files changed, 16 insertions(+), 33 deletions(-) diff --git a/account_tax_unece/README.rst b/account_tax_unece/README.rst index 44322644..ee416364 100644 --- a/account_tax_unece/README.rst +++ b/account_tax_unece/README.rst @@ -14,13 +14,13 @@ Account Tax UNECE :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcommunity--data--files-lightgray.png?logo=github - :target: https://github.com/OCA/community-data-files/tree/14.0/account_tax_unece + :target: https://github.com/OCA/community-data-files/tree/16.0/account_tax_unece :alt: OCA/community-data-files .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/community-data-files-14-0/community-data-files-14-0-account_tax_unece + :target: https://translation.odoo-community.org/projects/community-data-files-16-0/community-data-files-16-0-account_tax_unece :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/101/14.0 + :target: https://runbot.odoo-community.org/runbot/101/16.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -65,7 +65,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -106,6 +106,6 @@ Current `maintainer `__: |maintainer-alexis-via| -This module is part of the `OCA/community-data-files `_ project on GitHub. +This module is part of the `OCA/community-data-files `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_tax_unece/i18n/account_tax_unece.pot b/account_tax_unece/i18n/account_tax_unece.pot index 8bd11eb3..5f22785c 100644 --- a/account_tax_unece/i18n/account_tax_unece.pot +++ b/account_tax_unece/i18n/account_tax_unece.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -18,30 +18,6 @@ msgstr "" msgid "Companies" msgstr "" -#. module: account_tax_unece -#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__display_name -#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__display_name -#: model:ir.model.fields,field_description:account_tax_unece.field_res_company__display_name -#: model:ir.model.fields,field_description:account_tax_unece.field_unece_code_list__display_name -msgid "Display Name" -msgstr "" - -#. module: account_tax_unece -#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__id -#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__id -#: model:ir.model.fields,field_description:account_tax_unece.field_res_company__id -#: model:ir.model.fields,field_description:account_tax_unece.field_unece_code_list__id -msgid "ID" -msgstr "" - -#. module: account_tax_unece -#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax____last_update -#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template____last_update -#: model:ir.model.fields,field_description:account_tax_unece.field_res_company____last_update -#: model:ir.model.fields,field_description:account_tax_unece.field_unece_code_list____last_update -msgid "Last Modified on" -msgstr "" - #. module: account_tax_unece #: model:ir.model.fields,help:account_tax_unece.field_account_tax__unece_categ_id #: model:ir.model.fields,help:account_tax_unece.field_account_tax_template__unece_categ_id diff --git a/account_tax_unece/static/description/index.html b/account_tax_unece/static/description/index.html index 3496755c..b2bb3185 100644 --- a/account_tax_unece/static/description/index.html +++ b/account_tax_unece/static/description/index.html @@ -367,7 +367,7 @@

Account Tax UNECE

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Production/Stable License: AGPL-3 OCA/community-data-files Translate me on Weblate Try me on Runbot

+

Production/Stable License: AGPL-3 OCA/community-data-files Translate me on Weblate Try me on Runbot

This module adds two fields UNECE Type Code and UNECE Category Code on taxes to allow the use of the standards written by the United Nations Economic Commission for Europe (which @@ -415,7 +415,7 @@

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -444,7 +444,7 @@

Maintainers

promote its widespread use.

Current maintainer:

alexis-via

-

This module is part of the OCA/community-data-files project on GitHub.

+

This module is part of the OCA/community-data-files project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/account_tax_unece/tests/test_tax_unece.py b/account_tax_unece/tests/test_tax_unece.py index 1ea04aa6..be5b370e 100644 --- a/account_tax_unece/tests/test_tax_unece.py +++ b/account_tax_unece/tests/test_tax_unece.py @@ -19,3 +19,10 @@ def test_get_tax_vals(self): res = template._get_tax_vals(self.env.company, {}) self.assertFalse(res["unece_type_id"]) self.assertFalse(res["unece_categ_id"]) + + def test_company_speeddict_methods(self): + company = self.env.ref("base.main_company") + res_tax = company._get_tax_unece_speeddict() + self.assertTrue(isinstance(res_tax, dict)) + res_fp = company._get_fiscal_position_speeddict("en_US") + self.assertTrue(isinstance(res_fp, dict)) From 45ac9984d9dff9d78e2f7b54cca198a8f30686ab Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 26 Dec 2022 22:28:23 +0100 Subject: [PATCH 18/29] [FIX] account_tax_unece: remove HTML tags in 'note' of fiscal position --- account_tax_unece/__manifest__.py | 2 +- account_tax_unece/models/res_company.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/account_tax_unece/__manifest__.py b/account_tax_unece/__manifest__.py index 110776eb..e879f23d 100644 --- a/account_tax_unece/__manifest__.py +++ b/account_tax_unece/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Account Tax UNECE", - "version": "16.0.1.0.0", + "version": "16.0.1.1.0", "category": "Accounting & Finance", "license": "AGPL-3", "development_status": "Production/Stable", diff --git a/account_tax_unece/models/res_company.py b/account_tax_unece/models/res_company.py index 2682b311..4ebd9ba7 100644 --- a/account_tax_unece/models/res_company.py +++ b/account_tax_unece/models/res_company.py @@ -3,6 +3,7 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import models +from odoo.tools import html2plaintext, is_html_empty class ResCompany(models.Model): @@ -48,9 +49,13 @@ def _get_fiscal_position_speeddict(self, lang): [("company_id", "=", self.id)], ["name", "display_name", "note"] ) for fp in fpositions: + note = False + if fp["note"] and not is_html_empty(fp["note"]): + note = html2plaintext(fp["note"]) res[fp["id"]] = { "name": fp["name"], "display_name": fp["display_name"], - "note": fp["note"], # supposed to store the exemption reason + "note": note, + # "note" is a fields.Html() that stores the exemption reason } return res From e2995867ab9e150fea365ebe86ca220daa4890cb Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 5 Jun 2023 16:25:17 +0200 Subject: [PATCH 19/29] account_tax_unece: string update Minor view improvement --- account_tax_unece/views/account_tax.xml | 2 ++ account_tax_unece/views/account_tax_template.xml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/account_tax_unece/views/account_tax.xml b/account_tax_unece/views/account_tax.xml index 15c8eb9e..250ade1a 100644 --- a/account_tax_unece/views/account_tax.xml +++ b/account_tax_unece/views/account_tax.xml @@ -15,10 +15,12 @@ diff --git a/account_tax_unece/views/account_tax_template.xml b/account_tax_unece/views/account_tax_template.xml index 22aa9a60..bf0702a6 100644 --- a/account_tax_unece/views/account_tax_template.xml +++ b/account_tax_unece/views/account_tax_template.xml @@ -7,7 +7,7 @@ - + Date: Mon, 5 Jun 2023 15:06:02 +0000 Subject: [PATCH 20/29] Added translation using Weblate (French) Translated using Weblate (French) Currently translated at 100.0% (14 of 14 strings) Translation: community-data-files-16.0/community-data-files-16.0-account_tax_unece Translate-URL: https://translation.odoo-community.org/projects/community-data-files-16-0/community-data-files-16-0-account_tax_unece/fr/ --- account_tax_unece/__manifest__.py | 2 +- account_tax_unece/i18n/account_tax_unece.pot | 10 +- account_tax_unece/i18n/de.po | 34 +----- account_tax_unece/i18n/fr.po | 104 +++++++++++++++++++ 4 files changed, 115 insertions(+), 35 deletions(-) create mode 100644 account_tax_unece/i18n/fr.po diff --git a/account_tax_unece/__manifest__.py b/account_tax_unece/__manifest__.py index e879f23d..921f099c 100644 --- a/account_tax_unece/__manifest__.py +++ b/account_tax_unece/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Account Tax UNECE", - "version": "16.0.1.1.0", + "version": "16.0.1.2.0", "category": "Accounting & Finance", "license": "AGPL-3", "development_status": "Production/Stable", diff --git a/account_tax_unece/i18n/account_tax_unece.pot b/account_tax_unece/i18n/account_tax_unece.pot index 5f22785c..055a83ca 100644 --- a/account_tax_unece/i18n/account_tax_unece.pot +++ b/account_tax_unece/i18n/account_tax_unece.pot @@ -59,6 +59,11 @@ msgstr "" msgid "Type" msgstr "" +#. module: account_tax_unece +#: model_terms:ir.ui.view,arch_db:account_tax_unece.view_tax_template_form +msgid "UNECE" +msgstr "" + #. module: account_tax_unece #: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_categ_code msgid "UNECE Category Code" @@ -85,8 +90,3 @@ msgstr "" #: model:ir.model,name:account_tax_unece.model_unece_code_list msgid "UNECE nomenclatures" msgstr "" - -#. module: account_tax_unece -#: model_terms:ir.ui.view,arch_db:account_tax_unece.view_tax_template_form -msgid "Unece" -msgstr "" diff --git a/account_tax_unece/i18n/de.po b/account_tax_unece/i18n/de.po index 806fcd10..949adaff 100644 --- a/account_tax_unece/i18n/de.po +++ b/account_tax_unece/i18n/de.po @@ -19,30 +19,6 @@ msgstr "" msgid "Companies" msgstr "" -#. module: account_tax_unece -#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__display_name -#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__display_name -#: model:ir.model.fields,field_description:account_tax_unece.field_res_company__display_name -#: model:ir.model.fields,field_description:account_tax_unece.field_unece_code_list__display_name -msgid "Display Name" -msgstr "" - -#. module: account_tax_unece -#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__id -#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__id -#: model:ir.model.fields,field_description:account_tax_unece.field_res_company__id -#: model:ir.model.fields,field_description:account_tax_unece.field_unece_code_list__id -msgid "ID" -msgstr "" - -#. module: account_tax_unece -#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax____last_update -#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template____last_update -#: model:ir.model.fields,field_description:account_tax_unece.field_res_company____last_update -#: model:ir.model.fields,field_description:account_tax_unece.field_unece_code_list____last_update -msgid "Last Modified on" -msgstr "" - #. module: account_tax_unece #: model:ir.model.fields,help:account_tax_unece.field_account_tax__unece_categ_id #: model:ir.model.fields,help:account_tax_unece.field_account_tax_template__unece_categ_id @@ -84,6 +60,11 @@ msgstr "" msgid "Type" msgstr "" +#. module: account_tax_unece +#: model_terms:ir.ui.view,arch_db:account_tax_unece.view_tax_template_form +msgid "UNECE" +msgstr "" + #. module: account_tax_unece #: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_categ_code msgid "UNECE Category Code" @@ -110,8 +91,3 @@ msgstr "" #: model:ir.model,name:account_tax_unece.model_unece_code_list msgid "UNECE nomenclatures" msgstr "" - -#. module: account_tax_unece -#: model_terms:ir.ui.view,arch_db:account_tax_unece.view_tax_template_form -msgid "Unece" -msgstr "" diff --git a/account_tax_unece/i18n/fr.po b/account_tax_unece/i18n/fr.po new file mode 100644 index 00000000..7c54bfd8 --- /dev/null +++ b/account_tax_unece/i18n/fr.po @@ -0,0 +1,104 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_tax_unece +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-06-05 16:10+0000\n" +"Last-Translator: Alexis de Lattre \n" +"Language-Team: none\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: account_tax_unece +#: model:ir.model,name:account_tax_unece.model_res_company +msgid "Companies" +msgstr "Sociétés" + +#. module: account_tax_unece +#: model:ir.model.fields,help:account_tax_unece.field_account_tax__unece_categ_id +#: model:ir.model.fields,help:account_tax_unece.field_account_tax_template__unece_categ_id +msgid "" +"Select the Tax Category Code of the official nomenclature of the United " +"Nations Economic Commission for Europe (UNECE), DataElement 5305" +msgstr "" +"Sélectionnez le code de la catégorie de taxe au sein de la nomenclature " +"officielle de la Commission économique pour l'Europe des Nations unies " +"(UNECE), DataElement 5305" + +#. module: account_tax_unece +#: model:ir.model.fields,help:account_tax_unece.field_account_tax__unece_type_id +#: model:ir.model.fields,help:account_tax_unece.field_account_tax_template__unece_type_id +msgid "" +"Select the Tax Type Code of the official nomenclature of the United Nations " +"Economic Commission for Europe (UNECE), DataElement 5153" +msgstr "" +"Sélectionnez le code de type de taxe au sein de la nomenclature officielle " +"de la Commission économique pour l'Europe des Nations unies (UNECE), " +"DataElement 5153" + +#. module: account_tax_unece +#: model:ir.model,name:account_tax_unece.model_account_tax +msgid "Tax" +msgstr "Taxe" + +#. module: account_tax_unece +#: model:ir.model.fields.selection,name:account_tax_unece.selection__unece_code_list__type__tax_categ +msgid "Tax Categories (UNCL 5305)" +msgstr "Catégories de taxes (UNCL 5305)" + +#. module: account_tax_unece +#: model:ir.model.fields.selection,name:account_tax_unece.selection__unece_code_list__type__tax_type +msgid "Tax Types (UNCL 5153)" +msgstr "Types de taxes (UNCL 5153)" + +#. module: account_tax_unece +#: model:ir.model,name:account_tax_unece.model_account_tax_template +msgid "Templates for Taxes" +msgstr "Modèles de taxes" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_unece_code_list__type +msgid "Type" +msgstr "Type" + +#. module: account_tax_unece +#: model_terms:ir.ui.view,arch_db:account_tax_unece.view_tax_template_form +msgid "UNECE" +msgstr "" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_categ_code +msgid "UNECE Category Code" +msgstr "Code de la catégorie UNECE" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_categ_id +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__unece_categ_id +msgid "UNECE Tax Category" +msgstr "Catégorie de taxe de l'UNECE" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_type_id +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__unece_type_id +msgid "UNECE Tax Type" +msgstr "Type de taxe de l'UNECE" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_type_code +msgid "UNECE Type Code" +msgstr "Code du type UNECE" + +#. module: account_tax_unece +#: model:ir.model,name:account_tax_unece.model_unece_code_list +msgid "UNECE nomenclatures" +msgstr "Nomenclatures UNECE" + +#~ msgid "Unece" +#~ msgstr "UNECE" From 68e4d3f89f392a38a50185d79defe6f0ef771dc6 Mon Sep 17 00:00:00 2001 From: Ivorra78 Date: Wed, 2 Aug 2023 09:50:24 +0000 Subject: [PATCH 21/29] Added translation using Weblate (Spanish) Translated using Weblate (Spanish) Currently translated at 100.0% (14 of 14 strings) Translation: community-data-files-16.0/community-data-files-16.0-account_tax_unece Translate-URL: https://translation.odoo-community.org/projects/community-data-files-16-0/community-data-files-16-0-account_tax_unece/es/ --- account_tax_unece/README.rst | 15 +-- account_tax_unece/i18n/es.po | 101 ++++++++++++++++++ .../static/description/index.html | 40 +++---- 3 files changed, 131 insertions(+), 25 deletions(-) create mode 100644 account_tax_unece/i18n/es.po diff --git a/account_tax_unece/README.rst b/account_tax_unece/README.rst index ee416364..db9e9d43 100644 --- a/account_tax_unece/README.rst +++ b/account_tax_unece/README.rst @@ -2,10 +2,13 @@ Account Tax UNECE ================= -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:40c52d9b2b371c1a8a0c588ea5f9dcd660aae8d10f9cd86322581a3716598732 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png :target: https://odoo-community.org/page/development-status @@ -19,11 +22,11 @@ Account Tax UNECE .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/community-data-files-16-0/community-data-files-16-0-account_tax_unece :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/101/16.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/community-data-files&target_branch=16.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module adds two fields *UNECE Type Code* and *UNECE Category Code* on taxes to allow the use of the standards written by the @@ -64,7 +67,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed +If you spotted it first, help us to smash it by providing a detailed and welcomed `feedback `_. Do not contact contributors directly about support or help with technical issues. diff --git a/account_tax_unece/i18n/es.po b/account_tax_unece/i18n/es.po new file mode 100644 index 00000000..e26490f8 --- /dev/null +++ b/account_tax_unece/i18n/es.po @@ -0,0 +1,101 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_tax_unece +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2023-08-02 12:09+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: account_tax_unece +#: model:ir.model,name:account_tax_unece.model_res_company +msgid "Companies" +msgstr "Compañías" + +#. module: account_tax_unece +#: model:ir.model.fields,help:account_tax_unece.field_account_tax__unece_categ_id +#: model:ir.model.fields,help:account_tax_unece.field_account_tax_template__unece_categ_id +msgid "" +"Select the Tax Category Code of the official nomenclature of the United " +"Nations Economic Commission for Europe (UNECE), DataElement 5305" +msgstr "" +"Seleccione el código de categoría fiscal de la nomenclatura oficial de la " +"Comisión Económica para Europa de las Naciones Unidas (UNECE), elemento de " +"datos 5305" + +#. module: account_tax_unece +#: model:ir.model.fields,help:account_tax_unece.field_account_tax__unece_type_id +#: model:ir.model.fields,help:account_tax_unece.field_account_tax_template__unece_type_id +msgid "" +"Select the Tax Type Code of the official nomenclature of the United Nations " +"Economic Commission for Europe (UNECE), DataElement 5153" +msgstr "" +"Seleccione el Código de Tipo de Impuesto de la nomenclatura oficial de la " +"Comisión Económica para Europa de las Naciones Unidas (UNECE), Elemento de " +"Datos 5153" + +#. module: account_tax_unece +#: model:ir.model,name:account_tax_unece.model_account_tax +msgid "Tax" +msgstr "Impuesto" + +#. module: account_tax_unece +#: model:ir.model.fields.selection,name:account_tax_unece.selection__unece_code_list__type__tax_categ +msgid "Tax Categories (UNCL 5305)" +msgstr "Categorías impositivas (UNCL 5305)" + +#. module: account_tax_unece +#: model:ir.model.fields.selection,name:account_tax_unece.selection__unece_code_list__type__tax_type +msgid "Tax Types (UNCL 5153)" +msgstr "Tipos de Impuestos (UNCL 5153)" + +#. module: account_tax_unece +#: model:ir.model,name:account_tax_unece.model_account_tax_template +msgid "Templates for Taxes" +msgstr "Plantillas para impuestos" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_unece_code_list__type +msgid "Type" +msgstr "Tipo" + +#. module: account_tax_unece +#: model_terms:ir.ui.view,arch_db:account_tax_unece.view_tax_template_form +msgid "UNECE" +msgstr "CEPE" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_categ_code +msgid "UNECE Category Code" +msgstr "Código de categoría de la CEPE (UNECE)" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_categ_id +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__unece_categ_id +msgid "UNECE Tax Category" +msgstr "Categoría impositiva de la CEPE (UNECE)" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_type_id +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax_template__unece_type_id +msgid "UNECE Tax Type" +msgstr "Tipo de impuesto de la CEPE (UNECE)" + +#. module: account_tax_unece +#: model:ir.model.fields,field_description:account_tax_unece.field_account_tax__unece_type_code +msgid "UNECE Type Code" +msgstr "Código de tipo CEPE (UNECE)" + +#. module: account_tax_unece +#: model:ir.model,name:account_tax_unece.model_unece_code_list +msgid "UNECE nomenclatures" +msgstr "Nomenclaturas de la UNECE" diff --git a/account_tax_unece/static/description/index.html b/account_tax_unece/static/description/index.html index b2bb3185..7ee5a1ff 100644 --- a/account_tax_unece/static/description/index.html +++ b/account_tax_unece/static/description/index.html @@ -1,20 +1,20 @@ - + - + Account Tax UNECE