Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3416917
[ADD] website_sale_vat_required
eLBati Apr 17, 2015
9db9b60
[FIX] Vat label selector
StefanRijnhart Oct 27, 2015
a26215b
[FIX] Compatibility with website_sale Phantomjs tests
pedrobaeza Oct 27, 2015
dbe2b89
[MIG][9.0][website_sale_vat_required] Migrate
yajo May 4, 2017
4a640d4
[MIG] website_sale_vat_required: Migration to 11.0
ernestotejeda May 24, 2018
9d614c1
Added translation using Weblate (Spanish)
chienandalu Nov 12, 2018
0be48b6
[MIG] website_sale_vat_required: Migration to 12.0
ernestotejeda Sep 11, 2019
52c8e57
Update translation files
oca-transbot Apr 5, 2020
fd60189
[MIG] website_sale_vat_required: Migration to 13.0
Oct 3, 2020
91e5009
Update translation files
oca-transbot Oct 26, 2020
9867a0e
Added translation using Weblate (Catalan)
claudiagn Feb 25, 2021
a7daf27
[15.0][MIG] website_sale_vat_required
ChrisOForgeFlow Aug 25, 2022
d4e8379
Update translation files
weblate Dec 30, 2022
c54a1ca
[MIG] website_sale_vat_required: Migration to 16.0
Abranes Apr 19, 2023
8edf65c
[IMP-FIX] website_sale_vat_required: Remove dependency on payment met…
pilarvargas-tecnativa Sep 7, 2023
5ca5a5a
Added translation using Weblate (Italian)
mymage May 8, 2024
fdc34d9
[FIX] website_sale_vat_required: fix test
pilarvargas-tecnativa Jun 17, 2024
8695e50
[IMP] website_sale_vat_required: pre-commit auto fixes
carlos-lopez-tecnativa Feb 20, 2025
f8b6d7c
[MIG] website_sale_vat_required: Migration to version 17.0
carlos-lopez-tecnativa Feb 20, 2025
85013ff
[MIG] website_sale_vat_required: Migration to version 18.0
carlos-lopez-tecnativa Feb 26, 2025
8a22a60
[UPD] Update website_sale_vat_required.pot
Mar 6, 2025
9baad3b
[BOT] post-merge updates
OCA-git-bot Mar 6, 2025
89ab016
Added translation using Weblate (Portuguese (Brazil))
marcelsavegnago Jun 30, 2025
2849bc9
[19.0][MIG] website_sale_vat_required: Migration to 19.0
ManfredNelvin Jul 8, 2026
d1aed26
[IMP] website_sale_vat_required: Adapt tests for Odoo 19
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
26 changes: 26 additions & 0 deletions website_sale_vat_required/controllers/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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