From 09f97c078fca558e0d59109c031d81e68e26e24a Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Tue, 3 Dec 2019 16:29:58 -0800 Subject: [PATCH] IMP `stock_warehouse_procurement` also filter 'exception' stock moves by warehouse Note that there are 'to assign' moves that do not use a method to get the domain, this is a known limitation. --- stock_warehouse_procurement/models/procurement.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stock_warehouse_procurement/models/procurement.py b/stock_warehouse_procurement/models/procurement.py index 3b56006b..2b65eb4a 100644 --- a/stock_warehouse_procurement/models/procurement.py +++ b/stock_warehouse_procurement/models/procurement.py @@ -10,3 +10,10 @@ class ProcurementGroup(models.Model): if warehouse_id: domain.append(('warehouse_id', '=', warehouse_id)) return domain + + def _get_exceptions_domain(self): + domain = super(ProcurementGroup, self)._get_exceptions_domain() + warehouse_id = self.env.context.get('warehouse_id') + if warehouse_id: + domain.append(('warehouse_id', '=', warehouse_id)) + return domain