[19.0][FW][IMP] sale_automatic_workflow: add option for default payment journal#4138
[19.0][FW][IMP] sale_automatic_workflow: add option for default payment journal#4138JordiMForgeFlow wants to merge 2 commits intoOCA:19.0from
Conversation
… 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
|
@gurneyalex @sebastienbeau could you check the proposed changes? Thank you :) |
alexey-pelykh
left a comment
There was a problem hiding this comment.
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" | ||
| /> |
There was a problem hiding this comment.
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.
|
This PR has the |
FW of #4137 and also ensure module works properly when payments don't generate journal entries and using enterprise.
CC @kevinkhao