odoo-addon-stock-request 15.0.1.7.0.1__py3-none-any.whl → 16.0.1.0.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. odoo/addons/stock_request/README.rst +9 -9
  2. odoo/addons/stock_request/__manifest__.py +2 -2
  3. odoo/addons/stock_request/i18n/ca.po +36 -31
  4. odoo/addons/stock_request/i18n/de.po +49 -77
  5. odoo/addons/stock_request/i18n/el_GR.po +36 -31
  6. odoo/addons/stock_request/i18n/es.po +60 -38
  7. odoo/addons/stock_request/i18n/es_ES.po +36 -31
  8. odoo/addons/stock_request/i18n/eu.po +36 -31
  9. odoo/addons/stock_request/i18n/fi.po +36 -31
  10. odoo/addons/stock_request/i18n/fr.po +36 -31
  11. odoo/addons/stock_request/i18n/fr_CH.po +36 -31
  12. odoo/addons/stock_request/i18n/fr_FR.po +36 -31
  13. odoo/addons/stock_request/i18n/gl.po +36 -31
  14. odoo/addons/stock_request/i18n/hr.po +36 -31
  15. odoo/addons/stock_request/i18n/hr_HR.po +36 -31
  16. odoo/addons/stock_request/i18n/it.po +36 -31
  17. odoo/addons/stock_request/i18n/ja.po +36 -31
  18. odoo/addons/stock_request/i18n/ja_JP.po +36 -31
  19. odoo/addons/stock_request/i18n/nl.po +36 -31
  20. odoo/addons/stock_request/i18n/nl_NL.po +36 -31
  21. odoo/addons/stock_request/i18n/pt.po +36 -31
  22. odoo/addons/stock_request/i18n/pt_BR.po +36 -31
  23. odoo/addons/stock_request/i18n/ro.po +36 -31
  24. odoo/addons/stock_request/i18n/ru.po +36 -31
  25. odoo/addons/stock_request/i18n/sl.po +36 -31
  26. odoo/addons/stock_request/i18n/stock_request.pot +37 -32
  27. odoo/addons/stock_request/i18n/tr.po +36 -31
  28. odoo/addons/stock_request/i18n/tr_TR.po +36 -31
  29. odoo/addons/stock_request/i18n/vi_VN.po +36 -31
  30. odoo/addons/stock_request/i18n/zh_CN.po +52 -75
  31. odoo/addons/stock_request/models/__init__.py +1 -1
  32. odoo/addons/stock_request/models/stock_picking.py +2 -2
  33. odoo/addons/stock_request/models/stock_request.py +40 -29
  34. odoo/addons/stock_request/models/stock_request_abstract.py +5 -7
  35. odoo/addons/stock_request/models/stock_request_order.py +11 -8
  36. odoo/addons/stock_request/models/{stock_location_route.py → stock_route.py} +2 -2
  37. odoo/addons/stock_request/security/stock_request_security.xml +1 -5
  38. odoo/addons/stock_request/static/description/index.html +5 -5
  39. odoo/addons/stock_request/tests/test_stock_request.py +140 -156
  40. odoo/addons/stock_request/views/res_config_settings_views.xml +5 -2
  41. odoo/addons/stock_request/views/stock_request_order_views.xml +14 -3
  42. odoo/addons/stock_request/views/stock_request_views.xml +14 -5
  43. {odoo_addon_stock_request-15.0.1.7.0.1.dist-info → odoo_addon_stock_request-16.0.1.0.0.3.dist-info}/METADATA +14 -14
  44. odoo_addon_stock_request-16.0.1.0.0.3.dist-info/RECORD +71 -0
  45. {odoo_addon_stock_request-15.0.1.7.0.1.dist-info → odoo_addon_stock_request-16.0.1.0.0.3.dist-info}/WHEEL +1 -1
  46. odoo/addons/stock_request/migrations/15.0.1.4.0/noupdate_changes.xml +0 -14
  47. odoo/addons/stock_request/migrations/15.0.1.4.0/post-migration.py +0 -10
  48. odoo_addon_stock_request-15.0.1.7.0.1.dist-info/RECORD +0 -73
  49. {odoo_addon_stock_request-15.0.1.7.0.1.dist-info → odoo_addon_stock_request-16.0.1.0.0.3.dist-info}/top_level.txt +0 -0
@@ -21,6 +21,7 @@ msgstr ""
21
21
  "X-Generator: Weblate 3.8\n"
22
22
 
23
23
  #. module: stock_request
