Skip to content

Commit

Permalink
[9.0][FIX] demand estimate domains (OCA#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-dacosta authored and DavidBForgeFlow committed Mar 17, 2021
1 parent b98a9ef commit e0386cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ddmrp/models/stock_warehouse_orderpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,8 @@ def subtract_procurements(self, orderpoint):
def _past_demand_estimate_domain(self, date_from, date_to, locations):
return [('location_id', 'in', locations.ids),
('product_id', '=', self.product_id.id),
'|', ('date_range_id.date_start', '>=', date_from),
('date_range_id.date_end', '<=', date_to)]
('date_range_id.date_start', '<=', date_to),
('date_range_id.date_end', '>=', date_from)]

@api.multi
def _past_moves_domain(self, date_from, locations):
Expand Down Expand Up @@ -435,8 +435,8 @@ def _compute_adu_past_demand(self):
def _future_demand_estimate_domain(self, date_from, date_to, locations):
return [('location_id', 'in', locations.ids),
('product_id', '=', self.product_id.id),
'|', ('date_range_id.date_start', '>=', date_from),
('date_range_id.date_end', '<=', date_to)]
('date_range_id.date_start', '<=', date_to),
('date_range_id.date_end', '>=', date_from)]

@api.model
def _future_moves_domain(self, date_to, locations):
Expand Down

0 comments on commit e0386cb

Please sign in to comment.