[IMP]purchase: add state at topbar

bzr revid: kjo@tinyerp.com-20120426084245-mjpjg77mrosyy1sh
This commit is contained in:
Kuldeep Joshi (OpenERP) 2012-04-26 14:12:45 +05:30
parent 8d240b5775
commit f9c8ab38c0
1 changed files with 19 additions and 13 deletions

View File

@ -130,7 +130,22 @@
<field name="model">purchase.order</field> <field name="model">purchase.order</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Purchase Order"> <form layout="manual">
<div class="oe_form_topbar">
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="picking_ok" states="except_picking" string="Manually Corrected" icon="gtk-convert"/>
<button name="invoice_ok" states="except_invoice" string="Manually Corrected" icon="gtk-convert"/>
<button name="purchase_confirm" states="draft" string="Convert to Purchase Order" icon="gtk-go-forward"/>
<button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase" icon="gtk-ok"/>
<button name="purchase_approve" states="confirmed" string="Approved" icon="gtk-go-forward"/>
<button name="%(report_purchase_order)d" string="Print" states="approved" type="action" icon="gtk-print"/>
<button name="action_cancel" states="approved,except_picking,except_invoice,wait" string="Cancel Purchase Order" type="object" icon="gtk-cancel"/>
<button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel" icon="gtk-cancel"/>
<div class="oe_right">
<field name="state" nolabel="1" widget="statusbar" statusbar_visible="draft,approved,done" statusbar_colors='{"except_picking":"red","except_invoice":"red","confirmed":"blue","wait":"blue"}' readonly="1"/>
</div>
</div>
<sheet string="Purchase Order" layout="auto">
<group col="6" colspan="4"> <group col="6" colspan="4">
<field name="name"/> <field name="name"/>
<field name="date_order"/> <field name="date_order"/>
@ -164,18 +179,6 @@
<field name="amount_total" sum="Total amount"/> <field name="amount_total" sum="Total amount"/>
<button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/> <button name="button_dummy" states="draft" string="Compute" type="object" icon="gtk-execute"/>
</group> </group>
<group col="11" colspan="4">
<field name="state" widget="statusbar" statusbar_visible="draft,approved,done" statusbar_colors='{"except_picking":"red","except_invoice":"red","confirmed":"blue","wait":"blue"}' readonly="1"/>
<button name="purchase_cancel" states="draft,confirmed,wait_auth" string="Cancel" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="action_cancel" states="approved,except_picking,except_invoice,wait" string="Cancel Purchase Order" type="object" icon="gtk-cancel"/>
<button name="picking_ok" states="except_picking" string="Manually Corrected" icon="gtk-convert"/>
<button name="invoice_ok" states="except_invoice" string="Manually Corrected" icon="gtk-convert"/>
<button name="purchase_confirm" states="draft" string="Convert to Purchase Order" icon="gtk-go-forward"/>
<button name="purchase_appbuyer" states="wait_auth" string="Approve Purchase" icon="gtk-ok"/>
<button name="purchase_approve" states="confirmed" string="Approved" icon="gtk-go-forward"/>
<button name="%(report_purchase_order)d" string="Print" states="approved" type="action" icon="gtk-print"/>
</group>
</page> </page>
<page string="Delivery &amp; Invoicing"> <page string="Delivery &amp; Invoicing">
<group colspan="2" col="2"> <group colspan="2" col="2">
@ -203,7 +206,10 @@
<field colspan="4" name="notes" nolabel="1"/> <field colspan="4" name="notes" nolabel="1"/>
</page> </page>
</notebook> </notebook>
</sheet>
<div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/> <field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
</div>
</form> </form>
</field> </field>
</record> </record>