[IMP] sale : Opens sales order form when quotation is confirmed.
bzr revid: mdi@tinyerp.com-20120518113937-ut4kghjs0pvd3378
This commit is contained in:
parent
7e66d4f3a3
commit
09e4a6e95c
|
@ -642,6 +642,26 @@ class sale_order(osv.osv):
|
|||
self.cancel_send_note(cr, uid, [sale.id], context=None)
|
||||
self.write(cr, uid, ids, {'state': 'cancel'})
|
||||
return True
|
||||
|
||||
def action_button_confirm(self, cr, uid, ids, context=None):
|
||||
wf_service = netsvc.LocalService('workflow')
|
||||
for id in ids:
|
||||
wf_service.trg_validate(uid, 'sale.order', id, 'order_confirm', cr)
|
||||
|
||||
result = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'sale', 'view_order_form')
|
||||
view_id = result and result[1] or False,
|
||||
|
||||
return {
|
||||
'name': _('Sales Order'),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'view_id': view_id,
|
||||
'res_model': 'sale.order',
|
||||
'type': 'ir.actions.act_window',
|
||||
'nodestroy': True,
|
||||
'target': 'current',
|
||||
'res_id': ids and ids[0] or False,
|
||||
}
|
||||
|
||||
def action_wait(self, cr, uid, ids, context=None):
|
||||
for o in self.browse(cr, uid, ids):
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
<button name="cancel" states="draft" string="Cancel Order" icon="gtk-cancel"/>
|
||||
<button name="invoice_cancel" states="invoice_except" string="Cancel Order" icon="gtk-cancel"/>
|
||||
<button name="%(report_sale_order)d" string="Print Quotation" type="action" icon="gtk-print" states="draft" class="oe_form_button_hi"/>
|
||||
<button name="order_confirm" states="draft" string="Confirm Order" icon="gtk-apply" class="oe_form_button_hi"/>
|
||||
<button name="action_button_confirm" states="draft" string="Confirm Order" icon="gtk-apply" class="oe_form_button_hi" type="object"/>
|
||||
<button name="%(action_view_sale_advance_payment_inv)d" string="Advance Invoice" type="action" icon="gtk-execute" states="draft,manual"/>
|
||||
<div class="oe_right">
|
||||
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,progress,done" statusbar_colors='{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}'/>
|
||||
|
|
Loading…
Reference in New Issue