Skip to content

Conversation

@grindtildeath
Copy link
Contributor

This module will ensure dunning fees are considered when generating swiss
QR-bill from credit control lines.

Copy link
Contributor

@simahawk simahawk left a 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?

Comment on lines +21 to +24
invoices = self.env["account.move"].browse(docids)
for invoice in invoices:
if invoice.id not in dunning_fees_qr_amounts:
continue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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?

Comment on lines +12 to +17
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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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?

report_ref, data, res_ids=res_ids
)

collected_streams = OrderedDict()
Copy link
Contributor

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?

@grindtildeath
Copy link
Contributor Author

@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.

@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jan 26, 2025
@github-actions github-actions bot closed this Mar 2, 2025
@TDu TDu reopened this Mar 4, 2025
@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 9, 2025
@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 13, 2025
@github-actions github-actions bot closed this Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants