fix empty quantity
This commit is contained in:
parent
255e8601ce
commit
2fda0c0c59
|
|
@ -268,9 +268,9 @@ class SamashtiDashboard(models.AbstractModel):
|
|||
('date_start', '<=', toDate)
|
||||
])
|
||||
move_ids = mo_ids.move_raw_ids + mo_ids.move_finished_ids + mo_ids.scrap_ids.move_ids
|
||||
stock_layer_ids = move_ids.filtered(lambda x:x.location_id.usage == 'production' or x.location_dest_id.usage == 'production').stock_valuation_layer_ids
|
||||
stock_layer_ids = move_ids.filtered(lambda x:x.location_id.usage == 'production' or x.location_dest_id.usage == 'production' ).stock_valuation_layer_ids
|
||||
data = []
|
||||
for l in stock_layer_ids:
|
||||
for l in stock_layer_ids.filtered(lambda x:x.quantity > 0):
|
||||
mo = self.env['mrp.production'].search([('name', 'ilike', l.reference),('state','=','done')])
|
||||
product_tags = ', '.join(
|
||||
tag.name for tag in l.mapped('product_id.product_tag_ids')
|
||||
|
|
|
|||
Loading…
Reference in New Issue