Skip to content

Commit

Permalink
[MIG] l10n_it_website_portal_fatturapa: Migration to 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Borruso committed Jan 28, 2022
1 parent bb85524 commit 8fdff13
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 57 deletions.
16 changes: 8 additions & 8 deletions l10n_it_website_portal_fatturapa/README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
====================================================
Italian Localization - Fattura elettronica - Portale
====================================================
===================================
ITA - Fattura elettronica - Portale
===================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
Expand All @@ -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|
Expand All @@ -43,7 +43,7 @@ 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_portal_fatturapa%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_website_portal_fatturapa%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.

Expand All @@ -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 <https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_website_portal_fatturapa>`_ project on GitHub.
This module is part of the `OCA/l10n-italy <https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_website_portal_fatturapa>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
7 changes: 3 additions & 4 deletions l10n_it_website_portal_fatturapa/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
14 changes: 7 additions & 7 deletions l10n_it_website_portal_fatturapa/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Italian Localization - Fattura elettronica - Portale</title>
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
<title>ITA - Fattura elettronica - Portale</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,14 +360,14 @@
</style>
</head>
<body>
<div class="document" id="italian-localization-fattura-elettronica-portale">
<h1 class="title">Italian Localization - Fattura elettronica - Portale</h1>
<div class="document" id="ita-fattura-elettronica-portale">
<h1 class="title">ITA - Fattura elettronica - Portale</h1>

<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_website_portal_fatturapa"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-italy-12-0/l10n-italy-12-0-l10n_it_website_portal_fatturapa"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/122/12.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_website_portal_fatturapa"><img alt="OCA/l10n-italy" src="https://img.shields.io/badge/github-OCA%2Fl10n--italy-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/l10n-italy-14-0/l10n-italy-14-0-l10n_it_website_portal_fatturapa"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/122/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>Allow frontend users to edit any necessary field for Electronic invoice from their <em>details</em> page.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand All @@ -389,7 +389,7 @@ <h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/l10n-italy/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_website_portal_fatturapa%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/l10n-italy/issues/new?body=module:%20l10n_it_website_portal_fatturapa%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -401,7 +401,7 @@ <h2><a class="toc-backref" href="#id4">Maintainers</a></h2>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/12.0/l10n_it_website_portal_fatturapa">OCA/l10n-italy</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/l10n-italy/tree/14.0/l10n_it_website_portal_fatturapa">OCA/l10n-italy</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});

0 comments on commit 8fdff13

Please sign in to comment.