[IMP]ser pricelist of pos on pos order
bzr revid: sgo@tinyerp.com-20121106061302-m00bezd0bt0line7
This commit is contained in:
@@ -618,9 +618,10 @@ class pos_order(osv.osv):
|
||||
return session_ids and session_ids[0] or False
|
||||
|
||||
def _default_pricelist(self, cr, uid, context=None):
|
||||
res = self.pool.get('sale.shop').search(cr, uid, [], context=context)
|
||||
if res:
|
||||
shop = self.pool.get('sale.shop').browse(cr, uid, res[0], context=context)
|
||||
session_ids = self._default_session(cr, uid, context)
|
||||
if session_ids:
|
||||
session_record = self.pool.get('pos.session').browse(cr, uid, session_ids, context=context)
|
||||
shop = self.pool.get('sale.shop').browse(cr, uid, session_record.config_id.shop_id.id, context=context)
|
||||
return shop.pricelist_id and shop.pricelist_id.id or False
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user