[FIX] stock: recheck_availability button
bzr revid: qdp-launchpad@openerp.com-20140213105148-l0560ztdos5epzya
This commit is contained in:
parent
1b01820265
commit
06d516beae
|
@ -916,6 +916,10 @@ class stock_picking(osv.osv):
|
|||
return backorder_id
|
||||
return False
|
||||
|
||||
def recheck_availability(self, cr, uid, picking_ids, context=None):
|
||||
self.action_assign(cr, uid, picking_ids, context=context)
|
||||
self.do_prepare_partial(cr, uid, picking_ids, context=context)
|
||||
|
||||
def do_prepare_partial(self, cr, uid, picking_ids, context=None):
|
||||
#TODO refactore me
|
||||
context = context or {}
|
||||
|
@ -1892,7 +1896,6 @@ class stock_move(osv.osv):
|
|||
picking_obj = self.pool.get("stock.picking")
|
||||
quant_obj = self.pool.get("stock.quant")
|
||||
pack_op_obj = self.pool.get("stock.pack.operation")
|
||||
pack_obj = self.pool.get("stock.quant.package")
|
||||
todo = [move.id for move in self.browse(cr, uid, ids, context=context) if move.state == "draft"]
|
||||
if todo:
|
||||
self.action_confirm(cr, uid, todo, context=context)
|
||||
|
|
|
@ -799,7 +799,7 @@
|
|||
<field name="pack_operation_exist" invisible="1"/>
|
||||
<button name="action_pack" string="Create Package" type="object" attrs="{'invisible': ['|',('pack_operation_exist', '=', False),('state', 'not in', ('draft','assigned','partially_available','confirmed'))]}" class="oe_link oe_right oe_inline" groups="product.group_stock_packaging"/>
|
||||
<button name="do_split" string="Create Draft Backorder" groups="base.group_no_one" type="object" attrs="{'invisible': ['|',('pack_operation_exist', '=', False),('state','not in',('assigned', 'partially_available'))]}" class="oe_link oe_right oe_inline"/>
|
||||
<button name="do_prepare_partial" string="Recheck Availability" type="object" attrs="{'invisible': ['|',('pack_operation_exist', '=', False),('state','not in',('assigned', 'partially_available'))]}" groups="stock.group_stock_user" class="oe_link oe_right oe_inline"/>
|
||||
<button name="recheck_availability" string="Recheck Availability" type="object" attrs="{'invisible': ['|',('pack_operation_exist', '=', False),('state','not in',('assigned', 'partially_available'))]}" groups="stock.group_stock_user" class="oe_link oe_right oe_inline"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="pack_operation_ids" attrs="{'invisible': [('pack_operation_exist', '=', False)]}" context="{'default_owner_id': owner_id}">
|
||||
|
|
Loading…
Reference in New Issue