24
+ #. odoo-python
24
25
  #: code:addons/stock_request/models/stock_move_line.py:0
25
26
  #, python-format
26
27
  msgid ""
@@ -70,8 +71,10 @@ msgstr ""
70
71
 
71
72
  #. module: stock_request
72
73
  #: model_terms:ir.ui.view,arch_db:stock_request.res_config_settings_view_form
73
- msgid "Add State to Stock Request and Stock Request Orders if activated."
74
- msgstr "如果激活,则将状态添加到库存请求和库存请求订单中。"
74
+ msgid ""
75
+ "Add State to Stock Request and Stock Request Orders if\n"
76
+ " activated."
77
+ msgstr ""
75
78
 
76
79
  #. module: stock_request
77
80
  #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation__allocated_product_qty
@@ -112,9 +115,9 @@ msgstr "附件数量"
112
115
  #. module: stock_request
113
116
  #: model_terms:ir.ui.view,arch_db:stock_request.res_config_settings_view_form
114
117
  msgid ""
115
- "By default only internal and transit locations are allowed in Stock Request "
116
- "and Orders."
117
- msgstr "默认情况下,库存请求和订单中只允许内部和运输地点。"
118
+ "By default only internal and transit locations are allowed in\n"
119
+ " Stock Request and Orders."
120
+ msgstr ""
118
121
 
119
122
  #. module: stock_request
120
123
  #: model_terms:ir.ui.view,arch_db:stock_request.res_config_settings_view_form
@@ -166,6 +169,7 @@ msgid "Company"
166
169
  msgstr "公司"
167
170
 
168
171
  #. module: stock_request
172
+ #. odoo-python
169
173
  #: code:addons/stock_request/models/stock_request.py:0
170
174
  #, python-format
171
175
  msgid "Company must be equal to the order"
@@ -279,6 +283,7 @@ msgid "Expected Date"
279
283
  msgstr "预计日期"
280
284
 
281
285
  #. module: stock_request
286
+ #. odoo-python
282
287
  #: code:addons/stock_request/models/stock_request.py:0
283
288
  #, python-format
284
289
  msgid "Expected date must be equal to the order"
@@ -352,11 +357,8 @@ msgstr ""
352
357
 
353
358
  #. module: stock_request
354
359
  #: model:ir.model.fields,help:stock_request.field_stock_request__message_needaction
355
- #: model:ir.model.fields,help:stock_request.field_stock_request__message_unread
356
360
  #: model:ir.model.fields,help:stock_request.field_stock_request_abstract__message_needaction
357
- #: model:ir.model.fields,help:stock_request.field_stock_request_abstract__message_unread
358
361
  #: model:ir.model.fields,help:stock_request.field_stock_request_order__message_needaction
359
- #: model:ir.model.fields,help:stock_request.field_stock_request_order__message_unread
360
362
  msgid "If checked, new messages require your attention."
361
363
  msgstr "如果勾选此项,将会收到新消息提醒。"
362
364
 
@@ -385,7 +387,7 @@ msgid "Inventory Locations"
385
387
  msgstr "库存位置"
386
388
 
387
389
  #. module: stock_request
388
- #: model:ir.model,name:stock_request.model_stock_location_route
390
+ #: model:ir.model,name:stock_request.model_stock_route
389
391
  msgid "Inventory Routes"
390
392
  msgstr "库存路由"
391
393
 
@@ -437,6 +439,7 @@ msgid "Location"
437
439
  msgstr "位置"
438
440
 
439
441
  #. module: stock_request
442
+ #. odoo-python
440
443
  #: code:addons/stock_request/models/stock_request.py:0
441
444
  #, python-format
442
445
  msgid "Location must be equal to the order"
@@ -501,7 +504,6 @@ msgstr "名称"
501
504
 
502
505
  #. module: stock_request
503
506
  #: model:ir.model.constraint,message:stock_request.constraint_stock_request_abstract_name_uniq
504
- #: model:ir.model.constraint,message:stock_request.constraint_stock_request_kanban_name_uniq
505
507
  msgid "Name must be unique"
506
508
  msgstr "名称必须唯一"
507
509
 
@@ -545,8 +547,8 @@ msgstr "错误数"
545
547
  #: model:ir.model.fields,help:stock_request.field_stock_request__message_needaction_counter
546
548
  #: model:ir.model.fields,help:stock_request.field_stock_request_abstract__message_needaction_counter
547
549
  #: model:ir.model.fields,help:stock_request.field_stock_request_order__message_needaction_counter
