-
-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by tafaRU
- Loading branch information
Showing
18 changed files
with
805 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
======================= | ||
Website Sale FiscalCode | ||
======================= | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! 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%2Fl10n--italy-lightgray.png?logo=github | ||
:target: https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_website_sale_fiscalcode | ||
:alt: OCA/l10n-italy | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_website_sale_fiscalcode | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/122/14.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
**Italiano** | ||
|
||
Questo modulo aggiunge il codice fiscale nel form del checkout. | ||
|
||
**English** | ||
|
||
This module adds fiscal code in the checkout form. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
**Italiano** | ||
|
||
Per utilizzare questo modulo: | ||
|
||
* Andare nel negozio; | ||
* Comprare qualcosa; | ||
* Aggiungere il codice fiscale nel form del checkout. | ||
|
||
**English** | ||
|
||
To use this module, you need to: | ||
|
||
* Go to Shop; | ||
* Buy something; | ||
* Add fiscal code in the checkout form. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/l10n-italy/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/l10n-italy/issues/new?body=module:%20l10n_it_website_sale_fiscalcode%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 | ||
~~~~~~~ | ||
|
||
* Agile Business Group | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Nicola Malcontenti <nicola.malcontenti@agilebg.com> | ||
* Alessio Gerace <alessio.gerace@agilebg.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/l10n-italy <https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_website_sale_fiscalcode>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Copyright 2017 Nicola Malcontenti - Agile Business Group | ||
|
||
from . import controllers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2017 Nicola Malcontenti - Agile Business Group | ||
# Copyright 2019 Simone Rubino | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Website Sale FiscalCode", | ||
"category": "e-commerce", | ||
"author": "Agile Business Group," "Odoo Community Association (OCA)", | ||
"version": "14.0.1.0.0", | ||
"license": "AGPL-3", | ||
"website": "https://github.com/OCA/l10n-italy" | ||
"/tree/14.0/l10n_it_website_sale_fiscalcode", | ||
"depends": ["website_sale", "l10n_it_fiscalcode"], | ||
"data": [ | ||
"views/templates.xml", | ||
], | ||
"installable": True, | ||
"auto_install": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Copyright 2017 Nicola Malcontenti - Agile Business Group | ||
|
||
from . import main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright 2017 Nicola Malcontenti - Agile Business Group | ||
|
||
from odoo import _ | ||
from odoo.http import request | ||
|
||
from odoo.addons.website_sale.controllers.main import WebsiteSale | ||
|
||
|
||
class WebsiteSaleFiscalCode(WebsiteSale): | ||
def _checkout_form_save(self, mode, checkout, all_values): | ||
res = super(WebsiteSaleFiscalCode, self)._checkout_form_save( | ||
mode, checkout, all_values | ||
) | ||
partner_values = dict() | ||
if "fiscalcode" not in checkout and "fiscalcode" in all_values: | ||
partner_values["fiscalcode"] = all_values["fiscalcode"] | ||
if partner_values: | ||
request.env["res.partner"].browse(res).sudo().write(partner_values) | ||
return res | ||
|
||
def checkout_form_validate(self, mode, all_form_values, data): | ||
error, error_message = super().checkout_form_validate( | ||
mode, all_form_values, data | ||
) | ||
partner_sudo = request.env.user.partner_id.sudo() | ||
dummy_partner = request.env["res.partner"].new( | ||
{ | ||
"fiscalcode": data.get("fiscalcode"), | ||
"is_company": partner_sudo.is_company, | ||
} | ||
) | ||
if dummy_partner.fiscalcode: | ||
if len(dummy_partner.fiscalcode) != 16: | ||
error["fiscalcode"] = "error" | ||
error_message.append(_("Fiscal Code not valid")) | ||
return error, error_message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * l10n_it_website_sale_fiscalcode | ||
# | ||
# Translators: | ||
# Niki Waibel, 2018 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 10.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2018-05-11 12:22+0000\n" | ||
"PO-Revision-Date: 2018-05-11 12:22+0000\n" | ||
"Last-Translator: Niki Waibel, 2018\n" | ||
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" | ||
"Language: de\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" | ||
|
||
#. module: l10n_it_website_sale_fiscalcode | ||
#: model_terms:ir.ui.view,arch_db:l10n_it_website_sale_fiscalcode.l10n_it_website_sale_fiscalcode | ||
msgid "Fiscal Code" | ||
msgstr "Steuernummer" | ||
|
||
#. module: l10n_it_website_sale_fiscalcode | ||
#: code:addons/l10n_it_website_sale_fiscalcode/controllers/main.py:30 | ||
#, fuzzy, python-format | ||
msgid "Fiscal Code not valid" | ||
msgstr "Steuernummer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * l10n_it_website_sale_fiscalcode | ||
# | ||
# Translators: | ||
# OCA Transbot <transbot@odoo-community.org>, 2018 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 10.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2018-05-11 12:22+0000\n" | ||
"PO-Revision-Date: 2018-05-11 12:22+0000\n" | ||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n" | ||
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\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" | ||
|
||
#. module: l10n_it_website_sale_fiscalcode | ||
#: model_terms:ir.ui.view,arch_db:l10n_it_website_sale_fiscalcode.l10n_it_website_sale_fiscalcode | ||
msgid "Fiscal Code" | ||
msgstr "Código Fiscal" | ||
|
||
#. module: l10n_it_website_sale_fiscalcode | ||
#: code:addons/l10n_it_website_sale_fiscalcode/controllers/main.py:30 | ||
#, fuzzy, python-format | ||
msgid "Fiscal Code not valid" | ||
msgstr "Código Fiscal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * l10n_it_website_sale_fiscalcode | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 10.0+e\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2018-05-07 13:45+0000\n" | ||
"PO-Revision-Date: 2019-02-27 08:13+0000\n" | ||
"Last-Translator: Sergio Zanchetta <primes2h@gmail.com>\n" | ||
"Language-Team: \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" | ||
"X-Generator: Weblate 3.4\n" | ||
|
||
#. module: l10n_it_website_sale_fiscalcode | ||
#: model_terms:ir.ui.view,arch_db:l10n_it_website_sale_fiscalcode.l10n_it_website_sale_fiscalcode | ||
msgid "Fiscal Code" | ||
msgstr "Codice fiscale" | ||
|
||
#. module: l10n_it_website_sale_fiscalcode | ||
#: code:addons/l10n_it_website_sale_fiscalcode/controllers/main.py:30 | ||
#, python-format | ||
msgid "Fiscal Code not valid" | ||
msgstr "Codice fiscale non valido" |
26 changes: 26 additions & 0 deletions
26
l10n_it_website_sale_fiscalcode/i18n/l10n_it_website_sale_fiscalcode.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * l10n_it_website_sale_fiscalcode | ||
# | ||
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: l10n_it_website_sale_fiscalcode | ||
#: model_terms:ir.ui.view,arch_db:l10n_it_website_sale_fiscalcode.l10n_it_website_sale_fiscalcode | ||
msgid "Fiscal Code" | ||
msgstr "" | ||
|
||
#. module: l10n_it_website_sale_fiscalcode | ||
#: code:addons/l10n_it_website_sale_fiscalcode/controllers/main.py:30 | ||
#, python-format | ||
msgid "Fiscal Code not valid" | ||
msgstr "" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * l10n_it_website_sale_fiscalcode | ||
# | ||
# Translators: | ||
# OCA Transbot <transbot@odoo-community.org>, 2018 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 10.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2018-05-11 12:22+0000\n" | ||
"PO-Revision-Date: 2018-05-11 12:22+0000\n" | ||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2018\n" | ||
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" | ||
"Language: sl\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" | ||
"%100==4 ? 2 : 3);\n" | ||
|
||
#. module: l10n_it_website_sale_fiscalcode | ||
#: model_terms:ir.ui.view,arch_db:l10n_it_website_sale_fiscalcode.l10n_it_website_sale_fiscalcode | ||
msgid "Fiscal Code" | ||
msgstr "Fiskalna koda" | ||
|
||
#. module: l10n_it_website_sale_fiscalcode | ||
#: code:addons/l10n_it_website_sale_fiscalcode/controllers/main.py:30 | ||
#, fuzzy, python-format | ||
msgid "Fiscal Code not valid" | ||
msgstr "Fiskalna koda" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* Nicola Malcontenti <nicola.malcontenti@agilebg.com> | ||
* Alessio Gerace <alessio.gerace@agilebg.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
**Italiano** | ||
|
||
Questo modulo aggiunge il codice fiscale nel form del checkout. | ||
|
||
**English** | ||
|
||
This module adds fiscal code in the checkout form. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
**Italiano** | ||
|
||
Per utilizzare questo modulo: | ||
|
||
* Andare nel negozio; | ||
* Comprare qualcosa; | ||
* Aggiungere il codice fiscale nel form del checkout. | ||
|
||
**English** | ||
|
||
To use this module, you need to: | ||
|
||
* Go to Shop; | ||
* Buy something; | ||
* Add fiscal code in the checkout form. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.