Product variant cannot appear correctly in sale order, purchase order
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
If you used variants in product, they can'nt appear in 'Description' field in sale order line an in purchase order line.
To solve this y propose to modify 'product.py' file like below :
-------
diff --git a/addons/
index 1937912..a7cfe16 100644
--- a/addons/
+++ b/addons/
@@ -390,8 +390,8 @@ class product_
product = self.browse(cr, uid, [product_id], context)[0]
for supinfo in product.seller_ids:
if supinfo.name.id == partner_id:
- return {'code': supinfo.
- return {'code' : product.
+ return {'code': supinfo.
+ return {'code' : product.
def _product_code(self, cr, uid, ids, name, arg, context={}):
res = {}
@@ -403,12 +403,14 @@ class product_
res = {}
for p in self.browse(cr, uid, ids, context):
data = self._get_
+ if not data['code'] and not data['name']:
+ data['variants'] = p.variants
if not data['code']:
if not data['name']:
- (data['name'] or '')
+ (data['name'] or '') + (data['variants'] and (' - '+data['variants']) or '')
return res
-------
Hello Christophe, 20090730091713- yrh8t7gmc2rude7 3
Thanks for the patch.
Applied on trunk addons as it's not a bug and improvement.
Revision info: 2311 hda@hda-