548
- msgid "Number of messages which requires an action"
549
- msgstr "需要操作消息数量"
550
+ msgid "Number of messages requiring action"
551
+ msgstr ""
550
552
 
551
553
  #. module: stock_request
552
554
  #: model:ir.model.fields,help:stock_request.field_stock_request__message_has_error_counter
@@ -556,19 +558,14 @@ msgid "Number of messages with delivery error"
556
558
  msgstr "传递错误的消息数量"
557
559
 
558
560
  #. module: stock_request
559
- #: model:ir.model.fields,help:stock_request.field_stock_request__message_unread_counter
560
- #: model:ir.model.fields,help:stock_request.field_stock_request_abstract__message_unread_counter
561
- #: model:ir.model.fields,help:stock_request.field_stock_request_order__message_unread_counter
562
- msgid "Number of unread messages"
563
- msgstr "未读消息的数量"
564
-
565
- #. module: stock_request
561
+ #. odoo-python
566
562
  #: code:addons/stock_request/models/stock_request_order.py:0
567
563
  #, python-format
568
564
  msgid "Only orders on draft state can be unlinked"
569
565
  msgstr "只有处于草稿状态的订单才能取消链接"
570
566
 
571
567
  #. module: stock_request
568
+ #. odoo-python
572
569
  #: code:addons/stock_request/models/stock_request.py:0
573
570
  #, python-format
574
571
  msgid "Only requests on draft state can be unlinked"
@@ -609,6 +606,7 @@ msgid "Procurement Group"
609
606
  msgstr "补货组"
610
607
 
611
608
  #. module: stock_request
609
+ #. odoo-python
612
610
  #: code:addons/stock_request/models/stock_request.py:0
613
611
  #, python-format
614
612
  msgid "Procurement group must be equal to the order"
@@ -708,6 +706,7 @@ msgid "Real Quantity"
708
706
  msgstr "实际数量"
709
707
 
710
708
  #. module: stock_request
709
+ #. odoo-python
711
710
  #: code:addons/stock_request/models/stock_move_line.py:0
712
711
  #, python-format
713
712
  msgid "Receipt confirmation %(picking_name)s for your Request %(request_name)s"
@@ -748,6 +747,7 @@ msgid "Requested Quantity (UoM)"
748
747
  msgstr "已请求的数量(单位)"
749
748
 
750
749
  #. module: stock_request
750
+ #. odoo-python
751
751
  #: code:addons/stock_request/models/stock_request.py:0
752
752
  #, python-format
753
753
  msgid "Requested by must be equal to the order"
@@ -830,6 +830,7 @@ msgstr "库存移动"
830
830
  #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation__stock_request_id
831
831
  #: model:ir.model.fields,field_description:stock_request.field_stock_request_order__stock_request_ids
832
832
  #: model:ir.module.category,name:stock_request.module_category_stock_request
833
+ #: model_terms:ir.ui.view,arch_db:stock_request.res_config_settings_view_form
833
834
  #: model_terms:ir.ui.view,arch_db:stock_request.view_stock_request_form
834
835
  msgid "Stock Request"
835
836
  msgstr "库存请求"
@@ -892,6 +893,7 @@ msgid "Stock Request name must be unique"
892
893
  msgstr "库存请求名称必须唯一"
893
894
 
894
895
  #. module: stock_request
896
+ #. odoo-python
895
897
  #: code:addons/stock_request/models/stock_request_abstract.py:0
896
898
  #, python-format
897
899
  msgid "Stock Request product quantity has to be strictly positive."
@@ -957,6 +959,7 @@ msgid "Submitted state in Stock Requests"
957
959
  msgstr "库存请求的提交状态"
958
960
 
959
961
  #. module: stock_request
962
+ #. odoo-python
960
963
  #: code:addons/stock_request/models/stock_move.py:0
961
964
  #: code:addons/stock_request/models/stock_request_order.py:0
962
965
  #, python-format
@@ -964,12 +967,14 @@ msgid "The company of the stock request must match with that of the location."
964
967
  msgstr "库存请求的公司必须与位置的公司匹配。"
965
968
 
966
969
  #. module: stock_request
970
+ #. odoo-python
967
971
  #: code:addons/stock_request/models/stock_request_order.py:0
968
972
  #, python-format
969
973
  msgid "The company of the stock request must match with that of the warehouse."
970
974
  msgstr "库存请求的公司必须与仓库的公司匹配。"
971
975
 
