Mayur Maheshwari(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-Delivery_wkf-mma into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-Delivery_wkf-mma/+merge/95553
Hello,
I have improved the following things:
1] Improve code of action_asign
2] Added print button & set a position of button
3] Removed a process later button
Thanks.
mma
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-Delivery_wkf-mma/+merge/95553
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-Delivery_wkf-mma.
=== modified file 'stock/stock.py'
--- stock/stock.py 2012-02-28 14:08:16 +0000
+++ stock/stock.py 2012-03-02 13:12:25 +0000
@@ -738,7 +738,10 @@
""" Changes state of picking to available if all moves are confirmed.
@return: True
"""
+ wf_service = netsvc.LocalService("workflow")
for pick in self.browse(cr, uid, ids):
+ if pick.state == 'draft':
+ wf_service.trg_validate(uid, 'stock.picking', pick.id,'button_confirm', cr)
move_ids = [x.id for x in pick.move_lines if x.state == 'confirmed']
if not move_ids:
raise osv.except_osv(_('Warning !'),_('Not enough stock, unable to reserve the products.'))
=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml 2012-02-13 15:27:55 +0000
+++ stock/stock_view.xml 2012-03-02 13:12:25 +0000
@@ -989,14 +989,14 @@
</field>
<group col="12" colspan="4">
<field name="state" readonly="1" widget="statusbar" statusbar_visible="draft,confirmed,assigned,done" statusbar_colors='{"auto":"blue", "confirmed":"blue"}'/>
- <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/>
- <button name="draft_force_assign" states="draft" string="Process Later" type="object" icon="gtk-ok"/>
<button name="draft_validate" states="draft" string="Process Now" type="object" icon="gtk-yes"/>
- <button name="action_assign" states="confirmed" string="Check Availability" type="object" groups="base.group_extended" icon="gtk-find"/>
+ <button name="action_assign" states="draft" string="Check Availability" type="object" groups="base.group_extended" icon="gtk-find"/>
<button name="force_assign" states="confirmed" string="Force Availability" type="object" icon="gtk-jump-to"/>
<button name="action_process" states="assigned" string="Process" type="object" icon="gtk-go-forward"/>
+ <button name="%(report_picking_list)d" string="Print Delivery Order" states="done" type="action" icon="gtk-print"/>
<button name="%(act_stock_return_picking)d" string="Return Products" states="done" type="action" icon="gtk-execute"/>
<button name="%(action_stock_invoice_onshipping)d" string="Create Invoice" attrs="{'invisible': ['|','|',('state','<>','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}" type="action" icon="terp-gtk-go-back-rtl"/>
+ <button name="button_cancel" states="assigned,confirmed,draft" string="_Cancel" icon="gtk-cancel"/>
</group>
</page>
<page string="Additional info" groups="base.group_extended,base.group_multi_company">
_______________________________________________
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