Skip to content

Commit 649ef67

Browse files
victoralmaupeluko00
authored andcommitted
[IMP] stock_request + stock_request_submit: Show error in stock.request.order in the "Confirm" or "Submit" buttons if there are no items.
TT39761 [UPD] Update stock_request_submit.pot stock_request_submit 14.0.1.0.1 Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: stock-logistics-warehouse-14.0/stock-logistics-warehouse-14.0-stock_request_submit Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_request_submit/
1 parent 4664be3 commit 649ef67

File tree

5 files changed

+64
-10
lines changed

5 files changed

+64
-10
lines changed

stock_request_submit/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"name": "Stock Request Submit",
77
"summary": "Add submit state on Stock Requests",
8-
"version": "14.0.1.0.0",
8+
"version": "14.0.1.0.1",
99
"license": "LGPL-3",
1010
"website": "https://github.com/OCA/stock-logistics-warehouse",
1111
"author": "Open Source Integrators, Odoo Community Association (OCA)",

stock_request_submit/i18n/es.po

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,34 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Odoo Server 12.0\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"PO-Revision-Date: 2020-01-17 05:13+0000\n"
9+
"POT-Creation-Date: 2022-10-21 09:12+0000\n"
10+
"PO-Revision-Date: 2022-10-21 11:13+0200\n"
1011
"Last-Translator: Nelson Ramírez Sánchez <[email protected]>\n"
1112
"Language-Team: none\n"
1213
"Language: es\n"
1314
"MIME-Version: 1.0\n"
1415
"Content-Type: text/plain; charset=UTF-8\n"
15-
"Content-Transfer-Encoding: \n"
16+
"Content-Transfer-Encoding: 8bit\n"
1617
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17-
"X-Generator: Weblate 3.10\n"
18+
"X-Generator: Poedit 3.0.1\n"
19+
20+
#. module: stock_request_submit
21+
#: model:ir.model.fields,field_description:stock_request_submit.field_stock_request__display_name
22+
#: model:ir.model.fields,field_description:stock_request_submit.field_stock_request_order__display_name
23+
msgid "Display Name"
24+
msgstr "Nombre mostrado"
25+
26+
#. module: stock_request_submit
27+
#: model:ir.model.fields,field_description:stock_request_submit.field_stock_request__id
28+
#: model:ir.model.fields,field_description:stock_request_submit.field_stock_request_order__id
29+
msgid "ID"
30+
msgstr "ID"
31+
32+
#. module: stock_request_submit
33+
#: model:ir.model.fields,field_description:stock_request_submit.field_stock_request____last_update
34+
#: model:ir.model.fields,field_description:stock_request_submit.field_stock_request_order____last_update
35+
msgid "Last Modified on"
36+
msgstr "Última Modificación el"
1837

1938
#. module: stock_request_submit
2039
#: model:ir.model.fields,field_description:stock_request_submit.field_stock_request__route_id
@@ -37,8 +56,8 @@ msgstr "Pedido de solicitud de stock"
3756
msgid "Submit"
3857
msgstr "Enviar"
3958

40-
#~ msgid "Draft"
41-
#~ msgstr "Borrador"
42-
43-
#~ msgid "Submitted"
44-
#~ msgstr "Enviada"
59+
#. module: stock_request_submit
60+
#: code:addons/stock_request_submit/models/stock_request_order.py:0
61+
#, python-format
62+
msgid "There should be at least one request item for submiting the order."
63+
msgstr "Debe haber al menos un elemento de solicitud para enviar el pedido."

stock_request_submit/i18n/stock_request_submit.pot

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,9 @@ msgstr ""
5151
#: model_terms:ir.ui.view,arch_db:stock_request_submit.view_stock_request_form
5252
msgid "Submit"
5353
msgstr ""
54+
55+
#. module: stock_request_submit
56+
#: code:addons/stock_request_submit/models/stock_request_order.py:0
57+
#, python-format
58+
msgid "There should be at least one request item for submiting the order."
59+
msgstr ""

stock_request_submit/i18n/zh_CN.po

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,24 @@ msgstr ""
1616
"Plural-Forms: nplurals=1; plural=0;\n"
1717
"X-Generator: Weblate 3.8\n"
1818

19+
#. module: stock_request_submit
20+
#: model:ir.model.fields,field_description:stock_request_submit.field_stock_request__display_name
21+
#: model:ir.model.fields,field_description:stock_request_submit.field_stock_request_order__display_name
22+
msgid "Display Name"
23+
msgstr ""
24+
25+
#. module: stock_request_submit
26+
#: model:ir.model.fields,field_description:stock_request_submit.field_stock_request__id
27+
#: model:ir.model.fields,field_description:stock_request_submit.field_stock_request_order__id
28+
msgid "ID"
29+
msgstr ""
30+
31+
#. module: stock_request_submit
32+
#: model:ir.model.fields,field_description:stock_request_submit.field_stock_request____last_update
33+
#: model:ir.model.fields,field_description:stock_request_submit.field_stock_request_order____last_update
34+
msgid "Last Modified on"
35+
msgstr ""
36+
1937
#. module: stock_request_submit
2038
#: model:ir.model.fields,field_description:stock_request_submit.field_stock_request__route_id
2139
msgid "Route"
@@ -37,6 +55,12 @@ msgstr "库存请求单"
3755
msgid "Submit"
3856
msgstr "提交"
3957

58+
#. module: stock_request_submit
59+
#: code:addons/stock_request_submit/models/stock_request_order.py:0
60+
#, python-format
61+
msgid "There should be at least one request item for submiting the order."
62+
msgstr ""
63+
4064
#~ msgid "Draft"
4165
#~ msgstr "草稿"
4266

stock_request_submit/models/stock_request_order.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22
# Copyright 2019-2020 ForgeFlow S.L. (https://www.forgeflow.com)
33
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
44

5-
from odoo import models
5+
from odoo import _, models
6+
from odoo.exceptions import UserError
67

78

89
class StockRequestOrder(models.Model):
910
_inherit = "stock.request.order"
1011

1112
def action_submit(self):
13+
if not self.stock_request_ids:
14+
raise UserError(
15+
_("There should be at least one request item for submiting the order.")
16+
)
1217
for line in self.stock_request_ids:
1318
line.action_submit()
1419
self.state = "submitted"

0 commit comments

Comments
 (0)