-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
[16.0] Add module l10n_ch_credit_control_dunning_fees_qr_report #737
base: 16.0
Are you sure you want to change the base?
[16.0] Add module l10n_ch_credit_control_dunning_fees_qr_report #737
Conversation
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.
Non blocking remarks. Pre-approving.
Any chance to have tests?
invoices = self.env["account.move"].browse(docids) | ||
for invoice in invoices: | ||
if invoice.id not in dunning_fees_qr_amounts: | ||
continue |
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.
invoices = self.env["account.move"].browse(docids) | |
for invoice in invoices: | |
if invoice.id not in dunning_fees_qr_amounts: | |
continue | |
invoices = self.env["account.move"].browse(list(dunning_fees_qr_amounts.keys())) | |
for invoice in invoices: |
You know already the ones to browse no?
if self.id in qr_dunning_fees_amounts: | ||
return "{:,.2f}".format(qr_dunning_fees_amounts[self.id]).replace( | ||
",", "\xa0" | ||
) | ||
else: | ||
return "{:,.2f}".format(self.amount_residual).replace(",", "\xa0") |
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.
if self.id in qr_dunning_fees_amounts: | |
return "{:,.2f}".format(qr_dunning_fees_amounts[self.id]).replace( | |
",", "\xa0" | |
) | |
else: | |
return "{:,.2f}".format(self.amount_residual).replace(",", "\xa0") | |
if self.id in qr_dunning_fees_amounts: | |
return "{:,.2f}".format(qr_dunning_fees_amounts[self.id]).replace( | |
",", "\xa0" | |
) | |
return "{:,.2f}".format(self.amount_residual).replace(",", "\xa0") |
any comment to explain why this is needed?
l10n_ch_credit_control_dunning_fees_qr_report/models/credit_control_communication_report.py
Outdated
Show resolved
Hide resolved
report_ref, data, res_ids=res_ids | ||
) | ||
|
||
collected_streams = OrderedDict() |
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.
maybe move to a separate method like _pdf_prepare_streams_cc_dunning_fees
?
@simahawk Out of moving class to its dedicated file, I would prefer keeping code as it to avoid any unforeseen issue since it's been working in production for a while. Also I'm not the original author, most of the code was from @ajaniszewska-dev , so I cannot necessarily answer all these questions. A test would be good yes. |
This module will ensure dunning fees are considered when generating swiss
QR-bill from credit control lines.