Skip to content

Commit 7682920

Browse files
[IMP] shopfloor_reception: Add multi company capability
1 parent f40e685 commit 7682920

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

shopfloor_reception/services/reception.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def _scheduled_date_today_domain(self):
7777
return domain
7878

7979
def _get_today_start_end_datetime(self):
80-
company = self.env.company
80+
company = self.picking_types.company_id
8181
tz = company.partner_id.tz or "UTC"
8282
today = fields.Datetime.today()
8383
today_start = fields.Datetime.start_of(today, "day")
@@ -1054,7 +1054,7 @@ def _create_lot_values(self, product, lot_name):
10541054
return {
10551055
"name": lot_name,
10561056
"product_id": product.id,
1057-
"company_id": self.env.company.id,
1057+
"company_id": self.picking_types.company_id.id,
10581058
"use_expiration_date": product.use_expiration_date,
10591059
}
10601060

@@ -1349,7 +1349,7 @@ def set_destination(
13491349
)
13501350
search = self._actions_for("search")
13511351

1352-
location = search.location_from_scan(location_name)
1352+
location = search.location_from_scan(location_name, company=picking.company_id)
13531353
if not location:
13541354
return self._response_for_set_destination(
13551355
picking, selected_line, message=self.msg_store.no_location_found()

0 commit comments

Comments
 (0)