Fix group by access error on stock.picking.in/out in multi company by ensuring the good ir rules are applied, this is done by calling read_group using stock.picking intead of stock.picking.in/out.

lp bug: https://launchpad.net/bugs/1309105 fixed

bzr revid: yannick.vaucher@camptocamp.com-20140417164953-7bjuggmhktv7mfwx
This commit is contained in:
Yannick Vaucher
2014-04-17 18:49:53 +02:00
parent 64ce8f977d
commit 229f48bb2d
+6
View File
@@ -3022,6 +3022,9 @@ class stock_picking_in(osv.osv):
def read(self, cr, uid, ids, fields=None, context=None, load='_classic_read'):
return self.pool.get('stock.picking').read(cr, uid, ids, fields=fields, context=context, load=load)
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
return self.pool['stock.picking'].read_group(cr, uid, domain, fields, groupby, offset=offset, limit=None, context=context, orderby=orderby)
def check_access_rights(self, cr, uid, operation, raise_exception=True):
#override in order to redirect the check of acces rights on the stock.picking object
return self.pool.get('stock.picking').check_access_rights(cr, uid, operation, raise_exception=raise_exception)
@@ -3092,6 +3095,9 @@ class stock_picking_out(osv.osv):
def read(self, cr, uid, ids, fields=None, context=None, load='_classic_read'):
return self.pool.get('stock.picking').read(cr, uid, ids, fields=fields, context=context, load=load)
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
return self.pool['stock.picking'].read_group(cr, uid, domain, fields, groupby, offset=offset, limit=None, context=context, orderby=orderby)
def check_access_rights(self, cr, uid, operation, raise_exception=True):
#override in order to redirect the check of acces rights on the stock.picking object
return self.pool.get('stock.picking').check_access_rights(cr, uid, operation, raise_exception=raise_exception)