odoo-addon-stock-request 16.0.1.0.0.3__py3-none-any.whl → 17.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.
- odoo/addons/stock_request/README.rst +41 -41
- odoo/addons/stock_request/__manifest__.py +1 -1
- odoo/addons/stock_request/i18n/ca.po +13 -30
- odoo/addons/stock_request/i18n/de.po +72 -41
- odoo/addons/stock_request/i18n/el_GR.po +13 -30
- odoo/addons/stock_request/i18n/es.po +27 -40
- odoo/addons/stock_request/i18n/es_ES.po +13 -30
- odoo/addons/stock_request/i18n/eu.po +13 -30
- odoo/addons/stock_request/i18n/fi.po +13 -30
- odoo/addons/stock_request/i18n/fr.po +13 -30
- odoo/addons/stock_request/i18n/fr_CH.po +13 -30
- odoo/addons/stock_request/i18n/fr_FR.po +13 -30
- odoo/addons/stock_request/i18n/gl.po +13 -30
- odoo/addons/stock_request/i18n/hr.po +13 -30
- odoo/addons/stock_request/i18n/hr_HR.po +13 -30
- odoo/addons/stock_request/i18n/it.po +13 -30
- odoo/addons/stock_request/i18n/ja.po +13 -30
- odoo/addons/stock_request/i18n/ja_JP.po +13 -30
- odoo/addons/stock_request/i18n/nl.po +13 -30
- odoo/addons/stock_request/i18n/nl_NL.po +13 -30
- odoo/addons/stock_request/i18n/pt.po +13 -30
- odoo/addons/stock_request/i18n/pt_BR.po +13 -30
- odoo/addons/stock_request/i18n/ro.po +13 -30
- odoo/addons/stock_request/i18n/ru.po +13 -30
- odoo/addons/stock_request/i18n/sl.po +13 -30
- odoo/addons/stock_request/i18n/stock_request.pot +14 -31
- odoo/addons/stock_request/i18n/tr.po +13 -30
- odoo/addons/stock_request/i18n/tr_TR.po +13 -30
- odoo/addons/stock_request/i18n/vi_VN.po +13 -30
- odoo/addons/stock_request/i18n/zh_CN.po +71 -39
- odoo/addons/stock_request/models/stock_move.py +2 -2
- odoo/addons/stock_request/models/stock_move_line.py +4 -4
- odoo/addons/stock_request/models/stock_request.py +50 -43
- odoo/addons/stock_request/models/stock_request_abstract.py +2 -1
- odoo/addons/stock_request/models/stock_request_order.py +0 -13
- odoo/addons/stock_request/models/stock_rule.py +1 -1
- odoo/addons/stock_request/readme/CONFIGURE.md +16 -0
- odoo/addons/stock_request/readme/CONTRIBUTORS.md +13 -0
- odoo/addons/stock_request/readme/{DESCRIPTION.rst → DESCRIPTION.md} +2 -1
- odoo/addons/stock_request/readme/{ROADMAP.rst → ROADMAP.md} +3 -3
- odoo/addons/stock_request/readme/USAGE.md +16 -0
- odoo/addons/stock_request/security/stock_request_security.xml +5 -1
- odoo/addons/stock_request/static/description/index.html +17 -17
- odoo/addons/stock_request/tests/test_stock_request.py +171 -149
- odoo/addons/stock_request/views/res_config_settings_views.xml +72 -108
- odoo/addons/stock_request/views/stock_picking_views.xml +1 -1
- odoo/addons/stock_request/views/stock_request_order_views.xml +40 -36
- odoo/addons/stock_request/views/stock_request_views.xml +40 -39
- {odoo_addon_stock_request-16.0.1.0.0.3.dist-info → odoo_addon_stock_request-17.0.1.0.0.3.dist-info}/METADATA +47 -50
- odoo_addon_stock_request-17.0.1.0.0.3.dist-info/RECORD +71 -0
- {odoo_addon_stock_request-16.0.1.0.0.3.dist-info → odoo_addon_stock_request-17.0.1.0.0.3.dist-info}/WHEEL +1 -1
- odoo_addon_stock_request-17.0.1.0.0.3.dist-info/top_level.txt +1 -0
- odoo/addons/stock_request/readme/CONFIGURE.rst +0 -17
- odoo/addons/stock_request/readme/CONTRIBUTORS.rst +0 -15
- odoo/addons/stock_request/readme/USAGE.rst +0 -16
- odoo_addon_stock_request-16.0.1.0.0.3.dist-info/RECORD +0 -71
- odoo_addon_stock_request-16.0.1.0.0.3.dist-info/top_level.txt +0 -1
@@ -71,10 +71,8 @@ msgstr ""
|
|
71
71
|
|
72
72
|
#. module: stock_request
|
73
73
|
#: model_terms:ir.ui.view,arch_db:stock_request.res_config_settings_view_form
|
74
|
-
msgid ""
|
75
|
-
|
76
|
-
" activated."
|
77
|
-
msgstr ""
|
74
|
+
msgid "Add State to Stock Request and Stock Request Orders if activated."
|
75
|
+
msgstr "如果激活,则将状态添加到库存请求和库存请求订单中。"
|
78
76
|
|
79
77
|
#. module: stock_request
|
80
78
|
#: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation__allocated_product_qty
|
@@ -115,9 +113,9 @@ msgstr "附件数量"
|
|
115
113
|
#. module: stock_request
|
116
114
|
#: model_terms:ir.ui.view,arch_db:stock_request.res_config_settings_view_form
|
117
115
|
msgid ""
|
118
|
-
"By default only internal and transit locations are allowed in
|
119
|
-
"
|
120
|
-
msgstr ""
|
116
|
+
"By default only internal and transit locations are allowed in Stock Request "
|
117
|
+
"and Orders."
|
118
|
+
msgstr "默认情况下,库存请求和订单中只允许内部和运输地点。"
|
121
119
|
|
122
120
|
#. module: stock_request
|
123
121
|
#: model_terms:ir.ui.view,arch_db:stock_request.res_config_settings_view_form
|
@@ -364,8 +362,11 @@ msgstr "如果勾选此项,将会收到新消息提醒。"
|
|
364
362
|
|
365
363
|
#. module: stock_request
|
366
364
|
#: model:ir.model.fields,help:stock_request.field_stock_request__message_has_error
|
365
|
+
#: model:ir.model.fields,help:stock_request.field_stock_request__message_has_sms_error
|
367
366
|
#: model:ir.model.fields,help:stock_request.field_stock_request_abstract__message_has_error
|
367
|
+
#: model:ir.model.fields,help:stock_request.field_stock_request_abstract__message_has_sms_error
|
368
368
|
#: model:ir.model.fields,help:stock_request.field_stock_request_order__message_has_error
|
369
|
+
#: model:ir.model.fields,help:stock_request.field_stock_request_order__message_has_sms_error
|
369
370
|
msgid "If checked, some messages have a delivery error."
|
370
371
|
msgstr "如果勾选此项, 某些信息将会产生传递错误。"
|
371
372
|
|
@@ -408,13 +409,6 @@ msgstr "项"
|
|
408
409
|
msgid "Kanban"
|
409
410
|
msgstr "看板"
|
410
411
|
|
411
|
-
#. module: stock_request
|
412
|
-
#: model:ir.model.fields,field_description:stock_request.field_stock_request____last_update
|
413
|
-
#: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation____last_update
|
414
|
-
#: model:ir.model.fields,field_description:stock_request.field_stock_request_order____last_update
|
415
|
-
msgid "Last Modified on"
|
416
|
-
msgstr "最后修改时间"
|
417
|
-
|
418
412
|
#. module: stock_request
|
419
413
|
#: model:ir.model.fields,field_description:stock_request.field_stock_request__write_uid
|
420
414
|
#: model:ir.model.fields,field_description:stock_request.field_stock_request_allocation__write_uid
|
@@ -445,13 +439,6 @@ msgstr "位置"
|
|
445
439
|
msgid "Location must be equal to the order"
|
446
440
|
msgstr "位置必须等于订单"
|
447
441
|
|
448
|
-
#. module: stock_request
|
449
|
-
#: model:ir.model.fields,field_description:stock_request.field_stock_request__message_main_attachment_id
|
450
|
-
#: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract__message_main_attachment_id
|
451
|
-
#: model:ir.model.fields,field_description:stock_request.field_stock_request_order__message_main_attachment_id
|
452
|
-
msgid "Main Attachment"
|
453
|
-
msgstr "附件"
|
454
|
-
|
455
442
|
#. module: stock_request
|
456
443
|
#: model_terms:ir.ui.view,arch_db:stock_request.res_config_settings_view_form
|
457
444
|
msgid "Manufacturing"
|
@@ -773,6 +760,14 @@ msgstr "路线"
|
|
773
760
|
msgid "Routes"
|
774
761
|
msgstr "路线"
|
775
762
|
|
763
|
+
#. module: stock_request
|
764
|
+
#: model:ir.model.fields,field_description:stock_request.field_stock_request__message_has_sms_error
|
765
|
+
#: model:ir.model.fields,field_description:stock_request.field_stock_request_abstract__message_has_sms_error
|
766
|
+
#: model:ir.model.fields,field_description:stock_request.field_stock_request_order__message_has_sms_error
|
767
|
+
#, fuzzy
|
768
|
+
msgid "SMS Delivery error"
|
769
|
+
msgstr "消息递送错误"
|
770
|
+
|
776
771
|
#. module: stock_request
|
777
772
|
#: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form
|
778
773
|
#: model_terms:ir.ui.view,arch_db:stock_request.view_stock_request_form
|
@@ -908,7 +903,6 @@ msgstr "库存请求产品的数量必须严格为正数。"
|
|
908
903
|
#: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_form
|
909
904
|
#: model_terms:ir.ui.view,arch_db:stock_request.stock_request_search
|
910
905
|
#: model_terms:ir.ui.view,arch_db:stock_request.view_picking_form
|
911
|
-
#: model_terms:ir.ui.view,arch_db:stock_request.view_stock_request_form
|
912
906
|
msgid "Stock Requests"
|
913
907
|
msgstr "库存请求"
|
914
908
|
|
@@ -922,17 +916,6 @@ msgstr "库存请求分析集成"
|
|
922
916
|
msgid "Stock Requests Kanban integration"
|
923
917
|
msgstr "库存请求看板集成"
|
924
918
|
|
925
|
-
#. module: stock_request
|
926
|
-
#: model_terms:ir.ui.view,arch_db:stock_request.stock_request_order_search
|
927
|
-
#, fuzzy
|
928
|
-
msgid "Stock Requests Order Search"
|
929
|
-
msgstr "库存请求搜索"
|
930
|
-
|
931
|
-
#. module: stock_request
|
932
|
-
#: model_terms:ir.ui.view,arch_db:stock_request.stock_request_search
|
933
|
-
msgid "Stock Requests Search"
|
934
|
-
msgstr "库存请求搜索"
|
935
|
-
|
936
919
|
#. module: stock_request
|
937
920
|
#: model:ir.model.fields,field_description:stock_request.field_res_config_settings__module_stock_request_purchase
|
938
921
|
msgid "Stock Requests for Purchases"
|
@@ -1154,13 +1137,11 @@ msgid ""
|
|
1154
1137
|
"default unit of measure of the product"
|
1155
1138
|
msgstr "您必须选择与产品默认计量单位相同类别的产品计量单位"
|
1156
1139
|
|
1157
|
-
#~ msgid "
|
1158
|
-
#~ msgstr "
|
1140
|
+
#~ msgid "Last Modified on"
|
1141
|
+
#~ msgstr "最后修改时间"
|
1159
1142
|
|
1160
|
-
#~ msgid ""
|
1161
|
-
#~
|
1162
|
-
#~ "Request and Orders."
|
1163
|
-
#~ msgstr "默认情况下,库存请求和订单中只允许内部和运输地点。"
|
1143
|
+
#~ msgid "Main Attachment"
|
1144
|
+
#~ msgstr "附件"
|
1164
1145
|
|
1165
1146
|
#~ msgid "Number of messages which requires an action"
|
1166
1147
|
#~ msgstr "需要操作消息数量"
|
@@ -1168,8 +1149,59 @@ msgstr "您必须选择与产品默认计量单位相同类别的产品计量单
|
|
1168
1149
|
#~ msgid "Number of unread messages"
|
1169
1150
|
#~ msgstr "未读消息的数量"
|
1170
1151
|
|
1152
|
+
#, fuzzy
|
1153
|
+
#~ msgid "Stock Requests Order Search"
|
1154
|
+
#~ msgstr "库存请求搜索"
|
1155
|
+
|
1156
|
+
#~ msgid "Stock Requests Search"
|
1157
|
+
#~ msgstr "库存请求搜索"
|
1158
|
+
|
1171
1159
|
#~ msgid "Unread Messages"
|
1172
1160
|
#~ msgstr "未读消息"
|
1173
1161
|
|
1174
1162
|
#~ msgid "Unread Messages Counter"
|
1175
1163
|
#~ msgstr "未读消息计数器"
|
1164
|
+
|
1165
|
+
#~ msgid "Stock request"
|
1166
|
+
#~ msgstr "库存请求"
|
1167
|
+
|
1168
|
+
#, python-format
|
1169
|
+
#~ msgid "<li><b>%s</b>: Transferred quantity %s %s</li>"
|
1170
|
+
#~ msgstr "<li><b>%s</b>: 调拨数量%s %s</li>"
|
1171
|
+
|
1172
|
+
#~ msgid "Followers (Channels)"
|
1173
|
+
#~ msgstr "关注者(频道)"
|
1174
|
+
|
1175
|
+
#, python-format
|
1176
|
+
#~ msgid "Receipt confirmation %s for your Request %s"
|
1177
|
+
#~ msgstr "您的请求%s的收据确认%s"
|
1178
|
+
|
1179
|
+
#~ msgid "Requested by"
|
1180
|
+
#~ msgstr "请求者"
|
1181
|
+
|
1182
|
+
#, python-format
|
1183
|
+
#~ msgid ""
|
1184
|
+
#~ "The following requested items from Stock Request %s have now been "
|
1185
|
+
#~ "received in %s using Picking %s:"
|
1186
|
+
#~ msgstr "从库存请求%s中请求的下列项目现在已在使用领料%s的%s中收到:"
|
1187
|
+
|
1188
|
+
#, python-format
|
1189
|
+
#~ msgid ""
|
1190
|
+
#~ "Unfortunately it seems you do not have the necessary rights for creating "
|
1191
|
+
#~ "stock requests. Please contact your administrator."
|
1192
|
+
#~ msgstr "不幸的是,您似乎没有创建库存请求的必要权限。请与管理员联系。"
|
1193
|
+
|
1194
|
+
#~ msgid "Archived"
|
1195
|
+
#~ msgstr "已归档"
|
1196
|
+
|
1197
|
+
#~ msgid "If checked new messages require your attention."
|
1198
|
+
#~ msgstr ".如果勾选此项,将会收到新消息提醒。"
|
1199
|
+
|
1200
|
+
#~ msgid "Overdue"
|
1201
|
+
#~ msgstr "逾期"
|
1202
|
+
|
1203
|
+
#~ msgid "Planned"
|
1204
|
+
#~ msgstr "计划"
|
1205
|
+
|
1206
|
+
#~ msgid "Today"
|
1207
|
+
#~ msgstr "今天"
|
@@ -26,7 +26,7 @@ class StockMove(models.Model):
|
|
26
26
|
rec.stock_request_ids = rec.allocation_ids.mapped("stock_request_id")
|
27
27
|
|
28
28
|
def _merge_moves_fields(self):
|
29
|
-
res = super(
|
29
|
+
res = super()._merge_moves_fields()
|
30
30
|
res["allocation_ids"] = [(4, m.id) for m in self.mapped("allocation_ids")]
|
31
31
|
return res
|
32
32
|
|
@@ -65,7 +65,7 @@ class StockMove(models.Model):
|
|
65
65
|
},
|
66
66
|
)
|
67
67
|
)
|
68
|
-
return super(
|
68
|
+
return super().copy_data(default)
|
69
69
|
|
70
70
|
def _action_cancel(self):
|
71
71
|
"""Apply sudo to prevent requests ACL errors if the user does not have
|
@@ -36,17 +36,17 @@ class StockMoveLine(models.Model):
|
|
36
36
|
return {
|
37
37
|
"request_name": request.name,
|
38
38
|
"picking_name": ml.picking_id.name,
|
39
|
-
"product_name": ml.product_id.
|
39
|
+
"product_name": ml.product_id.display_name,
|
40
40
|
"product_qty": allocated_qty,
|
41
41
|
"product_uom": ml.product_uom_id.name,
|
42
|
-
"location_name": ml.location_dest_id.
|
42
|
+
"location_name": ml.location_dest_id.display_name,
|
43
43
|
}
|
44
44
|
|
45
45
|
def _action_done(self):
|
46
|
-
res = super(
|
46
|
+
res = super()._action_done()
|
47
47
|
for ml in self.filtered(lambda m: m.exists() and m.move_id.allocation_ids):
|
48
48
|
qty_done = ml.product_uom_id._compute_quantity(
|
49
|
-
ml.
|
49
|
+
ml.quantity, ml.product_id.uom_id
|
50
50
|
)
|
51
51
|
|
52
52
|
# We do sudo because potentially the user that completes the move
|
@@ -19,7 +19,7 @@ class StockRequest(models.Model):
|
|
19
19
|
def _get_expected_date():
|
20
20
|
return fields.Datetime.now()
|
21
21
|
|
22
|
-
name = fields.Char(
|
22
|
+
name = fields.Char()
|
23
23
|
state = fields.Selection(
|
24
24
|
selection=[
|
25
25
|
("draft", "Draft"),
|
@@ -43,8 +43,6 @@ class StockRequest(models.Model):
|
|
43
43
|
expected_date = fields.Datetime(
|
44
44
|
index=True,
|
45
45
|
required=True,
|
46
|
-
readonly=True,
|
47
|
-
states={"draft": [("readonly", False)]},
|
48
46
|
help="Date when you expect to receive the goods.",
|
49
47
|
)
|
50
48
|
picking_policy = fields.Selection(
|
@@ -54,8 +52,6 @@ class StockRequest(models.Model):
|
|
54
52
|
],
|
55
53
|
string="Shipping Policy",
|
56
54
|
required=True,
|
57
|
-
readonly=True,
|
58
|
-
states={"draft": [("readonly", False)]},
|
59
55
|
default="direct",
|
60
56
|
)
|
61
57
|
move_ids = fields.One2many(
|
@@ -102,24 +98,14 @@ class StockRequest(models.Model):
|
|
102
98
|
string="Stock Request Allocation",
|
103
99
|
)
|
104
100
|
order_id = fields.Many2one("stock.request.order", readonly=True)
|
105
|
-
warehouse_id = fields.Many2one(
|
106
|
-
|
107
|
-
)
|
108
|
-
|
109
|
-
|
110
|
-
)
|
111
|
-
|
112
|
-
|
113
|
-
states={"draft": [("readonly", False)]}, readonly=True
|
114
|
-
)
|
115
|
-
product_uom_qty = fields.Float(
|
116
|
-
states={"draft": [("readonly", False)]}, readonly=True
|
117
|
-
)
|
118
|
-
procurement_group_id = fields.Many2one(
|
119
|
-
states={"draft": [("readonly", False)]}, readonly=True
|
120
|
-
)
|
121
|
-
company_id = fields.Many2one(states={"draft": [("readonly", False)]}, readonly=True)
|
122
|
-
route_id = fields.Many2one(states={"draft": [("readonly", False)]}, readonly=True)
|
101
|
+
warehouse_id = fields.Many2one()
|
102
|
+
location_id = fields.Many2one()
|
103
|
+
product_id = fields.Many2one()
|
104
|
+
product_uom_id = fields.Many2one()
|
105
|
+
product_uom_qty = fields.Float()
|
106
|
+
procurement_group_id = fields.Many2one()
|
107
|
+
company_id = fields.Many2one()
|
108
|
+
route_id = fields.Many2one()
|
123
109
|
|
124
110
|
_sql_constraints = [
|
125
111
|
("name_uniq", "unique(name, company_id)", "Stock Request name must be unique")
|
@@ -148,7 +134,7 @@ class StockRequest(models.Model):
|
|
148
134
|
"allocation_ids",
|
149
135
|
"allocation_ids.stock_move_id.state",
|
150
136
|
"allocation_ids.stock_move_id.move_line_ids",
|
151
|
-
"allocation_ids.stock_move_id.move_line_ids.
|
137
|
+
"allocation_ids.stock_move_id.move_line_ids.quantity",
|
152
138
|
)
|
153
139
|
def _compute_qty(self):
|
154
140
|
for request in self:
|
@@ -180,47 +166,67 @@ class StockRequest(models.Model):
|
|
180
166
|
|
181
167
|
@api.constrains("order_id", "requested_by")
|
182
168
|
def check_order_requested_by(self):
|
183
|
-
for
|
184
|
-
if
|
169
|
+
for stock_request in self:
|
170
|
+
if (
|
171
|
+
stock_request.order_id
|
172
|
+
and stock_request.order_id.requested_by != stock_request.requested_by
|
173
|
+
):
|
185
174
|
raise ValidationError(_("Requested by must be equal to the order"))
|
186
175
|
|
187
176
|
@api.constrains("order_id", "warehouse_id")
|
188
177
|
def check_order_warehouse_id(self):
|
189
|
-
for
|
190
|
-
if
|
178
|
+
for stock_request in self:
|
179
|
+
if (
|
180
|
+
stock_request.order_id
|
181
|
+
and stock_request.order_id.warehouse_id != stock_request.warehouse_id
|
182
|
+
):
|
191
183
|
raise ValidationError(_("Warehouse must be equal to the order"))
|
192
184
|
|
193
185
|
@api.constrains("order_id", "location_id")
|
194
186
|
def check_order_location(self):
|
195
|
-
for
|
196
|
-
if
|
187
|
+
for stock_request in self:
|
188
|
+
if (
|
189
|
+
stock_request.order_id
|
190
|
+
and stock_request.order_id.location_id != stock_request.location_id
|
191
|
+
):
|
197
192
|
raise ValidationError(_("Location must be equal to the order"))
|
198
193
|
|
199
194
|
@api.constrains("order_id", "procurement_group_id")
|
200
195
|
def check_order_procurement_group(self):
|
201
|
-
for
|
196
|
+
for stock_request in self:
|
202
197
|
if (
|
203
|
-
|
204
|
-
and
|
198
|
+
stock_request.order_id
|
199
|
+
and stock_request.order_id.procurement_group_id
|
200
|
+
!= stock_request.procurement_group_id
|
205
201
|
):
|
206
202
|
raise ValidationError(_("Procurement group must be equal to the order"))
|
207
203
|
|
208
204
|
@api.constrains("order_id", "company_id")
|
209
205
|
def check_order_company(self):
|
210
|
-
for
|
211
|
-
if
|
206
|
+
for stock_request in self:
|
207
|
+
if (
|
208
|
+
stock_request.order_id
|
209
|
+
and stock_request.order_id.company_id != stock_request.company_id
|
210
|
+
):
|
212
211
|
raise ValidationError(_("Company must be equal to the order"))
|
213
212
|
|
214
213
|
@api.constrains("order_id", "expected_date")
|
215
214
|
def check_order_expected_date(self):
|
216
|
-
for
|
217
|
-
if
|
215
|
+
for stock_request in self:
|
216
|
+
if (
|
217
|
+
stock_request.order_id
|
218
|
+
and stock_request.order_id.expected_date != stock_request.expected_date
|
219
|
+
):
|
218
220
|
raise ValidationError(_("Expected date must be equal to the order"))
|
219
221
|
|
220
222
|
@api.constrains("order_id", "picking_policy")
|
221
223
|
def check_order_picking_policy(self):
|
222
|
-
for
|
223
|
-
if
|
224
|
+
for stock_request in self:
|
225
|
+
if (
|
226
|
+
stock_request.order_id
|
227
|
+
and stock_request.order_id.picking_policy
|
228
|
+
!= stock_request.picking_policy
|
229
|
+
):
|
224
230
|
raise ValidationError(
|
225
231
|
_("The picking policy must be equal to the order")
|
226
232
|
)
|
@@ -338,7 +344,8 @@ class StockRequest(models.Model):
|
|
338
344
|
pending_qty -= qty_move
|
339
345
|
# Create allocation + done move
|
340
346
|
allocation_model.create(self._prepare_stock_request_allocation(move))
|
341
|
-
move.
|
347
|
+
move.quantity = move.product_uom_qty
|
348
|
+
move.picked = True
|
342
349
|
move._action_done()
|
343
350
|
|
344
351
|
def _action_launch_procurement_rule(self):
|
@@ -422,8 +429,8 @@ class StockRequest(models.Model):
|
|
422
429
|
if upd_vals.get("name", "/") == "/":
|
423
430
|
upd_vals["name"] = self.env["ir.sequence"].next_by_code("stock.request")
|
424
431
|
if "order_id" in upd_vals:
|
425
|
-
|
426
|
-
upd_vals["expected_date"] =
|
432
|
+
order_id = self.env["stock.request.order"].browse(upd_vals["order_id"])
|
433
|
+
upd_vals["expected_date"] = order_id.expected_date
|
427
434
|
else:
|
428
435
|
upd_vals["expected_date"] = self._get_expected_date()
|
429
436
|
vals_list_upd.append(upd_vals)
|
@@ -432,4 +439,4 @@ class StockRequest(models.Model):
|
|
432
439
|
def unlink(self):
|
433
440
|
if self.filtered(lambda r: r.state != "draft"):
|
434
441
|
raise UserError(_("Only requests on draft state can be unlinked"))
|
435
|
-
return super(
|
442
|
+
return super().unlink()
|
@@ -12,7 +12,7 @@ class StockRequest(models.AbstractModel):
|
|
12
12
|
|
13
13
|
@api.model
|
14
14
|
def default_get(self, fields):
|
15
|
-
res = super(
|
15
|
+
res = super().default_get(fields)
|
16
16
|
warehouse = None
|
17
17
|
if "warehouse_id" not in res and res.get("company_id"):
|
18
18
|
warehouse = self.env["stock.warehouse"].search(
|
@@ -131,6 +131,7 @@ class StockRequest(models.AbstractModel):
|
|
131
131
|
if record.warehouse_id and routes_by_warehouse.get(record.warehouse_id.id):
|
132
132
|
routes |= routes_by_warehouse[record.warehouse_id.id]
|
133
133
|
parents = record.get_parents().ids
|
134
|
+
# ruff: noqa: B023
|
134
135
|
record.route_ids = routes.filtered(
|
135
136
|
lambda r: any(p.location_dest_id.id in parents for p in r.rule_ids)
|
136
137
|
)
|
@@ -39,7 +39,6 @@ class StockRequestOrder(models.Model):
|
|
39
39
|
copy=False,
|
40
40
|
required=True,
|
41
41
|
readonly=True,
|
42
|
-
states={"draft": [("readonly", False)]},
|
43
42
|
default="/",
|
44
43
|
)
|
45
44
|
state = fields.Selection(
|
@@ -63,20 +62,16 @@ class StockRequestOrder(models.Model):
|
|
63
62
|
comodel_name="stock.warehouse",
|
64
63
|
string="Warehouse",
|
65
64
|
check_company=True,
|
66
|
-
readonly=True,
|
67
65
|
ondelete="cascade",
|
68
66
|
required=True,
|
69
|
-
states={"draft": [("readonly", False)]},
|
70
67
|
)
|
71
68
|
location_id = fields.Many2one(
|
72
69
|
comodel_name="stock.location",
|
73
70
|
string="Location",
|
74
71
|
domain="not allow_virtual_location and "
|
75
72
|
"[('usage', 'in', ['internal', 'transit'])] or []",
|
76
|
-
readonly=True,
|
77
73
|
ondelete="cascade",
|
78
74
|
required=True,
|
79
|
-
states={"draft": [("readonly", False)]},
|
80
75
|
)
|
81
76
|
allow_virtual_location = fields.Boolean(
|
82
77
|
related="company_id.stock_request_allow_virtual_loc", readonly=True
|
@@ -84,8 +79,6 @@ class StockRequestOrder(models.Model):
|
|
84
79
|
procurement_group_id = fields.Many2one(
|
85
80
|
"procurement.group",
|
86
81
|
"Procurement Group",
|
87
|
-
readonly=True,
|
88
|
-
states={"draft": [("readonly", False)]},
|
89
82
|
help="Moves created through this stock request will be put in this "
|
90
83
|
"procurement group. If none is given, the moves generated by "
|
91
84
|
"procurement rules will be grouped into one big picking.",
|
@@ -94,16 +87,12 @@ class StockRequestOrder(models.Model):
|
|
94
87
|
"res.company",
|
95
88
|
"Company",
|
96
89
|
required=True,
|
97
|
-
readonly=True,
|
98
|
-
states={"draft": [("readonly", False)]},
|
99
90
|
default=lambda self: self.env.company,
|
100
91
|
)
|
101
92
|
expected_date = fields.Datetime(
|
102
93
|
default=fields.Datetime.now,
|
103
94
|
index=True,
|
104
95
|
required=True,
|
105
|
-
readonly=True,
|
106
|
-
states={"draft": [("readonly", False)]},
|
107
96
|
help="Date when you expect to receive the goods.",
|
108
97
|
)
|
109
98
|
picking_policy = fields.Selection(
|
@@ -113,8 +102,6 @@ class StockRequestOrder(models.Model):
|
|
113
102
|
],
|
114
103
|
string="Shipping Policy",
|
115
104
|
required=True,
|
116
|
-
readonly=True,
|
117
|
-
states={"draft": [("readonly", False)]},
|
118
105
|
default="direct",
|
119
106
|
)
|
120
107
|
move_ids = fields.One2many(
|
@@ -0,0 +1,16 @@
|
|
1
|
+
To configure this module:
|
2
|
+
|
3
|
+
- Go to Stock Requests \> Settings
|
4
|
+
|
5
|
+
Users should be assigned to the groups 'Stock Request / User' or 'Stock
|
6
|
+
Request / Manager'.
|
7
|
+
|
8
|
+
\## Group Stock Request / User
|
9
|
+
|
10
|
+
- Can see her/his own Stock Requests, and others that she/he's been
|
11
|
+
granted permission to follow.
|
12
|
+
- Can create/update only her/his Stock Requests.
|
13
|
+
|
14
|
+
\## Group Stock Request / Manager
|
15
|
+
|
16
|
+
- Can fully manage all Stock Requests
|
@@ -0,0 +1,13 @@
|
|
1
|
+
- Jordi Ballester (EFICENT) \<<jordi.ballester@forgeflow.com>\>.
|
2
|
+
- Enric Tobella \<<etobella@creublanca.es>\>
|
3
|
+
- Atte Isopuro \<<atte.isopuro@avoin.systems>\>
|
4
|
+
- Lois Rilo \<<lois.rilo@forgeflow.com>\>
|
5
|
+
- Raul Martin \<<raul.martin@braintec-group.com>\>
|
6
|
+
- Serpent Consulting Services Pvt. Ltd. \<<support@serpentcs.com>\>
|
7
|
+
- [Open Source Integrators](https://www.opensourceintegrators.com)
|
8
|
+
- Maxime Chambreuil \<<mchambreuil@opensourceintegrators.com>\>
|
9
|
+
- Steve Campbell \<<scampbell@opensourceintegrators.com>\>
|
10
|
+
- Héctor Villarreal \<<hector.villarreal@forgeflow.com>\>
|
11
|
+
- Kitti U. \<<kittiu@ecosoft.co.th>\>
|
12
|
+
- Bernat Puig \<<bernat.puig@forgeflow.com>\>
|
13
|
+
- Oriol Miranda \<<oriol.miranda@forgeflow.com>\>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
There is no way to achieve Storck Request and Stock Request Orders.
|
2
|
-
|
3
|
-
|
1
|
+
There is no way to achieve Storck Request and Stock Request Orders. It
|
2
|
+
should be developed taking into account that only Cancel and Done stock
|
3
|
+
request can be archived.
|
4
4
|
|
5
5
|
It is also required to manage active field logically from Orders to SRs.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
\## Creation
|
2
|
+
|
3
|
+
- Go to 'Stock Requests / Stock Requests' and create a new Request.
|
4
|
+
- Indicate a product, quantity and location.
|
5
|
+
- Press 'Confirm'.
|
6
|
+
|
7
|
+
Upon confirmation the request will be evaluated using the procurement
|
8
|
+
rules for the selected location.
|
9
|
+
|
10
|
+
In case that transfers are created, the user will be able to access to
|
11
|
+
them from the button 'Transfers' available in the Stock Request.
|
12
|
+
|
13
|
+
\## Cancel
|
14
|
+
|
15
|
+
When the user cancels a Stock Request, the related pending stock moves
|
16
|
+
will be also cancelled.
|
@@ -29,7 +29,11 @@
|
|
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
|
32
|
+
<field
|
33
|
+
name="model_id"
|
34
|
+
search="[('model','=','stock.request')]"
|
35
|
+
model="ir.model"
|
36
|
+
/>
|
33
37
|
<field name="global" eval="True" />
|
34
38
|
<field
|
35
39
|
name="domain_force"
|
@@ -1,4 +1,3 @@
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
2
1
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
2
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
3
|
<head>
|
@@ -367,11 +366,12 @@ ul.auto-toc {
|
|
367
366
|
!! This file is generated by oca-gen-addon-readme !!
|
368
367
|
!! changes will be overwritten. !!
|
369
368
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
370
|
-
!! source digest: sha256:
|
369
|
+
!! source digest: sha256:a6ad00aa5c7750ab61a1779781df12ad36dd4d825a469e9171796efb048ede46
|
371
370
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
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/
|
371
|
+
<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/17.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-17-0/stock-logistics-request-17-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&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
373
372
|
<p>This module was written to allow users to request products that are
|
374
|
-
frequently stocked by the company, to be transferred to their chosen
|
373
|
+
frequently stocked by the company, to be transferred to their chosen
|
374
|
+
location.</p>
|
375
375
|
<p><strong>Table of contents</strong></p>
|
376
376
|
<div class="contents local topic" id="contents">
|
377
377
|
<ul class="simple">
|
@@ -397,8 +397,8 @@ frequently stocked by the company, to be transferred to their chosen location.</
|
|
397
397
|
Request / Manager’.</p>
|
398
398
|
<p>## Group Stock Request / User</p>
|
399
399
|
<ul class="simple">
|
400
|
-
<li>Can see her/his own Stock Requests, and others that she/he’s been
|
401
|
-
permission to follow.</li>
|
400
|
+
<li>Can see her/his own Stock Requests, and others that she/he’s been
|
401
|
+
granted permission to follow.</li>
|
402
402
|
<li>Can create/update only her/his Stock Requests.</li>
|
403
403
|
</ul>
|
404
404
|
<p>## Group Stock Request / Manager</p>
|
@@ -414,19 +414,19 @@ permission to follow.</li>
|
|
414
414
|
<li>Indicate a product, quantity and location.</li>
|
415
415
|
<li>Press ‘Confirm’.</li>
|
416
416
|
</ul>
|
417
|
-
<p>Upon confirmation the request will be evaluated using the procurement
|
418
|
-
for the selected location.</p>
|
419
|
-
<p>In case that transfers are created, the user will be able to access to
|
420
|
-
from the button ‘Transfers’ available in the Stock Request.</p>
|
417
|
+
<p>Upon confirmation the request will be evaluated using the procurement
|
418
|
+
rules for the selected location.</p>
|
419
|
+
<p>In case that transfers are created, the user will be able to access to
|
420
|
+
them from the button ‘Transfers’ available in the Stock Request.</p>
|
421
421
|
<p>## Cancel</p>
|
422
|
-
<p>When the user cancels a Stock Request, the related pending stock moves
|
423
|
-
also cancelled.</p>
|
422
|
+
<p>When the user cancels a Stock Request, the related pending stock moves
|
423
|
+
will be also cancelled.</p>
|
424
424
|
</div>
|
425
425
|
<div class="section" id="known-issues-roadmap">
|
426
426
|
<h1><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h1>
|
427
|
-
<p>There is no way to achieve Storck Request and Stock Request Orders.
|
428
|
-
|
429
|
-
|
427
|
+
<p>There is no way to achieve Storck Request and Stock Request Orders. It
|
428
|
+
should be developed taking into account that only Cancel and Done stock
|
429
|
+
request can be archived.</p>
|
430
430
|
<p>It is also required to manage active field logically from Orders to SRs.</p>
|
431
431
|
</div>
|
432
432
|
<div class="section" id="bug-tracker">
|
@@ -434,7 +434,7 @@ stock request can be archived.</p>
|
|
434
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-request/issues/new?body=module:%20stock_request%0Aversion:%
|
437
|
+
<a class="reference external" href="https://github.com/OCA/stock-logistics-request/issues/new?body=module:%20stock_request%0Aversion:%2017.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-request/tree/
|
475
|
+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-request/tree/17.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>
|