[MERGE] Forward-port of latest saas-2 bugfixes, up to rev. 9141 revid:dle@openerp.com-20140306123937-sn61atwvbcjwbyup
bzr revid: dle@openerp.com-20140306124247-29dgpb0ap5j0vsk0
This commit is contained in:
commit
c11db79d57
|
@ -149,7 +149,7 @@
|
|||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<pre style="terp_default_9_followup_id">[[ format(get_text(o,data['form']['followup_id'])) ]]</pre>
|
||||
<para style="terp_default_9"><pre style="terp_default_9_followup_id">[[ format(get_text(o,data['form']['followup_id'])) ]]</pre></para>
|
||||
<para style="terp_default_9">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
|
|
@ -106,15 +106,16 @@ class stock_fill_inventory(osv.osv_memory):
|
|||
datas = {}
|
||||
res[location] = {}
|
||||
move_ids = move_obj.search(cr, uid, ['|',('location_dest_id','=',location),('location_id','=',location),('state','=','done')], context=context)
|
||||
|
||||
local_context = dict(context)
|
||||
local_context['raise-exception'] = False
|
||||
for move in move_obj.browse(cr, uid, move_ids, context=context):
|
||||
lot_id = move.prodlot_id.id
|
||||
prod_id = move.product_id.id
|
||||
if move.location_dest_id.id != move.location_id.id:
|
||||
if move.location_dest_id.id == location:
|
||||
qty = uom_obj._compute_qty(cr, uid, move.product_uom.id,move.product_qty, move.product_id.uom_id.id)
|
||||
qty = uom_obj._compute_qty_obj(cr, uid, move.product_uom,move.product_qty, move.product_id.uom_id, context=local_context)
|
||||
else:
|
||||
qty = -uom_obj._compute_qty(cr, uid, move.product_uom.id,move.product_qty, move.product_id.uom_id.id)
|
||||
qty = -uom_obj._compute_qty_obj(cr, uid, move.product_uom,move.product_qty, move.product_id.uom_id, context=local_context)
|
||||
|
||||
|
||||
if datas.get((prod_id, lot_id)):
|
||||
|
|
Loading…
Reference in New Issue