[FIX] stock_cycle_count: use company of the location when creating cycle_count

This commit is contained in:
Joan Sisquella
2024-11-21 12:50:27 +01:00
committed by ArnauCForgeFlow
parent ecdeba21c7
commit 490c19abe7
2 changed files with 2 additions and 0 deletions

View File

@@ -160,6 +160,7 @@ class StockCycleCountRule(models.Model):
"date": fields.Datetime.from_string(date), "date": fields.Datetime.from_string(date),
"location": location, "location": location,
"rule_type": self, "rule_type": self,
"company_id": location.company_id,
} }
return cycle_count return cycle_count

View File

@@ -74,6 +74,7 @@ class StockWarehouse(models.Model):
"location_id": cycle_count_proposed["location"].id, "location_id": cycle_count_proposed["location"].id,
"cycle_count_rule_id": cycle_count_proposed["rule_type"].id, "cycle_count_rule_id": cycle_count_proposed["rule_type"].id,
"state": "draft", "state": "draft",
"company_id": cycle_count_proposed["company_id"].id,
} }
def action_compute_cycle_count_rules(self): def action_compute_cycle_count_rules(self):