class pos_scan_product(osv.osv_memory):
_name = 'pos.scan.product'
_description = 'Scan product'
+
_columns = {
- 'gencod': fields.char('Barcode',size=13,required= True)
+ 'gencod': fields.char('Barcode', size=13, required=True)
}
+
def scan(self, cr, uid, ids, context=None):
"""
To get the gencod and scan product
if context is None:
context = {}
data=self.read(cr, uid, ids)[0]
- record_id = context and context.get('active_id',False)
+ record_id = context and context.get('active_id', False)
result =self. pool.get('pos.order.line')._scan_product(cr, uid, data['gencod'], 1, record_id)
return {'gencod': False}
+
pos_scan_product()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: