From 0ce49dfdaabbade765ca6b7fddaf45374241615b Mon Sep 17 00:00:00 2001 From: Borruso Date: Sat, 20 Nov 2021 18:47:13 +0100 Subject: [PATCH] [MIG] l10n_it_website_portal_fatturapa: Migration to 14.0 --- l10n_it_website_portal_fatturapa/README.rst | 16 ++-- .../__manifest__.py | 7 +- .../static/description/index.html | 14 ++-- .../js/l10n_it_website_portal_fatturapa.js | 75 +++++++++---------- 4 files changed, 55 insertions(+), 57 deletions(-) diff --git a/l10n_it_website_portal_fatturapa/README.rst b/l10n_it_website_portal_fatturapa/README.rst index d1f5f4db69f3..3e87afa4d7a7 100644 --- a/l10n_it_website_portal_fatturapa/README.rst +++ b/l10n_it_website_portal_fatturapa/README.rst @@ -1,6 +1,6 @@ -==================================================== -Italian Localization - Fattura elettronica - Portale -==================================================== +=================================== +ITA - Fattura elettronica - Portale +=================================== .. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! @@ -14,13 +14,13 @@ Italian Localization - Fattura elettronica - Portale :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/12.0/l10n_it_website_portal_fatturapa + :target: https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_website_portal_fatturapa :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-12-0/l10n-italy-12-0-l10n_it_website_portal_fatturapa + :target: https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_website_portal_fatturapa :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/12.0 + :target: https://runbot.odoo-community.org/runbot/122/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -43,7 +43,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -63,6 +63,6 @@ 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 `_ project on GitHub. +This module is part of the `OCA/l10n-italy `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/l10n_it_website_portal_fatturapa/__manifest__.py b/l10n_it_website_portal_fatturapa/__manifest__.py index 4ebb982d136a..169a91fac0ba 100644 --- a/l10n_it_website_portal_fatturapa/__manifest__.py +++ b/l10n_it_website_portal_fatturapa/__manifest__.py @@ -2,13 +2,12 @@ # Copyright 2019 Lorenzo Battistini # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). { - "name": "Italian Localization - Fattura elettronica - Portale", + "name": "ITA - Fattura elettronica - Portale", "summary": "Add fatturapa fields and checks in frontend user's details", - "version": "12.0.1.3.0", + "version": "14.0.1.0.0", "author": "Odoo Community Association (OCA)", "category": "Localization/Italy", - "website": "https://github.com/OCA/l10n-italy" - "12.0/l10n_it_website_portal_fatturapa", + "website": "https://github.com/OCA/l10n-italy", "license": "AGPL-3", "depends": [ "l10n_it_fatturapa", diff --git a/l10n_it_website_portal_fatturapa/static/description/index.html b/l10n_it_website_portal_fatturapa/static/description/index.html index 85518daf341e..17dd37364e60 100644 --- a/l10n_it_website_portal_fatturapa/static/description/index.html +++ b/l10n_it_website_portal_fatturapa/static/description/index.html @@ -3,8 +3,8 @@ - -Italian Localization - Fattura elettronica - Portale + +ITA - Fattura elettronica - Portale -
-

Italian Localization - Fattura elettronica - Portale

+
+

ITA - Fattura elettronica - Portale

-

Beta License: AGPL-3 OCA/l10n-italy Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/l10n-italy Translate me on Weblate Try me on Runbot

Allow frontend users to edit any necessary field for Electronic invoice from their details page.

Table of contents

@@ -389,7 +389,7 @@

Bug Tracker

Bugs are tracked on GitHub 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.

+feedback.

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

@@ -401,7 +401,7 @@

Maintainers

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 project on GitHub.

+

This module is part of the OCA/l10n-italy project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/l10n_it_website_portal_fatturapa/static/src/js/l10n_it_website_portal_fatturapa.js b/l10n_it_website_portal_fatturapa/static/src/js/l10n_it_website_portal_fatturapa.js index ef5df9065ace..0bcccf0badfe 100644 --- a/l10n_it_website_portal_fatturapa/static/src/js/l10n_it_website_portal_fatturapa.js +++ b/l10n_it_website_portal_fatturapa/static/src/js/l10n_it_website_portal_fatturapa.js @@ -5,47 +5,46 @@ odoo.define("l10n_it_website_portal_fatturapa", function (require) { $(document).ready(function () { var details_div_selector = ".o_portal_details"; var $details_div = $(details_div_selector); - if (!$details_div.length) { - return $.Deferred().reject("DOM doesn't contain " + details_div_selector); - } - var $electronic_invoice_subjected_input = $details_div.find( - "input[name='electronic_invoice_subjected'][type='checkbox']" - ); - var $div_electronic_invoice_subjected_fields = $details_div.find( - ".div_electronic_invoice_subjected_fields" - ); + if ($details_div.length) { + var $electronic_invoice_subjected_input = $details_div.find( + "input[name='electronic_invoice_subjected'][type='checkbox']" + ); + var $div_electronic_invoice_subjected_fields = $details_div.find( + ".div_electronic_invoice_subjected_fields" + ); + + var compute_e_inv_fields_visibility = function () { + if ($electronic_invoice_subjected_input[0].checked) { + $div_electronic_invoice_subjected_fields.show(); + } else { + $div_electronic_invoice_subjected_fields.hide(); + } + }; + compute_e_inv_fields_visibility(); + $electronic_invoice_subjected_input.change(compute_e_inv_fields_visibility); - var compute_e_inv_fields_visibility = function () { - if ($electronic_invoice_subjected_input[0].checked) { - $div_electronic_invoice_subjected_fields.show(); - } else { - $div_electronic_invoice_subjected_fields.hide(); + var $is_pa = $details_div.find("input[name='is_pa'][type='checkbox']"); + if (!$is_pa.length) { + return; } - }; - compute_e_inv_fields_visibility(); - $electronic_invoice_subjected_input.change(compute_e_inv_fields_visibility); + var $codice_destinatario_div = $details_div + .find("input[name='codice_destinatario'][type='text']") + .parent(); + var $pec_destinatario_div = $details_div + .find("input[name='pec_destinatario'][type='text']") + .parent(); - var $is_pa = $details_div.find("input[name='is_pa'][type='checkbox']"); - if (!$is_pa.length) { - return; + var compute_destinatario_fields_visibility = function () { + if ($is_pa[0].checked) { + $codice_destinatario_div.hide(); + $pec_destinatario_div.hide(); + } else { + $codice_destinatario_div.show(); + $pec_destinatario_div.show(); + } + }; + compute_destinatario_fields_visibility(); + $is_pa.change(compute_destinatario_fields_visibility); } - var $codice_destinatario_div = $details_div - .find("input[name='codice_destinatario'][type='text']") - .parent(); - var $pec_destinatario_div = $details_div - .find("input[name='pec_destinatario'][type='text']") - .parent(); - - var compute_destinatario_fields_visibility = function () { - if (!$is_pa[0].checked) { - $codice_destinatario_div.show(); - $pec_destinatario_div.show(); - } else { - $codice_destinatario_div.hide(); - $pec_destinatario_div.hide(); - } - }; - compute_destinatario_fields_visibility(); - $is_pa.change(compute_destinatario_fields_visibility); }); });