Update the branch with latest stable addons.
bzr revid: vinusoft85@gmail.com-20090603130457-euf0dbo08r1hg9ko
This commit is contained in:
@@ -1796,7 +1796,7 @@ msgstr "Magasin"
|
||||
#: selection:stock.move,state:0
|
||||
#: selection:stock.picking,state:0
|
||||
msgid "Done"
|
||||
msgstr "Terminer"
|
||||
msgstr "Terminé"
|
||||
|
||||
#. module: stock
|
||||
#: model:stock.location,name:stock.stock_location_locations_virtual
|
||||
|
||||
+19
-13
@@ -785,20 +785,26 @@ class stock_production_lot(osv.osv):
|
||||
if 'location_id' not in context:
|
||||
locations = self.pool.get('stock.location').search(cr, uid, [('usage','=','internal')], context=context)
|
||||
else:
|
||||
locations = [context['location_id']]
|
||||
locations = context['location_id'] and [context['location_id']] or []
|
||||
|
||||
if isinstance(ids, (int, long)):
|
||||
ids = [ids]
|
||||
|
||||
res = {}.fromkeys(ids, 0.0)
|
||||
cr.execute('''select
|
||||
prodlot_id,
|
||||
sum(name)
|
||||
from
|
||||
stock_report_prodlots
|
||||
where
|
||||
location_id in ('''+','.join(map(str, locations))+''') and
|
||||
prodlot_id in ('''+','.join(map(str, ids))+''')
|
||||
group by
|
||||
prodlot_id
|
||||
''')
|
||||
res.update(dict(cr.fetchall()))
|
||||
|
||||
if locations:
|
||||
cr.execute('''select
|
||||
prodlot_id,
|
||||
sum(name)
|
||||
from
|
||||
stock_report_prodlots
|
||||
where
|
||||
location_id in ('''+','.join(map(str, locations))+''') and
|
||||
prodlot_id in ('''+','.join(map(str, ids))+''')
|
||||
group by
|
||||
prodlot_id
|
||||
''')
|
||||
res.update(dict(cr.fetchall()))
|
||||
return res
|
||||
|
||||
def _stock_search(self, cr, uid, obj, name, args):
|
||||
|
||||
@@ -77,6 +77,7 @@ def _track_lines(self, cr, uid, data, context):
|
||||
'product_uos_qty': uos_qty,
|
||||
}
|
||||
new_move = []
|
||||
production_ids = []
|
||||
for idx in range(int(move.product_qty//quantity)):
|
||||
if idx:
|
||||
current_move = move_obj.copy(cr, uid, move.id, {'state': move.state, 'production_id': move.production_id.id})
|
||||
|
||||
Reference in New Issue
Block a user