[IMP] Write done/cancel a little bit different and default_restrict_lot on scrap
bzr revid: jco@openerp.com-20140115104120-p1gp95n5kqa8mu8x
This commit is contained in:
parent
557a052cb3
commit
4481eb2a4c
|
@ -977,9 +977,8 @@ class stock_picking(osv.osv):
|
|||
def do_recompute_remaining_quantities(self, cr, uid, picking_ids, context=None):
|
||||
def _create_link_for_product(product_id, qty):
|
||||
qty_to_assign = qty
|
||||
active_lines = [x for x in picking.move_lines if x.state not in ['done', 'cancel']]
|
||||
for move in active_lines:
|
||||
if move.product_id.id == product_id:
|
||||
for move in picking.move_lines:
|
||||
if move.product_id.id == product_id and move.state not in ['done', 'cancel']:
|
||||
qty_on_link = min(move.remaining_qty, qty_to_assign)
|
||||
link_obj.create(cr, uid, {'move_id': move.id, 'operation_id': op.id, 'qty': qty_on_link}, context=context)
|
||||
qty_to_assign -= qty_on_link
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<field name="product_uom" class="oe_inline" readonly="1" groups="product.group_uom"/>
|
||||
</div>
|
||||
<field name="restrict_lot_id" domain="[('product_id','=',product_id)]" groups="stock.group_tracking_lot"
|
||||
context="{'product_id': product_id}"/>
|
||||
context="{'default_product_id': product_id}"/>
|
||||
<field name="location_id" string="Scrap Location" widget="selection"
|
||||
domain="[('usage','!=','view'),('scrap_location','=',True)]" groups="stock.group_locations"/>
|
||||
</group>
|
||||
|
|
Loading…
Reference in New Issue