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 mileo committed Aug 19, 2020
1 parent 5477400 commit 42b9dbd
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 42b9dbd

Please sign in to comment.