[IMP] FEFO takes FIFO if no lot, location_id and dest_id by default for pack op
This commit is contained in:
parent
e4521e4681
commit
c8a8f3c78d
|
@ -92,7 +92,7 @@ class stock_quant(osv.osv):
|
|||
|
||||
def apply_removal_strategy(self, cr, uid, location, product, qty, domain, removal_strategy, context=None):
|
||||
if removal_strategy == 'fefo':
|
||||
order = 'removal_date, id'
|
||||
order = 'removal_date, in_date, id'
|
||||
return self._quants_get_order(cr, uid, location, product, qty, domain, order, context=context)
|
||||
return super(stock_quant, self).apply_removal_strategy(cr, uid, location, product, qty, domain, removal_strategy, context=context)
|
||||
|
||||
|
|
|
@ -3871,11 +3871,15 @@ class stock_pack_operation(osv.osv):
|
|||
self.write(cr, uid, [operation_id], {'qty_done': qty}, context=context)
|
||||
else:
|
||||
#no existing operation found for the given domain and picking => create a new one
|
||||
picking_obj = self.pool.get("stock.picking")
|
||||
picking = picking_obj.browse(cr, uid, picking_id, context=context)
|
||||
values = {
|
||||
'picking_id': picking_id,
|
||||
'product_qty': 0,
|
||||
'location_id': picking.location_id.id,
|
||||
'location_dest_id': picking.location_dest_id.id,
|
||||
'qty_done': 1,
|
||||
}
|
||||
}
|
||||
for key in domain:
|
||||
var_name, dummy, value = key
|
||||
uom_id = False
|
||||
|
|
|
@ -7,18 +7,15 @@
|
|||
<t>
|
||||
<div class="page">
|
||||
<div class="oe_structure"/>
|
||||
<div class="row">
|
||||
<div class="col-xs-4">
|
||||
<img class="image" t-att-src="'data:image/png;base64,%s' % res_company.logo" style="border:auto;"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-6 mt6">
|
||||
<table class="table table-condensed" style="border-bottom: 3px solid black !important;"><thead><th> </th></thead></table>
|
||||
<img t-if="not o.loc_barcode" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', o.name, 600, 100)" style="width:300px;height:50px"/>
|
||||
<img t-if="o.loc_barcode" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', o.loc_barcode, 600, 100)" style="width:300px;height:50px"/>
|
||||
<p class="text-center" t-if="not o.loc_barcode" t-field="o.name"></p>
|
||||
<p class="text-center" t-if="o.loc_barcode" t-field="o.loc_barcode"></p>
|
||||
<p>
|
||||
<span t-if="not o.loc_barcode" t-field="o.name"/>
|
||||
<span t-if="o.loc_barcode" t-field="o.loc_barcode"/>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue