Skip to content

Commit

Permalink
[MIG] l10n_it_fatturapa_out_triple_discount: Migration to 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SirTakobi authored and GSLabIt committed Apr 11, 2023
1 parent c87162f commit 0c28ad6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
1 change: 0 additions & 1 deletion l10n_it_fatturapa_out/data/invoice_it_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
~ Copyright 2022 Simone Rubino - TAKOBI
~ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->

<odoo>
<data>
<!--
Expand Down
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_out/wizard/efattura.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def get_all_taxes(record):
wiz = self.env["wizard.export.fatturapa"]
return wiz.getAllTaxes(record)

def get_importo(line, discount_field='discount'):
def get_importo(line, discount_field="discount"):
str_number = str(line[discount_field])
number = str_number[::-1].find(".")
if number <= 2:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
~ Copyright 2022 Simone Rubino - TAKOBI
~ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-->
<odoo>
<data>
<template
Expand All @@ -8,11 +12,11 @@
<xpath expr="//ScontoMaggiorazione" position="after">
<t
t-set="importo2"
t-value="get_importo(line.price_unit, line.discount2)"
t-value="get_importo(line, discount_field='discount2')"
/>
<t
t-set="importo3"
t-value="get_importo(line.price_unit, line.discount3)"
t-value="get_importo(line, discount_field='discount3')"
/>
<ScontoMaggiorazione t-if="line.discount2 != 0 or importo2 != 0">
<!-- [2.2.1.10] -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
* Simone Rubino
* Alex Comba <alex.comba@agilebg.com>
* Giovanni Serra <giovanni@gslab.it>
* `Ooops <https://ooops404.com>`_:

* Giovanni Serra <giovanni@gslab.it>

* `TAKOBI <https://takobi.online>`_:

* Simone Rubino <sir@takobi.online>

0 comments on commit 0c28ad6

Please sign in to comment.