[IMP] procurement: added a button to reset to confirmed a cancelled procurement
bzr revid: qdp-launchpad@openerp.com-20131106083231-jnr6w30rhfkvzsbu
This commit is contained in:
parent
6ec682a59f
commit
61babf0c6e
|
@ -164,8 +164,10 @@ class procurement_order(osv.osv):
|
|||
return {}
|
||||
|
||||
def cancel(self, cr, uid, ids, context=None):
|
||||
self.write(cr, uid, ids, {'state': 'cancel'}, context=context)
|
||||
return True
|
||||
return self.write(cr, uid, ids, {'state': 'cancel'}, context=context)
|
||||
|
||||
def reset_to_confirmed(self, cr, uid, ids, context=None):
|
||||
return self.write(cr, uid, ids, {'state': 'confirmed'}, context=context)
|
||||
|
||||
def run(self, cr, uid, ids, context=None):
|
||||
for procurement in self.browse(cr, uid, ids, context=context):
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
<button name="run" states="confirmed,exception" string="Run Procurement" class="oe_highlight" type="object"/>
|
||||
<button name="check" states="running" string="Check Procurement" class="oe_highlight" type="object"/>
|
||||
<button name="cancel" states="exception,confirmed,running" string="Cancel Procurement" type="object"/>
|
||||
<button name="reset_to_confirmed" states="cancel" string="Reconfirm Procurement" type="object"/>
|
||||
<field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed,running,done" />
|
||||
</header>
|
||||
<sheet>
|
||||
|
@ -83,7 +84,7 @@
|
|||
<field name="res_model">procurement.order</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('group_id','=',active_id)]</field>
|
||||
<field name="domain">[('group_id','=',active_id)]</field>
|
||||
</record>
|
||||
|
||||
<record id="procurement_group_form_view" model="ir.ui.view">
|
||||
|
@ -92,9 +93,9 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Procurement group" version="7.0">
|
||||
<sheet>
|
||||
<div class="oe_right oe_button_box">
|
||||
<button name="%(do_view_procurements)d" string="View related procurements" type="action" />
|
||||
</div>
|
||||
<div class="oe_right oe_button_box">
|
||||
<button name="%(do_view_procurements)d" string="View related procurements" type="action" />
|
||||
</div>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="move_type"/>
|
||||
|
|
Loading…
Reference in New Issue