[IMP] POS: Remove Default Category, when pos created
bzr revid: ggh@tinyerp.com-20130410105743-5i04atwsawpb8c6u
This commit is contained in:
parent
5aae7d0ec0
commit
6ca422445c
|
@ -1315,13 +1315,8 @@ class product_product(osv.osv):
|
|||
category_id = False
|
||||
if ids and available_in_pos:
|
||||
for pos_id in self.browse(cr,uid,ids):
|
||||
if pos_id.pos_categ_id.id:
|
||||
if pos_id.pos_categ_id:
|
||||
category_id = pos_id.pos_categ_id.id
|
||||
elif available_in_pos :
|
||||
try:
|
||||
category_id = proxy.get_object_reference(cr, uid, 'point_of_sale', 'categ_others')[1]
|
||||
except:
|
||||
pass
|
||||
return {'value': {'pos_categ_id': category_id}}
|
||||
|
||||
_defaults = {
|
||||
|
|
Loading…
Reference in New Issue