diff --git a/l10n_pt_vat/README.rst b/l10n_pt_vat/README.rst new file mode 100644 index 0000000..1dc75e2 --- /dev/null +++ b/l10n_pt_vat/README.rst @@ -0,0 +1,100 @@ +============== +Portugal - IVA +============== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:81e5b6f28b942cb6ca6117b5a4ad766962d1f379856e8ca7eee7dd64ca305c0e + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png + :target: https://odoo-community.org/page/development-status + :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%2Fl10n--portugal-lightgray.png?logo=github + :target: https://github.com/OCA/l10n-portugal/tree/17.0/l10n_pt_vat + :alt: OCA/l10n-portugal +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/l10n-portugal-17-0/l10n-portugal-17-0-l10n_pt_vat + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/l10n-portugal&target_branch=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This modules extends the base localization modules with a few VAT +specific functions that are required by the Portuguese Tax Authorities, +including: + +- The use of pre-defined legally accepted reasons for issuing credit + notes, as required for fields 40/41 of the VAT statement (Portaria nº + 255/2013). + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +On an Invoice, the VAT adjustment reason is available for selection. + +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 to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Open Source Integrators +* Sossia + +Contributors +------------ + +- Pedro Castro Silva (`Sossia `__) + +- `Open Source Integrators `__ + + - Daniel Reis (dreis@opensourceintegrators.com) + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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. + +.. |maintainer-dreispt| image:: https://github.com/dreispt.png?size=40px + :target: https://github.com/dreispt + :alt: dreispt + +Current `maintainer `__: + +|maintainer-dreispt| + +This module is part of the `OCA/l10n-portugal `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/l10n_pt_vat/__init__.py b/l10n_pt_vat/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/l10n_pt_vat/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/l10n_pt_vat/__manifest__.py b/l10n_pt_vat/__manifest__.py new file mode 100644 index 0000000..39f0386 --- /dev/null +++ b/l10n_pt_vat/__manifest__.py @@ -0,0 +1,27 @@ +# Copyright (C) 2021 Open Source Integrators () +# Copyright (C) 2014 Sossia, Lda. () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Portugal - IVA", + "version": "17.0.1.0.0", + "license": "AGPL-3", + "author": "Open Source Integrators, Sossia, Odoo Community Association (OCA)", + "summary": "Portuguese VAT requirements extensions", + "website": "https://github.com/OCA/l10n-portugal", + "category": "Accounting/Localizations", + "maintainers": ["dreispt"], + "development_status": "Production/Stable", + "depends": ["account", "l10n_pt"], + "data": [ + "security/ir.model.access.csv", + "data/vat_exempt_reason.xml", + "data/vat_adjustment_norm.xml", + "views/account_journal_view.xml", + "views/account_move_view.xml", + "views/account_tax_view.xml", + "views/l10n_pt_vat_exempt_reason_view.xml", + "views/vat_adjustment_norm_view.xml", + ], + "installable": True, + "auto_install": True, +} diff --git a/l10n_pt_vat/data/vat_adjustment_norm.xml b/l10n_pt_vat/data/vat_adjustment_norm.xml new file mode 100644 index 0000000..5ae596b --- /dev/null +++ b/l10n_pt_vat/data/vat_adjustment_norm.xml @@ -0,0 +1,96 @@ + + + + Art. 78º, nº 2 + + + + Art. 78º, nº 3 + + + + + Art. 78º, nº 4 + + + + Art. 78º, nº 6 + + + + + Art. 78º, nº 7, alínea a) + + + + + Art. 78º, nº 7, alínea b) + + + + + Art. 78º, nº 7, alínea c) + + + + + Art. 78º, nº 7, alínea d) + + + + + Art. 78º, nº 8, alínea b) + + + + Art. 78º, nº 8, alínea c) + + + + Art. 78º, nº 8, alínea d) + + + + + Art. 78º, nº 8, alínea e) + + + + Art. 78º, nº 12 + + + + Art. 78º-A, nº 2, alínea a) + + + + Art. 78º-A, nº 4, alínea a) + + + + Art. 78º-A, nº 4, alínea b) + + + + Art. 78º-A, nº 4, alínea c) + + + + Art. 78º-A, nº 4, alínea d) + + + + Art. 78º-B, nº 4 + + + + Art. 78º-C, nº 1 + + + + Art. 78º-C, nº 3 + + + diff --git a/l10n_pt_vat/data/vat_exempt_reason.xml b/l10n_pt_vat/data/vat_exempt_reason.xml new file mode 100644 index 0000000..33c073e --- /dev/null +++ b/l10n_pt_vat/data/vat_exempt_reason.xml @@ -0,0 +1,233 @@ + + + + M01 + Não sujeito - alínea c) do n.º 6 do art.º 16.º do CIVA + Despesas pagas em nome e por contas de terceiros - Artigo 16.º do CIVA + + + M02 + Isento IVA - Artigo 6.º do decreto-lei n.º 198/90 de 19 de junho + Exportações indiretas (venda a um exportador nacional) - valor superior a + 1.000€/fatura - Situações isentas - Artigo n.º 6º do decreto-lei n.º 198/90 de 19 de + junho + + + M04 + Isento IVA - Artigo 13º CIVA + Importações - Artigo 13.º do CIVA + + + M05 + Isento de IVA - n.º x do artigo 14 do CIVA, Colocar qual o n.º do artigo + 14.º do CIVA aplicável a isenção + Situações isentas - Isenções nas exportações, operações assimiladas e + transportes internacionais - Artigo 14.º do CIVA + + + M06 + Isento de IVA - n.º x do artigo 15.º do CIVA, colocar qual o n.º e + alínea aplicável à isenção + Regimes suspensivos - bens colocados em entrepostos fiscais e + alfandegários - Artigo 15.º do CIVA + + + M07 + Isento de IVA - n.º x do artigo 9.º do CIVA, colocar qual o n.º do + artigo 9.º do CIVA aplicável a isenção + Situações isentas - Operações Internas - Artigo 9.º do CIVA + + + M09 + IVA - não confere direito à dedução + Regime especial dos pequenos retalhistas - Artigo 60.º do CIVA - Artigo + 60.º do CIVA + + + M10 + IVA - regime de isenção + Regime especial de isenção - Artigo 53.º do CIVA (Faturação < 12.500€) - Artigo 53.º do CIVA + + + M11 + Não tributado + Regime especial do Tabaco e fósforos - Decreto-lei n.º 346/85 de 23 de + agosto + + + M12 + Regime da margem de lucro - Agências de viagens + Regime especial das agências de viagens e circuitos turísticos - n.º 2 do + art.º 4.º do Decreto-Lei n.º 221/85, de 3 de Julho + + + M13 + Regime da margem de lucro - Bens em segunda mão + Regime da margem de lucro - Bens em segunda mão - N.º 1 do art. 6.º do + anexo ao Decreto-Lei n.º 199/96, de 18 de Outubro + + + M14 + Regime da margem de lucro - Objetos de arte + Regime da margem de lucro - Objetos de arte - N.º 1 do art. 6.º do anexo + ao Decreto-Lei n.º 199/96, de 18 de Outubro + + + M15 + Regime da margem de lucro - Objetos de coleção e antiguidades + Regime da margem de lucro - Objetos de coleção e antiguidades - N.º 1 do + art. 6.º do anexo ao Decreto-Lei n.º 199/96, de 18 de Outubro + + + M16 + Colocar qual a alínea do artigo 14.º do RITI aplicável a isenção + Situações isentas - Transmissões Intracomunitárias - Artigo 14.º do RITI + + + M19 + Isenção do diploma xxxx + Outras isenções - Isenções temporárias determinadas em diplomas próprio + (exemplo: em 2022 isenção temporária alimentação animal para consumo) + + + M20 + IVA - Regime forfetário + IVA - Regime forfetário - Artigo 59.º-B n.º 2 do CIVA + + + M21 + IVA - não confere direito à dedução + Regime de tributação dos combustíveis líquidos aplicáveis aos + revendedores - N.º 4 do art.º 72 do CIVA + + + M22 + Mercadorias à Consignação + Mercadorias à Consignação - Artigo 38.º n.º 1 alínea a) + + + M30 + IVA - autoliquidação + Regime inversão Sucatas, resíduos e desperdícios (anexo E, CIVA) + (Situação em que o destinatário ou adquirente é o devedor do imposto) - Sector de + desperdícios, resíduos e sucatas recicláveis a que se refere a alínea i) do n.º 1 do + art.º 2.º do CIVA + + + M31 + IVA - autoliquidação + Regime inversão construção civil (Situação em que o destinatário ou + adquirente é o devedor do imposto) - Serviços de construção civil a que se refere a + alínea j) do n.º 1 do art.º 2.º do CIVA + + + M32 + IVA - autoliquidação + Regime de inversão emissão de gases efeito estufa (Situação em que o + destinatário ou adquirente é o devedor do imposto) - Emissões de gases com efeito de + estufa a que se refere a alínea l) do n.º 1 do art.º 2.º do CIVA + + + M33 + IVA - autoliquidação + Regime inversão na cortiça, madeira, pinhas e pinhões com casca (Situação + em que o destinatário ou adquirente é o devedor do imposto) - Emissões de gases com + efeito de estufa a que se refere a alínea m) do n.º 1 do art.º 2.º do CIVA + + + M40 + IVA - autoliquidação + Regime inversão regras de localização bens e prestação serviços (PT e EM) + - Situação em que o destinatário ou adquirente é o devedor do imposto - Alínea a) do n.º + 6 do art.º 6.º do CIVA (a contrario) + + + M41 + IVA - autoliquidação + Relacionado com Aquisições Intracomunitária de bens - Artigo 8.º n.º 3 do + RITI + + + M42 + IVA - autoliquidação + Regime dos Sujeitos Passivos que renunciaram à isenção nas operações com + imóveis (imobiliárias) - decreto-lei n.º 21/2007 de 29 de janeiro + + + M43 + IVA - autoliquidação + Regime especial aplicável ao ouro para investimento - Renúncia a isenção + quando o adquirente seja sujeito passivo de imposto - N.º 4 do artigo 5.º e n.º 2 do + art.º 10.º, ambos o anexo ao Decreto-Lei n.º 362/99, de 16 de Setembro + + + M99 + Não sujeito; não tributado (Ou similar) + Outras situações de não liquidação do imposto (Exemplos: artigo 2.º, n.º + 2; artigo 3.º, n.ºs 4, 6 e 7; artigo 4.º, n.º 5, todos do CIVA) Também os Serviços p/ + Fora da Comunidade Art.º 6 n.º 11 - + + + diff --git a/l10n_pt_vat/i18n/l10n_pt_vat.pot b/l10n_pt_vat/i18n/l10n_pt_vat.pot new file mode 100644 index 0000000..b57ea5c --- /dev/null +++ b/l10n_pt_vat/i18n/l10n_pt_vat.pot @@ -0,0 +1,325 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_pt_vat +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.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: l10n_pt_vat +#. odoo-python +#: code:addons/l10n_pt_vat/models/account_move.py:0 +#, python-format +msgid "A tax exemption reason must be provided." +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__active +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__active +msgid "Active" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields.selection,name:l10n_pt_vat.selection__account_tax__l10n_pt_fiscal_zone__pt-ac +msgid "Açores" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__code +msgid "Code" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M16 +msgid "Colocar qual a alínea do artigo 14.º do RITI aplicável a isenção" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__create_uid +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__create_uid +msgid "Created by" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__create_date +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__create_date +msgid "Created on" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields.selection,name:l10n_pt_vat.selection__account_vat_adjustment_norm__move_type__out_refund +msgid "Customer Credit Note" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__note +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__note +msgid "Description" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__display_name +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__display_name +msgid "Display Name" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,help:l10n_pt_vat.field_account_bank_statement_line__vat_adjustment_norm_id +#: model:ir.model.fields,help:l10n_pt_vat.field_account_move__vat_adjustment_norm_id +#: model:ir.model.fields,help:l10n_pt_vat.field_account_payment__vat_adjustment_norm_id +msgid "Fields 40/41 of the VAT Statement" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_tax__l10n_pt_fiscal_zone +msgid "Fiscal Zone" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__id +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__id +msgid "ID" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M20 +msgid "IVA - Regime forfetário" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M30 +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M31 +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M32 +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M33 +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M40 +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M41 +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M42 +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M43 +msgid "IVA - autoliquidação" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M09 +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M21 +msgid "IVA - não confere direito à dedução" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M10 +msgid "IVA - regime de isenção" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,help:l10n_pt_vat.field_account_vat_adjustment_norm__in_refunds +msgid "" +"If True, it will allow you to apply the adjustment norm to third party " +"companies refunds." +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,help:l10n_pt_vat.field_account_vat_adjustment_norm__out_refunds +msgid "" +"If True, it will allow you to apply the adjustment norm to your company " +"refunds." +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,help:l10n_pt_vat.field_account_vat_adjustment_norm__active +msgid "" +"If the active field is set to False, it will allow you to hide the " +"adjustment norm without removing it." +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M04 +msgid "Isento IVA - Artigo 13º CIVA" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M02 +msgid "Isento IVA - Artigo 6.º do decreto-lei n.º 198/90 de 19 de junho" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M06 +msgid "" +"Isento de IVA - n.º x do artigo 15.º do CIVA, colocar qual o n.º e\n" +" alínea aplicável à isenção" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M05 +msgid "" +"Isento de IVA - n.º x do artigo 14 do CIVA, Colocar qual o n.º do artigo\n" +" 14.º do CIVA aplicável a isenção" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M07 +msgid "" +"Isento de IVA - n.º x do artigo 9.º do CIVA, colocar qual o n.º do\n" +" artigo 9.º do CIVA aplicável a isenção" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M19 +msgid "Isenção do diploma xxxx" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model,name:l10n_pt_vat.model_account_journal +msgid "Journal" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model,name:l10n_pt_vat.model_account_move +msgid "Journal Entry" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_bank_statement_line__l10npt_has_tax_exempt_lines +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_move__l10npt_has_tax_exempt_lines +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_payment__l10npt_has_tax_exempt_lines +msgid "L10Npt Has Tax Exempt Lines" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason____last_update +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm____last_update +msgid "Last Modified on" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__write_uid +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__write_date +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__write_date +msgid "Last Updated on" +msgstr "" + +#. module: l10n_pt_vat +#: model_terms:ir.ui.view,arch_db:l10n_pt_vat.vat_adjustment_norm_view_form +msgid "Legal Norm (ex: Art. 78º, nº 8, alínea b)) ..." +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields.selection,name:l10n_pt_vat.selection__account_tax__l10n_pt_fiscal_zone__pt-ma +msgid "Madeira" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M22 +msgid "Mercadorias à Consignação" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__move_type +msgid "Move Type" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__name +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__name +msgid "Name" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M01 +msgid "Não sujeito - alínea c) do n.º 6 do art.º 16.º do CIVA" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M99 +msgid "Não sujeito; não tributado (Ou similar)" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M11 +msgid "Não tributado" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields.selection,name:l10n_pt_vat.selection__account_tax__l10n_pt_fiscal_zone__pt +msgid "Portugal Continental" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M12 +msgid "Regime da margem de lucro - Agências de viagens" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M13 +msgid "Regime da margem de lucro - Bens em segunda mão" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M14 +msgid "Regime da margem de lucro - Objetos de arte" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M15 +msgid "Regime da margem de lucro - Objetos de coleção e antiguidades" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model,name:l10n_pt_vat.model_account_tax +msgid "Tax" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__out_refunds +msgid "Use on company refunds" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__in_refunds +msgid "Use on third party refunds" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model,name:l10n_pt_vat.model_account_vat_adjustment_norm +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_bank_statement_line__vat_adjustment_norm_id +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_move__vat_adjustment_norm_id +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_payment__vat_adjustment_norm_id +#: model_terms:ir.ui.view,arch_db:l10n_pt_vat.vat_adjustment_norm_view_search +msgid "VAT Adjustment Norm" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.actions.act_window,name:l10n_pt_vat.vat_adjustment_norm_action +#: model:ir.ui.menu,name:l10n_pt_vat.menu_action_vat_adjustment_norm +msgid "VAT Adjustment Norms" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.actions.act_window,name:l10n_pt_vat.vat_exempt_reason_action +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_bank_statement_line__l10npt_vat_exempt_reason +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_journal__l10npt_vat_exempt_reason +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_move__l10npt_vat_exempt_reason +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_payment__l10npt_vat_exempt_reason +#: model:ir.ui.menu,name:l10n_pt_vat.menu_action_vat_exempt_reason +msgid "VAT Exempt Reason" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model,name:l10n_pt_vat.model_account_l10n_pt_vat_exempt_reason +msgid "VAT Exemption Reason" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields.selection,name:l10n_pt_vat.selection__account_vat_adjustment_norm__move_type__in_refund +msgid "Vendor Credit Note" +msgstr "" diff --git a/l10n_pt_vat/i18n/pt.po b/l10n_pt_vat/i18n/pt.po new file mode 100644 index 0000000..9573417 --- /dev/null +++ b/l10n_pt_vat/i18n/pt.po @@ -0,0 +1,351 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_pt_vat +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 15.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-11-18 15:02+0000\n" +"PO-Revision-Date: 2021-09-24 13:34+0000\n" +"Last-Translator: Daniel Reis \n" +"Language-Team: \n" +"Language: pt\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.3.2\n" + +#. module: l10n_pt_vat +#. odoo-python +#: code:addons/l10n_pt_vat/models/account_move.py:0 +#, python-format +msgid "A tax exemption reason must be provided." +msgstr "O motivo de isenção é obrigatório." + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__active +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__active +msgid "Active" +msgstr "Ativo" + +#. module: l10n_pt_vat +#: model:ir.model.fields.selection,name:l10n_pt_vat.selection__account_tax__l10n_pt_fiscal_zone__pt-ac +msgid "Açores" +msgstr "Açores" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__code +msgid "Code" +msgstr "Código" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M16 +msgid "Colocar qual a alínea do artigo 14.º do RITI aplicável a isenção" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__create_uid +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__create_uid +msgid "Created by" +msgstr "Criado por" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__create_date +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__create_date +msgid "Created on" +msgstr "Criado em" + +#. module: l10n_pt_vat +#: model:ir.model.fields.selection,name:l10n_pt_vat.selection__account_vat_adjustment_norm__move_type__out_refund +msgid "Customer Credit Note" +msgstr "Nota de Crédito de Cliente" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__note +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__note +msgid "Description" +msgstr "Descrição" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__display_name +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__display_name +msgid "Display Name" +msgstr "Nome a Exibir" + +#. module: l10n_pt_vat +#: model:ir.model.fields,help:l10n_pt_vat.field_account_bank_statement_line__vat_adjustment_norm_id +#: model:ir.model.fields,help:l10n_pt_vat.field_account_move__vat_adjustment_norm_id +#: model:ir.model.fields,help:l10n_pt_vat.field_account_payment__vat_adjustment_norm_id +msgid "Fields 40/41 of the VAT Statement" +msgstr "Campo 40/41 da Declaração de IVA" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_tax__l10n_pt_fiscal_zone +msgid "Fiscal Zone" +msgstr "Zona Fiscal" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__id +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__id +msgid "ID" +msgstr "ID" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M20 +msgid "IVA - Regime forfetário" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M30 +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M31 +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M32 +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M33 +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M40 +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M41 +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M42 +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M43 +msgid "IVA - autoliquidação" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M09 +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M21 +msgid "IVA - não confere direito à dedução" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M10 +msgid "IVA - regime de isenção" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,help:l10n_pt_vat.field_account_vat_adjustment_norm__in_refunds +msgid "" +"If True, it will allow you to apply the adjustment norm to third party " +"companies refunds." +msgstr "" +"Se assinalado, poderá aplicar a norma de regularização a notas de crédito de " +"terceiros." + +#. module: l10n_pt_vat +#: model:ir.model.fields,help:l10n_pt_vat.field_account_vat_adjustment_norm__out_refunds +msgid "" +"If True, it will allow you to apply the adjustment norm to your company " +"refunds." +msgstr "" +"Se assinalado, poderá aplicar a norma de regularização às suas notas de " +"crédito." + +#. module: l10n_pt_vat +#: model:ir.model.fields,help:l10n_pt_vat.field_account_vat_adjustment_norm__active +msgid "" +"If the active field is set to False, it will allow you to hide the " +"adjustment norm without removing it." +msgstr "" +"Se o campo Ativo não estiver assinalado, poderá esconder a norma de " +"regularização sem a remover." + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M04 +msgid "Isento IVA - Artigo 13º CIVA" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M02 +msgid "Isento IVA - Artigo 6.º do decreto-lei n.º 198/90 de 19 de junho" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M06 +msgid "" +"Isento de IVA - n.º x do artigo 15.º do CIVA, colocar qual o n.º e\n" +" alínea aplicável à isenção" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M05 +msgid "" +"Isento de IVA - n.º x do artigo 14 do CIVA, Colocar qual o n.º do artigo\n" +" 14.º do CIVA aplicável a isenção" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M07 +msgid "" +"Isento de IVA - n.º x do artigo 9.º do CIVA, colocar qual o n.º do\n" +" artigo 9.º do CIVA aplicável a isenção" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M19 +msgid "Isenção do diploma xxxx" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model,name:l10n_pt_vat.model_account_journal +msgid "Journal" +msgstr "Diário" + +#. module: l10n_pt_vat +#: model:ir.model,name:l10n_pt_vat.model_account_move +msgid "Journal Entry" +msgstr "Lançamento de Diário" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_bank_statement_line__l10npt_has_tax_exempt_lines +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_move__l10npt_has_tax_exempt_lines +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_payment__l10npt_has_tax_exempt_lines +msgid "L10Npt Has Tax Exempt Lines" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason____last_update +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm____last_update +msgid "Last Modified on" +msgstr "Última Modificação em" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__write_uid +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__write_uid +msgid "Last Updated by" +msgstr "Atualizado pela últ. vez por" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__write_date +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__write_date +msgid "Last Updated on" +msgstr "Atualizado pela últ. vez em" + +#. module: l10n_pt_vat +#: model_terms:ir.ui.view,arch_db:l10n_pt_vat.vat_adjustment_norm_view_form +msgid "Legal Norm (ex: Art. 78º, nº 8, alínea b)) ..." +msgstr "Norma de Regularização Legal (ex: Art. 78º, nº 8, alínea b)) ..." + +#. module: l10n_pt_vat +#: model:ir.model.fields.selection,name:l10n_pt_vat.selection__account_tax__l10n_pt_fiscal_zone__pt-ma +msgid "Madeira" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M22 +msgid "Mercadorias à Consignação" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__move_type +msgid "Move Type" +msgstr "Tipo de Lançamento" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_l10n_pt_vat_exempt_reason__name +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__name +msgid "Name" +msgstr "Nome" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M01 +msgid "Não sujeito - alínea c) do n.º 6 do art.º 16.º do CIVA" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M99 +msgid "Não sujeito; não tributado (Ou similar)" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M11 +msgid "Não tributado" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model.fields.selection,name:l10n_pt_vat.selection__account_tax__l10n_pt_fiscal_zone__pt +msgid "Portugal Continental" +msgstr "Portugal Continental" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M12 +msgid "Regime da margem de lucro - Agências de viagens" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M13 +msgid "Regime da margem de lucro - Bens em segunda mão" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M14 +msgid "Regime da margem de lucro - Objetos de arte" +msgstr "" + +#. module: l10n_pt_vat +#: model:account.l10n_pt.vat.exempt.reason,name:l10n_pt_vat.M15 +msgid "Regime da margem de lucro - Objetos de coleção e antiguidades" +msgstr "" + +#. module: l10n_pt_vat +#: model:ir.model,name:l10n_pt_vat.model_account_tax +msgid "Tax" +msgstr "Imposto" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__out_refunds +msgid "Use on company refunds" +msgstr "Utilizar em notas de crédito próprias" + +#. module: l10n_pt_vat +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_vat_adjustment_norm__in_refunds +msgid "Use on third party refunds" +msgstr "Utilizar em notas de crédito de terceiros" + +#. module: l10n_pt_vat +#: model:ir.model,name:l10n_pt_vat.model_account_vat_adjustment_norm +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_bank_statement_line__vat_adjustment_norm_id +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_move__vat_adjustment_norm_id +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_payment__vat_adjustment_norm_id +#: model_terms:ir.ui.view,arch_db:l10n_pt_vat.vat_adjustment_norm_view_search +msgid "VAT Adjustment Norm" +msgstr "Norma de Regularização de IVA" + +#. module: l10n_pt_vat +#: model:ir.actions.act_window,name:l10n_pt_vat.vat_adjustment_norm_action +#: model:ir.ui.menu,name:l10n_pt_vat.menu_action_vat_adjustment_norm +msgid "VAT Adjustment Norms" +msgstr "Normas de Regularização de IVA" + +#. module: l10n_pt_vat +#: model:ir.actions.act_window,name:l10n_pt_vat.vat_exempt_reason_action +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_bank_statement_line__l10npt_vat_exempt_reason +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_journal__l10npt_vat_exempt_reason +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_move__l10npt_vat_exempt_reason +#: model:ir.model.fields,field_description:l10n_pt_vat.field_account_payment__l10npt_vat_exempt_reason +#: model:ir.ui.menu,name:l10n_pt_vat.menu_action_vat_exempt_reason +msgid "VAT Exempt Reason" +msgstr "Motivo de Isenção de IVA" + +#. module: l10n_pt_vat +#: model:ir.model,name:l10n_pt_vat.model_account_l10n_pt_vat_exempt_reason +msgid "VAT Exemption Reason" +msgstr "Motivo de Isenção de IVA" + +#. module: l10n_pt_vat +#: model:ir.model.fields.selection,name:l10n_pt_vat.selection__account_vat_adjustment_norm__move_type__in_refund +msgid "Vendor Credit Note" +msgstr "Nota de Crédito de Fornecedor" + +#, fuzzy +#~ msgid "Artigo 16.º n.º 6 do CIVA" +#~ msgstr "Artigo 16.º n.º 6 do CIVA" + +#~ msgid "Artigo 6.º do Decreto-Lei n.º 198/90, de 19 de Junho " +#~ msgstr "Artigo 6.º do Decreto-Lei n.º 198/90, de 19 de Junho " + +#~ msgid "Exigibilidade de caixa" +#~ msgstr "Exigibilidade de caixa" + +#~ msgid "IVA - Autoliquidação" +#~ msgstr "IVA - Autoliquidação" + +#~ msgid "Invoice" +#~ msgstr "Fatura" diff --git a/l10n_pt_vat/models/__init__.py b/l10n_pt_vat/models/__init__.py new file mode 100644 index 0000000..3057c8c --- /dev/null +++ b/l10n_pt_vat/models/__init__.py @@ -0,0 +1,5 @@ +from . import l10n_pt_vat_exempt_reason +from . import account_journal +from . import account_move +from . import account_tax +from . import vat_adjustment_norm diff --git a/l10n_pt_vat/models/account_journal.py b/l10n_pt_vat/models/account_journal.py new file mode 100644 index 0000000..c69ad35 --- /dev/null +++ b/l10n_pt_vat/models/account_journal.py @@ -0,0 +1,12 @@ +# Copyright (C) 2021 Open Source Integrators () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class AccountJournal(models.Model): + _inherit = "account.journal" + + l10npt_vat_exempt_reason = fields.Many2one( + "account.l10n_pt.vat.exempt.reason", string="VAT Exempt Reason" + ) diff --git a/l10n_pt_vat/models/account_move.py b/l10n_pt_vat/models/account_move.py new file mode 100644 index 0000000..80b9f6b --- /dev/null +++ b/l10n_pt_vat/models/account_move.py @@ -0,0 +1,67 @@ +# Copyright (C) 2014 Sossia, Lda. () +# Copyright (C) 2021 Open SOurce Integrators () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import _, api, exceptions, fields, models + + +class AccountMove(models.Model): + _inherit = "account.move" + + vat_adjustment_norm_id = fields.Many2one( + "account.vat.adjustment_norm", + string="VAT Adjustment Norm", + ondelete="restrict", + help="Fields 40/41 of the VAT Statement", + ) + l10npt_has_tax_exempt_lines = fields.Boolean( + compute="_compute_l10npt_has_tax_exempt_lines" + ) + l10npt_vat_exempt_reason = fields.Many2one( + "account.l10n_pt.vat.exempt.reason", + string="VAT Exempt Reason", + compute="_compute_l10npt_vat_exempt_reason", + store=True, + readonly=False, + ) + + @api.depends("country_code", "move_type", "invoice_line_ids") + def _compute_l10npt_has_tax_exempt_lines(self): + for invoice in self: + invoice.l10npt_has_tax_exempt_lines = bool( + invoice.country_code == "PT" + and invoice.is_sale_document() + and invoice.invoice_line_ids.filtered( + lambda x: not x.display_type and not x.tax_ids.filtered("amount") + ) + ) + + @api.depends( + "l10npt_has_tax_exempt_lines", "journal_id", "company_id", "amount_total" + ) + def _compute_l10npt_vat_exempt_reason(self): + for invoice in self: + if ( + invoice.l10npt_has_tax_exempt_lines + and not invoice.l10npt_vat_exempt_reason + ): + invoice.l10npt_vat_exempt_reason = ( + invoice.journal_id.l10npt_vat_exempt_reason + ) + + def action_post(self): + """ + VAT Exemption reason is required if there are lines without tax + """ + for invoice in self.filtered( + lambda x: x.country_code == "PT" and x.is_sale_document() + ): + exempt_lines = invoice.invoice_line_ids.filtered( + lambda x: x.display_type not in ["line_section", "line_note"] + and not x.tax_ids.filtered("amount") + ) + if exempt_lines and not invoice.l10npt_vat_exempt_reason: + raise exceptions.ValidationError( + _("A tax exemption reason must be provided.") + ) + return super().action_post() diff --git a/l10n_pt_vat/models/account_tax.py b/l10n_pt_vat/models/account_tax.py new file mode 100644 index 0000000..5a478a0 --- /dev/null +++ b/l10n_pt_vat/models/account_tax.py @@ -0,0 +1,14 @@ +# Copyright (C) 2021 Open SOurce Integrators () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class AccountTax(models.Model): + _inherit = "account.tax" + + l10n_pt_fiscal_zone = fields.Selection( + [("PT", "Portugal Continental"), ("PT-AC", "Açores"), ("PT-MA", "Madeira")], + string="Fiscal Zone", + default="PT", + ) diff --git a/l10n_pt_vat/models/l10n_pt_vat_exempt_reason.py b/l10n_pt_vat/models/l10n_pt_vat_exempt_reason.py new file mode 100644 index 0000000..37b1e46 --- /dev/null +++ b/l10n_pt_vat/models/l10n_pt_vat_exempt_reason.py @@ -0,0 +1,38 @@ +# Copyright (C) 2021 Open Source Integrators () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models +from odoo.osv import expression + + +class VatExemptReason(models.Model): + _name = "account.l10n_pt.vat.exempt.reason" + _description = "VAT Exemption Reason" + _order = "code" + + name = fields.Char(required=True, translate=True) + code = fields.Char(required=True) + active = fields.Boolean(default=True) + note = fields.Text(string="Description") + + def name_get(self): + return [(x.id, f"[{'x.code'}] {'x.name'}") for x in self] + + @api.model + def _name_search( + self, name, args=None, operator="ilike", limit=100, name_get_uid=None + ): + """ + Returns a list of tuples containing id, name, + as internally it is called <> + result format: {[(id, name), (id, name), ...]} + """ + args = args or [] + if operator == "ilike" and not (name or "").strip(): + domain = [] + else: + connector = "&" if operator in expression.NEGATIVE_TERM_OPERATORS else "|" + domain = [connector, ("code", operator, name), ("name", operator, name)] + return self._search( + expression.AND([domain, args]), limit=limit, access_rights_uid=name_get_uid + ) diff --git a/l10n_pt_vat/models/vat_adjustment_norm.py b/l10n_pt_vat/models/vat_adjustment_norm.py new file mode 100644 index 0000000..d262599 --- /dev/null +++ b/l10n_pt_vat/models/vat_adjustment_norm.py @@ -0,0 +1,48 @@ +# Copyright (C) 2014- Sossia, Lda. () +# Copyright (C) 2021 Open SOurce Integrators () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class AccountVATAdjustmentNorm(models.Model): + "Support fields 40/41 of the VAT Statement)" + + _name = "account.vat.adjustment_norm" + _description = "VAT Adjustment Norm" + + name = fields.Char(required=True) + active = fields.Boolean( + default=True, + help="If the active field is set to False, it " + "will allow you to hide the adjustment norm without removing it.", + ) + note = fields.Text(string="Description", translate=True) + out_refunds = fields.Boolean( + string="Use on company refunds", + help="If True, it will allow you to apply the adjustment " + "norm to your company refunds.", + ) + in_refunds = fields.Boolean( + string="Use on third party refunds", + help="If True, it will allow you to apply the adjustment " + "norm to third party companies refunds.", + ) + move_type = fields.Selection( + selection=[ + ("out_refund", "Customer Credit Note"), + ("in_refund", "Vendor Credit Note"), + ], + compute="_compute_move_type", + store=True, + ) + + @api.depends("out_refunds", "in_refunds") + def _compute_move_type(self): + for norm in self: + if norm.out_refunds: + norm.move_type = "out_refund" + elif norm.in_refunds: + norm.move_type = "in_refund" + else: + norm.move_type = False diff --git a/l10n_pt_vat/pyproject.toml b/l10n_pt_vat/pyproject.toml new file mode 100644 index 0000000..4231d0c --- /dev/null +++ b/l10n_pt_vat/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/l10n_pt_vat/readme/CONFIGURATION.rst b/l10n_pt_vat/readme/CONFIGURATION.rst new file mode 100644 index 0000000..66711f3 --- /dev/null +++ b/l10n_pt_vat/readme/CONFIGURATION.rst @@ -0,0 +1,6 @@ +On Accounting Taxes, the "Fiscal Zone" can be set, to identify the VAT zone: +Continental Portugal, Madeira or Azores. + +The default VAT Exemption reason can be set on the Sales Journal: + +- Go to *Accounting/Invoicing > Configuration > Accounting / Journals* diff --git a/l10n_pt_vat/readme/CONTRIBUTORS.md b/l10n_pt_vat/readme/CONTRIBUTORS.md new file mode 100644 index 0000000..72c1894 --- /dev/null +++ b/l10n_pt_vat/readme/CONTRIBUTORS.md @@ -0,0 +1,5 @@ +- Pedro Castro Silva ([Sossia](http://www.sossia.pt)) + +- [Open Source Integrators](https://www.opensourceintegrators.com) + + > - Daniel Reis () diff --git a/l10n_pt_vat/readme/DESCRIPTION.md b/l10n_pt_vat/readme/DESCRIPTION.md new file mode 100644 index 0000000..3f3f4b4 --- /dev/null +++ b/l10n_pt_vat/readme/DESCRIPTION.md @@ -0,0 +1,7 @@ +This modules extends the base localization modules with a few VAT +specific functions that are required by the Portuguese Tax Authorities, +including: + +- The use of pre-defined legally accepted reasons for issuing credit + notes, as required for fields 40/41 of the VAT statement (Portaria nº + 255/2013). diff --git a/l10n_pt_vat/readme/USAGE.md b/l10n_pt_vat/readme/USAGE.md new file mode 100644 index 0000000..ea25561 --- /dev/null +++ b/l10n_pt_vat/readme/USAGE.md @@ -0,0 +1 @@ +On an Invoice, the VAT adjustment reason is available for selection. diff --git a/l10n_pt_vat/security/ir.model.access.csv b/l10n_pt_vat/security/ir.model.access.csv new file mode 100644 index 0000000..4bd5697 --- /dev/null +++ b/l10n_pt_vat/security/ir.model.access.csv @@ -0,0 +1,5 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_account_vat_adjustment_norm,account.vat.adjustment_norm,model_account_vat_adjustment_norm,account.group_account_user,1,0,0,0 +access_account_vat_adjustment_norm_manager,account.vat.adjustment_norm,model_account_vat_adjustment_norm,account.group_account_manager,1,1,1,1 +access_account_vat_exempt_reason,account.l10n_pt.vat.exempt.reason,model_account_l10n_pt_vat_exempt_reason,account.group_account_user,1,0,0,0 +access_account_vat_exempt_reason_manager,account.l10n_pt.vat.exempt.reason,model_account_l10n_pt_vat_exempt_reason,account.group_account_manager,1,1,1,1 diff --git a/l10n_pt_vat/static/description/icon.png b/l10n_pt_vat/static/description/icon.png new file mode 100644 index 0000000..8d80177 Binary files /dev/null and b/l10n_pt_vat/static/description/icon.png differ diff --git a/l10n_pt_vat/static/description/index.html b/l10n_pt_vat/static/description/index.html new file mode 100644 index 0000000..6ed229b --- /dev/null +++ b/l10n_pt_vat/static/description/index.html @@ -0,0 +1,446 @@ + + + + + +Portugal - IVA + + + +
+

