Skip to content

[19.0][FIX] contract: do not suggest archived products in contract lines - #1492

Merged
OCA-git-bot merged 1 commit into
OCA:19.0from
renzo1974:19.0-fix-contract-line-archived-products
Jul 29, 2026
Merged

[19.0][FIX] contract: do not suggest archived products in contract lines#1492
OCA-git-bot merged 1 commit into
OCA:19.0from
renzo1974:19.0-fix-contract-line-archived-products

Conversation

@renzo1974

Copy link
Copy Markdown
Contributor

The contract_line_ids and contract_line_fixed_ids one2many fields set active_test=False in their context so that archived (closed) contract lines remain visible in the contract form. The web client propagates this context to every RPC issued from within the lines, including the name_search of the product_id and uom_id many2one fields. As a result, archived products and units of measure were suggested in the dropdowns.

Restore the default behaviour by explicitly setting active_test=True on these fields in the embedded line lists and in the line form dialog.

(cherry picked from commit 6459aa9)

The contract_line_ids and contract_line_fixed_ids one2many fields set
active_test=False in their context so that archived (closed) contract
lines remain visible in the contract form. The web client propagates
this context to every RPC issued from within the lines, including the
name_search of the product_id and uom_id many2one fields. As a result,
archived products and units of measure were suggested in the dropdowns.

Restore the default behaviour by explicitly setting active_test=True on
these fields in the embedded line lists and in the line form dialog.

(cherry picked from commit 6459aa9)
@renzo1974 renzo1974 changed the title [FIX] contract: do not suggest archived products in contract lines [19.0][FIX] contract: do not suggest archived products in contract lines Jul 29, 2026
@pedrobaeza pedrobaeza added this to the 19.0 milestone Jul 29, 2026

@pedrobaeza pedrobaeza left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the fw-port. We can fast-track it:

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 19.0-ocabot-merge-pr-1492-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit a1e5de7 into OCA:19.0 Jul 29, 2026
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 1b381b9. Thanks a lot for contributing to OCA. ❤️

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.

3 participants