36
36
context.update({'picking_screen': True, 'from_so':True})
37
37
return super(stock_picking, self)._hook_log_picking_modify_message(cr, uid, ids, context=context, message=message, pick=pick)
39
def allow_cancel(self, cr, uid, ids, context=None):
40
res = super(stock_picking, self).allow_cancel(cr, uid, ids, context=context)
41
for pick in self.browse(cr, uid, ids, context=context):
45
raise osv.except_osv(_('Error'), _('You cannot cancel picking because it comes from a Field Order !'))
39
# I delete the method below because the mecanism was already done by PMA
40
# def allow_cancel(self, cr, uid, ids, context=None):
41
# res = super(stock_picking, self).allow_cancel(cr, uid, ids, context=context)
42
# for pick in self.browse(cr, uid, ids, context=context):
43
# if not pick.sale_id:
46
# raise osv.except_osv(_('Error'), _('You cannot cancel picking because it comes from a Field Order !'))
48
49
def _vals_get_bool(self, cr, uid, ids, fields, arg, context=None):