972
976
  #. module: stock_request
977
+ #. odoo-python
973
978
  #: code:addons/stock_request/models/stock_move_line.py:0
974
979
  #, python-format
975
980
  msgid ""
@@ -978,18 +983,21 @@ msgid ""
978
983
  msgstr ""
979
984
 
980
985
  #. module: stock_request
986
+ #. odoo-python
981
987
  #: code:addons/stock_request/models/stock_request.py:0
982
988
  #, python-format
983
989
  msgid "The picking policy must be equal to the order"
984
990
  msgstr "拣货策略必须等于订单"
985
991
 
986
992
  #. module: stock_request
993
+ #. odoo-python
987
994
  #: code:addons/stock_request/models/stock_request_order.py:0
988
995
  #, python-format
989
996
  msgid "There should be at least one request item for confirming the order."
990
997
  msgstr ""
991
998
 
992
999
  #. module: stock_request
1000
+ #. odoo-python
993
1001
  #: code:addons/stock_request/models/stock_request_order.py:0
994
1002
  #, python-format
995
1003
  msgid "This action only works in the context of products"
@@ -1013,20 +1021,6 @@ msgstr "调拨"
1013
1021
  msgid "Type of the exception activity on record."
1014
1022
  msgstr ""
1015
1023
 
1016
- #. module: stock_request
1017
- #: model:ir.model.fields,field_description:stock_request.field_stock_request__message_unread
1018
- #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract__message_unread
1019
- #: model:ir.model.fields,field_description:stock_request.field_stock_request_order__message_unread
1020
- msgid "Unread Messages"
1021
- msgstr "未读消息"
1022
-
1023
- #. module: stock_request
1024
- #: model:ir.model.fields,field_description:stock_request.field_stock_request__message_unread_counter
1025
- #: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract__message_unread_counter
1026
- #: model:ir.model.fields,field_description:stock_request.field_stock_request_order__message_unread_counter
1027
- msgid "Unread Messages Counter"
1028
- msgstr "未读消息计数器"
1029
-
1030
1024
  #. module: stock_request
1031
1025
  #: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation__product_uom_id
1032
1026
  msgid "UoM"
@@ -1058,6 +1052,7 @@ msgid "Warehouse"
1058
1052
  msgstr "仓库"
1059
1053
 
1060
1054
  #. module: stock_request
1055
+ #. odoo-python
1061
1056
  #: code:addons/stock_request/models/stock_request.py:0
1062
1057
  #, python-format
1063
1058
  msgid "Warehouse must be equal to the order"
@@ -1078,6 +1073,7 @@ msgid "Website communication history"
1078
1073
  msgstr "网站沟通记录"
1079
1074
 
1080
1075
  #. module: stock_request
1076
+ #. odoo-python
1081
1077
  #: code:addons/stock_request/models/stock_location.py:0
1082
1078
  #, python-format
1083
1079
  msgid ""
@@ -1086,6 +1082,7 @@ msgid ""
1086
1082
  msgstr "您无法更改位置的公司,因为它已分配给属于另一公司的库存请求单。"
1087
1083
 
1088
1084
  #. module: stock_request
1085
+ #. odoo-python
1089
1086
  #: code:addons/stock_request/models/stock_location.py:0
1090
1087
  #, python-format
1091
1088
  msgid ""
@@ -1094,7 +1091,8 @@ msgid ""
1094
1091
  msgstr "您无法更改位置的公司,因为它已分配给属于另一公司的库存请求。"
1095
1092
 
1096
1093
  #. module: stock_request
1097
- #: code:addons/stock_request/models/stock_location_route.py:0
1094
+ #. odoo-python
1095
+ #: code:addons/stock_request/models/stock_route.py:0
1098
1096
  #, python-format
1099
1097
  msgid ""
1100
1098
  "You cannot change the company of the route, as it is already assigned to "
@@ -1102,6 +1100,7 @@ msgid ""
1102
1100
  msgstr "您无法更改该路线的公司,因为它已分配给属于另一公司的库存请求。"
1103
1101
 
1104
1102
  #. module: stock_request
1103
+ #. odoo-python
1105
1104
  #: code:addons/stock_request/models/stock_warehouse.py:0
1106
1105
  #, python-format
1107
1106
  msgid ""
@@ -1110,6 +1109,7 @@ msgid ""
1110
1109
  msgstr "您无法更改仓库的公司,因为它已经分配给属于另一家公司的库存请求单。"
1111
1110
 
1112
1111
  #. module: stock_request
