Permalink
Browse files

temp rebasing PR 28296 (08a8590)

  • Loading branch information...
robodoo committed Nov 8, 2018
2 parents 7aa2136 + 08a8590 commit 3e14dd0820cc4893d6d174d0d998097eef1edfc8
Showing with 3 additions and 3 deletions.
  1. +1 −1 addons/sale/models/sale.py
  2. +2 −2 addons/sale_stock/models/sale_order.py
@@ -228,7 +228,7 @@ def _compute_expected_date(self):
"""
for order in self:
dates_list = []
confirm_date = fields.Datetime.from_string(order.confirmation_date if order.state == 'sale' else fields.Datetime.now())
confirm_date = fields.Datetime.from_string((order.confirmation_date or order.write_date) if order.state == 'sale' else fields.Datetime.now())
for line in order.order_line.filtered(lambda x: x.state != 'cancel' and not x._is_delivery()):
dt = confirm_date + timedelta(days=line.customer_lead or 0.0)
dates_list.append(dt)
@@ -48,8 +48,8 @@ def _compute_expected_date(self):
super(SaleOrder, self)._compute_expected_date()
for order in self:
dates_list = []
confirm_date = fields.Datetime.from_string(order.confirmation_date if order.state == 'sale' else fields.Datetime.now())
for line in order.order_line.filtered(lambda x: x.state != 'cancel' and not x._is_delivery()):
confirm_date = fields.Datetime.from_string((order.confirmation_date or order.write_date) if order.state == 'sale' else fields.Datetime.now())
for line in order.order_line.filtered(lambda x: x.state != 'cancel') and not x._is_delivery():
dt = confirm_date + timedelta(days=line.customer_lead or 0.0)
dates_list.append(dt)
if dates_list:

0 comments on commit 3e14dd0

Please sign in to comment.