Portugal - IVA

+ + +

Production/Stable License: AGPL-3 OCA/l10n-portugal Translate me on Weblate Try me on Runboat

+

This modules extends the base localization modules with a few VAT +specific functions that are required by the Portuguese Tax Authorities, +including:

+
    +
  • The use of pre-defined legally accepted reasons for issuing credit +notes, as required for fields 40/41 of the VAT statement (Portaria nº +255/2013).
  • +
+

Table of contents

+ +
+

Usage

+

On an Invoice, the VAT adjustment reason is available for selection.

+
+
+

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 to smash it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Open Source Integrators
  • +
  • Sossia
  • +
+
+
+

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.

+

Current maintainer:

+

dreispt

+

This module is part of the OCA/l10n-portugal project on GitHub.

+

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

+
+
+
+ + diff --git a/l10n_pt_vat/views/account_journal_view.xml b/l10n_pt_vat/views/account_journal_view.xml new file mode 100644 index 0000000..ca3beda --- /dev/null +++ b/l10n_pt_vat/views/account_journal_view.xml @@ -0,0 +1,17 @@ + + + Account Journal: add l10_pt_vat + account.journal + + + + + + + + + + diff --git a/l10n_pt_vat/views/account_move_view.xml b/l10n_pt_vat/views/account_move_view.xml new file mode 100644 index 0000000..f890189 --- /dev/null +++ b/l10n_pt_vat/views/account_move_view.xml @@ -0,0 +1,26 @@ + + + + Invoice: add l10_pt + account.move + + + + +
+ + + +
+
+
+
+
diff --git a/l10n_pt_vat/views/account_tax_view.xml b/l10n_pt_vat/views/account_tax_view.xml new file mode 100644 index 0000000..6c01553 --- /dev/null +++ b/l10n_pt_vat/views/account_tax_view.xml @@ -0,0 +1,12 @@ + + + Account Tax: add Fiscal Zone + account.tax + + + + + + + + diff --git a/l10n_pt_vat/views/l10n_pt_vat_exempt_reason_view.xml b/l10n_pt_vat/views/l10n_pt_vat_exempt_reason_view.xml new file mode 100644 index 0000000..7969aa5 --- /dev/null +++ b/l10n_pt_vat/views/l10n_pt_vat_exempt_reason_view.xml @@ -0,0 +1,37 @@ + + + VAT Exempt Reason List + account.l10n_pt.vat.exempt.reason + + + + + + + + + + VAT Exempt Reason Form + account.l10n_pt.vat.exempt.reason + +
+ + + + + +
+
+
+ + VAT Exempt Reason + account.l10n_pt.vat.exempt.reason + tree,form + + +
diff --git a/l10n_pt_vat/views/vat_adjustment_norm_view.xml b/l10n_pt_vat/views/vat_adjustment_norm_view.xml new file mode 100644 index 0000000..41772be --- /dev/null +++ b/l10n_pt_vat/views/vat_adjustment_norm_view.xml @@ -0,0 +1,57 @@ + + + + + account.vat.adjustment_norm.search + account.vat.adjustment_norm + + + + + + + + + account.vat.adjustment_norm.tree + account.vat.adjustment_norm + + + + + + + + + account.vat.adjustment_norm.form + account.vat.adjustment_norm + +
+ + + + + + + + + + + +
+
+
+ + VAT Adjustment Norms + account.vat.adjustment_norm + tree,form + + +