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.
This commit is contained in:
Jared Kipe
2019-12-03 16:29:58 -08:00
parent 3dfc7f092c
commit 09f97c078f

View File

@@ -10,3 +10,10 @@ class ProcurementGroup(models.Model):
if warehouse_id: if warehouse_id:
domain.append(('warehouse_id', '=', warehouse_id)) domain.append(('warehouse_id', '=', warehouse_id))
return domain 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