[IMP] POS:Available in pos checkbox not click pos_categ no need to display
bzr revid: ggh@tinyerp.com-20130409132314-2o0uvomvd5afy624
This commit is contained in:
parent
0d34beaf27
commit
07db55efa3
|
@ -1310,20 +1310,19 @@ class product_product(osv.osv):
|
|||
'to_weight' : fields.boolean('To Weight', help="Check if the product should be weighted (mainly used with self check-out interface)."),
|
||||
}
|
||||
|
||||
def _default_pos_categ_id(self, cr, uid, context=None):
|
||||
def default_pos_categ_id(self, cr, uid, ids, available_in_pos=None ,context=None):
|
||||
proxy = self.pool.get('ir.model.data')
|
||||
category_id = False
|
||||
|
||||
try:
|
||||
category_id = proxy.get_object_reference(cr, uid, 'point_of_sale', 'categ_others')[1]
|
||||
except ValueError:
|
||||
pass
|
||||
return category_id
|
||||
if available_in_pos:
|
||||
try:
|
||||
category_id = proxy.get_object_reference(cr, uid, 'point_of_sale', 'categ_others')[1]
|
||||
except ValueError:
|
||||
pass
|
||||
return {'value': {'pos_categ_id': category_id}}
|
||||
|
||||
_defaults = {
|
||||
'to_weight' : False,
|
||||
'available_in_pos': True,
|
||||
'pos_categ_id' : _default_pos_categ_id,
|
||||
}
|
||||
|
||||
def edit_ean(self, cr, uid, ids, context):
|
||||
|
|
|
@ -614,7 +614,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<group name="sale" position="inside">
|
||||
<group name="pos" string="Point of Sale">
|
||||
<field name="available_in_pos"/>
|
||||
<field name="available_in_pos" on_change="default_pos_categ_id(available_in_pos)"/>
|
||||
<field name="pos_categ_id"/>
|
||||
<field name="to_weight" />
|
||||
<field name="income_pdt"/>
|
||||
|
|
Loading…
Reference in New Issue