From 9f92167b6576b9e1599ac5053284e6b20689fc4e Mon Sep 17 00:00:00 2001
From: ps-tubtim
Date: Fri, 16 Oct 2020 18:15:54 +0700
Subject: [PATCH] [MIG] stock_request_submit: Migration to 13.0
[UPD] Update stock_request_submit.pot
---
stock_request_submit/README.rst | 12 +++----
stock_request_submit/__manifest__.py | 4 +--
.../i18n/stock_request_submit.pot | 7 ++--
stock_request_submit/models/stock_request.py | 8 ++---
.../models/stock_request_order.py | 5 ++-
stock_request_submit/readme/CONTRIBUTORS.rst | 1 +
.../static/description/index.html | 7 ++--
.../tests/test_stock_request_submit.py | 6 ++--
stock_request_submit/uninstall_hook.py | 2 +-
.../views/stock_request_order_views.xml | 32 ++++++++++++-------
.../views/stock_request_views.xml | 20 +++++++-----
11 files changed, 57 insertions(+), 47 deletions(-)
diff --git a/stock_request_submit/README.rst b/stock_request_submit/README.rst
index b3cf2d189..7bd546bf4 100644
--- a/stock_request_submit/README.rst
+++ b/stock_request_submit/README.rst
@@ -14,13 +14,13 @@ Stock Request Submit
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github
- :target: https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_request_submit
+ :target: https://github.com/OCA/stock-logistics-warehouse/tree/13.0/stock_request_submit
:alt: OCA/stock-logistics-warehouse
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-12-0/stock-logistics-warehouse-12-0-stock_request_submit
+ :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_request_submit
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/153/12.0
+ :target: https://runbot.odoo-community.org/runbot/153/13.0
:alt: Try me on Runbot
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -41,7 +41,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues `_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -62,7 +62,7 @@ Contributors
* Steve Campbell
* Héctor Villarreal Ortega
-
+* Pimolnat Suntian
Maintainers
~~~~~~~~~~~
@@ -77,6 +77,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
-This module is part of the `OCA/stock-logistics-warehouse `_ project on GitHub.
+This module is part of the `OCA/stock-logistics-warehouse `_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/stock_request_submit/__manifest__.py b/stock_request_submit/__manifest__.py
index 2b9a105bf..a6fa614fc 100644
--- a/stock_request_submit/__manifest__.py
+++ b/stock_request_submit/__manifest__.py
@@ -1,5 +1,5 @@
# Copyright 2019 Open Source Integrators
-# Copyright 2019 Eficent Business and IT Consulting Services, S.L.
+# Copyright 2019-2020 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
@@ -8,7 +8,7 @@
"version": "13.0.1.0.0",
"license": "LGPL-3",
"website": "https://github.com/stock-logistics-warehouse",
- "author": "Open Source Integrators, " "Odoo Community Association (OCA)",
+ "author": "Open Source Integrators, Odoo Community Association (OCA)",
"category": "Warehouse Management",
"depends": ["stock_request"],
"data": ["views/stock_request_order_views.xml", "views/stock_request_views.xml"],
diff --git a/stock_request_submit/i18n/stock_request_submit.pot b/stock_request_submit/i18n/stock_request_submit.pot
index f58a26f5d..bd2c350d0 100644
--- a/stock_request_submit/i18n/stock_request_submit.pot
+++ b/stock_request_submit/i18n/stock_request_submit.pot
@@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * stock_request_submit
+# * stock_request_submit
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 12.0\n"
+"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
-"Last-Translator: <>\n"
+"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -33,4 +33,3 @@ msgstr ""
#: model_terms:ir.ui.view,arch_db:stock_request_submit.view_stock_request_form
msgid "Submit"
msgstr ""
-
diff --git a/stock_request_submit/models/stock_request.py b/stock_request_submit/models/stock_request.py
index 94c759f08..ff07d9f04 100644
--- a/stock_request_submit/models/stock_request.py
+++ b/stock_request_submit/models/stock_request.py
@@ -1,7 +1,7 @@
# Copyright 2019 Open Source Integrators
-# Copyright 2019 Eficent Business and IT Consulting Services, S.L.
+# Copyright 2019-2020 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
-from odoo import api, fields, models
+from odoo import fields, models
class StockRequest(models.Model):
@@ -19,17 +19,15 @@ class StockRequest(models.Model):
states={"draft": [("readonly", False)], "submitted": [("readonly", False)]}
)
- @api.multi
def action_submit(self):
self._action_submit()
- @api.multi
def _action_submit(self):
self.state = "submitted"
def _skip_procurement(self):
return (
- super(StockRequest, self)._skip_procurement()
+ super()._skip_procurement()
and self.state != "submitted"
or self.product_id.type not in ("consu", "product")
)
diff --git a/stock_request_submit/models/stock_request_order.py b/stock_request_submit/models/stock_request_order.py
index 7746c6139..b59b70abc 100644
--- a/stock_request_submit/models/stock_request_order.py
+++ b/stock_request_submit/models/stock_request_order.py
@@ -1,13 +1,12 @@
# Copyright 2019 Open Source Integrators
-# Copyright 2019 Eficent Business and IT Consulting Services, S.L.
+# Copyright 2019-2020 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
-from odoo import api, models
+from odoo import models
class StockRequestOrder(models.Model):
_inherit = "stock.request.order"
- @api.multi
def action_submit(self):
for line in self.stock_request_ids:
line.action_submit()
diff --git a/stock_request_submit/readme/CONTRIBUTORS.rst b/stock_request_submit/readme/CONTRIBUTORS.rst
index 59f3c2e37..63e314425 100644
--- a/stock_request_submit/readme/CONTRIBUTORS.rst
+++ b/stock_request_submit/readme/CONTRIBUTORS.rst
@@ -4,3 +4,4 @@
* Steve Campbell
* Héctor Villarreal Ortega
+* Pimolnat Suntian
diff --git a/stock_request_submit/static/description/index.html b/stock_request_submit/static/description/index.html
index d8b5d5044..7105dfd52 100644
--- a/stock_request_submit/static/description/index.html
+++ b/stock_request_submit/static/description/index.html
@@ -367,7 +367,7 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module adds a new state ‘Submitted’ to Stock Request.
The porpose of this state is to allow Supervisors to validate the submitted
request enabling them to correct Routes if required.
@@ -388,7 +388,7 @@ request enabling them to correct Routes if required.
Bugs are tracked on GitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
-feedback.
@@ -417,7 +418,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.