Set Odoo payment term on the sale order #582

Merged
tobru merged 1 commit from odoo-payment-term-per-sale-order into main 2026-06-30 07:11:29 +00:00
Owner

Resolve the payment term for an organization's Odoo sale order from the organization override, the origin default, or a global env-var default (SERVALA_ODOO_PAYMENT_TERM_ID), in that order. The customer never chooses it; it is set on the sale order only. Mirrors the pricelist feature but without currency derivation, since payment terms carry no currency.

Adds the payment_term_id to the sale.order create payload in create_organization, sync_odoo, and the sanity recreate_sale_order fix, plus a payment_term_match sanity check with an always-safe sync_payment_term fix. Admin dropdowns are populated from the Odoo account.payment.term model, and the staff org-detail view shows the effective term and its source.

Resolve the payment term for an organization's Odoo sale order from the organization override, the origin default, or a global env-var default (SERVALA_ODOO_PAYMENT_TERM_ID), in that order. The customer never chooses it; it is set on the sale order only. Mirrors the pricelist feature but without currency derivation, since payment terms carry no currency. Adds the payment_term_id to the sale.order create payload in create_organization, sync_odoo, and the sanity recreate_sale_order fix, plus a payment_term_match sanity check with an always-safe sync_payment_term fix. Admin dropdowns are populated from the Odoo account.payment.term model, and the staff org-detail view shows the effective term and its source.
tobru force-pushed odoo-payment-term-per-sale-order from 68071a19f7
All checks were successful
Tests / test (push) Successful in 1m17s
to 146befaa39
All checks were successful
Tests / test (push) Successful in 1m47s
2026-06-30 07:11:14 +00:00
Compare
tobru changed title from WIP: Set Odoo payment term on the sale order to Set Odoo payment term on the sale order 2026-06-30 07:11:23 +00:00
tobru merged commit 6ddd4a8445 into main 2026-06-30 07:11:29 +00:00
tobru deleted branch odoo-payment-term-per-sale-order 2026-06-30 07:11:30 +00:00
Sign in to join this conversation.
No description provided.