Skip to content

[19.0][MIG] procurement_purchase_sale_no_grouping#3111

Open
Firas-Bessaad wants to merge 14 commits into
OCA:19.0from
Firas-Bessaad:19.0-mig-procurement_purchase_sale_no_grouping
Open

[19.0][MIG] procurement_purchase_sale_no_grouping#3111
Firas-Bessaad wants to merge 14 commits into
OCA:19.0from
Firas-Bessaad:19.0-mig-procurement_purchase_sale_no_grouping

Conversation

@Firas-Bessaad

Copy link
Copy Markdown

Migration of procurement_purchase_sale_no_grouping to 19.0.

Depends on procurement_purchase_no_grouping, already migrated in #3009.

Functional change for 19.0

In 18.0, sale_purchase looked up an existing RFQ to reuse through
purchase.order.search(). In 19.0 it does so through
purchase.order.line.search() (see
SaleOrderLine._purchase_service_match_purchase_order).

The search_purchase_no_grouping context override has therefore been moved
from purchase.order to purchase.order.line, so that returning an empty
recordset still forces a brand new purchase order to be created. This keeps the
"No order grouping" behaviour working (one RFQ per sale order line).
SaleOrderLine._purchase_service_create is unchanged.

Tests

  • Existing unit test passes (adapted product_uom -> product_uom_id).
  • Manually verified on 19.0 (Community + Enterprise): module installs cleanly,
    "No order grouping" creates one RFQ per line, other grouping modes group as
    before.

Connected to #2833

carlosdauden and others added 14 commits June 22, 2026 10:09
Currently translated at 100.0% (2 of 2 strings)

Translation: purchase-workflow-17.0/purchase-workflow-17.0-procurement_purchase_sale_no_grouping
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-17-0/purchase-workflow-17-0-procurement_purchase_sale_no_grouping/it/
Currently translated at 100.0% (2 of 2 strings)

Translation: purchase-workflow-18.0/purchase-workflow-18.0-procurement_purchase_sale_no_grouping
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-18-0/purchase-workflow-18-0-procurement_purchase_sale_no_grouping/sl/
- Bump manifest version to 19.0.1.0.0.
- Retarget the search override from purchase.order to purchase.order.line:
  in 19.0 sale_purchase looks up an existing RFQ via
  purchase.order.line.search() (_purchase_service_match_purchase_order)
  instead of purchase.order.search(); the search_purchase_no_grouping
  context must therefore neutralize the line-level search so that the
  "No order grouping" option keeps creating one RFQ per sale line.
- Adapt test to the renamed sale.order.line field product_uom -> product_uom_id.
@OCA-git-bot OCA-git-bot added series:19.0 mod:procurement_purchase_sale_no_grouping Module procurement_purchase_sale_no_grouping labels Jun 22, 2026
@Firas-Bessaad

Copy link
Copy Markdown
Author

@carlosdauden as the original author of this module, would you mind reviewing this 19.0 migration when you have a moment? The notable change is that the search override moved from purchase.order to purchase.order.line, since 19.0 sale_purchase matches an existing RFQ via purchase.order.line.search() in _purchase_service_match_purchase_order. Thanks!

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

Labels

mod:procurement_purchase_sale_no_grouping Module procurement_purchase_sale_no_grouping series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants