Skip to content

[19.0][FW][IMP] sale_automatic_workflow: add option for default payment journal#4138

Open
JordiMForgeFlow wants to merge 2 commits intoOCA:19.0from
ForgeFlow:19.0-fw-sale_automatic_workflow_payment_journal
Open

[19.0][FW][IMP] sale_automatic_workflow: add option for default payment journal#4138
JordiMForgeFlow wants to merge 2 commits intoOCA:19.0from
ForgeFlow:19.0-fw-sale_automatic_workflow_payment_journal

Conversation

@JordiMForgeFlow
Copy link
Copy Markdown
Contributor

@JordiMForgeFlow JordiMForgeFlow commented Feb 2, 2026

FW of #4137 and also ensure module works properly when payments don't generate journal entries and using enterprise.

CC @kevinkhao

kevinkhao and others added 2 commits February 2, 2026 10:47
… payments

Make sure payments that dont generate an entry are properly related to the invoice.
Also, make sure no duplicate payments are created when using odoo enterprise having the
'in_payment' state
@JordiMForgeFlow
Copy link
Copy Markdown
Contributor Author

@gurneyalex @sebastienbeau could you check the proposed changes? Thank you :)

Copy link
Copy Markdown

@alexey-pelykh alexey-pelykh left a comment

Choose a reason for hiding this comment

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

Thanks for the forward port and the enterprise compatibility improvements, @JordiMForgeFlow!

The changes look solid. The domain filter tightening from != paid to = not_paid is a good catch — the old filter could inadvertently pick up invoices in partial or in_payment states. Using _get_valid_payment_account_types() instead of hardcoded account types is the right call for enterprise compatibility. The new payment journal field follows the existing property_journal_id pattern consistently, and the test coverage is appropriate.

One minor thought below about journal type filtering, but nothing blocking.

<label
for="property_payment_journal_id"
class="col-lg-4 o_light_label"
/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit (non-blocking, pre-existing pattern): the <field> for the payment journal could benefit from a domain="[('type', 'in', ('bank', 'cash'))]" to restrict the selection to bank/cash journals, since it wouldn't make sense to register payments against a sales or miscellaneous journal. The existing property_journal_id has the same gap though, so this is more of a follow-up improvement for both fields.

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

@rousseldenis rousseldenis added this to the 19.0 milestone Mar 17, 2026
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.

6 participants