Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e0c63a7
[ADD] website_sale_vat_required
eLBati Apr 17, 2015
290fe06
[FIX] Vat label selector
StefanRijnhart Oct 27, 2015
24200b2
[FIX] Compatibility with website_sale Phantomjs tests
pedrobaeza Oct 27, 2015
b77aff2
[MIG][9.0][website_sale_vat_required] Migrate
yajo May 4, 2017
909723f
[MIG] website_sale_vat_required: Migration to 11.0
ernestotejeda May 24, 2018
d42ee59
Added translation using Weblate (Spanish)
chienandalu Nov 12, 2018
eb256fd
[MIG] website_sale_vat_required: Migration to 12.0
ernestotejeda Sep 11, 2019
6788b08
Update translation files
oca-transbot Apr 5, 2020
aaec9ad
[MIG] website_sale_vat_required: Migration to 13.0
Oct 3, 2020
01e0b05
Update translation files
oca-transbot Oct 26, 2020
7d06a27
Added translation using Weblate (Catalan)
claudiagn Feb 25, 2021
4c48a0e
[15.0][MIG] website_sale_vat_required
ChrisOForgeFlow Aug 25, 2022
945bef9
Update translation files
weblate Dec 30, 2022
4249a44
[MIG] website_sale_vat_required: Migration to 16.0
Abranes Apr 19, 2023
b63668e
[IMP-FIX] website_sale_vat_required: Remove dependency on payment met…
pilarvargas-tecnativa Sep 7, 2023
adc6896
Added translation using Weblate (Italian)
mymage May 8, 2024
98f21c7
[FIX] website_sale_vat_required: fix test
pilarvargas-tecnativa Jun 17, 2024
d807f85
[IMP] website_sale_vat_required: pre-commit auto fixes
carlos-lopez-tecnativa Feb 20, 2025
153d6d4
[MIG] website_sale_vat_required: Migration to version 17.0
carlos-lopez-tecnativa Feb 20, 2025
ef20f97
[MIG] website_sale_vat_required: Migration to version 18.0
carlos-lopez-tecnativa Feb 26, 2025
3cc70c3
[UPD] Update website_sale_vat_required.pot
Mar 6, 2025
293e12f
[BOT] post-merge updates
OCA-git-bot Mar 6, 2025
2b8771d
Added translation using Weblate (Portuguese (Brazil))
marcelsavegnago Jun 30, 2025
84605fa
[MIG] website_sale_vat_required: Migration to 19.0
ManfredNelvin Jul 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions website_sale_vat_required/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=======================
e-commerce required VAT
=======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:0ad8d5cfff4cc37f994c28fc6594b8f594e3b6769a263e5451eb847240221d0f
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/license-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%2Fe--commerce-lightgray.png?logo=github
:target: https://github.com/OCA/e-commerce/tree/19.0/website_sale_vat_required
:alt: OCA/e-commerce
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/e-commerce-19-0/e-commerce-19-0-website_sale_vat_required
: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/e-commerce&target_branch=19.0
:alt: Try me on Runboat

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

This module extends checkout e-commerce form in order to force user to
fill 'VAT number' field.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

1. Buy something from your e-commerce
2. Go to checkout page.
3. Try to checkout without specifying a VAT, or using a wrong one.
4. You will get an error.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/e-commerce/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 <https://github.com/OCA/e-commerce/issues/new?body=module:%20website_sale_vat_required%0Aversion:%2019.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
-------

* Agile Business Group
* Tecnativa

Contributors
------------

- Lorenzo Battistini <lorenzo.battistini@agilebg.com>

- `Tecnativa <https://www.tecnativa.com>`__:

- Jairo Llopis
- Ernesto Tejeda
- Carlos Lopez

- Abraham Anes <abrahamanes@gmail.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.

This module is part of the `OCA/e-commerce <https://github.com/OCA/e-commerce/tree/19.0/website_sale_vat_required>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions website_sale_vat_required/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2015 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright 2017 Jairo Llopis <jairo.llopis@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import controllers
21 changes: 21 additions & 0 deletions website_sale_vat_required/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2015 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright 2017 Jairo Llopis <jairo.llopis@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "e-commerce required VAT",
"summary": "VAT number required in checkout form",
"version": "19.0.1.0.0",
"category": "Website",
"author": "Agile Business Group, Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/e-commerce",
"license": "AGPL-3",
"depends": ["website_sale", "base_vat"],
"installable": True,
"auto_install": False,
"assets": {
"web.assets_tests": [
"website_sale_vat_required/static/tests/tours/website_sale_vat_required.esm.js",
],
},
}
5 changes: 5 additions & 0 deletions website_sale_vat_required/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2015 Lorenzo Battistini <lorenzo.battistini@agilebg.com>
# Copyright 2017 Jairo Llopis <jairo.llopis@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import main
23 changes: 23 additions & 0 deletions website_sale_vat_required/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2015 Agile Business Group sagl (<http://www.agilebg.com>)
# Copyright 2017 Jairo Llopis <jairo.llopis@tecnativa.com>
# Copyright 2025 Carlos Lopez - Tecnativa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo.addons.website_sale.controllers.main import WebsiteSale


class WebsiteSale(WebsiteSale):
def _get_mandatory_billing_address_fields(self, country_sudo):
field_names = super()._get_mandatory_billing_address_fields(country_sudo)
if "vat" not in field_names:
field_names |= {"vat"}
return field_names

def _prepare_address_form_values(self, *args, **kwargs):
rendering_values = super()._prepare_address_form_values(*args, **kwargs)
address_type = kwargs.get("address_type")
use_delivery_as_billing = kwargs.get("use_delivery_as_billing", False)
rendering_values["show_vat"] = (
address_type == "billing" or use_delivery_as_billing
)
return rendering_values
Empty file.
20 changes: 20 additions & 0 deletions website_sale_vat_required/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_sale_vat_required
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2018-11-13 09:15+0000\n"
"Last-Translator: David Vidal <david.vidal@tecnativa.com>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.2.2\n"

#~ msgid "TIN / VAT"
#~ msgstr "NIF"
14 changes: 14 additions & 0 deletions website_sale_vat_required/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: it\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"
14 changes: 14 additions & 0 deletions website_sale_vat_required/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: pt_BR\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"
13 changes: 13 additions & 0 deletions website_sale_vat_required/i18n/website_sale_vat_required.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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"
3 changes: 3 additions & 0 deletions website_sale_vat_required/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
9 changes: 9 additions & 0 deletions website_sale_vat_required/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- Lorenzo Battistini \<<lorenzo.battistini@agilebg.com>\>

- [Tecnativa](https://www.tecnativa.com):

> - Jairo Llopis
> - Ernesto Tejeda
> - Carlos Lopez

- Abraham Anes \<<abrahamanes@gmail.com>\>
2 changes: 2 additions & 0 deletions website_sale_vat_required/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module extends checkout e-commerce form in order to force user to
fill 'VAT number' field.
6 changes: 6 additions & 0 deletions website_sale_vat_required/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
To use this module, you need to:

1. Buy something from your e-commerce
2. Go to checkout page.
3. Try to checkout without specifying a VAT, or using a wrong one.
4. You will get an error.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading