-
-
Notifications
You must be signed in to change notification settings - Fork 309
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][FIX] l10n_it_delivery_note invoice multiple DDT on same sale order line #3240
[14.0][FIX] l10n_it_delivery_note invoice multiple DDT on same sale order line #3240
Conversation
Hi @As400it, |
07b6fe4
to
7e1a7e7
Compare
@sergiocorato puoi far ripartire il runboat? |
@sergiocorato puoi fare rebase? |
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.
Code review
new_line[2]["name"] = _( | ||
"""{} and "{}" of {}""" | ||
).format( | ||
new_line[2]["name"], | ||
dn.name, | ||
dn.date.strftime(DATE_FORMAT), | ||
) |
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.
suggestion: using the .format()
method is discouraged because it can be source of vulnerabilities.
See here the comment from Yajo
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.
Meglio fare il link direttamente a CONTRIBUTING:
https://github.com/OCA/odoo-community.org/blob/master/website/Contribution/CONTRIBUTING.rst#idioms
Prefer
%
over.format()
, prefer%(varname)
instead of positional.
This is better for translation
and security <https://github.com/OCA/pylint-odoo/issues/302#issue-758472967>
__.
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.
Ho corretto, grazie
4e27db1
to
8e4d672
Compare
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.
Ho provato il test nella versione del modulo attualmente sul branch 14.0, e passa comunque.
Se capisco bene il codice, l'unica modifica in questa PR è l'inserimento di una riga di tipo nota in fattura che faccia riferimento al Delivery note. Prima veniva inserita sempre, adesso... solo se non è già stata inserita. Quindi serve a non duplicare la nota. Giusto?
Per il resto, il codice mi sembra ok.
nitpick: Il numero di versione va nel titolo della PR, ma non nel messaggio di commit (perché poi il commit sarà comunque portato ad altre versioni)
La nota esce già normalmente se c'è un solo DDT (vedi https://github.com/OCA/l10n-italy/pull/3240/files#diff-5a5cc188c21c8cc692f1ac1a33571e760b1d0a05fe46a4a01544b90e71125965R114 ), con questa PR viene esposta anche se ci sono più DDT collegati. Correggo il commit, grazie della segnalazione. |
8e4d672
to
32e08f2
Compare
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.
LGTM
/ocabot merge patch |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at b0215b4. Thanks a lot for contributing to OCA. ❤️ |
No description provided.