Merge PR #1798 into 14.0

Signed-off-by jbaudoux
This commit is contained in:
OCA-git-bot
2023-08-08 09:03:29 +00:00
3 changed files with 7 additions and 4 deletions

View File

@@ -87,8 +87,8 @@ class StockLocationOrderpoint(models.Model):
_sql_constraints = [
(
"location_route_unique",
"unique(location_id, route_id)",
"The combination of Company, Location and Route must be unique",
"unique(location_id, route_id, company_id, replenish_method)",
"The combination of Company, Location, Route and Replenish method must be unique",
)
]

View File

@@ -76,8 +76,10 @@ class StockMove(models.Model):
job_options = job_options.copy()
job_options.setdefault(
"description",
_("Try to replenish quantities for location {} and product {}").format(
location.display_name, product.display_name
_("Try to replenish quantities {} location {} for product {}").format(
location_field == "location_id" and _("in") or _("from"),
location.display_name,
product.display_name,
),
)
# do not enqueue 2 jobs for the same location and product set

View File

@@ -17,6 +17,7 @@
<field name="trigger" />
<field name="replenish_method" />
<field name="group_id" />
<field name="priority" optional="hide" />
<field
name="company_id"
optional="hide"