Skip to content

Commit

Permalink
Merge PR #358 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by AaronHForgeFlow
  • Loading branch information
OCA-git-bot committed Oct 23, 2023
2 parents 2deeb55 + cfb29a0 commit 63d6dd9
Show file tree
Hide file tree
Showing 32 changed files with 1,772 additions and 0 deletions.
98 changes: 98 additions & 0 deletions account_multi_vat/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
=================
Account Multi Vat
=================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--fiscal--rule-lightgray.png?logo=github
:target: https://github.com/OCA/account-fiscal-rule/tree/14.0/account_multi_vat
:alt: OCA/account-fiscal-rule
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-fiscal-rule-14-0/account-fiscal-rule-14-0-account_multi_vat
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/93/14.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

Allows setting multiple VAT numbers on any partner and select the right one
depending on the fiscal position and delivery address of the invoice.

**Table of contents**

.. contents::
:local:

Usage
=====

When printing the invoice report, the company VAT number will be seeked in the following way:

#. **If there is a fiscal position which has a tax administration:** try to find a VAT number
matching the tax administration.
#. **If there is no fiscal position on the invoice or no tax administration on
the fiscal position:** try to find a VAT number matching the country of the company.
#. **If nothing found:** the standard VAT number on the company is used.

and the customer VAT number:
#. **If there is a delivery address:** try to find a tax administration matching the country of the address.
#. **If there is no delivery address on the invoice or no tax administration found or no VAT number found:** the standard VAT number on the customer is used.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-fiscal-rule/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-fiscal-rule/issues/new?body=module:%20account_multi_vat%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
~~~~~~~

* ACSONE SA/NV

Contributors
~~~~~~~~~~~~

