[FIX] On changing customer/supplier/partner in delivery orders/incoming shipments/internal moves respectively,gives traceback.
bzr revid: tpa@tinyerp.com-20121106093133-aenwqy71020gtydc
This commit is contained in:
@@ -730,7 +730,7 @@ class stock_picking(osv.osv):
|
||||
model,view_id = mod_obj.get_object_reference(cr, uid, 'stock', 'view_picking_out_form')
|
||||
return super(stock_picking,self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=submenu)
|
||||
|
||||
def onchange_partner_in(self, cr, uid, context=None, partner_id=None):
|
||||
def onchange_partner_in(self, cr, uid, ids, partner_id=None, context=None):
|
||||
return {}
|
||||
|
||||
def action_explode(self, cr, uid, moves, context=None):
|
||||
|
||||
@@ -149,7 +149,7 @@ account_invoice()
|
||||
class stock_picking(osv.osv):
|
||||
_inherit = 'stock.picking'
|
||||
|
||||
def onchange_partner_in(self, cr, uid, context, partner_id=None):
|
||||
def onchange_partner_in(self, cr, uid, ids, partner_id=None, context=None):
|
||||
if not partner_id:
|
||||
return {}
|
||||
partner = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
|
||||
@@ -165,7 +165,7 @@ class stock_picking(osv.osv):
|
||||
'title': title,
|
||||
'message': message
|
||||
}
|
||||
result = super(stock_picking, self).onchange_partner_in(cr, uid, context, partner_id)
|
||||
result = super(stock_picking, self).onchange_partner_in(cr, uid, ids, partner_id, context)
|
||||
if result.get('warning',False):
|
||||
warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title']
|
||||
warning['message'] = message and message + ' ' + result['warning']['message'] or result['warning']['message']
|
||||
@@ -179,7 +179,7 @@ stock_picking()
|
||||
class stock_picking_in(osv.osv):
|
||||
_inherit = 'stock.picking.in'
|
||||
|
||||
def onchange_partner_in(self, cr, uid, context, partner_id=None):
|
||||
def onchange_partner_in(self, cr, uid, ids, partner_id=None, context=None):
|
||||
if not partner_id:
|
||||
return {}
|
||||
partner = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
|
||||
@@ -195,7 +195,7 @@ class stock_picking_in(osv.osv):
|
||||
'title': title,
|
||||
'message': message
|
||||
}
|
||||
result = super(stock_picking_in, self).onchange_partner_in(cr, uid, context, partner_id)
|
||||
result = super(stock_picking_in, self).onchange_partner_in(cr, uid, ids, partner_id, context)
|
||||
if result.get('warning',False):
|
||||
warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title']
|
||||
warning['message'] = message and message + ' ' + result['warning']['message'] or result['warning']['message']
|
||||
@@ -205,7 +205,7 @@ class stock_picking_in(osv.osv):
|
||||
class stock_picking_out(osv.osv):
|
||||
_inherit = 'stock.picking.out'
|
||||
|
||||
def onchange_partner_in(self, cr, uid, context, partner_id=None):
|
||||
def onchange_partner_in(self, cr, uid, ids, partner_id=None, context=None):
|
||||
if not partner_id:
|
||||
return {}
|
||||
partner = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context)
|
||||
@@ -221,7 +221,7 @@ class stock_picking_out(osv.osv):
|
||||
'title': title,
|
||||
'message': message
|
||||
}
|
||||
result = super(stock_picking_out, self).onchange_partner_in(cr, uid, context, partner_id)
|
||||
result = super(stock_picking_out, self).onchange_partner_in(cr, uid, ids, partner_id, context)
|
||||
if result.get('warning',False):
|
||||
warning['title'] = title and title +' & '+ result['warning']['title'] or result['warning']['title']
|
||||
warning['message'] = message and message + ' ' + result['warning']['message'] or result['warning']['message']
|
||||
|
||||
Reference in New Issue
Block a user