Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
AungKoKoLin1997 committed Jan 21, 2025
1 parent d4a7f4d commit d318b86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 7 additions & 1 deletion sale_lead_time/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ def _compute_delivery_lead_time(self):
continue
partner_address_domain = rec._get_partner_address_domain()
warehouse_domain = rec._get_warehouse_domain()
domain = expression.AND([partner_address_domain, warehouse_domain])
domain = expression.AND(
[
partner_address_domain,
warehouse_domain,
[("company_id", "=", rec.company_id.id)],
]
)
profiles = self.env["lead.time.profile"].search(domain)
if not profiles:
continue
Expand Down
4 changes: 1 addition & 3 deletions sale_lead_time/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,5 @@ def _compute_customer_lead(self):
def _prepare_procurement_values(self, group_id=False):
values = super()._prepare_procurement_values(group_id)
if values.get("date_planned"):
values["date_planned"] = values["date_planned"] - timedelta(
days=self.order_id.delivery_lead_time
)
values["date_planned"] -= timedelta(days=self.order_id.delivery_lead_time)
return values

0 comments on commit d318b86

Please sign in to comment.