Skip to content

[18.0][ADD] account_move_from_epd: Materialize early payment discount - #2328

Open
grindtildeath wants to merge 4 commits into
OCA:18.0from
camptocamp:18.0-add-account_move_from_epd
Open

[18.0][ADD] account_move_from_epd: Materialize early payment discount#2328
grindtildeath wants to merge 4 commits into
OCA:18.0from
camptocamp:18.0-add-account_move_from_epd

Conversation

@grindtildeath

Copy link
Copy Markdown
Contributor

This module allows to materialize an 'Early Payment Discount' from an
invoice into a journal entry on a 'Miscellaneous' journal.

As Early Payment Discount cannot be applied once an invoice is partially
reconciled, the wizard allows to generate a journal entry using the full
EPD amount.

@OCA-git-bot OCA-git-bot added series:18.0 mod:account_move_from_epd Module account_move_from_epd labels Jun 12, 2026

@TDu TDu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LG, minor comments and also there is an issue with the pre-commits.

Could add the reconciliation part in the unit test to improve the code coverage of _compute_generated_epd_move_not_reconciled but not a necessity.

Comment thread account_move_from_epd/wizard/account_move_from_epd_generator.py Outdated
Comment thread account_move_from_epd/wizard/account_move_from_epd_generator.py Outdated
Comment thread account_move_from_epd/readme/DESCRIPTION.md

@florentx florentx left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LG

invoice_pay_term_lines.matched_debit_ids.debit_move_id
| invoice_pay_term_lines.matched_credit_ids.credit_move_id
)
move.generated_epd_move_not_reconciled = not bool(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
move.generated_epd_move_not_reconciled = not bool(
move.generated_epd_move_not_reconciled = not (

epd_values[category].get(payment_term_line, {}).items()
):
epd_line_vals_list.append(
{**dict(grouping_dict), **vals, "partner_id": partner.id}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Does it need the dict(...) if it is already a dict?

Suggested change
{**dict(grouping_dict), **vals, "partner_id": partner.id}
{**grouping_dict, **vals, "partner_id": partner.id}

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants