Thursday, September 3, 2026
1 change · master
New functionality added to Odoo
Businesses in the Philippines can now apply legally required Senior Citizen and Person With Disability discounts and VAT exemptions directly on quotations and sales orders, not only on invoices. This helps sales teams quote compliant prices earlier, prevents double discounting, and carries the discount details through to the invoice.
Original PR description
In the Philippines, Senior Citizens (SC) and Persons With Disabilities (PWD) are legally entitled to statutory discounts and VAT exemptions on eligible goods and services. The `l10n_ph_invoice`…
In the Philippines, Senior Citizens (SC) and Persons With Disabilities (PWD) are legally entitled to statutory discounts and VAT exemptions on eligible goods and services. The `l10n_ph_invoice` module already handles these on customer invoices and credit notes; this extends the same privileges to quotations and sale orders. This adds a new `l10n_ph_sale` module, enabled like `l10n_ph_invoice` via a separate "Discount Privileges on Sale Orders" toggle in the Philippine Accounting settings (`module_l10n_ph_sale`, defined in `l10n_ph` next to the invoice toggle). It mirrors the invoice implementation: * Sale Order Line: `sale.order.line` inherits the shared `l10n_ph.discount.privilege.line.mixin` and provides the model-specific hooks (`_l10n_ph_get_discount_price_details` recomputes the gross amounts with the tax engine) plus helpers to adjust the price unit and taxes from the privilege's fiscal position. Privilege fields are propagated to the generated invoice lines in `_prepare_invoice_line`, so invoiced lines behave exactly like lines the privilege was applied on. * Application Wizard: `l10n_ph.discount.privilege.wizard` is extended with `order_id` / `sale_order_line_id` so the same preview / scope-filtering / apply / remove-all / single-line-remove flow works on draft and sent quotations and sale orders. * Sale Discounts interplay: privileged lines are excluded from the standard sale Discounts wizard to avoid double discounting. * Views: "Discount Privileges" buttons below the order lines, regular/special discount amount columns, and the line discount becomes readonly while a privilege is applied. * Security: salesmen get read access to privilege definitions and CRUD on the wizard; configuring privilege definitions remains reserved for Accounting. * Tests: coverage for the wizard flows, scopes, fiscal position mappings, discount computations, state guards, access rights, invoice propagation and the sale Discounts interplay. Task-6032201 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr