[FIX] product_customerinfo_picking: support variant-level customer info - #2284
Closed
weinni2000 wants to merge 1 commit into
Closed
[FIX] product_customerinfo_picking: support variant-level customer info#2284weinni2000 wants to merge 1 commit into
weinni2000 wants to merge 1 commit into
Conversation
- Check `product_id.customer_ids` instead of `product_tmpl_id.customer_ids` in the guard condition to correctly reflect variant-level records - Add `product_tmpl_id` filter to template-level lookup to avoid cross-template false matches - Look up `variant_customer_ids` after template-level and let it override, so variant-specific customerinfo takes precedence over template-level Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
weinni2000
force-pushed
the
18.0-fix-product-customerinfo-variant
branch
from
March 19, 2026 14:17
0830d08 to
14da444
Compare
Author
|
@it-fact4lifetimesupport: |
Contributor
|
@weinni2000 I have opened PR #2413 where I actually use the search method from the base product_customerinfo module. This already considers the variants. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
_compute_product_customer_codemethod onstock.moveonly looked upcustomer info at the product template level (
product_tmpl_id.customer_ids).It ignored
product.customerinforecords linked to a specific product variant(
variant_customer_ids), so the customer reference/name was never filled forvariant-specific entries.
Additionally, the guard condition checked
product_tmpl_id.customer_idswhilethe
@api.dependstrackedproduct_id.customer_ids, causing a mismatch.Fix
product_id.customer_ids(consistent with@api.depends)product_tmpl_idfilter to avoid cross-template matchesvariant_customer_idsfiltered by partner and product variant; if found,override the template-level values so variant-specific info takes precedence
Test scenario
specific variant
not the template-level one
🤖 Generated with Claude Code