[IMP]:account_voucher:set statusbar at top and also improved code with indentation.

bzr revid: apa@tinyerp.com-20120521084052-aexwrj0zuxjkhrk3
This commit is contained in:
Amit Patel (OpenERP) 2012-05-21 14:10:52 +05:30
parent 6027ac629a
commit dc293abcb5
2 changed files with 24 additions and 29 deletions

View File

@ -144,14 +144,14 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form layout="manual">
<div class="oe_form_topbar">
<div class="oe_form_topbar">
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" icon="terp-stock_effects-object-colorize" invisible="context.get('line_type', False)" confirm="Are you sure to unreconcile and cancel this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize" invisible="context.get('line_type', False)"/>
<div class="oe_right">
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</div>
</div>
</div>
<sheet string="Bill Payment" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
@ -298,13 +298,13 @@
<field name="arch" type="xml">
<form layout="manual">
<div class="oe_form_topbar">
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" invisible="context.get('line_type', False)" icon="terp-stock_effects-object-colorize" confirm="Are you sure to unreconcile and cancel this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize" invisible="context.get('line_type', False)"/>
<div class="oe_right">
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel" invisible="context.get('line_type', False)"/>
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" invisible="context.get('line_type', False)" icon="terp-stock_effects-object-colorize" confirm="Are you sure to unreconcile and cancel this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize" invisible="context.get('line_type', False)"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</div>
</div>
</div>
<sheet string="Customer Payment" layout="auto">
<group col="6" colspan="4" class="oe_form_header">

View File

@ -82,17 +82,14 @@
<field name="arch" type="xml">
<form layout="manual">
<div class="oe_form_topbar">
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
<group attrs="{'invisible':['|', ('state','!=','posted'), ('paid','=',True)]}">
<button icon="terp-dolar_ok!" name="%(act_pay_voucher)d" context="{'narration':narration, 'title':'Customer Payment', 'type':'receipt', 'partner_id':partner_id, 'reference':reference, 'amount':amount}" type="action" string="Pay" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
</group>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
<div class="oe_right">
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
<button icon="terp-dolar_ok!" name="%(act_pay_voucher)d" context="{'narration':narration, 'title':'Customer Payment', 'type':'receipt', 'partner_id':partner_id, 'reference':reference, 'amount':amount}" type="action" string="Pay" attrs="{'invisible':['|','|',('pay_now','=','pay_now'),('state','!=','posted'), ('paid','=',True)]}"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</div>
</div>
</div>
<sheet string="Sales Receipt" layout="auto">
<group col="6" colspan="4" class="oe_form_header">
@ -213,19 +210,17 @@
<field name="arch" type="xml">
<form layout="manual">
<div class="oe_form_topbar">
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
<group attrs="{'invisible':['|', ('state','!=','posted'), ('paid','=',True)]}">
<button icon="terp-dolar_ok!" name="%(act_pay_bills)d" context="{'narration':narration, 'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay Bill" attrs="{'invisible':['|',('pay_now','=','pay_now'),'|', ('state','!=','posted'), ('paid','=',True)]}"/>
</group>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
<field name="pay_now" invisible="1"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
<div class="oe_right">
<button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
<button icon="terp-dolar_ok!" name="%(act_pay_bills)d" context="{'narration':narration, 'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id, 'reference':reference}" type="action" string="Pay Bill" attrs="{'invisible':['|','|',('pay_now','=','pay_now'),('state','!=','posted'), ('paid','=',True)]}"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" confirm="Are you sure to confirm this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
<div class="oe_right">
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</div>
</div>
</div>
<sheet string="Supplier Voucher" layout="auto">
<field name="pay_now" invisible="1"/>
<group col="6" colspan="4" class="oe_form_header">
<field name="partner_id" domain="[('supplier','=',True)]" required="1" string="Supplier" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}" />
<field name="date" string="Bill Date" select="1" on_change="onchange_date(date, currency_id, currency_id, amount, company_id, context)"/>