diff --git a/addons/account/views/report_payment_receipt_templates.xml b/addons/account/views/report_payment_receipt_templates.xml index 923980f81fb22..05deb47ce87f7 100644 --- a/addons/account/views/report_payment_receipt_templates.xml +++ b/addons/account/views/report_payment_receipt_templates.xml @@ -44,7 +44,7 @@ - + diff --git a/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py b/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py index 31f41919ff3fc..620b35173b9bc 100644 --- a/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py +++ b/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py @@ -611,7 +611,8 @@ def _import_retrieve_partner_vals(self, tree, role): 'vat': self._find_value(f'.//cac:Accounting{role}Party/cac:Party//cbc:CompanyID[string-length(text()) > 5]', tree), 'phone': self._find_value(f'.//cac:Accounting{role}Party/cac:Party//cbc:Telephone', tree), 'mail': self._find_value(f'.//cac:Accounting{role}Party/cac:Party//cbc:ElectronicMail', tree), - 'name': self._find_value(f'.//cac:Accounting{role}Party/cac:Party//cbc:Name', tree), + 'name': self._find_value(f'.//cac:Accounting{role}Party/cac:Party//cbc:Name', tree) or + self._find_value(f'.//cac:Accounting{role}Party/cac:Party//cbc:RegistrationName', tree), 'country_code': self._find_value(f'.//cac:Accounting{role}Party/cac:Party//cac:Country//cbc:IdentificationCode', tree), } diff --git a/addons/account_edi_ubl_cii_tax_extension/__init__.py b/addons/account_edi_ubl_cii_tax_extension/__init__.py new file mode 100644 index 0000000000000..d6210b1285d37 --- /dev/null +++ b/addons/account_edi_ubl_cii_tax_extension/__init__.py @@ -0,0 +1,3 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from . import models diff --git a/addons/account_edi_ubl_cii_tax_extension/__manifest__.py b/addons/account_edi_ubl_cii_tax_extension/__manifest__.py new file mode 100644 index 0000000000000..f3bd0cb4a44e5 --- /dev/null +++ b/addons/account_edi_ubl_cii_tax_extension/__manifest__.py @@ -0,0 +1,18 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. +{ + 'name': 'Tax extension for UBL/CII', + 'version': '1.0', + 'summary': 'Tax extension for UBL/CII', + 'description': """ + This module adds 2 useful fields on the taxes for electronic invoicing: the tax category code and the tax exemption reason code. + These fields will be read when generating Peppol Bis 3 or Factur-X xml, for instance. + """, + 'category': 'Accounting/Accounting', + 'website': 'https://www.odoo.com/app/invoicing', + 'depends': ['account_edi_ubl_cii'], + 'data': [ + 'views/account_tax_views.xml', + ], + 'installable': True, + 'license': 'LGPL-3', +} diff --git a/addons/account_edi_ubl_cii_tax_extension/i18n/account_edi_ubl_cii_tax_extension.pot b/addons/account_edi_ubl_cii_tax_extension/i18n/account_edi_ubl_cii_tax_extension.pot new file mode 100644 index 0000000000000..af7b0be6d2dfd --- /dev/null +++ b/addons/account_edi_ubl_cii_tax_extension/i18n/account_edi_ubl_cii_tax_extension.pot @@ -0,0 +1,491 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_edi_ubl_cii_tax_extension +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-09-16 07:48+0000\n" +"PO-Revision-Date: 2024-09-16 07:48+0000\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_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_category_code__ae +msgid "AE - Vat Reverse Charge" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_category_code__b +msgid "B - Transferred (VAT), In Italy" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model,name:account_edi_ubl_cii_tax_extension.model_account_edi_common +msgid "" +"Common functions for EDI documents: generate the data, the constraints, etc" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_category_code__e +msgid "E - Exempt from Tax" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_category_code__g +msgid "G - Free export item, VAT not charged" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_category_code__k +msgid "K - VAT exempt for EEA intra-community supply of goods and services" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_category_code__l +msgid "L - Canary Islands general indirect tax" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_category_code__m +msgid "M - Tax for production, services and importation in Ceuta and Melilla" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_category_code__o +msgid "O - Services outside scope of tax" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_category_code__s +msgid "S - Standard rate" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model,name:account_edi_ubl_cii_tax_extension.model_account_tax +msgid "Tax" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields,field_description:account_edi_ubl_cii_tax_extension.field_account_tax__ubl_cii_tax_category_code +msgid "Tax Category Code" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields,field_description:account_edi_ubl_cii_tax_extension.field_account_tax__ubl_cii_tax_exemption_reason_code +msgid "Tax Exemption Reason Code" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields,help:account_edi_ubl_cii_tax_extension.field_account_tax__ubl_cii_tax_category_code +msgid "The VAT category code used for electronic invoicing purposes." +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields,help:account_edi_ubl_cii_tax_extension.field_account_tax__ubl_cii_tax_exemption_reason_code +msgid "" +"The reason why the amount is exempted from VAT or why no VAT is being " +"charged, used for electronic invoicing purposes." +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132 +msgid "" +"VATEX-EU-132 - Exempt based on article 132 of Council Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1a +msgid "" +"VATEX-EU-132-1A - Exempt based on article 132, section 1 (a) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1b +msgid "" +"VATEX-EU-132-1B - Exempt based on article 132, section 1 (b) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1c +msgid "" +"VATEX-EU-132-1C - Exempt based on article 132, section 1 (c) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1d +msgid "" +"VATEX-EU-132-1D - Exempt based on article 132, section 1 (d) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1e +msgid "" +"VATEX-EU-132-1E - Exempt based on article 132, section 1 (e) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1f +msgid "" +"VATEX-EU-132-1F - Exempt based on article 132, section 1 (f) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1g +msgid "" +"VATEX-EU-132-1G - Exempt based on article 132, section 1 (g) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1h +msgid "" +"VATEX-EU-132-1H - Exempt based on article 132, section 1 (h) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1i +msgid "" +"VATEX-EU-132-1I - Exempt based on article 132, section 1 (i) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1j +msgid "" +"VATEX-EU-132-1J - Exempt based on article 132, section 1 (j) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1k +msgid "" +"VATEX-EU-132-1K - Exempt based on article 132, section 1 (k) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1l +msgid "" +"VATEX-EU-132-1L - Exempt based on article 132, section 1 (l) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1m +msgid "" +"VATEX-EU-132-1M - Exempt based on article 132, section 1 (m) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1n +msgid "" +"VATEX-EU-132-1N - Exempt based on article 132, section 1 (n) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1o +msgid "" +"VATEX-EU-132-1O - Exempt based on article 132, section 1 (o) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1p +msgid "" +"VATEX-EU-132-1P - Exempt based on article 132, section 1 (p) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-132-1q +msgid "" +"VATEX-EU-132-1Q - Exempt based on article 132, section 1 (q) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-143 +msgid "" +"VATEX-EU-143 - Exempt based on article 143 of Council Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-143-1a +msgid "" +"VATEX-EU-143-1A - Exempt based on article 143, section 1 (a) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-143-1b +msgid "" +"VATEX-EU-143-1B - Exempt based on article 143, section 1 (b) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-143-1c +msgid "" +"VATEX-EU-143-1C - Exempt based on article 143, section 1 (c) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-143-1d +msgid "" +"VATEX-EU-143-1D - Exempt based on article 143, section 1 (d) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-143-1e +msgid "" +"VATEX-EU-143-1E - Exempt based on article 143, section 1 (e) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-143-1f +msgid "" +"VATEX-EU-143-1F - Exempt based on article 143, section 1 (f) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-143-1fa +msgid "" +"VATEX-EU-143-1FA - Exempt based on article 143, section 1 (fa) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-143-1g +msgid "" +"VATEX-EU-143-1G - Exempt based on article 143, section 1 (g) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-143-1h +msgid "" +"VATEX-EU-143-1H - Exempt based on article 143, section 1 (h) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-143-1i +msgid "" +"VATEX-EU-143-1I - Exempt based on article 143, section 1 (i) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-143-1j +msgid "" +"VATEX-EU-143-1J - Exempt based on article 143, section 1 (j) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-143-1k +msgid "" +"VATEX-EU-143-1K - Exempt based on article 143, section 1 (k) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-143-1l +msgid "" +"VATEX-EU-143-1L - Exempt based on article 143, section 1 (l) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-148 +msgid "" +"VATEX-EU-148 - Exempt based on article 148 of Council Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-148-a +msgid "" +"VATEX-EU-148-A - Exempt based on article 148, section (a) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-148-b +msgid "" +"VATEX-EU-148-B - Exempt based on article 148, section (b) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-148-c +msgid "" +"VATEX-EU-148-C - Exempt based on article 148, section (c) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-148-d +msgid "" +"VATEX-EU-148-D - Exempt based on article 148, section (d) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-148-e +msgid "" +"VATEX-EU-148-E - Exempt based on article 148, section (e) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-148-f +msgid "" +"VATEX-EU-148-F - Exempt based on article 148, section (f) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-148-g +msgid "" +"VATEX-EU-148-G - Exempt based on article 148, section (g) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-151 +msgid "" +"VATEX-EU-151 - Exempt based on article 151 of Council Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-151-1a +msgid "" +"VATEX-EU-151-1A - Exempt based on article 151, section 1 (a) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-151-1aa +msgid "" +"VATEX-EU-151-1AA - Exempt based on article 151, section 1 (aa) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-151-1b +msgid "" +"VATEX-EU-151-1B - Exempt based on article 151, section 1 (b) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-151-1c +msgid "" +"VATEX-EU-151-1C - Exempt based on article 151, section 1 (c) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-151-1d +msgid "" +"VATEX-EU-151-1D - Exempt based on article 151, section 1 (d) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-151-1e +msgid "" +"VATEX-EU-151-1E - Exempt based on article 151, section 1 (e) of Council " +"Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-309 +msgid "" +"VATEX-EU-309 - Exempt based on article 309 of Council Directive 2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex-eu-79-c +msgid "" +"VATEX-EU-79-C - Exempt based on article 79, point c of Council Directive " +"2006/112/EC" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex_eu_ae +msgid "VATEX-EU-AE - Reverse charge" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex_eu_d +msgid "" +"VATEX-EU-D - Intra-Community acquisition from second hand means of transport" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex_eu_f +msgid "VATEX-EU-F - Intra-Community acquisition of second hand goods" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex_eu_g +msgid "VATEX-EU-G - Export outside the EU" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex_eu_i +msgid "VATEX-EU-I - Intra-Community acquisition of works of art" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex_eu_ic +msgid "VATEX-EU-IC - Intra-Community supply" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex_eu_j +msgid "" +"VATEX-EU-J - Intra-Community acquisition of collectors items and antiques" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex_eu_o +msgid "VATEX-EU-O - Not subject to VAT" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex_fr-cnwvat +msgid "" +"VATEX-FR-CNWVAT - France domestic Credit Notes without VAT, due to supplier " +"forfeit of VAT for discount" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_exemption_reason_code__vatex_fr-franchise +msgid "VATEX-FR-FRANCHISE - France domestic VAT franchise in base" +msgstr "" + +#. module: account_edi_ubl_cii_tax_extension +#: model:ir.model.fields.selection,name:account_edi_ubl_cii_tax_extension.selection__account_tax__ubl_cii_tax_category_code__z +msgid "Z - Zero rated goods" +msgstr "" diff --git a/addons/account_edi_ubl_cii_tax_extension/models/__init__.py b/addons/account_edi_ubl_cii_tax_extension/models/__init__.py new file mode 100644 index 0000000000000..c05dfd8cb57b1 --- /dev/null +++ b/addons/account_edi_ubl_cii_tax_extension/models/__init__.py @@ -0,0 +1,2 @@ +from . import account_tax +from . import account_edi_common diff --git a/addons/account_edi_ubl_cii_tax_extension/models/account_edi_common.py b/addons/account_edi_ubl_cii_tax_extension/models/account_edi_common.py new file mode 100644 index 0000000000000..8c9141576a6d2 --- /dev/null +++ b/addons/account_edi_ubl_cii_tax_extension/models/account_edi_common.py @@ -0,0 +1,77 @@ +from odoo import models + +TAX_EXEMPTION_MAPPING = { + 'VATEX-EU-79-C': 'Exempt based on article 79, point c of Council Directive 2006/112/EC', + 'VATEX-EU-132': 'Exempt based on article 132 of Council Directive 2006/112/EC', + 'VATEX-EU-132-1A': 'Exempt based on article 132, section 1 (a) of Council Directive 2006/112/EC', + 'VATEX-EU-132-1B': 'Exempt based on article 132, section 1 (b) of Council Directive 2006/112/EC', + 'VATEX-EU-132-1C': 'Exempt based on article 132, section 1 (c) of Council Directive 2006/112/EC', + 'VATEX-EU-132-1D': 'Exempt based on article 132, section 1 (d) of Council Directive 2006/112/EC', + 'VATEX-EU-132-1E': 'Exempt based on article 132, section 1 (e) of Council Directive 2006/112/EC', + 'VATEX-EU-132-1F': 'Exempt based on article 132, section 1 (f) of Council Directive 2006/112/EC', + 'VATEX-EU-132-1G': 'Exempt based on article 132, section 1 (g) of Council Directive 2006/112/EC', + 'VATEX-EU-132-1H': 'Exempt based on article 132, section 1 (h) of Council Directive 2006/112/EC', + 'VATEX-EU-132-1I': 'Exempt based on article 132, section 1 (i) of Council Directive 2006/112/EC', + 'VATEX-EU-132-1J': 'Exempt based on article 132, section 1 (j) of Council Directive 2006/112/EC', + 'VATEX-EU-132-1K': 'Exempt based on article 132, section 1 (k) of Council Directive 2006/112/EC', + 'VATEX-EU-132-1L': 'Exempt based on article 132, section 1 (l) of Council Directive 2006/112/EC', + 'VATEX-EU-132-1M': 'Exempt based on article 132, section 1 (m) of Council Directive 2006/112/EC', + 'VATEX-EU-132-1N': 'Exempt based on article 132, section 1 (n) of Council Directive 2006/112/EC', + 'VATEX-EU-132-1O': 'Exempt based on article 132, section 1 (o) of Council Directive 2006/112/EC', + 'VATEX-EU-132-1P': 'Exempt based on article 132, section 1 (p) of Council Directive 2006/112/EC', + 'VATEX-EU-132-1Q': 'Exempt based on article 132, section 1 (q) of Council Directive 2006/112/EC', + 'VATEX-EU-143': 'Exempt based on article 143 of Council Directive 2006/112/EC', + 'VATEX-EU-143-1A': 'Exempt based on article 143, section 1 (a) of Council Directive 2006/112/EC', + 'VATEX-EU-143-1B': 'Exempt based on article 143, section 1 (b) of Council Directive 2006/112/EC', + 'VATEX-EU-143-1C': 'Exempt based on article 143, section 1 (c) of Council Directive 2006/112/EC', + 'VATEX-EU-143-1D': 'Exempt based on article 143, section 1 (d) of Council Directive 2006/112/EC', + 'VATEX-EU-143-1E': 'Exempt based on article 143, section 1 (e) of Council Directive 2006/112/EC', + 'VATEX-EU-143-1F': 'Exempt based on article 143, section 1 (f) of Council Directive 2006/112/EC', + 'VATEX-EU-143-1FA': 'Exempt based on article 143, section 1 (fa) of Council Directive 2006/112/EC', + 'VATEX-EU-143-1G': 'Exempt based on article 143, section 1 (g) of Council Directive 2006/112/EC', + 'VATEX-EU-143-1H': 'Exempt based on article 143, section 1 (h) of Council Directive 2006/112/EC', + 'VATEX-EU-143-1I': 'Exempt based on article 143, section 1 (i) of Council Directive 2006/112/EC', + 'VATEX-EU-143-1J': 'Exempt based on article 143, section 1 (j) of Council Directive 2006/112/EC', + 'VATEX-EU-143-1K': 'Exempt based on article 143, section 1 (k) of Council Directive 2006/112/EC', + 'VATEX-EU-143-1L': 'Exempt based on article 143, section 1 (l) of Council Directive 2006/112/EC', + 'VATEX-EU-148': 'Exempt based on article 148 of Council Directive 2006/112/EC', + 'VATEX-EU-148-A': 'Exempt based on article 148, section (a) of Council Directive 2006/112/EC', + 'VATEX-EU-148-B': 'Exempt based on article 148, section (b) of Council Directive 2006/112/EC', + 'VATEX-EU-148-C': 'Exempt based on article 148, section (c) of Council Directive 2006/112/EC', + 'VATEX-EU-148-D': 'Exempt based on article 148, section (d) of Council Directive 2006/112/EC', + 'VATEX-EU-148-E': 'Exempt based on article 148, section (e) of Council Directive 2006/112/EC', + 'VATEX-EU-148-F': 'Exempt based on article 148, section (f) of Council Directive 2006/112/EC', + 'VATEX-EU-148-G': 'Exempt based on article 148, section (g) of Council Directive 2006/112/EC', + 'VATEX-EU-151': 'Exempt based on article 151 of Council Directive 2006/112/EC', + 'VATEX-EU-151-1A': 'Exempt based on article 151, section 1 (a) of Council Directive 2006/112/EC', + 'VATEX-EU-151-1AA': 'Exempt based on article 151, section 1 (aa) of Council Directive 2006/112/EC', + 'VATEX-EU-151-1B': 'Exempt based on article 151, section 1 (b) of Council Directive 2006/112/EC', + 'VATEX-EU-151-1C': 'Exempt based on article 151, section 1 (c) of Council Directive 2006/112/EC', + 'VATEX-EU-151-1D': 'Exempt based on article 151, section 1 (d) of Council Directive 2006/112/EC', + 'VATEX-EU-151-1E': 'Exempt based on article 151, section 1 (e) of Council Directive 2006/112/EC', + 'VATEX-EU-309': 'Exempt based on article 309 of Council Directive 2006/112/EC', + 'VATEX-EU-AE': 'Reverse charge', + 'VATEX-EU-D': 'Intra-Community acquisition from second hand means of transport', + 'VATEX-EU-F': 'Intra-Community acquisition of second hand goods', + 'VATEX-EU-G': 'Export outside the EU', + 'VATEX-EU-I': 'Intra-Community acquisition of works of art', + 'VATEX-EU-IC': 'Intra-Community supply', + 'VATEX-EU-O': 'Not subject to VAT', + 'VATEX-EU-J': 'Intra-Community acquisition of collectors items and antiques', + 'VATEX-FR-FRANCHISE': 'France domestic VAT franchise in base', + 'VATEX-FR-CNWVAT': 'France domestic Credit Notes without VAT, due to supplier forfeit of VAT for discount', +} + + +class AccountEdiCommon(models.AbstractModel): + _inherit = "account.edi.common" + + def _get_tax_unece_codes(self, invoice, tax): + if tax.ubl_cii_tax_category_code: + tax_exemption_reason = TAX_EXEMPTION_MAPPING.get(tax.ubl_cii_tax_exemption_reason_code) + return { + 'tax_category_code': tax.ubl_cii_tax_category_code, + 'tax_exemption_reason_code': tax.ubl_cii_tax_exemption_reason_code, + 'tax_exemption_reason': tax_exemption_reason, + } + return super()._get_tax_unece_codes(invoice, tax) diff --git a/addons/account_edi_ubl_cii_tax_extension/models/account_tax.py b/addons/account_edi_ubl_cii_tax_extension/models/account_tax.py new file mode 100644 index 0000000000000..caeda6eeeeeaf --- /dev/null +++ b/addons/account_edi_ubl_cii_tax_extension/models/account_tax.py @@ -0,0 +1,97 @@ +from odoo import api, fields, models + + +class AccountTax(models.Model): + _inherit = 'account.tax' + + ubl_cii_tax_category_code = fields.Selection( + help="The VAT category code used for electronic invoicing purposes.", + string="Tax Category Code", + selection=[ + ('AE', 'AE - Vat Reverse Charge'), + ('E', 'E - Exempt from Tax'), + ('S', 'S - Standard rate'), + ('Z', 'Z - Zero rated goods'), + ('G', 'G - Free export item, VAT not charged'), + ('O', 'O - Services outside scope of tax'), + ('K', 'K - VAT exempt for EEA intra-community supply of goods and services'), + ('L', 'L - Canary Islands general indirect tax'), + ('M', 'M - Tax for production, services and importation in Ceuta and Melilla'), + ('B', 'B - Transferred (VAT), In Italy') + ] + ) + ubl_cii_tax_exemption_reason_code = fields.Selection( + help="The reason why the amount is exempted from VAT or why no VAT is being charged, used for electronic invoicing purposes.", + string="Tax Exemption Reason Code", + selection=[ + ('VATEX-EU-79-C', 'VATEX-EU-79-C - Exempt based on article 79, point c of Council Directive 2006/112/EC'), + ('VATEX-EU-132', 'VATEX-EU-132 - Exempt based on article 132 of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1A', 'VATEX-EU-132-1A - Exempt based on article 132, section 1 (a) of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1B', 'VATEX-EU-132-1B - Exempt based on article 132, section 1 (b) of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1C', 'VATEX-EU-132-1C - Exempt based on article 132, section 1 (c) of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1D', 'VATEX-EU-132-1D - Exempt based on article 132, section 1 (d) of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1E', 'VATEX-EU-132-1E - Exempt based on article 132, section 1 (e) of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1F', 'VATEX-EU-132-1F - Exempt based on article 132, section 1 (f) of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1G', 'VATEX-EU-132-1G - Exempt based on article 132, section 1 (g) of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1H', 'VATEX-EU-132-1H - Exempt based on article 132, section 1 (h) of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1I', 'VATEX-EU-132-1I - Exempt based on article 132, section 1 (i) of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1J', 'VATEX-EU-132-1J - Exempt based on article 132, section 1 (j) of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1K', 'VATEX-EU-132-1K - Exempt based on article 132, section 1 (k) of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1L', 'VATEX-EU-132-1L - Exempt based on article 132, section 1 (l) of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1M', 'VATEX-EU-132-1M - Exempt based on article 132, section 1 (m) of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1N', 'VATEX-EU-132-1N - Exempt based on article 132, section 1 (n) of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1O', 'VATEX-EU-132-1O - Exempt based on article 132, section 1 (o) of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1P', 'VATEX-EU-132-1P - Exempt based on article 132, section 1 (p) of Council Directive 2006/112/EC'), + ('VATEX-EU-132-1Q', 'VATEX-EU-132-1Q - Exempt based on article 132, section 1 (q) of Council Directive 2006/112/EC'), + ('VATEX-EU-143', 'VATEX-EU-143 - Exempt based on article 143 of Council Directive 2006/112/EC'), + ('VATEX-EU-143-1A', 'VATEX-EU-143-1A - Exempt based on article 143, section 1 (a) of Council Directive 2006/112/EC'), + ('VATEX-EU-143-1B', 'VATEX-EU-143-1B - Exempt based on article 143, section 1 (b) of Council Directive 2006/112/EC'), + ('VATEX-EU-143-1C', 'VATEX-EU-143-1C - Exempt based on article 143, section 1 (c) of Council Directive 2006/112/EC'), + ('VATEX-EU-143-1D', 'VATEX-EU-143-1D - Exempt based on article 143, section 1 (d) of Council Directive 2006/112/EC'), + ('VATEX-EU-143-1E', 'VATEX-EU-143-1E - Exempt based on article 143, section 1 (e) of Council Directive 2006/112/EC'), + ('VATEX-EU-143-1F', 'VATEX-EU-143-1F - Exempt based on article 143, section 1 (f) of Council Directive 2006/112/EC'), + ('VATEX-EU-143-1FA', 'VATEX-EU-143-1FA - Exempt based on article 143, section 1 (fa) of Council Directive 2006/112/EC'), + ('VATEX-EU-143-1G', 'VATEX-EU-143-1G - Exempt based on article 143, section 1 (g) of Council Directive 2006/112/EC'), + ('VATEX-EU-143-1H', 'VATEX-EU-143-1H - Exempt based on article 143, section 1 (h) of Council Directive 2006/112/EC'), + ('VATEX-EU-143-1I', 'VATEX-EU-143-1I - Exempt based on article 143, section 1 (i) of Council Directive 2006/112/EC'), + ('VATEX-EU-143-1J', 'VATEX-EU-143-1J - Exempt based on article 143, section 1 (j) of Council Directive 2006/112/EC'), + ('VATEX-EU-143-1K', 'VATEX-EU-143-1K - Exempt based on article 143, section 1 (k) of Council Directive 2006/112/EC'), + ('VATEX-EU-143-1L', 'VATEX-EU-143-1L - Exempt based on article 143, section 1 (l) of Council Directive 2006/112/EC'), + ('VATEX-EU-148', 'VATEX-EU-148 - Exempt based on article 148 of Council Directive 2006/112/EC'), + ('VATEX-EU-148-A', 'VATEX-EU-148-A - Exempt based on article 148, section (a) of Council Directive 2006/112/EC'), + ('VATEX-EU-148-B', 'VATEX-EU-148-B - Exempt based on article 148, section (b) of Council Directive 2006/112/EC'), + ('VATEX-EU-148-C', 'VATEX-EU-148-C - Exempt based on article 148, section (c) of Council Directive 2006/112/EC'), + ('VATEX-EU-148-D', 'VATEX-EU-148-D - Exempt based on article 148, section (d) of Council Directive 2006/112/EC'), + ('VATEX-EU-148-E', 'VATEX-EU-148-E - Exempt based on article 148, section (e) of Council Directive 2006/112/EC'), + ('VATEX-EU-148-F', 'VATEX-EU-148-F - Exempt based on article 148, section (f) of Council Directive 2006/112/EC'), + ('VATEX-EU-148-G', 'VATEX-EU-148-G - Exempt based on article 148, section (g) of Council Directive 2006/112/EC'), + ('VATEX-EU-151', 'VATEX-EU-151 - Exempt based on article 151 of Council Directive 2006/112/EC'), + ('VATEX-EU-151-1A', 'VATEX-EU-151-1A - Exempt based on article 151, section 1 (a) of Council Directive 2006/112/EC'), + ('VATEX-EU-151-1AA', 'VATEX-EU-151-1AA - Exempt based on article 151, section 1 (aa) of Council Directive 2006/112/EC'), + ('VATEX-EU-151-1B', 'VATEX-EU-151-1B - Exempt based on article 151, section 1 (b) of Council Directive 2006/112/EC'), + ('VATEX-EU-151-1C', 'VATEX-EU-151-1C - Exempt based on article 151, section 1 (c) of Council Directive 2006/112/EC'), + ('VATEX-EU-151-1D', 'VATEX-EU-151-1D - Exempt based on article 151, section 1 (d) of Council Directive 2006/112/EC'), + ('VATEX-EU-151-1E', 'VATEX-EU-151-1E - Exempt based on article 151, section 1 (e) of Council Directive 2006/112/EC'), + ('VATEX-EU-309', 'VATEX-EU-309 - Exempt based on article 309 of Council Directive 2006/112/EC'), + ('VATEX_EU_AE', 'VATEX-EU-AE - Reverse charge'), + ('VATEX_EU_D', 'VATEX-EU-D - Intra-Community acquisition from second hand means of transport'), + ('VATEX_EU_F', 'VATEX-EU-F - Intra-Community acquisition of second hand goods'), + ('VATEX_EU_G', 'VATEX-EU-G - Export outside the EU'), + ('VATEX_EU_I', 'VATEX-EU-I - Intra-Community acquisition of works of art'), + ('VATEX_EU_IC', 'VATEX-EU-IC - Intra-Community supply'), + ('VATEX_EU_O', 'VATEX-EU-O - Not subject to VAT'), + ('VATEX_EU_J', 'VATEX-EU-J - Intra-Community acquisition of collectors items and antiques'), + ('VATEX_FR-FRANCHISE', 'VATEX-FR-FRANCHISE - France domestic VAT franchise in base'), + ('VATEX_FR-CNWVAT', 'VATEX-FR-CNWVAT - France domestic Credit Notes without VAT, due to supplier forfeit of VAT for discount'), + ] + ) + + def _requires_exemption_reason(self): + self.ensure_one() + return self.ubl_cii_tax_category_code in ['AE', 'E', 'G', 'O', 'K'] + + @api.onchange("ubl_cii_tax_category_code") + def _onchange_ubl_cii_tax_category_code(self): + for tax in self: + if not tax._requires_exemption_reason(): + tax.ubl_cii_tax_exemption_reason_code = False diff --git a/addons/account_edi_ubl_cii_tax_extension/tests/__init__.py b/addons/account_edi_ubl_cii_tax_extension/tests/__init__.py new file mode 100644 index 0000000000000..94de31e8a5ac6 --- /dev/null +++ b/addons/account_edi_ubl_cii_tax_extension/tests/__init__.py @@ -0,0 +1 @@ +from . import test_ubl_cii_tax_extension diff --git a/addons/account_edi_ubl_cii_tax_extension/tests/test_ubl_cii_tax_extension.py b/addons/account_edi_ubl_cii_tax_extension/tests/test_ubl_cii_tax_extension.py new file mode 100644 index 0000000000000..79fe0bbd6e05b --- /dev/null +++ b/addons/account_edi_ubl_cii_tax_extension/tests/test_ubl_cii_tax_extension.py @@ -0,0 +1,36 @@ +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from lxml import etree +from odoo import Command +from odoo.addons.account.tests.common import AccountTestInvoicingCommon +from odoo.tests import tagged + + +@tagged('post_install', '-at_install') +class TestAccountEdiUblCiiTaxExtension(AccountTestInvoicingCommon): + + @classmethod + def setUpClass(cls, chart_template_ref=None): + super().setUpClass(chart_template_ref=chart_template_ref) + + cls.reverse_charge_tax = cls.company_data['default_tax_sale'].copy({'name': 'Reverse charge tax', 'ubl_cii_tax_category_code': 'AE', 'ubl_cii_tax_exemption_reason_code': 'VATEX_EU_AE'}) + cls.zero_rated_tax = cls.company_data['default_tax_sale'].copy({'name': 'Zero rated tax', 'ubl_cii_tax_category_code': 'Z'}) + cls.prod_tax = cls.company_data['default_tax_sale'].copy({'name': 'Production tax', 'ubl_cii_tax_category_code': 'M'}) + cls.free_export_tax = cls.company_data['default_tax_sale'].copy({'name': 'Free export tax', 'ubl_cii_tax_category_code': 'G', 'ubl_cii_tax_exemption_reason_code': 'VATEX-EU-132-1G'}) + + def test_classified_tax_category_codes(self): + ubl_taxes = (self.reverse_charge_tax + self.zero_rated_tax + self.prod_tax + self.free_export_tax) + # test tax by tax then with multiple taxes + tax_list = list(ubl_taxes) + [ubl_taxes] + for taxes in tax_list: + invoice = self.env["account.move"].create({ + "partner_id": self.partner_a.id, + "move_type": "out_invoice", + "invoice_line_ids": [Command.create({"name": "Test product", "price_unit": 100, "tax_ids": [Command.set(taxes.ids)]})], + }) + invoice.action_post() + xml = self.env['account.edi.xml.ubl_bis3']._export_invoice(invoice)[0] + root = etree.fromstring(xml) + for tax, node in zip(taxes, root.findall('.//{*}Item/{*}ClassifiedTaxCategory')): + self.assertEqual(node.findtext('.//{*}ID') or False, tax.ubl_cii_tax_category_code) + self.assertEqual(node.findtext('.//{*}TaxExemptionReasonCode') or False, tax.ubl_cii_tax_exemption_reason_code) diff --git a/addons/account_edi_ubl_cii_tax_extension/views/account_tax_views.xml b/addons/account_edi_ubl_cii_tax_extension/views/account_tax_views.xml new file mode 100644 index 0000000000000..a51064ea765f2 --- /dev/null +++ b/addons/account_edi_ubl_cii_tax_extension/views/account_tax_views.xml @@ -0,0 +1,17 @@ + + + + account.tax.form.inherit + account.tax + + + + + + + + + diff --git a/addons/hr_work_entry_holidays/models/hr_work_entry.py b/addons/hr_work_entry_holidays/models/hr_work_entry.py index 13906ddddcf88..d85e62561c2f4 100644 --- a/addons/hr_work_entry_holidays/models/hr_work_entry.py +++ b/addons/hr_work_entry_holidays/models/hr_work_entry.py @@ -1,7 +1,9 @@ -# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -from odoo import fields, models +from collections import defaultdict +from dateutil.relativedelta import relativedelta + +from odoo import api, fields, models class HrWorkEntry(models.Model): @@ -76,6 +78,27 @@ def action_refuse_leave(self): if leave_sudo: leave_sudo.action_refuse() + @api.model + def _get_leaves_duration_between_two_dates(self, employee_id, date_from, date_to): + date_from += relativedelta(hour=0, minute=0, second=0) + date_to += relativedelta(hour=23, minute=59, second=59) + leaves_work_entries = self.env['hr.work.entry'].search([ + ('employee_id', '=', employee_id.id), + ('date_start', '>=', date_from), + ('date_stop', '<=', date_to), + ('state', '!=', 'cancelled'), + ('leave_id', '!=', False), + ('leave_state', '=', 'validate'), + ]) + entries_by_leave_type = defaultdict(lambda: self.env['hr.work.entry']) + for work_entry in leaves_work_entries: + entries_by_leave_type[work_entry.leave_id.holiday_status_id] |= work_entry + + durations_by_leave_type = {} + for leave_type, work_entries in entries_by_leave_type.items(): + durations_by_leave_type[leave_type] = sum(work_entries.mapped('duration')) + return durations_by_leave_type + class HrWorkEntryType(models.Model): _inherit = 'hr.work.entry.type' diff --git a/addons/l10n_es/models/template_es_common.py b/addons/l10n_es/models/template_es_common.py index 9db2ee89e989c..d79aec73ef0af 100644 --- a/addons/l10n_es/models/template_es_common.py +++ b/addons/l10n_es/models/template_es_common.py @@ -37,6 +37,8 @@ def _get_es_common_res_company(self): 'default_cash_difference_expense_account_id': 'account_common_678', 'account_sale_tax_id': 'account_tax_template_s_iva21b', 'account_purchase_tax_id': 'account_tax_template_p_iva21_bc', + 'deferred_expense_account_id': 'account_common_480', + 'deferred_revenue_account_id': 'account_common_485', }, } diff --git a/addons/l10n_fr/data/template/account.account-fr.csv b/addons/l10n_fr/data/template/account.account-fr.csv index b348db3664105..e48fc3cfbf617 100644 --- a/addons/l10n_fr/data/template/account.account-fr.csv +++ b/addons/l10n_fr/data/template/account.account-fr.csv @@ -54,60 +54,60 @@ "pcg_13917","Investment grants credited to the profit and loss account - Enterprises and private bodies","139170","equity","","False","Subventions d'équipement inscrites au compte de résultat - Entreprises et organismes privés" "pcg_13918","Investment grants credited to the profit and loss account - Other","139180","equity","","False","Subventions d'équipement inscrites au compte de résultat - Autres" "pcg_1398","Other investment grants (same location as for Account 1391)","139800","equity","","False","Autres subventions d'investissement (même ventilation que celle du compte 1391)" -"pcg_1423","Provisions for reconstitution of mining and petroleum deposits","142300","liability_current","","False","Provisions reconstitution des gisements miniers et pétroliers" -"pcg_1424","Provisions for investment (employee profit share)","142400","liability_current","","False","Provisions pour investissement (participation des salariés)" -"pcg_1431","Regulated provisions for inventories - Price increase","143100","liability_current","","False","Provisions réglementées relatives aux stocks - Hausse de prix" -"pcg_1432","Regulated provisions for inventories - Exchange rate fluctuations","143200","liability_current","","False","Provisions réglementées relatives aux stocks - Fluctuation des cours" -"pcg_144","Tax-regulated provisions relating to other asset components","144000","liability_current","","False","Provisions réglementées relatives aux autres éléments de l'actif" -"pcg_145","Depreciation by derogation","145000","liability_current","","False","Amortissements dérogatoires" -"pcg_146","Special revaluation provision","146000","liability_current","","False","Provision spéciale de réévaluation" -"pcg_147","Capital gains reinvested","147000","liability_current","","False","Plus-values réinvesties" -"pcg_148","Other tax-regulated provisions","148000","liability_current","","False","Autres provisions réglementées" -"pcg_1511","Provisions for litigation","151100","liability_current","","False","Provisions pour litiges" -"pcg_1512","Provisions for customer warranties","151200","liability_current","","False","Provisions pour garanties données aux clients" -"pcg_1513","Provisions for losses on futures","151300","liability_current","","False","Provisions pour pertes sur marchés à terme" -"pcg_1514","Provisions for fines and penalties","151400","liability_current","","False","Provisions pour amendes et pénalités" -"pcg_1515","Provisions for foreign exchange losses","151500","liability_current","","False","Provisions pour pertes de change" -"pcg_1516","Provisions for losses on contracts","151600","liability_current","","False","Provisions pour pertes sur contrats" -"pcg_1518","Other provisions for liabilities","151800","liability_current","","False","Autres provisions pour risques" -"pcg_153","Provisions for pensions and similar obligations","153000","liability_current","","False","Provisions pour pensions et obligations similaires" -"pcg_154","Provisions for restructuring","154000","liability_current","","False","Provisions pour restructurations" -"pcg_155","Provisions for taxation","155000","liability_current","","False","Provisions pour impôts" -"pcg_156","Provisions for fixed asset renewal (concession entities)","156000","liability_current","","False","Provisions pour renouvellement des immobilisations (entreprises concessionnaires)" -"pcg_157","Provisions for deferred charges","157000","liability_current","","False","Provisions pour charges à répartir sur plusieurs exercices" -"pcg_1572","Provisions for expenses to be spread over several years - Major maintenance or overhauls","157200","liability_current","","False","Provisions pour charges à répartir sur plusieurs exercices - Gros entretien ou grandes révisions" -"pcg_1581","Provisions for remediation","158100","liability_current","","False","Provisions pour remises en état" -"pcg_161","Convertible debenture loans","161000","liability_current","","False","Emprunts obligataires convertibles" -"pcg_162","Bonds representing net liabilities given in trust","162000","liability_current","","False","Obligations représentatives de passifs nets remis en fiducie" -"pcg_163","Other debenture loans","163000","liability_current","","False","Autres emprunts obligataires" -"pcg_164","Loans from credit institutions","164000","liability_current","","False","Emprunts auprès des établissements de crédit" -"pcg_1651","Deposits","165100","liability_current","","False","Dépôts" -"pcg_1655","Sureties","165500","liability_current","","False","Cautionnements" -"pcg_1661","Employee profit sharing - Blocked accounts","166100","liability_current","","False","Participation des salariés aux résultats - Comptes bloqués" -"pcg_1662","Employee profit sharing - Profit share funds","166200","liability_current","","False","Participation des salariés aux résultats - Fonds de participation" -"pcg_1671","Loans and debts with special conditions - Issues of non-voting shares","167100","liability_current","","False","Emprunts et dettes assortis de conditions particulières - Emissions de titres participatifs" -"pcg_1674","Loans and debts with special conditions - Advances by the state subject to conditions","167400","liability_current","","False","Emprunts et dettes assortis de conditions particulières - Avances conditionnées de l'État" -"pcg_1675","Loans and debts with special conditions - Participating loans","167500","liability_current","","False","Prêts participatifs" -"pcg_1681","Other loans and similar debts payable - Other loans","168100","liability_current","","False","Autres emprunts et dettes assimilées - Autres emprunts" -"pcg_1685","Other loans and similar debts payable - Capitalised life annuities","168500","liability_current","","False","Autres emprunts et dettes assimilées - Rentes viagères capitalisées" -"pcg_1687","Other loans and similar debts payable - Other debts payable","168700","liability_current","","False","Autres emprunts et dettes assimilées - Autres dettes" -"pcg_1688","Accrued interest","168800","liability_current","","False","Intérêts courus" -"pcg_16881","Accrued interest on convertible debenture loans","168810","liability_current","","False","Intérêts courus sur emprunts obligataires convertibles" -"pcg_16883","Accrued interest on other debenture loans","168830","liability_current","","False","Intérêts courus sur autres emprunts obligataires" -"pcg_16884","Accrued interest on loans from credit institutions","168840","liability_current","","False","Intérêts courus sur emprunts auprès des établissements de crédit" -"pcg_16885","Accrued interest on deposits and sureties received","168850","liability_current","","False","Intérêts courus sur dépôts et cautionnements reçus" -"pcg_16886","Accrued interest on employee profit share","168860","liability_current","","False","Intérêts courus sur participation des salariés aux résultats" -"pcg_16887","Accrued interest on loans and debts payable subject to particular conditions","168870","liability_current","","False","Intérêts courus sur emprunts et dettes assortis de conditions particulières" -"pcg_16888","Accrued interest on other loans and similar debts payable","168880","liability_current","","False","Intérêts courus sur autres emprunts et dettes assimilées" +"pcg_1423","Provisions for reconstitution of mining and petroleum deposits","142300","liability_non_current","","False","Provisions reconstitution des gisements miniers et pétroliers" +"pcg_1424","Provisions for investment (employee profit share)","142400","liability_non_current","","False","Provisions pour investissement (participation des salariés)" +"pcg_1431","Regulated provisions for inventories - Price increase","143100","liability_non_current","","False","Provisions réglementées relatives aux stocks - Hausse de prix" +"pcg_1432","Regulated provisions for inventories - Exchange rate fluctuations","143200","liability_non_current","","False","Provisions réglementées relatives aux stocks - Fluctuation des cours" +"pcg_144","Tax-regulated provisions relating to other asset components","144000","liability_non_current","","False","Provisions réglementées relatives aux autres éléments de l'actif" +"pcg_145","Depreciation by derogation","145000","liability_non_current","","False","Amortissements dérogatoires" +"pcg_146","Special revaluation provision","146000","liability_non_current","","False","Provision spéciale de réévaluation" +"pcg_147","Capital gains reinvested","147000","liability_non_current","","False","Plus-values réinvesties" +"pcg_148","Other tax-regulated provisions","148000","liability_non_current","","False","Autres provisions réglementées" +"pcg_1511","Provisions for litigation","151100","liability_non_current","","False","Provisions pour litiges" +"pcg_1512","Provisions for customer warranties","151200","liability_non_current","","False","Provisions pour garanties données aux clients" +"pcg_1513","Provisions for losses on futures","151300","liability_non_current","","False","Provisions pour pertes sur marchés à terme" +"pcg_1514","Provisions for fines and penalties","151400","liability_non_current","","False","Provisions pour amendes et pénalités" +"pcg_1515","Provisions for foreign exchange losses","151500","liability_non_current","","False","Provisions pour pertes de change" +"pcg_1516","Provisions for losses on contracts","151600","liability_non_current","","False","Provisions pour pertes sur contrats" +"pcg_1518","Other provisions for liabilities","151800","liability_non_current","","False","Autres provisions pour risques" +"pcg_153","Provisions for pensions and similar obligations","153000","liability_non_current","","False","Provisions pour pensions et obligations similaires" +"pcg_154","Provisions for restructuring","154000","liability_non_current","","False","Provisions pour restructurations" +"pcg_155","Provisions for taxation","155000","liability_non_current","","False","Provisions pour impôts" +"pcg_156","Provisions for fixed asset renewal (concession entities)","156000","liability_non_current","","False","Provisions pour renouvellement des immobilisations (entreprises concessionnaires)" +"pcg_157","Provisions for deferred charges","157000","liability_non_current","","False","Provisions pour charges à répartir sur plusieurs exercices" +"pcg_1572","Provisions for expenses to be spread over several years - Major maintenance or overhauls","157200","liability_non_current","","False","Provisions pour charges à répartir sur plusieurs exercices - Gros entretien ou grandes révisions" +"pcg_1581","Provisions for remediation","158100","liability_non_current","","False","Provisions pour remises en état" +"pcg_161","Convertible debenture loans","161000","liability_non_current","","False","Emprunts obligataires convertibles" +"pcg_162","Bonds representing net liabilities given in trust","162000","liability_non_current","","False","Obligations représentatives de passifs nets remis en fiducie" +"pcg_163","Other debenture loans","163000","liability_non_current","","False","Autres emprunts obligataires" +"pcg_164","Loans from credit institutions","164000","liability_non_current","","False","Emprunts auprès des établissements de crédit" +"pcg_1651","Deposits","165100","liability_non_current","","False","Dépôts" +"pcg_1655","Sureties","165500","liability_non_current","","False","Cautionnements" +"pcg_1661","Employee profit sharing - Blocked accounts","166100","liability_non_current","","False","Participation des salariés aux résultats - Comptes bloqués" +"pcg_1662","Employee profit sharing - Profit share funds","166200","liability_non_current","","False","Participation des salariés aux résultats - Fonds de participation" +"pcg_1671","Loans and debts with special conditions - Issues of non-voting shares","167100","liability_non_current","","False","Emprunts et dettes assortis de conditions particulières - Emissions de titres participatifs" +"pcg_1674","Loans and debts with special conditions - Advances by the state subject to conditions","167400","liability_non_current","","False","Emprunts et dettes assortis de conditions particulières - Avances conditionnées de l'État" +"pcg_1675","Loans and debts with special conditions - Participating loans","167500","liability_non_current","","False","Prêts participatifs" +"pcg_1681","Other loans and similar debts payable - Other loans","168100","liability_non_current","","False","Autres emprunts et dettes assimilées - Autres emprunts" +"pcg_1685","Other loans and similar debts payable - Capitalised life annuities","168500","liability_non_current","","False","Autres emprunts et dettes assimilées - Rentes viagères capitalisées" +"pcg_1687","Other loans and similar debts payable - Other debts payable","168700","liability_non_current","","False","Autres emprunts et dettes assimilées - Autres dettes" +"pcg_1688","Accrued interest","168800","liability_non_current","","False","Intérêts courus" +"pcg_16881","Accrued interest on convertible debenture loans","168810","liability_non_current","","False","Intérêts courus sur emprunts obligataires convertibles" +"pcg_16883","Accrued interest on other debenture loans","168830","liability_non_current","","False","Intérêts courus sur autres emprunts obligataires" +"pcg_16884","Accrued interest on loans from credit institutions","168840","liability_non_current","","False","Intérêts courus sur emprunts auprès des établissements de crédit" +"pcg_16885","Accrued interest on deposits and sureties received","168850","liability_non_current","","False","Intérêts courus sur dépôts et cautionnements reçus" +"pcg_16886","Accrued interest on employee profit share","168860","liability_non_current","","False","Intérêts courus sur participation des salariés aux résultats" +"pcg_16887","Accrued interest on loans and debts payable subject to particular conditions","168870","liability_non_current","","False","Intérêts courus sur emprunts et dettes assortis de conditions particulières" +"pcg_16888","Accrued interest on other loans and similar debts payable","168880","liability_non_current","","False","Intérêts courus sur autres emprunts et dettes assimilées" "pcg_169","Debt redemption premiums","169000","asset_current","","False","Primes de remboursement des obligations" -"pcg_171","Debts payable related to participating interests (group)","171000","liability_current","","False","Dettes rattachées à des participations (groupe)" -"pcg_174","Debts payable related to participating interests (apart from group)","174000","liability_current","","False","Dettes rattachées à des participations (hors groupe)" -"pcg_1781","Debts payable related to joint ventures - Principal","178100","liability_current","","False","Dettes rattachées à des sociétés en participation - Principal" -"pcg_1788","Debts payable related to joint ventures - Accrued interest","178800","liability_current","","False","Dettes rattachées à des sociétés en participation - Intérêts courus" -"pcg_181","Reciprocal branch accounts","181000","liability_current","","False","Comptes de liaison des établissements" -"pcg_186","Goods and services exchanged between establishments (expenses)","186000","liability_current","","False","Biens et prestations de services échangés entre établissements (charges)" -"pcg_187","Goods and services exchanged between establishments (income)","187000","liability_current","","False","Biens et prestations de services échangés entre établissements (produits)" -"pcg_188","Reciprocal joint venture accounts","188000","liability_current","","False","Comptes de liaison des sociétés en participation" +"pcg_171","Debts payable related to participating interests (group)","171000","liability_non_current","","False","Dettes rattachées à des participations (groupe)" +"pcg_174","Debts payable related to participating interests (apart from group)","174000","liability_non_current","","False","Dettes rattachées à des participations (hors groupe)" +"pcg_1781","Debts payable related to joint ventures - Principal","178100","liability_non_current","","False","Dettes rattachées à des sociétés en participation - Principal" +"pcg_1788","Debts payable related to joint ventures - Accrued interest","178800","liability_non_current","","False","Dettes rattachées à des sociétés en participation - Intérêts courus" +"pcg_181","Reciprocal branch accounts","181000","liability_non_current","","False","Comptes de liaison des établissements" +"pcg_186","Goods and services exchanged between establishments (expenses)","186000","liability_non_current","","False","Biens et prestations de services échangés entre établissements (charges)" +"pcg_187","Goods and services exchanged between establishments (income)","187000","liability_non_current","","False","Biens et prestations de services échangés entre établissements (produits)" +"pcg_188","Reciprocal joint venture accounts","188000","liability_non_current","","False","Comptes de liaison des sociétés en participation" "pcg_2011","Intangible fixed assets - Establishment costs - Incorporation costs","201100","asset_fixed","","False","Immobilisations incorporelles - Frais d'établissement - Frais de constitution" "pcg_2012","Intangible fixed assets - Establishment costs - Start-up costs","201200","asset_fixed","","False","Frais de premier établissement" "pcg_20121","Intangible fixed assets - Establishment costs - Commercial assessment costs","201210","asset_fixed","","False","Immobilisations incorporelles - Frais d'établissement - Frais de prospection" diff --git a/addons/l10n_in_purchase_stock/models/stock_move.py b/addons/l10n_in_purchase_stock/models/stock_move.py index 5d9c415950c9a..5a4465e1473c4 100644 --- a/addons/l10n_in_purchase_stock/models/stock_move.py +++ b/addons/l10n_in_purchase_stock/models/stock_move.py @@ -10,7 +10,14 @@ def _l10n_in_get_product_price_unit(self): self.ensure_one() if line_id := self.purchase_line_id: if qty := line_id.product_qty: - return line_id.price_subtotal / qty + company_id = line_id.company_id + return line_id.currency_id._convert( + line_id.price_subtotal / qty, + company_id.currency_id, + company_id, + self.date, + round=False + ) return 0.00 return super()._l10n_in_get_product_price_unit() diff --git a/addons/l10n_in_sale_stock/models/stock_move.py b/addons/l10n_in_sale_stock/models/stock_move.py index bd7ed6db917f8..52799086c1ffc 100644 --- a/addons/l10n_in_sale_stock/models/stock_move.py +++ b/addons/l10n_in_sale_stock/models/stock_move.py @@ -10,7 +10,14 @@ def _l10n_in_get_product_price_unit(self): self.ensure_one() if line_id := self.sale_line_id: if qty := line_id.product_uom_qty: - return line_id.price_subtotal / qty + company_id = line_id.company_id + return line_id.currency_id._convert( + line_id.price_subtotal / qty, + company_id.currency_id, + company_id, + self.date, + round=False + ) return 0.00 return super()._l10n_in_get_product_price_unit() diff --git a/addons/l10n_qa/__init__.py b/addons/l10n_qa/__init__.py new file mode 100644 index 0000000000000..0650744f6bc69 --- /dev/null +++ b/addons/l10n_qa/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/addons/l10n_qa/__manifest__.py b/addons/l10n_qa/__manifest__.py new file mode 100644 index 0000000000000..c6b0b74dccd1d --- /dev/null +++ b/addons/l10n_qa/__manifest__.py @@ -0,0 +1,20 @@ +{ + 'name': 'Qatar - Accounting', + 'countries': ['qa'], + 'description': """ +This is the base module to manage the accounting chart for Qatar in Odoo. +============================================================================== +Qatar accounting basic charts and localization. +Activates: +- Chart of accounts + """, + 'category': 'Accounting/Localizations/Account Charts', + 'version': '1.0', + 'depends': [ + 'account', + ], + 'demo': [ + 'demo/demo_company.xml', + ], + 'license': 'LGPL-3', +} diff --git a/addons/l10n_qa/data/template/account.account-qa.csv b/addons/l10n_qa/data/template/account.account-qa.csv new file mode 100644 index 0000000000000..fe52843e9d14a --- /dev/null +++ b/addons/l10n_qa/data/template/account.account-qa.csv @@ -0,0 +1,137 @@ +"id","name","code","account_type","reconcile","name@ar_001" +"qa_account_100102","Bank Suspense Account","100102","asset_current","False","حساب التعليق البنكي" +"qa_account_100103","Outstanding Receipts","100103","asset_current","False","الإيصالات المستحقة" +"qa_account_100104","Outstanding Payments","100104","asset_current","False","المدفوعات المستحقة" +"qa_account_100106","Credit cards","100106","asset_current","False","البطاقات الائتمانية" +"qa_account_100107","Post Dated Cheques Received","100107","asset_current","False","الشيكات مؤجلة الصرف المستلمة" +"qa_account_100201","Accounts Receivable","100201","asset_receivable","True","الحسابات المدينة" +"qa_account_100202","Accounts Receivable (PoS)","100202","asset_receivable","True","الحسابات المدينة (نقطة البيع)" +"qa_account_100203","Other Receivable","100203","asset_current","False","المستحقات الأخرى" +"qa_account_100301","Deposit - Office Rent","100301","asset_current","False","إيداع - إيجار المكتب" +"qa_account_100302","Deposits - Customs","100302","asset_current","False","الإيداعات - الجمارك" +"qa_account_100303","Deposit to Immigration (Visa)","100303","asset_current","False","إيداع للهجرة (فيزا)" +"qa_account_100304","Deposit Others","100304","asset_current","False","إيداع آخر" +"qa_account_100401","Prepaid Medical Insurance","100401","asset_current","False","التأمين الصحي مسبق الدفع" +"qa_account_100402","Prepaid Life Insurance","100402","asset_current","False","التأمين على الحياة مسبق الدفع" +"qa_account_100403","Prepaid Office Rent","100403","asset_current","False","إيجار المكتب مسبق الدفع" +"qa_account_100404","Prepaid Other Insurance","100404","asset_current","False","التأمينات الأخرى مسبقة الدفع" +"qa_account_100405","Prepaid License Fees","100405","asset_current","False","رسوم الرخصة مسبقة الدفع" +"qa_account_100406","Prepaid Maintenance","100406","asset_current","False","الصيانة مسبقة الدفع" +"qa_account_100407","Prepaid Employees Housing","100407","asset_current","False","سكن الموظفين مسبق الدفع" +"qa_account_100408","Prepaid Schooling Fees","100408","asset_current","False","الرسوم الدراسية مسبقة الدفع" +"qa_account_100409","Prepaid Consultancy Fees","100409","asset_current","False","الرسوم الاستشارية مسبقة الدفع" +"qa_account_100410","Prepaid Legal Fees","100410","asset_current","False","الرسوم القانونية مسبقة الدفع" +"qa_account_100411","Prepaid Sponsorship Fees","100411","asset_current","False","رسوم الكفالة مسبقة الدفع" +"qa_account_100412","Prepaid Advertisement Expenses","100412","asset_current","False","نفقات الإعلان مسبقة الدفع" +"qa_account_100413","Prepaid Bank Guarantee","100413","asset_current","False","ضمان البنك مسبق الدفع" +"qa_account_100414","Prepaid Finance charge for Loans","100414","asset_current","False","رسوم التمويل مسبقة الدفع للقروض" +"qa_account_100415","Other Prepayments","100415","asset_current","False","المدفوعات المسبقة الأخرى" +"qa_account_100416","Prepaid Expenses","100416","asset_current","False","المصروفات المدفوعة مقدما" +"qa_account_100501","Handling Difference in Inventory","100501","asset_current","False","التعامل مع الفرق في المخزون" +"qa_account_100502","Inventory Valuation","100502","asset_current","False","تقييم المخزون" +"qa_account_100503","Stock Incoming","100503","asset_current","False","المخزون الوارد" +"qa_account_100504","Stock Outgoing","100504","asset_current","False","المخزون الصادر" +"qa_account_100505","Work in Progress (Inventory)","100505","asset_current","False","العمل قيد التنفيذ (المخزون)" +"qa_account_100601","Accumulated Depreciation of Motor Vehicles","100601","asset_fixed","False","حساب الإهلاك للمركبات" +"qa_account_100602","Amortisation on Leasehold Improvement","100602","asset_fixed","False","الاستهلاك عند تحسين العقارات المستأجرة" +"qa_account_100603","Leasehold Improvement","100603","asset_fixed","False","تحسين العقارات المستأجرة" +"qa_account_100604","Furniture and Equipment","100604","asset_fixed","False","الأثاث والمعدات" +"qa_account_100605","Computer Hardware & Software","100605","asset_fixed","False","أجهزة وبرامج الحاسوب" +"qa_account_100606","Accumulated Depreciation of Furniture & Office Equipment","100606","asset_fixed","False","حساب الإهلاك للأثاث والأدوات المكتبية" +"qa_account_100607","Accumulated Depreciation of Computer Hardware & Software","100607","asset_fixed","False","حساب الإهلاك لبرامج وأجهزة الحاسوب" +"qa_account_100701","Registration of Trademarks","100701","asset_current","False","تسجيل العلامات التجارية" +"qa_account_100801","Right of use Asset (IFRS 16)","100801","asset_fixed","False","حق استخدام الأصل (IFRS 16)" +"qa_account_100802","Accumulated Depreciation Right of use Asset (IFRS 16)","100802","asset_fixed","False","حق استخدام الأصل للإهلاك المتراكم (IFRS 16)" +"qa_account_200101","Payables","200101","liability_payable","True","المبالغ مستحقة الدفع" +"qa_account_200102","Trade Payables","200102","liability_payable","True","" +"qa_account_200103","Employees Payables","200103","liability_payable","True","المبالغ المستحقة للموظفين" +"qa_account_200104","Credit Notes to Customers","200104","liability_current","False","الإشعارات الدائنة للعملاء" +"qa_account_200201","Accrued - Salaries","200201","liability_current","False","مستحق - المرتبات" +"qa_account_200202","Accrued - Commissions","200202","liability_current","False","مستحق - العمولات" +"qa_account_200203","Accrued - Staff Bonus","200203","liability_current","False","مكافآت الموظفين المستحقة" +"qa_account_200204","Accrued Other Personnel Cost","200204","liability_current","False","تكاليف الموظفين الآخرين المستحقة" +"qa_account_200205","Accrued - Sponsorship","200205","liability_current","False","مستحق - الكفالة" +"qa_account_200301","Accrued - Utilities","200301","liability_current","False","مستحق - المرافق" +"qa_account_200302","Accrued - Telephone","200302","liability_current","False","مستحق - الهاتف" +"qa_account_200303","Accrued - Audit Fees","200303","liability_current","False","مستحق - رسوم التدقيق" +"qa_account_200304","Accrued - Office Rent","200304","liability_current","False","مستحق - إيجار المكتب" +"qa_account_200305","Accrued Others","200305","liability_current","False","المستحقات الأخرى" +"qa_account_200306","Accrued Qatar Customs","200306","liability_current","False","جمارك قطر المستحقة" +"qa_account_200401","Deferred income","200401","liability_current","False","الدخل المؤجل" +"qa_account_200501","Leave Tickets Provision","200501","liability_non_current","False","حكم تذاكر الطيران" +"qa_account_200502","Leave Days Provision","200502","liability_non_current","False","حكم أيام الإجازة" +"qa_account_200503","End of Service Provision","200503","liability_non_current","False","حكم نهاية الخدمة" +"qa_account_200504","Income Tax Provision","200504","liability_non_current","False","حكم ضريبة الدخل" +"qa_account_200901","VAT Input","200901","liability_current","False","مدخلات ضريبة القيمة المضافة" +"qa_account_200902","VAT Output","200902","liability_current","False","مخرجات ضريبة القيمة المضافة" +"qa_account_200903","VAT Receivable","200903","asset_non_current","False","ضريبة القيمة المضافة مستحقة الدفع" +"qa_account_200904","VAT Payable","200904","liability_non_current","False","ضريبة القيمة المضافة المستحقة" +"qa_account_200905","Tax Payable","200905","liability_current","False","الضريبة المستحقة" +"qa_account_200906","Tax Receivable","200906","liability_current","False","" +"qa_account_300100","Retained Earnings","300100","equity","False","" +"qa_account_300101","Undistributed Profits/Losses","300101","equity_unaffected","False","الأرباح/الخسائر غير الموزعة" +"qa_account_400100","Income Clearing Account","400100","income","False","" +"qa_account_400101","Sales Account","400101","income","False","حساب المبيعات" +"qa_account_400102","Sales of I/C","400102","income","False","المبيعات بين الشركات التابعة" +"qa_account_400103","Sales from Other Region","400103","income","False","المبيعات من منطقة أخرى" +"qa_account_400104","Management Consultancy Fees","400104","income","False","رسوم الاستشارة الإدارية" +"qa_account_400105","Advertising Income","400105","income","False","دخل الإعلان" +"qa_account_400201","Other Income","400201","income_other","False","دخل آخر" +"qa_account_400301","Gain on Difference on Exchange","400301","income_other","False","أرباح فرق صرف العملة" +"qa_account_400302","Cash Difference Gain","400302","income_other","False","أرباح فرق النقد" +"qa_account_400303","Excess In Till","400303","income_other","False","الفائض في صندوق النقود" +"qa_account_400304","Cash Discount Gain","400304","income_other","False","" +"qa_account_500101","Cost of Goods Sold in Trading","500101","expense_direct_cost","False","تكاليف البضائع المباعة في التجارة" +"qa_account_500102","Cost Of Goods Sold I/C Sales","500102","expense_direct_cost","False","تكاليف البضائع المباعة - المبيعات بين الشركات التابعة" +"qa_account_500200","Expense Clearing Account","500200","expense","False","" +"qa_account_500201","Medical Insurance","500201","expense","False","التأمين الصحي" +"qa_account_500202","End of Service Indemnity","500202","expense","False","تعويض نهاية الخدمة" +"qa_account_500203","Sponsorship Fees","500203","expense","False","رسوم الكفالة" +"qa_account_500301","Basic Salary","500301","expense","False","الراتب الأساسي" +"qa_account_500302","Housing Allowance","500302","expense","False","بدل السكن" +"qa_account_500303","Transportation Allowance","500303","expense","False","بدل المواصلات" +"qa_account_500304","Leave Ticket","500304","expense","False","تذكرة الطيران" +"qa_account_500305","Leave Salary","500305","expense","False","راتب الإجازة" +"qa_account_500306","Sales Commission","500306","expense","False","عمولة المبيعات" +"qa_account_500307","Visa Expenses","500307","expense","False","نفقات الفيزا" +"qa_account_500308","Staff Other Allowances","500308","expense","False","نفقات الموظفين الأخرى" +"qa_account_500309","Air tickets","500309","expense","False","تذاكر الطيران" +"qa_account_500401","Office Rent","500401","expense","False","إيجار المكتب" +"qa_account_500402","Warehouse Rent","500402","expense","False","إيجار المستودع" +"qa_account_500403","Water & Electricity","500403","expense","False","الماء والكهرباء" +"qa_account_500404","Other Utility Charges","500404","expense","False","" +"qa_account_500501","Audit Fees","500501","expense","False","رسوم التدقيق" +"qa_account_500502","Legal fees","500502","expense","False","الرسوم القانونية" +"qa_account_500503","Trade License Fees","500503","expense","False","رسوم الرخصة التجارية" +"qa_account_500504","Others - Professional Fees","500504","expense","False","غير ذلك - الرسوم المهنية" +"qa_account_500505","Insurance","500505","expense","False","التأمين" +"qa_account_500506","Previous Year Adjustments Account","500506","expense","False","حساب تعديلات العام الماضي" +"qa_account_500601","Credit Card Charges","500601","expense","False","رسوم البطاقة الائتمانية" +"qa_account_500602","Other Bank Charges","500602","expense","False","الرسوم البنكية الأخرى" +"qa_account_500603","Bank Finance & Loan Charges","500603","expense","False","رسوم القروض والتمويل البنكي" +"qa_account_500651","Income Tax Expense","500651","expense","False","نفقات ضريبة الدخل" +"qa_account_500701","Other - Advertising Expenses","500701","expense","False","غير ذلك - نفقات الإعلان" +"qa_account_500702","Training","500702","expense","False","التدريب" +"qa_account_500703","Consultancy Fees","500703","expense","False","الرسوم الاستشارية" +"qa_account_500801","Amortisation on Leasehold Improvement","500801","expense_depreciation","False","الاستهلاك عند تحسين العقارات المستأجرة" +"qa_account_500802","Vehicle Expenses","500802","expense_depreciation","False","نفقات المركبات" +"qa_account_500803","Depreciation of Motor Vehicles","500803","expense_depreciation","False","إهلاك المركبات" +"qa_account_500804","Depreciation of Furniture & Office Equipment","500804","expense_depreciation","False","إهلاك الأثاث والمعدات المكتبية" +"qa_account_500805","Depreciation of Computer Hard & Soft","500805","expense_depreciation","False","إهلاك أجهزة وبرامج الحاسوب" +"qa_account_500851","Depreciation on Right of use Asset (IFRS 16)","500851","expense_depreciation","False","إهلاك حق استخدام الأصل (IFRS 16)" +"qa_account_500901","Loss on Fixed Assets Disposal","500901","expense","False","خسائر التصرف في الأصول الثابتة" +"qa_account_500902","Cash Shortage","500902","expense","False","القصور النقدي" +"qa_account_500903","Loss on Difference on Exchange","500903","expense","False","حسائر فرق صرف العملة" +"qa_account_500904","Write Off Receivables & Payables","500904","expense","False","شطب الحسابات المدينة والدائنة" +"qa_account_500905","Write Off Inventory","500905","expense","False","شطب المخزون" +"qa_account_500906","Others - Provision & Write Off","500906","expense","False","غير ذلك - المَحافظ والتعديلات" +"qa_account_500907","Others","500907","expense","False","غير ذلك" +"qa_account_500908","Other Non-Operating Expenses","500908","expense","False","النفقات الأخرى غير التشغيلية" +"qa_account_500909","Cash Difference Loss","500909","expense","False","خسائر فريق النقد" +"qa_account_501101","Telephone","501101","expense","False","الهاتف" +"qa_account_501102","Others - Communication","501102","expense","False","غير ذلك - التواصل" +"qa_account_501103","Maintenance","501103","expense","False","الصيانة" +"qa_account_501104","Security & Guard","501104","expense","False","الأمن والحراسة" +"qa_account_501105","Cleaning","501105","expense","False","التنظيف" +"qa_account_501106","Others - Office Various Expenses","501106","expense","False","غير ذلك - نفقات المكتب المختلفة" +"qa_account_501107","Cash Discount Loss","501107","expense","False","خسارة الخصم النقدي" diff --git a/addons/l10n_qa/data/template/account.group-qa.csv b/addons/l10n_qa/data/template/account.group-qa.csv new file mode 100644 index 0000000000000..dde52445f8106 --- /dev/null +++ b/addons/l10n_qa/data/template/account.group-qa.csv @@ -0,0 +1,32 @@ +"id","code_prefix_start","code_prefix_end","name","name@ar_001" +"qa_group_01","1000","1000","Liquidity","السيولة" +"qa_group_02","1001","1001","Liquidity","السيولة" +"qa_group_03","1009","1009","Liquidity","السيولة" +"qa_group_04","1002","1002","Receivables","الحسابات المدينة" +"qa_group_05","1003","1003","Deposits","الإيداعات" +"qa_group_06","1004","1004","Prepaid Expenses","النفقات مسبقة الدفع" +"qa_group_07","1005","1005","Inventory","المخزون" +"qa_group_08","1006","1006","Company Assets & Depreciation","أصول الشركة والإهلاك" +"qa_group_09","1007","1007","Licensing and Copyrights","الترخيص وحقوق النشر" +"qa_group_10","1008","1008","IFRS16 Assets & Depreciation","أصول IFRS16 والإهلاك" +"qa_group_11","2001","2001","Payables","الحسابات الدائنة" +"qa_group_12","2002","2002","Accrued Employee Expenses","نفقات الموظفين المستحقة" +"qa_group_13","2003","2003","Accrued Expenses","النفقات المستحقة" +"qa_group_14","2004","2004","Deferrals","التأجيلات" +"qa_group_15","2005","2005","Provisions","الأحكام" +"qa_group_16","2009","2009"," VAT","ضريبة القيمة المضافة" +"qa_group_17","4001","4001","Operating Income","الإيرادات التشغيلية" +"qa_group_18","4002","4002","Non-Operating Income","الإيرادات غير التشغيلية" +"qa_group_19","4003","4003","Other gains & losses - Other Income","المكاسب والخسائر الأخرى - إيرادات أخرى" +"qa_group_20","5001","5001","Cost of Sales","تكلفة المبيعات" +"qa_group_21","5002","5002","Employees Expenses","مصروفات الموظفين" +"qa_group_22","5003","5003","Payroll Expenses","مصروفات الرواتب" +"qa_group_23","5004","5004","Office and Location Expenses","نفقات المكتب والموقع" +"qa_group_24","5005","5005","Company Expenses","مصروفات الشركة" +"qa_group_25","500600","500649","Finance Expenses","المصروفات المالية" +"qa_group_26","500650","500699","Income Tax","ضريبة الدخل" +"qa_group_27","5007","5007","Misc. Company Expenses","متفرقات. مصروفات الشركة" +"qa_group_28","500800","500849","Assets Depreciation Expenses","مصروفات استهلاك الأصول" +"qa_group_29","500851","500899","IFRS16 Depreciation","IFRS16 الإهلاك" +"qa_group_30","5009","5009","Other gains & losses - Expenses","الأرباح والخسائر الأخرى - المصروفات" +"qa_group_31","5011","5011","Misc. Office Expenses","متفرقات. نفقات مكتبية" diff --git a/addons/l10n_qa/demo/demo_company.xml b/addons/l10n_qa/demo/demo_company.xml new file mode 100644 index 0000000000000..1e19ad1c0b121 --- /dev/null +++ b/addons/l10n_qa/demo/demo_company.xml @@ -0,0 +1,35 @@ + + + + QA Company + + 117 Street 7, Block 4, Baaya, Qatar + Unit 07 - 10, 38/F Baaya + Baaya + + + +97423245875 + qatarcompany@example.com + www.qaexample.com + + + + QA Company + + + + + + + + + + + + + + + qa + + + diff --git a/addons/l10n_qa/i18n/ar_001.po b/addons/l10n_qa/i18n/ar_001.po new file mode 100644 index 0000000000000..399adb7d0091a --- /dev/null +++ b/addons/l10n_qa/i18n/ar_001.po @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_qa +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-08-29 11:32+0000\n" +"PO-Revision-Date: 2024-08-29 11:32+0000\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: l10n_qa +#: model:ir.model,name:l10n_qa.model_account_chart_template +msgid "Account Chart Template" +msgstr "قالب شجرة الحسابات" diff --git a/addons/l10n_qa/i18n/l10n_qa.pot b/addons/l10n_qa/i18n/l10n_qa.pot new file mode 100644 index 0000000000000..f199dc86f3127 --- /dev/null +++ b/addons/l10n_qa/i18n/l10n_qa.pot @@ -0,0 +1,21 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_qa +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-08-29 11:32+0000\n" +"PO-Revision-Date: 2024-08-29 11:32+0000\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: l10n_qa +#: model:ir.model,name:l10n_qa.model_account_chart_template +msgid "Account Chart Template" +msgstr "" diff --git a/addons/l10n_qa/models/__init__.py b/addons/l10n_qa/models/__init__.py new file mode 100644 index 0000000000000..2b9aa701cefd3 --- /dev/null +++ b/addons/l10n_qa/models/__init__.py @@ -0,0 +1 @@ +from . import template_qa diff --git a/addons/l10n_qa/models/template_qa.py b/addons/l10n_qa/models/template_qa.py new file mode 100644 index 0000000000000..5772645911db0 --- /dev/null +++ b/addons/l10n_qa/models/template_qa.py @@ -0,0 +1,45 @@ +from odoo import models +from odoo.addons.account.models.chart_template import template + + +class AccountChartTemplate(models.AbstractModel): + _inherit = 'account.chart.template' + + @template('qa') + def _get_qa_template_data(self): + return { + 'property_account_receivable_id': 'qa_account_100201', + 'property_account_payable_id': 'qa_account_200101', + 'property_account_expense_categ_id': 'qa_account_500101', + 'property_account_income_categ_id': 'qa_account_400101', + 'property_account_expense_id': 'qa_account_500101', + 'property_account_income_id': 'qa_account_400101', + 'property_stock_valuation_account_id': 'qa_account_100502', + 'property_stock_account_input_categ_id': 'qa_account_100503', + 'property_stock_account_output_categ_id': 'qa_account_100504', + 'property_stock_account_production_cost_id': 'qa_account_100505', + 'code_digits': '6', + } + + @template('qa', 'res.company') + def _get_qa_res_company(self): + return { + self.env.company.id: { + 'account_fiscal_country_id': 'base.qa', + 'bank_account_code_prefix': '1000', + 'cash_account_code_prefix': '1009', + 'transfer_account_code_prefix': '1001', + 'account_default_pos_receivable_account_id': 'qa_account_100202', + 'income_currency_exchange_account_id': 'qa_account_400301', + 'expense_currency_exchange_account_id': 'qa_account_500903', + 'account_journal_suspense_account_id': 'qa_account_100102', + 'account_journal_early_pay_discount_loss_account_id': 'qa_account_501107', + 'account_journal_early_pay_discount_gain_account_id': 'qa_account_400304', + 'account_journal_payment_debit_account_id': 'qa_account_100103', + 'account_journal_payment_credit_account_id': 'qa_account_100104', + 'default_cash_difference_income_account_id': 'qa_account_400302', + 'default_cash_difference_expense_account_id': 'qa_account_500909', + 'deferred_expense_account_id': 'qa_account_100416', + 'deferred_revenue_account_id': 'qa_account_200401', + }, + } diff --git a/addons/mail/static/src/core/common/composer.xml b/addons/mail/static/src/core/common/composer.xml index 67d76d86614fd..e9a8422fe940c 100644 --- a/addons/mail/static/src/core/common/composer.xml +++ b/addons/mail/static/src/core/common/composer.xml @@ -38,7 +38,9 @@ }" >
-