Thomas Binsfeld <thomas.binsfeld@acsone.eu> (https://www.acsone.eu/)
Omar Castiñeira <omar@comunitea.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-ThomasBinsfeld| image:: https://github.com/ThomasBinsfeld.png?size=40px
:target: https://github.com/ThomasBinsfeld
:alt: ThomasBinsfeld

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ThomasBinsfeld|

This module is part of the `OCA/account-fiscal-rule <https://github.com/OCA/account-fiscal-rule/tree/14.0/account_multi_vat>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions account_multi_vat/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizards
24 changes: 24 additions & 0 deletions account_multi_vat/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Account Multi Vat",
"summary": """
Allows setting multiple VAT numbers on any partner and select the right one
depending on the fiscal position and delivery address of the invoice.""",
"version": "15.0.1.0.0",
"development_status": "Beta",
"license": "AGPL-3",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"maintainers": ["ThomasBinsfeld"],
"website": "https://github.com/OCA/account-fiscal-rule",
"depends": ["account", "base_vat", "partner_identification"],
"data": [
"views/account_tax.xml",
"data/res_partner_id_category.xml",
"views/account_move.xml",
"views/res_partner.xml",
"views/account_fiscal_position.xml",
"views/report_invoice.xml",
],
}
12 changes: 12 additions & 0 deletions account_multi_vat/data/res_partner_id_category.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2020 ACSONE SA/NV
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record model="res.partner.id_category" id="partner_id_category_vat">
<field name="code">VAT</field>
<field name="name">VAT number</field>
<field
name="validation_code"
>failed = not self._is_vat_code_valid(id_number)</field>
</record>
</odoo>
174 changes: 174 additions & 0 deletions account_multi_vat/i18n/account_multi_vat.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_multi_vat
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: account_multi_vat
#: model:ir.model,name:account_multi_vat.model_account_move_reversal
msgid "Account Move Reversal"
msgstr ""

#. module: account_multi_vat
#: model:ir.model,name:account_multi_vat.model_res_partner
msgid "Contact"
msgstr ""

#. module: account_multi_vat
#: model:ir.model.fields,field_description:account_multi_vat.field_account_tax__country_id
#: model:ir.model.fields,field_description:account_multi_vat.field_account_tax_repartition_line__country_id
msgid "Country"
msgstr ""

#. module: account_multi_vat
#: model:ir.model.fields,field_description:account_multi_vat.field_account_bank_statement_line__customer_vat
#: model:ir.model.fields,field_description:account_multi_vat.field_account_move__customer_vat
#: model:ir.model.fields,field_description:account_multi_vat.field_account_payment__customer_vat
msgid "Customer VAT"
msgstr ""

#. module: account_multi_vat
#: model:ir.model.fields,field_description:account_multi_vat.field_account_bank_statement_line__customer_vat_partner_id
#: model:ir.model.fields,field_description:account_multi_vat.field_account_move__customer_vat_partner_id
#: model:ir.model.fields,field_description:account_multi_vat.field_account_payment__customer_vat_partner_id
msgid "Customer tax administration"
msgstr ""

#. module: account_multi_vat
#: model:ir.model.fields,field_description:account_multi_vat.field_account_fiscal_position__display_name
#: model:ir.model.fields,field_description:account_multi_vat.field_account_move__display_name
#: model:ir.model.fields,field_description:account_multi_vat.field_account_move_reversal__display_name
#: model:ir.model.fields,field_description:account_multi_vat.field_account_tax__display_name
#: model:ir.model.fields,field_description:account_multi_vat.field_account_tax_repartition_line__display_name
#: model:ir.model.fields,field_description:account_multi_vat.field_res_partner__display_name
#: model:ir.model.fields,field_description:account_multi_vat.field_res_partner_id_category__display_name
#: model:ir.model.fields,field_description:account_multi_vat.field_res_partner_id_number__display_name
msgid "Display Name"
msgstr ""

#. module: account_multi_vat
#: model:ir.model,name:account_multi_vat.model_account_fiscal_position
msgid "Fiscal Position"
msgstr ""

#. module: account_multi_vat
#: model:ir.model.fields,field_description:account_multi_vat.field_res_partner__has_vat
#: model:ir.model.fields,field_description:account_multi_vat.field_res_users__has_vat
msgid "Has Vat"
msgstr ""

#. module: account_multi_vat
#: model:ir.model.fields,field_description:account_multi_vat.field_account_fiscal_position__id
#: model:ir.model.fields,field_description:account_multi_vat.field_account_move__id
#: model:ir.model.fields,field_description:account_multi_vat.field_account_move_reversal__id
#: model:ir.model.fields,field_description:account_multi_vat.field_account_tax__id
#: model:ir.model.fields,field_description:account_multi_vat.field_account_tax_repartition_line__id
#: model:ir.model.fields,field_description:account_multi_vat.field_res_partner__id
#: model:ir.model.fields,field_description:account_multi_vat.field_res_partner_id_category__id
#: model:ir.model.fields,field_description:account_multi_vat.field_res_partner_id_number__id
msgid "ID"
msgstr ""

#. module: account_multi_vat
#: model:ir.model,name:account_multi_vat.model_account_move
msgid "Journal Entry"
msgstr ""

#. module: account_multi_vat
#: model:ir.model.fields,field_description:account_multi_vat.field_account_fiscal_position____last_update
#: model:ir.model.fields,field_description:account_multi_vat.field_account_move____last_update
#: model:ir.model.fields,field_description:account_multi_vat.field_account_move_reversal____last_update
#: model:ir.model.fields,field_description:account_multi_vat.field_account_tax____last_update
#: model:ir.model.fields,field_description:account_multi_vat.field_account_tax_repartition_line____last_update
#: model:ir.model.fields,field_description:account_multi_vat.field_res_partner____last_update
#: model:ir.model.fields,field_description:account_multi_vat.field_res_partner_id_category____last_update
#: model:ir.model.fields,field_description:account_multi_vat.field_res_partner_id_number____last_update
msgid "Last Modified on"
msgstr ""

#. module: account_multi_vat
#: model:ir.model,name:account_multi_vat.model_res_partner_id_category
msgid "Partner ID Category"
msgstr ""

#. module: account_multi_vat
#: model:ir.model,name:account_multi_vat.model_res_partner_id_number
msgid "Partner ID Number"
msgstr ""

#. module: account_multi_vat
#: code:addons/account_multi_vat/models/res_partner_id_number.py:0
#, python-format
msgid "Please specify a tax administration in the 'Issued by' field."
msgstr ""

#. module: account_multi_vat
#: model:ir.model,name:account_multi_vat.model_account_tax
#: model:ir.model.fields,field_description:account_multi_vat.field_account_tax_repartition_line__tax_id
msgid "Tax"
msgstr ""

#. module: account_multi_vat
#: model_terms:ir.ui.view,arch_db:account_multi_vat.multi_vat_report_invoice_document
msgid "Tax ID"
msgstr ""

#. module: account_multi_vat
#: model:ir.model,name:account_multi_vat.model_account_tax_repartition_line
msgid "Tax Repartition Line"
msgstr ""

#. module: account_multi_vat
#: model:ir.model.fields,field_description:account_multi_vat.field_account_fiscal_position__vat_partner_id
#: model:ir.model.fields,field_description:account_multi_vat.field_account_tax__vat_partner_id
#: model:ir.model.fields,field_description:account_multi_vat.field_res_partner__is_tax_administration
#: model:ir.model.fields,field_description:account_multi_vat.field_res_users__is_tax_administration
#: model_terms:ir.ui.view,arch_db:account_multi_vat.account_tax_search_view
msgid "Tax administration"
msgstr ""

#. module: account_multi_vat
#: code:addons/account_multi_vat/models/res_partner_id_number.py:0
#, python-format
msgid "The VAT number must be issued by a tax administration."
msgstr ""

#. module: account_multi_vat
#: code:addons/account_multi_vat/models/res_partner.py:0
#, python-format
msgid "The country is mandatory for tax administrations."
msgstr ""

#. module: account_multi_vat
#: code:addons/account_multi_vat/models/account_tax.py:0
#, python-format
msgid "The country of the tax must match the one of the tax grids."
msgstr ""

#. module: account_multi_vat
#: code:addons/account_multi_vat/models/res_partner_id_number.py:0
#, python-format
msgid ""
"There is already a VAT number for the tax administration "
"'{tax_administration}' on this contact."
msgstr ""

#. module: account_multi_vat
#: code:addons/account_multi_vat/models/res_partner.py:0
#, python-format
msgid "There's already a tax administration for {country_name}"
msgstr ""

#. module: account_multi_vat
#: model:res.partner.id_category,name:account_multi_vat.partner_id_category_vat
msgid "VAT number"
msgstr ""
Loading

0 comments on commit 63d6dd9

Please sign in to comment.