From 2fda0c0c599dd85597c9ade482c76a23ebf4e59b Mon Sep 17 00:00:00 2001 From: Raman Marikanti Date: Mon, 5 Jan 2026 12:25:06 +0530 Subject: [PATCH] fix empty quantity --- custom_addons/dashboard/models/stock_dashboard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_addons/dashboard/models/stock_dashboard.py b/custom_addons/dashboard/models/stock_dashboard.py index e357bf6bd..1286e7098 100644 --- a/custom_addons/dashboard/models/stock_dashboard.py +++ b/custom_addons/dashboard/models/stock_dashboard.py @@ -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')