1112
+ #. odoo-python
1113
1113
  #: code:addons/stock_request/models/stock_warehouse.py:0
1114
1114
  #, python-format
1115
1115
  msgid ""
@@ -1118,30 +1118,35 @@ msgid ""
1118
1118
  msgstr "您无法更改仓库的公司,因为它已分配给属于另一个公司的库存请求。"
1119
1119
 
1120
1120
  #. module: stock_request
1121
+ #. odoo-python
1121
1122
  #: code:addons/stock_request/models/stock_request_abstract.py:0
1122
1123
  #, python-format
1123
1124
  msgid "You have entered a location that is assigned to another company."
1124
1125
  msgstr "您输入了分配给其他公司的位置。"
1125
1126
 
1126
1127
  #. module: stock_request
1128
+ #. odoo-python
1127
1129
  #: code:addons/stock_request/models/stock_request_abstract.py:0
1128
1130
  #, python-format
1129
1131
  msgid "You have entered a product that is assigned to another company."
1130
1132
  msgstr "您输入了分配给其他公司的产品。"
1131
1133
 
1132
1134
  #. module: stock_request
1135
+ #. odoo-python
1133
1136
  #: code:addons/stock_request/models/stock_request_abstract.py:0
1134
1137
  #, python-format
1135
1138
  msgid "You have entered a route that is assigned to another company."
1136
1139
  msgstr "您输入了分配给其他公司的路线。"
1137
1140
 
1138
1141
  #. module: stock_request
1142
+ #. odoo-python
1139
1143
  #: code:addons/stock_request/models/stock_request_abstract.py:0
1140
1144
  #, python-format
1141
1145
  msgid "You have entered a warehouse that is assigned to another company."
1142
1146
  msgstr "您输入了分配给其他公司的仓库。"
1143
1147
 
1144
1148
  #. module: stock_request
1149
+ #. odoo-python
1145
1150
  #: code:addons/stock_request/models/stock_request_abstract.py:0
1146
1151
  #, python-format
1147
1152
  msgid ""
@@ -1149,50 +1154,22 @@ msgid ""
1149
1154
  "default unit of measure of the product"
1150
1155
  msgstr "您必须选择与产品默认计量单位相同类别的产品计量单位"
1151
1156
 
1152
- #, fuzzy
1153
- #~ msgid "SMS Delivery error"
1154
- #~ msgstr "消息递送错误"
1155
-
1156
- #~ msgid "Stock request"
1157
- #~ msgstr "库存请求"
1158
-
1159
- #, python-format
1160
- #~ msgid "<li><b>%s</b>: Transferred quantity %s %s</li>"
1161
- #~ msgstr "<li><b>%s</b>: 调拨数量%s %s</li>"
1162
-
1163
- #~ msgid "Followers (Channels)"
1164
- #~ msgstr "关注者(频道)"
1165
-
1166
- #, python-format
1167
- #~ msgid "Receipt confirmation %s for your Request %s"
1168
- #~ msgstr "您的请求%s的收据确认%s"
1169
-
1170
- #~ msgid "Requested by"
1171
- #~ msgstr "请求者"
1172
-
1173
- #, python-format
1174
- #~ msgid ""
1175
- #~ "The following requested items from Stock Request %s have now been "
1176
- #~ "received in %s using Picking %s:"
1177
- #~ msgstr "从库存请求%s中请求的下列项目现在已在使用领料%s的%s中收到:"
1157
+ #~ msgid "Add State to Stock Request and Stock Request Orders if activated."
1158
+ #~ msgstr "如果激活,则将状态添加到库存请求和库存请求订单中。"
1178
1159
 
1179
- #, python-format
1180
1160
  #~ msgid ""
1181
- #~ "Unfortunately it seems you do not have the necessary rights for creating "
1182
- #~ "stock requests. Please contact your administrator."
1183
- #~ msgstr "不幸的是,您似乎没有创建库存请求的必要权限。请与管理员联系。"
1184
-
1185
- #~ msgid "Archived"
1186
- #~ msgstr "已归档"
1161
+ #~ "By default only internal and transit locations are allowed in Stock "
1162
+ #~ "Request and Orders."
1163
+ #~ msgstr "默认情况下,库存请求和订单中只允许内部和运输地点。"
1187
1164
 
1188
- #~ msgid "If checked new messages require your attention."
1189
- #~ msgstr ".如果勾选此项,将会收到新消息提醒。"
1165
+ #~ msgid "Number of messages which requires an action"
1166
+ #~ msgstr "需要操作消息数量"
1190
1167
 
1191
- #~ msgid "Overdue"
1192
- #~ msgstr "逾期"
1168
+ #~ msgid "Number of unread messages"
1169
+ #~ msgstr "未读消息的数量"
1193
1170
 
1194
- #~ msgid "Planned"
1195
- #~ msgstr "计划"
1171
+ #~ msgid "Unread Messages"
1172
+ #~ msgstr "未读消息"
1196
1173
 
1197
- #~ msgid "Today"
1198
- #~ msgstr "今天"
1174
+ #~ msgid "Unread Messages Counter"
1175
+ #~ msgstr "未读消息计数器"
@@ -10,5 +10,5 @@ from . import stock_move_line
10
10
  from . import res_config_settings
11
11
  from . import stock_warehouse
12
12
  from . import stock_location
13
- from . import stock_location_route
13
+ from . import stock_route
14
14
  from . import res_company
@@ -16,10 +16,10 @@ class StockPicking(models.Model):
16
16
  "Stock Request #", compute="_compute_stock_request_ids"
17
17
  )
18
18
 
19
- @api.depends("move_lines")
19
+ @api.depends("move_ids")
20
20
  def _compute_stock_request_ids(self):
21
21
  for rec in self:
22
- rec.stock_request_ids = rec.move_lines.mapped("stock_request_ids")
22
+ rec.stock_request_ids = rec.move_ids.mapped("stock_request_ids")
23
23
  rec.stock_request_count = len(rec.stock_request_ids)
24
24
 
25
25
  def action_view_stock_request(self):
@@ -180,41 +180,50 @@ class StockRequest(models.Model):
180
180
 
181
181
  @api.constrains("order_id", "requested_by")
182
182
  def check_order_requested_by(self):
183
- if self.order_id and self.order_id.requested_by != self.requested_by:
184
- raise ValidationError(_("Requested by must be equal to the order"))
183
+ for rec in self:
184
+ if rec.order_id and rec.order_id.requested_by != rec.requested_by:
185
+ raise ValidationError(_("Requested by must be equal to the order"))
185
186
 
186
187
  @api.constrains("order_id", "warehouse_id")
187
188
  def check_order_warehouse_id(self):
188
- if self.order_id and self.order_id.warehouse_id != self.warehouse_id:
189
- raise ValidationError(_("Warehouse must be equal to the order"))
189
+ for rec in self:
190
+ if rec.order_id and rec.order_id.warehouse_id != rec.warehouse_id:
191
+ raise ValidationError(_("Warehouse must be equal to the order"))
190
192
 
191
193
  @api.constrains("order_id", "location_id")
192
194
  def check_order_location(self):
193
- if self.order_id and self.order_id.location_id != self.location_id:
194
- raise ValidationError(_("Location must be equal to the order"))
195
+ for rec in self:
196
+ if rec.order_id and rec.order_id.location_id != rec.location_id:
197
+ raise ValidationError(_("Location must be equal to the order"))
195
198
 
196
199
  @api.constrains("order_id", "procurement_group_id")
197
200
  def check_order_procurement_group(self):
198
- if (
199
- self.order_id
200
- and self.order_id.procurement_group_id != self.procurement_group_id
201
- ):
202
- raise ValidationError(_("Procurement group must be equal to the order"))
201
+ for rec in self:
202
+ if (
203
+ rec.order_id
204
+ and rec.order_id.procurement_group_id != rec.procurement_group_id
205
+ ):
206
+ raise ValidationError(_("Procurement group must be equal to the order"))
203
207
 
204
208
  @api.constrains("order_id", "company_id")
205
209
  def check_order_company(self):
206
- if self.order_id and self.order_id.company_id != self.company_id:
207
- raise ValidationError(_("Company must be equal to the order"))
210
+ for rec in self:
211
+ if rec.order_id and rec.order_id.company_id != rec.company_id:
212
+ raise ValidationError(_("Company must be equal to the order"))
208
213
 
209
214
  @api.constrains("order_id", "expected_date")
210
215
  def check_order_expected_date(self):
211
- if self.order_id and self.order_id.expected_date != self.expected_date:
212
- raise ValidationError(_("Expected date must be equal to the order"))
216
+ for rec in self:
217
+ if rec.order_id and rec.order_id.expected_date != rec.expected_date:
218
+ raise ValidationError(_("Expected date must be equal to the order"))
213
219
 
214
220
  @api.constrains("order_id", "picking_policy")
215
221
  def check_order_picking_policy(self):
216
- if self.order_id and self.order_id.picking_policy != self.picking_policy:
217
- raise ValidationError(_("The picking policy must be equal to the order"))
222
+ for rec in self:
223
+ if rec.order_id and rec.order_id.picking_policy != rec.picking_policy:
224
+ raise ValidationError(
225
+ _("The picking policy must be equal to the order")
226
+ )
218
227
 
219
228
  def _action_confirm(self):
220
229
  self._action_launch_procurement_rule()
@@ -274,7 +283,6 @@ class StockRequest(models.Model):
274
283
  )
275
284
 
276
285
  def _prepare_procurement_values(self, group_id=False):
277
-
278
286
  """Prepare specific key for moves or other components that
279
287
  will be created from a procurement rule
280
288
  coming from a stock request. This method could be override
@@ -406,17 +414,20 @@ class StockRequest(models.Model):
406
414
  action["res_id"] = pickings.id
407
415
  return action
408
416
 
409
- @api.model
410
- def create(self, vals):
411
- upd_vals = vals.copy()
412
- if upd_vals.get("name", "/") == "/":
413
- upd_vals["name"] = self.env["ir.sequence"].next_by_code("stock.request")
414
- if "order_id" in upd_vals:
415
- order_id = self.env["stock.request.order"].browse(upd_vals["order_id"])
416
- upd_vals["expected_date"] = order_id.expected_date
417
- else:
418
- upd_vals["expected_date"] = self._get_expected_date()
419
- return super().create(upd_vals)
417
+ @api.model_create_multi
418
+ def create(self, vals_list):
419
+ vals_list_upd = []
420
+ for vals in vals_list:
421
+ upd_vals = vals.copy()
422
+ if upd_vals.get("name", "/") == "/":
423
+ upd_vals["name"] = self.env["ir.sequence"].next_by_code("stock.request")
424
+ if "order_id" in upd_vals:
425
+ order = self.env["stock.request.order"].browse(upd_vals["order_id"])
426
+ upd_vals["expected_date"] = order.expected_date
427
+ else:
428
+ upd_vals["expected_date"] = self._get_expected_date()
429
+ vals_list_upd.append(upd_vals)
430
+ return super().create(vals_list_upd)
420
431
 
421
432
  def unlink(self):
422
433
  if self.filtered(lambda r: r.state != "draft"):
@@ -94,14 +94,14 @@ class StockRequest(models.AbstractModel):
94
94
  "res.company", "Company", required=True, default=lambda self: self.env.company
95
95
  )
96
96
  route_id = fields.Many2one(
97
- "stock.location.route",
97
+ "stock.route",
98
98
  string="Route",
99
99
  domain="[('id', 'in', route_ids)]",
100
100
  ondelete="restrict",
101
101
  )
102
102
 
103
103
  route_ids = fields.Many2many(
104
- "stock.location.route",
104
+ "stock.route",
105
105
  string="Routes",
106
106
  compute="_compute_route_ids",
107
107
  readonly=True,
@@ -113,16 +113,14 @@ class StockRequest(models.AbstractModel):
113
113
 
114
114
  @api.depends("product_id", "warehouse_id", "location_id")
115
115
  def _compute_route_ids(self):
116
- route_obj = self.env["stock.location.route"]
116
+ route_obj = self.env["stock.route"]
117
117
  routes = route_obj.search(
118
118
  [("warehouse_ids", "in", self.mapped("warehouse_id").ids)]
119
119
  )
120
120
  routes_by_warehouse = {}
121
121
  for route in routes:
122
122
  for warehouse in route.warehouse_ids:
123
- routes_by_warehouse.setdefault(
124
- warehouse.id, self.env["stock.location.route"]
125
- )
123
+ routes_by_warehouse.setdefault(warehouse.id, self.env["stock.route"])
126
124
  routes_by_warehouse[warehouse.id] |= route
127
125
  for record in self:
128
126
  routes = route_obj
@@ -134,7 +132,7 @@ class StockRequest(models.AbstractModel):
134
132
  routes |= routes_by_warehouse[record.warehouse_id.id]
135
133
  parents = record.get_parents().ids
136
134
  record.route_ids = routes.filtered(
137
- lambda r: any(p.location_id.id in parents for p in r.rule_ids)
135
+ lambda r: any(p.location_dest_id.id in parents for p in r.rule_ids)
138
136
  )
139
137
 
140
138
  def get_parents(self):
@@ -277,14 +277,17 @@ class StockRequestOrder(models.Model):
277
277
  action["res_id"] = self.stock_request_ids.id
278
278
  return action
279
279
 
280
- @api.model
281
- def create(self, vals):
282
- upd_vals = vals.copy()
283
- if upd_vals.get("name", "/") == "/":
284
- upd_vals["name"] = self.env["ir.sequence"].next_by_code(
285
- "stock.request.order"
286
- )
287
- return super().create(upd_vals)
280
+ @api.model_create_multi
281
+ def create(self, vals_list):
282
+ vals_list_upd = []
283
+ for vals in vals_list:
284
+ upd_vals = vals.copy()
285
+ if upd_vals.get("name", "/") == "/":
286
+ upd_vals["name"] = self.env["ir.sequence"].next_by_code(
287
+ "stock.request.order"
288
+ )
289
+ vals_list_upd.append(upd_vals)
290
+ return super().create(vals_list_upd)
288
291
 
289
292
  def unlink(self):
290
293
  if self.filtered(lambda r: r.state != "draft"):
@@ -5,8 +5,8 @@ from odoo import _, api, models
5
5
  from odoo.exceptions import ValidationError
6
6
 
7
7
 
8
- class StockLocationRoute(models.Model):
9
- _inherit = "stock.location.route"
8
+ class StockRoute(models.Model):
9
+ _inherit = "stock.route"
10
10
 
11
11
  @api.constrains("company_id")
12
12
  def _check_company_stock_request(self):
@@ -29,11 +29,7 @@
29
29
  <data noupdate="1">
30
30
  <record model="ir.rule" id="stock_picking_rule">
31
31
  <field name="name">stock_request multi-company</field>
32
- <field
33
- name="model_id"
34
- search="[('model','=','stock.request')]"
35
- model="ir.model"
36
- />
32
+ <field name="model_id" ref="model_stock_request" />
37
33
  <field name="global" eval="True" />
38
34
  <field
39
35
  name="domain_force"
@@ -367,9 +367,9 @@ ul.auto-toc {
367
367
  !! This file is generated by oca-gen-addon-readme !!
368
368
  !! changes will be overwritten. !!
369
369
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370
- !! source digest: sha256:f7abc85838ce009026d931feb4eeef8b5d7c9fc791db18affe7a3e6e7dcec1ea
370
+ !! source digest: sha256:a466d45b459fb5887294de33e31dfbd31db3dcedb0f5b44560203bdfe27da502
371
371
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372
- <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/stock-logistics-warehouse/tree/15.0/stock_request"><img alt="OCA/stock-logistics-warehouse" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-warehouse-15-0/stock-logistics-warehouse-15-0-stock_request"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-warehouse&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372
+ <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/stock-logistics-request/tree/16.0/stock_request"><img alt="OCA/stock-logistics-request" src="https://img.shields.io/badge/github-OCA%2Fstock--logistics--request-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/stock-logistics-request-16-0/stock-logistics-request-16-0-stock_request"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-request&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373
373
  <p>This module was written to allow users to request products that are
374
374
  frequently stocked by the company, to be transferred to their chosen location.</p>
375
375
  <p><strong>Table of contents</strong></p>
@@ -431,10 +431,10 @@ stock request can be archived.</p>
431
431
  </div>
432
432
  <div class="section" id="bug-tracker">
433
433
  <h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
434
- <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues">GitHub Issues</a>.
434
+ <p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-request/issues">GitHub Issues</a>.
435
435
  In case of trouble, please check there if your issue has already been reported.
436
436
  If you spotted it first, help us to smash it by providing a detailed and welcomed
437
- <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_request%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
437
+ <a class="reference external" href="https://github.com/OCA/stock-logistics-request/issues/new?body=module:%20stock_request%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
438
438
  <p>Do not contact contributors directly about support or help with technical issues.</p>
439
439
  </div>
440
440
  <div class="section" id="credits">
@@ -472,7 +472,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
472
472
  <p>OCA, or the Odoo Community Association, is a nonprofit organization whose
473
473
  mission is to support the collaborative development of Odoo features and
474
474
  promote its widespread use.</p>
475
- <p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-warehouse/tree/15.0/stock_request">OCA/stock-logistics-warehouse</a> project on GitHub.</p>
475
+ <p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-request/tree/16.0/stock_request">OCA/stock-logistics-request</a> project on GitHub.</p>
476
476
  <p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
477
477
  </div>
478
478
  </div>