-
-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0][MIG] l10n_it_fatturapa_out_triple_discount #2760
Closed
GSLabIt
wants to merge
22
commits into
OCA:14.0
from
GSLabIt:14.0-mig-l10n_it_fatturapa_out_triple_discount
Closed
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
01b67c2
[ADD] l10n_it_fatturapa_out_triple_discount
SimoRubi 3df7fca
[UPD] Update l10n_it_fatturapa_out_triple_discount.pot
oca-travis 4017fce
FIX l10n_it_fatturapa_out_triple_discount adapt to new set_sequences …
eLBati 9c6c605
[ADD] icon.png
OCA-git-bot f0cb63c
l10n_it_fatturapa: xml doctor for fatturapa
sherpya 264f9b7
[UPD] README.rst
OCA-git-bot 5b76fae
[MIG] 10n_it_fatturapa_out_triple_discount: Migration to 12.0
tafaRU 3b7b6c9
[UPD] Update l10n_it_fatturapa_out_triple_discount.pot
oca-travis 2278bbc
[UPD] README.rst
OCA-git-bot 83fa79d
Use float_round from odoo because in python 3 "Exact halfway cases ar…
eLBati c640350
l10n_it_fatturapa_out_triple_discount 12.0.1.0.1
OCA-git-bot 9c9bc3a
l10n_it_fatturapa_out_triple_discount: disable tests because unstable
eLBati 4e40600
l10n_it_fatturapa_out_triple_discount 12.0.1.0.2
OCA-git-bot 686943b
merge PR 1264 1717 1728 1737 1739
311e046
FIX license LGPL-3 conflicts
eLBati 84b0ad1
l10n_it_fatturapa_out_triple_discount 12.0.1.0.4
OCA-git-bot f4aac77
[12.0][IMP] l10n_it_fatturapa_out and l10n_it_fatturapa_out_triple_di…
tafaRU 641d54b
l10n_it_fatturapa_out_triple_discount 12.0.2.0.0
OCA-git-bot 5cf5ef3
[FIX][l10n_it_fatturapa_out_triple_discount] change rounding to avoid…
dbad815
l10n_it_fatturapa_out_triple_discount 12.0.2.0.1
OCA-git-bot c87162f
[REF] l10n_it_fatturapa_out: Extract discounted price computation
SirTakobi 0c28ad6
[MIG] l10n_it_fatturapa_out_triple_discount: Migration to 14.0
SirTakobi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
====================================================== | ||
ITA - Fattura elettronica - Integrazione sconto triplo | ||
====================================================== | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
|
||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
: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_fatturapa_out_triple_discount | ||
: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_fatturapa_out_triple_discount | ||
: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 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
**Italiano** | ||
|
||
Questo modulo consente di generare correttamente la fattura elettronica (XML) quando il modulo account_invoice_triple_discount è installato. | ||
|
||
**English** | ||
|
||
The module allows to use correctly generate the Electronic Invoice (XML) when the module account_invoice_triple_discount is installed. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
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_fatturapa_out_triple_discount%0Aversion:%2012.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. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* Agile Business Group | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Simone Rubino | ||
* Alex Comba <alex.comba@agilebg.com> | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
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_fatturapa_out_triple_discount>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2019 Simone Rubino - Agile Business Group | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
{ | ||
"name": "ITA - Fattura elettronica - Integrazione sconto triplo", | ||
GSLabIt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"summary": "Modulo ponte tra emissione " "fatture elettroniche e sconto triplo", | ||
"version": "14.0.1.0.0", | ||
"development_status": "Beta", | ||
"category": "Hidden", | ||
"website": "https://github.com/OCA/l10n-italy" | ||
"l10n_it_fatturapa_out_triple_discount", | ||
"author": "Agile Business Group, Odoo Community Association (OCA)", | ||
"license": "AGPL-3", | ||
"auto_install": True, | ||
"depends": [ | ||
"l10n_it_fatturapa_out", | ||
"account_invoice_triple_discount", | ||
], | ||
"data": ["data/invoice_it_template.xml"], | ||
} |
50 changes: 50 additions & 0 deletions
50
l10n_it_fatturapa_out_triple_discount/data/invoice_it_template.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?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 | ||
id="account_invoice_line_it_triple_discount" | ||
inherit_id="l10n_it_fatturapa_out.account_invoice_line_it_sconto_maggiorazione" | ||
> | ||
<xpath expr="//ScontoMaggiorazione" position="after"> | ||
<t | ||
t-set="importo2" | ||
t-value="get_importo(line, discount_field='discount2')" | ||
/> | ||
<t | ||
t-set="importo3" | ||
t-value="get_importo(line, discount_field='discount3')" | ||
/> | ||
<ScontoMaggiorazione t-if="line.discount2 != 0 or importo2 != 0"> | ||
<!-- [2.2.1.10] --> | ||
<t t-if="importo"> | ||
<Tipo t-if="importo2 > 0">SC</Tipo> | ||
<Tipo t-if="importo2 <= 0">MG</Tipo> | ||
<Importo t-esc="format_numbers(abs(importo2))" /> | ||
</t> | ||
<t t-else=""> | ||
<Tipo t-if="line.discount2 > 0">SC</Tipo> | ||
<Tipo t-if="line.discount2 <= 0">MG</Tipo> | ||
<Percentuale t-esc="format_numbers_two(abs(line.discount2))" /> | ||
</t> | ||
</ScontoMaggiorazione> | ||
<ScontoMaggiorazione t-if="line.discount3 != 0 or importo3 != 0"> | ||
<!-- [2.2.1.10] --> | ||
<t t-if="importo"> | ||
<Tipo t-if="importo3 > 0">SC</Tipo> | ||
<Tipo t-if="importo3 <= 0">MG</Tipo> | ||
<Importo t-esc="format_numbers(abs(importo3))" /> | ||
</t> | ||
<t t-else=""> | ||
<Tipo t-if="line.discount3 > 0">SC</Tipo> | ||
<Tipo t-if="line.discount3 <= 0">MG</Tipo> | ||
<Percentuale t-esc="format_numbers_two(abs(line.discount3))" /> | ||
</t> | ||
</ScontoMaggiorazione> | ||
</xpath> | ||
</template> | ||
</data> | ||
</odoo> |
20 changes: 20 additions & 0 deletions
20
l10n_it_fatturapa_out_triple_discount/i18n/l10n_it_fatturapa_out_triple_discount.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * l10n_it_fatturapa_out_triple_discount | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"Last-Translator: <>\n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: l10n_it_fatturapa_out_triple_discount | ||
#: model:ir.model,name:l10n_it_fatturapa_out_triple_discount.model_wizard_export_fatturapa | ||
msgid "Export E-invoice" | ||
msgstr "" | ||
|
9 changes: 9 additions & 0 deletions
9
l10n_it_fatturapa_out_triple_discount/readme/CONTRIBUTORS.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
* Simone Rubino | ||
* Alex Comba <alex.comba@agilebg.com> | ||
* `Ooops <https://ooops404.com>`_: | ||
|
||
* Giovanni Serra <giovanni@gslab.it> | ||
|
||
* `TAKOBI <https://takobi.online>`_: | ||
|
||
* Simone Rubino <sir@takobi.online> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
**Italiano** | ||
|
||
Questo modulo consente di generare correttamente la fattura elettronica (XML) quando il modulo account_invoice_triple_discount è installato. | ||
|
||
**English** | ||
|
||
The module allows to use correctly generate the Electronic Invoice (XML) when the module account_invoice_triple_discount is installed. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trovo più versatile passare l'intera line piuttosto che i due valori qui. Un sottomodulo potrebbe voler fare l'override dell'importo leggendo valori presi da line. Se passi solo price_unit e discount, altri moduli non ci possono fare molto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A me sembra più utile non duplicare il codice per il calcolo dello sconto.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beh prima c'era funzione
get_importo()
che riceveva un parametro,line
, adesso riceve due parametri,price_unit
ediscount
, entrambi però presi daline
.È cambiata la signature della funzione, e rende la funzione meno versatile.
Forse sarebbe meglio passare un parametro aggiuntivo, opzionale, che permetta di selezionare quale sconto applicare, mantenendo la compatibilità con la base e altri (eventuali) moduli. Tipo:
che permette di mantenere la compatibilità e comunque scegliere lo sconto da applicare, in modo del tutto generale. Un domani un altro modulo potrebbe voler fare dei conti sull'importo usando campi dalla
line
, o introdurre in altro campo sconto da usare come base tipodiscount4
(faccio per dire, non che abbia senso).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chiaro ma resto della mia idea; mi da l'impressione di un UCAS. Detto ciò, sentiti libero di modificare la pr.