Skip to content

Commit

Permalink
IMP l10n_it_website_portal_fatturapa: when customers set they are sub…
Browse files Browse the repository at this point in the history
…jected they are also obliged
  • Loading branch information
eLBati authored and Borruso committed Feb 26, 2024
1 parent 3d0fbcb commit 030f28e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion l10n_it_website_portal_fatturapa/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Italian Localization - Fattura elettronica - Portale",
"summary": "Add fatturapa fields and checks in frontend user's details",
"version": "12.0.1.2.1",
"version": "12.0.1.3.0",
"author": "Odoo Community Association (OCA)",
"category": "Localization/Italy",
"website": "https://github.com/OCA/l10n-italy/tree/"
Expand Down
4 changes: 3 additions & 1 deletion l10n_it_website_portal_fatturapa/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
['codice_destinatario', 'firstname', 'lastname',
'pec_destinatario', 'country_id', 'fiscalcode', 'zipcode', 'vat',
'electronic_invoice_subjected', 'street', 'city',
'is_pa', 'ipa_code', 'eori_code']
'is_pa', 'ipa_code', 'eori_code', 'electronic_invoice_obliged_subject']
WebsitePortalFiscalCode.OPTIONAL_BILLING_FIELDS.extend(FATTURAPA_PORTAL_FIELDS)


Expand All @@ -22,6 +22,8 @@ def details_form_validate(self, data):
# it is not posted
data['electronic_invoice_subjected'] = data.get(
'electronic_invoice_subjected', False)
if data["electronic_invoice_subjected"]:
data["electronic_invoice_obliged_subject"] = True
error, error_message = \
super(WebsitePortalFatturapa, self).details_form_validate(data)
partner_sudo = request.env.user.partner_id.sudo()
Expand Down
4 changes: 2 additions & 2 deletions l10n_it_website_portal_fatturapa/i18n/it.po
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_it_website_portal_fatturapa
# * l10n_it_website_portal_fatturapa
#
msgid ""
msgstr ""
Expand All @@ -22,7 +22,7 @@ msgid "Addressee code"
msgstr "Codice destinatario"

#. module: l10n_it_website_portal_fatturapa
#: code:addons/l10n_it_website_portal_fatturapa/controllers/main.py:70
#: code:addons/l10n_it_website_portal_fatturapa/controllers/main.py:72
#, python-format
msgid "At least one of first name and last name is required"
msgstr "Almeno uno fra nome e cognome è richiesto"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ msgid "Addressee code"
msgstr ""

#. module: l10n_it_website_portal_fatturapa
#: code:addons/l10n_it_website_portal_fatturapa/controllers/main.py:70
#: code:addons/l10n_it_website_portal_fatturapa/controllers/main.py:72
#, python-format
msgid "At least one of first name and last name is required"
msgstr ""
Expand Down

0 comments on commit 030f28e

Please sign in to comment.