File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
2+ <!--
3+ ~ Copyright 2022 Simone Rubino - TAKOBI
4+ ~ License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
5+ -->
6+
27<odoo >
38 <data >
49<!--
@@ -119,7 +124,7 @@ e 'line' per riga di fattura (a seconda del livello in cui sono chiamati)
119124 </template >
120125
121126 <template id =" account_invoice_line_it_sconto_maggiorazione" >
122- <t t-set =" importo" t-value =" get_importo(line.price_unit, line.discount )" />
127+ <t t-set =" importo" t-value =" get_importo(line)" />
123128 <ScontoMaggiorazione t-if =" line.discount != 0 or importo != 0" >
124129 <!-- [2.2.1.10] -->
125130 <t t-if =" importo" >
Original file line number Diff line number Diff line change 99* `Tecnativa <https://www.tecnativa.com >`_:
1010
1111 * Víctor Martínez
12+ * `TAKOBI <https://takobi.online >`_:
13+
14+ * Simone Rubino <sir@takobi.online>
Original file line number Diff line number Diff line change 11# Copyright 2020 Giuseppe Borruso
22# Copyright 2020 Marco Colombo
3+ # Copyright 2022 Simone Rubino - TAKOBI
4+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
35import logging
46import os
57from datetime import datetime
@@ -174,12 +176,12 @@ def get_all_taxes(record):
174176 wiz = self .env ["wizard.export.fatturapa" ]
175177 return wiz .getAllTaxes (record )
176178
177- def get_importo (price_unit , discount ):
178- str_number = str (discount )
179+ def get_importo (line , discount_field = ' discount' ):
180+ str_number = str (line [ discount_field ] )
179181 number = str_number [::- 1 ].find ("." )
180182 if number <= 2 :
181183 return False
182- return price_unit * discount / 100
184+ return line . price_unit * line . discount / 100
183185
184186 def get_importo_totale (invoice ):
185187 # wrapper to a method in wizard (for better overriding)
You can’t perform that action at this time.
0 commit comments