[IMP] check_assign/action_assign in picking
bzr revid: qdp-launchpad@openerp.com-20130625122432-3p9sc2f082cfenjp
This commit is contained in:
parent
75432056b9
commit
58b2b57fa3
|
@ -1001,7 +1001,7 @@ class stock_picking(osv.osv):
|
|||
# TODO: Check locations to see if in the same location ?
|
||||
return True
|
||||
|
||||
def action_assign(self, cr, uid, ids, *args):
|
||||
def check_assign(self, cr, uid, ids, *args):
|
||||
""" Changes state of picking to available if all moves are confirmed.
|
||||
@return: True
|
||||
"""
|
||||
|
@ -1062,6 +1062,8 @@ class stock_picking(osv.osv):
|
|||
""" Changes picking state to assigned.
|
||||
@return: True
|
||||
"""
|
||||
for picking in self.browse(cr, uid, ids, context=context):
|
||||
self.pool.get('stock.move').action_assign(cr, uid, [move.id for move in picking.move_lines], context=context)
|
||||
self.write(cr, uid, ids, {'state': 'assigned'})
|
||||
return True
|
||||
|
||||
|
|
|
@ -759,7 +759,7 @@
|
|||
<header>
|
||||
<button name="draft_force_assign" states="draft" string="Confirm" type="object" class="oe_highlight" groups="base.group_user"/>
|
||||
<button name="draft_validate" states="draft" string="Confirm & Transfer" type="object" class="oe_highlight" groups="base.group_user"/>
|
||||
<!-- <button name="action_assign" states="confirmed" string="Check Availability" type="object"/> -->
|
||||
<!-- <button name="check_assign" states="confirmed" string="Check Availability" type="object"/> -->
|
||||
<button name="force_assign" states="confirmed" string="Force Availability" type="object" class="oe_highlight" groups="base.group_user"/>
|
||||
<button name="action_process" states="assigned" string="Confirm & Transfer" groups="stock.group_stock_user" type="object" class="oe_highlight"/>
|
||||
<button name="%(action_stock_invoice_onshipping)d" string="Create Invoice/Refund" attrs="{'invisible': ['|','|',('state','<>','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}" type="action" class="oe_highlight" groups="base.group_user"/>
|
||||
|
@ -909,7 +909,7 @@
|
|||
</xpath>
|
||||
<xpath expr="/form/header//button[@name='draft_validate']" position="replace">
|
||||
<button name="draft_validate" states="draft" string="Confirm & Deliver" type="object" class="oe_highlight"/>
|
||||
<button name="action_assign" states="confirmed" string="Check Availability" type="object" class="oe_highlight"/>
|
||||
<button name="check_assign" states="confirmed" string="Check Availability" type="object" class="oe_highlight"/>
|
||||
</xpath>
|
||||
<xpath expr="/form/header//button[@name='action_process']" position="replace">
|
||||
<button name="action_process" states="assigned" string="Deliver" type="object" class="oe_highlight"/>
|
||||
|
|
Loading…
Reference in New Issue