Mayur Maheshwari(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-form-add-topbar-apa-inventory-mma into
lp:~openerp-dev/openobject-addons/trunk-form-add-topbar-apa.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-form-add-topbar-apa-inventory-mma/+merge/104690
Hello Sir,
stock : Added state and buttons on top bar in inventory
Thanks.
mma
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-form-add-topbar-apa-inventory-mma/+merge/104690
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openobject-addons/trunk-form-add-topbar-apa-inventory-mma into
lp:~openerp-dev/openobject-addons/trunk-form-add-topbar-apa.
=== modified file 'stock/stock.py'
--- stock/stock.py 2012-05-04 05:22:31 +0000
+++ stock/stock.py 2012-05-04 06:50:24 +0000
@@ -2656,7 +2656,7 @@
'date_done': fields.datetime('Date done'),
'inventory_line_id': fields.one2many('stock.inventory.line', 'inventory_id', 'Inventories', states={'done': [('readonly', True)]}),
'move_ids': fields.many2many('stock.move', 'stock_inventory_move_rel', 'inventory_id', 'move_id', 'Created Moves'),
- 'state': fields.selection( (('draft', 'Draft'), ('done', 'Done'), ('confirm','Confirmed'),('cancel','Cancelled')), 'State', readonly=True, select=True),
+ 'state': fields.selection( (('draft', 'Draft'), ('confirm','Confirmed'), ('done', 'Done'), ('cancel','Cancelled')), 'State', readonly=True, select=True),
'company_id': fields.many2one('res.company', 'Company', required=True, select=True, readonly=True, states={'draft':[('readonly',False)]}),
}
=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml 2012-05-04 05:22:31 +0000
+++ stock/stock_view.xml 2012-05-04 06:50:24 +0000
@@ -108,7 +108,18 @@
<field name="model">stock.inventory</field>
<field name="type">form</field>
<field name="arch" type="xml">
- <form string="Physical Inventory">
+ <form layout="manual">
+ <div class="oe_form_topbar">
+ <button name="action_confirm" states="draft" string="Confirm Inventory" type="object" icon="gtk-apply"/>
+ <button name="action_done" states="confirm" string="Validate Inventory" type="object" icon="gtk-jump-to"/>
+ <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
+ <button name="action_cancel_inventory" states="draft,confirm,done" string="Cancel Inventory" type="object" icon="gtk-cancel"/>
+ <div class="oe_right">
+ <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
+ </div>
+ </div>
+ <sheet string="Physical Inventory" layout="auto">
+ <group class="oe_form_header">
<field name="name"/>
<field name="date"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
@@ -167,15 +178,8 @@
</field>
</page>
</notebook>
- <group col="2" colspan="2">
- <field name="state"/>
- </group>
- <group col="3" colspan="2">
- <button name="action_cancel_inventory" states="draft,confirm,done" string="Cancel Inventory" type="object" icon="gtk-cancel"/>
- <button name="action_confirm" states="draft" string="Confirm Inventory" type="object" icon="gtk-apply"/>
- <button name="action_done" states="confirm" string="Validate Inventory" type="object" icon="gtk-jump-to"/>
- <button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
- </group>
+ </group>
+ </sheet>
</form>
</field>
</record>
_______________________________________________
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