[FIX] sale: keep page when confirming a sale order
To keep the pager and view changer after confirmation of a sale order, do not reload the view (quotation and sale order view are the same anyway) Fixes #250
This commit is contained in:
parent
cce70fd4c9
commit
59b76ee927
|
@ -581,22 +581,8 @@ class sale_order(osv.osv):
|
|||
assert len(ids) == 1, 'This option should only be used for a single id at a time.'
|
||||
wf_service = netsvc.LocalService('workflow')
|
||||
wf_service.trg_validate(uid, 'sale.order', ids[0], 'order_confirm', cr)
|
||||
|
||||
# redisplay the record as a sales order
|
||||
view_ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'sale', 'view_order_form')
|
||||
view_id = view_ref and view_ref[1] or False,
|
||||
return {
|
||||
'type': 'ir.actions.act_window',
|
||||
'name': _('Sales Order'),
|
||||
'res_model': 'sale.order',
|
||||
'res_id': ids[0],
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'view_id': view_id,
|
||||
'target': 'current',
|
||||
'nodestroy': True,
|
||||
}
|
||||
|
||||
return True
|
||||
|
||||
def action_wait(self, cr, uid, ids, context=None):
|
||||
context = context or {}
|
||||
for o in self.browse(cr, uid, ids):
|
||||
|
|
Loading…
Reference in New Issue