From 764f12e89dc1f83fbe27212aed0faedeb5a19bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Mon, 26 Feb 2024 11:18:03 +0100 Subject: [PATCH] [MIG] stock_request: Migration to 16.0 TT45771 --- stock_request/i18n/de.po | 48 ------ stock_request/i18n/es.po | 3 - stock_request/i18n/zh_CN.po | 48 ------ stock_request/models/stock_request.py | 5 +- .../security/stock_request_security.xml | 6 +- stock_request/tests/test_stock_request.py | 154 +++++++----------- .../views/stock_request_order_views.xml | 18 +- stock_request/views/stock_request_views.xml | 9 +- 8 files changed, 69 insertions(+), 222 deletions(-) diff --git a/stock_request/i18n/de.po b/stock_request/i18n/de.po index 5279ea2b..f7be2295 100644 --- a/stock_request/i18n/de.po +++ b/stock_request/i18n/de.po @@ -1163,51 +1163,3 @@ msgid "" msgstr "" "Sie müssen eine Produktmengeneinheit aus der gleichen Kategorie, wie die " "Basismengeneinheit des Produkts, verwenden" - -#, fuzzy -#~ msgid "SMS Delivery error" -#~ msgstr "Meldungszustellfehler" - -#, fuzzy -#~ msgid "Stock request" -#~ msgstr "Bestandsanforderung" - -#, python-format -#~ msgid "
  • %s: Transferred quantity %s %s
  • " -#~ msgstr "
  • %s: Umgelagerte Menge %s %s
  • " - -#~ msgid "Followers (Channels)" -#~ msgstr "Follower (Kanäle)" - -#, python-format -#~ msgid "Receipt confirmation %s for your Request %s" -#~ msgstr "Bestätigungsbeleg %s zu Ihrer Anforderung %s" - -#~ msgid "Requested by" -#~ msgstr "Angefordert durch" - -#, python-format -#~ msgid "" -#~ "The following requested items from Stock Request %s have now been " -#~ "received in %s using Picking %s:" -#~ msgstr "" -#~ "Die folgenden Posten aus Anforderung %s sind nun eingegangen in %s unter " -#~ "Kommissionierung %s:" - -#~ msgid "Archived" -#~ msgstr "Archiviert" - -#~ msgid "If checked new messages require your attention." -#~ msgstr "Wenn angehakt, erfordern Meldungen Ihre Aufmerksamkeit." - -#~ msgid "Overdue" -#~ msgstr "Überfällig" - -#~ msgid "Planned" -#~ msgstr "Geplant" - -#~ msgid "Packing Operation" -#~ msgstr "Packvorgang" - -#~ msgid "Procurement Rule" -#~ msgstr "Beschaffungsregel" diff --git a/stock_request/i18n/es.po b/stock_request/i18n/es.po index ca33c7ef..277e1b68 100644 --- a/stock_request/i18n/es.po +++ b/stock_request/i18n/es.po @@ -1176,6 +1176,3 @@ msgid "" msgstr "" "Debe seleccionada una unidad de medida de producto de la misma categoría que " "la unidad de medida por defecto del producto" - -#~ msgid "SMS Delivery error" -#~ msgstr "Error de entrega de SMS" diff --git a/stock_request/i18n/zh_CN.po b/stock_request/i18n/zh_CN.po index a1e67057..4a3102b8 100644 --- a/stock_request/i18n/zh_CN.po +++ b/stock_request/i18n/zh_CN.po @@ -1148,51 +1148,3 @@ msgid "" "You have to select a product unit of measure in the same category than the " "default unit of measure of the product" msgstr "您必须选择与产品默认计量单位相同类别的产品计量单位" - -#, fuzzy -#~ msgid "SMS Delivery error" -#~ msgstr "消息递送错误" - -#~ msgid "Stock request" -#~ msgstr "库存请求" - -#, python-format -#~ msgid "
  • %s: Transferred quantity %s %s
  • " -#~ msgstr "
  • %s: 调拨数量%s %s
  • " - -#~ msgid "Followers (Channels)" -#~ msgstr "关注者(频道)" - -#, python-format -#~ msgid "Receipt confirmation %s for your Request %s" -#~ msgstr "您的请求%s的收据确认%s" - -#~ msgid "Requested by" -#~ msgstr "请求者" - -#, python-format -#~ msgid "" -#~ "The following requested items from Stock Request %s have now been " -#~ "received in %s using Picking %s:" -#~ msgstr "从库存请求%s中请求的下列项目现在已在使用领料%s的%s中收到:" - -#, python-format -#~ msgid "" -#~ "Unfortunately it seems you do not have the necessary rights for creating " -#~ "stock requests. Please contact your administrator." -#~ msgstr "不幸的是,您似乎没有创建库存请求的必要权限。请与管理员联系。" - -#~ msgid "Archived" -#~ msgstr "已归档" - -#~ msgid "If checked new messages require your attention." -#~ msgstr ".如果勾选此项,将会收到新消息提醒。" - -#~ msgid "Overdue" -#~ msgstr "逾期" - -#~ msgid "Planned" -#~ msgstr "计划" - -#~ msgid "Today" -#~ msgstr "今天" diff --git a/stock_request/models/stock_request.py b/stock_request/models/stock_request.py index e7cfd366..eeadff9b 100644 --- a/stock_request/models/stock_request.py +++ b/stock_request/models/stock_request.py @@ -283,7 +283,6 @@ def _check_cancel_allocation(self): ) def _prepare_procurement_values(self, group_id=False): - """Prepare specific key for moves or other components that will be created from a procurement rule coming from a stock request. This method could be override @@ -423,8 +422,8 @@ def create(self, vals_list): if upd_vals.get("name", "/") == "/": upd_vals["name"] = self.env["ir.sequence"].next_by_code("stock.request") if "order_id" in upd_vals: - order_id = self.env["stock.request.order"].browse(upd_vals["order_id"]) - upd_vals["expected_date"] = order_id.expected_date + order = self.env["stock.request.order"].browse(upd_vals["order_id"]) + upd_vals["expected_date"] = order.expected_date else: upd_vals["expected_date"] = self._get_expected_date() vals_list_upd.append(upd_vals) diff --git a/stock_request/security/stock_request_security.xml b/stock_request/security/stock_request_security.xml index 74de3d9b..d49eb957 100644 --- a/stock_request/security/stock_request_security.xml +++ b/stock_request/security/stock_request_security.xml @@ -29,11 +29,7 @@ stock_request multi-company - + stock.request.order.form stock.request.order -
    + @@ -46,7 +46,11 @@
    - +
    -