Skip to content

[19.0][FIX] contract: exclude archived products from the line picker#1460

Merged
pedrobaeza merged 1 commit into
OCA:19.0from
bosd:19.0-fix-contract-archived-product
Jun 15, 2026
Merged

[19.0][FIX] contract: exclude archived products from the line picker#1460
pedrobaeza merged 1 commit into
OCA:19.0from
bosd:19.0-fix-contract-archived-product

Conversation

@bosd

@bosd bosd commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Split out from #1427 (per @pedrobaeza's request to break the big PR into focused ones).

Excludes archived products from the contract line product picker.

Context: the active_test: False on contract_line_ids — added in d25115d ("No contract line and invoices when contract is archived") to keep archived contract lines visible — leaks into the embedded product search and surfaces archived products. Because a view-level domain attribute replaces the model field domain (they don't AND together), each customer/supplier line view re-asserts ('active', '=', True). Happy to switch to re-asserting active_test: True on the product field instead if preferred.

Comment thread contract/tests/test_contract.py Outdated
@bosd bosd force-pushed the 19.0-fix-contract-archived-product branch from 77269b5 to b450faf Compare June 13, 2026 16:38

@BhaveshHeliconia BhaveshHeliconia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@pedrobaeza pedrobaeza merged commit 85fdc5d into OCA:19.0 Jun 15, 2026
7 checks passed
@pedrobaeza

Copy link
Copy Markdown
Member

Ouch, my bad, I have merged directly without ocabot (mixed with opened tabs in OpenUpgrade). Sorry.

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.

4 participants