Rifakat (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.0-bug-853070-rha into 
lp:openobject-addons/6.0.

Requested reviews:
  Raphael Collet (OpenERP) (rco-openerp)
Related bugs:
  Bug #853070 in OpenERP Addons: "product property lookup function invalid"
  https://bugs.launchpad.net/openobject-addons/+bug/853070

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-bug-853070-rha/+merge/76520

Hello,

Product property look up function on_change of product in invoice line searches 
on product.template instead on product.category for product category.

This fix solves the problem.

Thanks,
Rifakat
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-bug-853070-rha/+merge/76520
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.0-bug-853070-rha.
=== modified file 'account/invoice.py'
--- account/invoice.py	2011-06-21 14:56:58 +0000
+++ account/invoice.py	2011-09-22 07:20:31 +0000
@@ -1315,10 +1315,10 @@
             account_obj = self.pool.get('account.account')
             in_pro_id = property_obj.search(cr, uid, [('name','=','property_account_income'),('res_id','=','product.template,'+str(res.product_tmpl_id.id)+''),('company_id','=',company_id)])
             if not in_pro_id:
-                in_pro_id = property_obj.search(cr, uid, [('name','=','property_account_income_categ'),('res_id','=','product.template,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
+                in_pro_id = property_obj.search(cr, uid, [('name','=','property_account_income_categ'),('res_id','=','product.category,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
             exp_pro_id = property_obj.search(cr, uid, [('name','=','property_account_expense'),('res_id','=','product.template,'+str(res.product_tmpl_id.id)+''),('company_id','=',company_id)])
             if not exp_pro_id:
-                exp_pro_id = property_obj.search(cr, uid, [('name','=','property_account_expense_categ'),('res_id','=','product.template,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
+                exp_pro_id = property_obj.search(cr, uid, [('name','=','property_account_expense_categ'),('res_id','=','product.category,'+str(res.categ_id.id)+''),('company_id','=',company_id)])
 
             if not in_pro_id:
                 in_acc = res.product_tmpl_id.property_account_income

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to