Turkesh Patel (openERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-account-topbar1-tpa into
lp:~openerp-dev/openobject-addons/trunk-form-add-topbar-apa.
Requested reviews:
Amit Patel (OpenERP) (apa-tiny)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-account-topbar1-tpa/+merge/103685
account
==========================================
[IMP]: Move state and button in a top bar.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-account-topbar1-tpa/+merge/103685
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-form-add-topbar-apa.
=== modified file 'account/account_invoice_view.xml'
--- account/account_invoice_view.xml 2012-04-25 13:40:18 +0000
+++ account/account_invoice_view.xml 2012-04-26 12:44:33 +0000
@@ -144,8 +144,19 @@
<field name="type">form</field>
<field name="priority">2</field>
<field name="arch" type="xml">
- <form string="Supplier Invoice">
- <group col="8" colspan="4">
+ <form layout="manual">
+ <div class="oe_form_topbar">
+ <button name="invoice_open" states="draft,proforma2" string="Approve" icon="terp-camera_test"/>
+ <button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
+ <button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','<>','paid'), ('reconciled', '=', True)]}" icon="gtk-convert" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
+ <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="base.group_no_one"/>
+ <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
+ <div class="oe_right">
+ <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
+ </div>
+ </div>
+ <sheet string="Supplier Invoice" layout="auto">
+ <group col="8" colspan="4" class="oe_form_header">
<field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection"/>
<field name="number" readonly="1"/>
<field name="type" invisible="1"/>
@@ -205,13 +216,6 @@
<field name="amount_total"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
<field name="residual"/>
- <group col="6" colspan="4">
- <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="base.group_no_one"/>
- <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
- <button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
- <button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','<>','paid'), ('reconciled', '=', True)]}" icon="gtk-convert" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
- <button name="invoice_open" states="draft,proforma2" string="Approve" icon="terp-camera_test"/>
- </group>
</group>
</page>
<page string="Other Info">
@@ -243,7 +247,10 @@
</field>
</page>
</notebook>
+ </sheet>
+ <div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
+ </div>
</form>
</field>
</record>
@@ -253,8 +260,21 @@
<field name="model">account.invoice</field>
<field name="type">form</field>
<field name="arch" type="xml">
- <form string="Invoice">
- <group colspan="4" col="8">
+ <form layout="manual">
+ <div class="oe_form_topbar">
+ <button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-gtk-media-pause" groups="account.group_proforma_invoices"/>
+ <button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-go-forward"/>
+ <button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','<>','paid'), ('reconciled', '=', True)]}" icon="gtk-convert" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
+ <button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
+ <button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
+ <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="base.group_no_one"/>
+ <button name="%(account_invoices)d" string="Print Invoice" type="action" icon="gtk-print" states="open,paid,proforma,sale,proforma2"/>
+ <div class="oe_right">
+ <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
+ </div>
+ </div>
+ <sheet string="Invoice" layout="auto">
+ <group colspan="4" col="8" class="oe_form_header">
<field name="journal_id" groups="base.group_user" on_change="onchange_journal_id(journal_id, context)" widget="selection"/>
<field name="number"/>
<field name="type" invisible="1"/>
@@ -299,15 +319,6 @@
<field name="amount_total"/>
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
<field name="residual"/>
- <group col="8" colspan="4" groups="base.group_user">
- <button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="base.group_no_one"/>
- <button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
- <button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','<>','paid'), ('reconciled', '=', True)]}" icon="gtk-convert" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
- <button name="%(action_account_invoice_refund)d" type='action' string='Refund' states='open,paid' icon="gtk-execute"/>
- <button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="terp-gtk-media-pause" groups="account.group_proforma_invoices"/>
- <button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-go-forward"/>
- <button name="%(account_invoices)d" string="Print Invoice" type="action" icon="gtk-print" states="open,paid,proforma,sale,proforma2"/>
- </group>
</group>
</page>
<page string="Other Info">
@@ -338,7 +349,10 @@
</field>
</page>
</notebook>
+ </sheet>
+ <div class="oe_form_sheet_width">
<field name="message_ids_social" colspan="4" widget="ThreadView" nolabel="1"/>
+ </div>
</form>
</field>
</record>
=== modified file 'account/account_view.xml'
--- account/account_view.xml 2012-04-25 13:40:18 +0000
+++ account/account_view.xml 2012-04-26 12:44:33 +0000
@@ -592,8 +592,17 @@
<field name="model">account.bank.statement</field>
<field name="type">form</field>
<field name="arch" type="xml">
- <form string="Bank Statement">
- <group col="7" colspan="4">
+ <form layout="manual">
+ <div class="oe_form_topbar">
+ <button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
+ <button name="button_confirm_bank" states="draft" string="Confirm" type="object" icon="terp-camera_test"/>
+ <button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
+ <div class="oe_right">
+ <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
+ </div>
+ </div>
+ <sheet string="Bank Statement" layout="auto">
+ <group col="7" colspan="4" class="oe_form_header">
<field name="name" select="1"/>
<field name="date" select="1" on_change="onchange_date(date, company_id)"/>
<field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" select="1" widget="selection"/>
@@ -637,13 +646,7 @@
<field colspan="4" name="move_line_ids" nolabel="1"/>
</page>
</notebook>
- <group col="8" colspan="4">
- <field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
- <field name="balance_end"/>
- <button name="button_cancel" states="confirm" string="Cancel" type="object" icon="gtk-cancel"/>
- <button name="button_dummy" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific"/>
- <button name="button_confirm_bank" states="draft" string="Confirm" type="object" icon="terp-camera_test"/>
- </group>
+ </sheet>
</form>
</field>
</record>
@@ -2611,8 +2614,17 @@
<field name="model">account.bank.statement</field>
<field name="type">form</field>
<field name="arch" type="xml">
- <form string="Statement">
- <group col="6" colspan="4">
+ <form layout="manual">
+ <div class="oe_form_topbar">
+ <button name="button_confirm_cash" states="open" string="Close CashBox" icon="terp-dialog-close" type="object"/>
+ <button name="button_open" states="draft" string="Open CashBox" icon="gtk-go-forward" type="object"/>
+ <button name="button_cancel" states="confirm,open" string="Cancel" icon="terp-gtk-stop" type="object" groups="base.group_extended"/>
+ <div class="oe_right">
+ <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
+ </div>
+ </div>
+ <sheet string="Statement" layout="auto">
+ <group col="6" colspan="4" class="oe_form_header">
<field name="name" select="1"/>
<field name='company_id' widget="selection" groups="base.group_multi_company" />
<field name="journal_id" on_change="onchange_journal_id(journal_id)" select="1" widget="selection"/>
@@ -2701,12 +2713,7 @@
<field name="balance_end_cash"/>
</group>
</group>
- <group col="8" colspan="4">
- <field name="state" widget="statusbar" statusbar_visible="draft,confirm" colspan="4"/>
- <button name="button_cancel" states="confirm,open" string="Cancel" icon="terp-gtk-stop" type="object"/>
- <button name="button_confirm_cash" states="open" string="Close CashBox" icon="terp-dialog-close" type="object"/>
- <button name="button_open" states="draft" string="Open CashBox" icon="gtk-go-forward" type="object"/>
- </group>
+ </sheet>
</form>
</field>
</record>
=== modified file 'account_cancel/account_cancel_view.xml'
--- account_cancel/account_cancel_view.xml 2011-10-27 21:11:24 +0000
+++ account_cancel/account_cancel_view.xml 2012-04-26 12:44:33 +0000
@@ -19,7 +19,7 @@
<field name="type">form</field>
<field name="inherit_id" ref="account.invoice_form"/>
<field name="arch" type="xml">
- <xpath expr="/form/notebook/page/group/group/button[@name='invoice_cancel']" position="replace">
+ <xpath expr="/form/div/notebook/page/group/group/button[@name='invoice_cancel']" position="replace">
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="account.group_account_invoice"/>
</xpath>
</field>
@@ -31,7 +31,7 @@
<field name="type">form</field>
<field name="inherit_id" ref="account.invoice_supplier_form"/>
<field name="arch" type="xml">
- <xpath expr="/form/notebook/page/group/group/button[@name='invoice_cancel']" position="replace">
+ <xpath expr="/form/div/notebook/page/group/group/button[@name='invoice_cancel']" position="replace">
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel" groups="account.group_account_invoice"/>
</xpath>
</field>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp