Skip to content

Commit c074401

Browse files
committed
[MIG] stock_request_submit: Migration to 18.0
1 parent 2469e3b commit c074401

File tree

6 files changed

+28
-28
lines changed

6 files changed

+28
-28
lines changed

stock_request_submit/README.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Stock Request Submit
1717
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
1818
:alt: License: LGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--request-lightgray.png?logo=github
20-
:target: https://github.com/OCA/stock-logistics-request/tree/17.0/stock_request_submit
20+
:target: https://github.com/OCA/stock-logistics-request/tree/18.0/stock_request_submit
2121
:alt: OCA/stock-logistics-request
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/stock-logistics-request-17-0/stock-logistics-request-17-0-stock_request_submit
23+
:target: https://translation.odoo-community.org/projects/stock-logistics-request-18-0/stock-logistics-request-18-0-stock_request_submit
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-request&target_branch=17.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-request&target_branch=18.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -44,7 +44,7 @@ Bug Tracker
4444
Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-request/issues>`_.
4545
In case of trouble, please check there if your issue has already been reported.
4646
If you spotted it first, help us to smash it by providing a detailed and welcomed
47-
`feedback <https://github.com/OCA/stock-logistics-request/issues/new?body=module:%20stock_request_submit%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
47+
`feedback <https://github.com/OCA/stock-logistics-request/issues/new?body=module:%20stock_request_submit%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
4848

4949
Do not contact contributors directly about support or help with technical issues.
5050

@@ -59,17 +59,17 @@ Authors
5959
Contributors
6060
------------
6161

62-
- `Open Source Integrators <https://www.opensourceintegrators.com>`__
62+
- `Open Source Integrators <https://www.opensourceintegrators.com>`__
6363

64-
- Maxime Chambreuil <[email protected]>
65-
- Steve Campbell <[email protected]>
66-
- Urvisha Desai <[email protected]>
64+
- Maxime Chambreuil <[email protected]>
65+
- Steve Campbell <[email protected]>
66+
- Urvisha Desai <[email protected]>
6767

68-
- Héctor Villarreal Ortega <[email protected]>
69-
- Pimolnat Suntian <[email protected]>
70-
- `APSL-Nagarro <https://www.apsl.tech>`__:
68+
- Héctor Villarreal Ortega <[email protected]>
69+
- Pimolnat Suntian <[email protected]>
70+
- `APSL-Nagarro <https://www.apsl.tech>`__:
7171

72-
- Antoni Marroig <[email protected]>
72+
- Antoni Marroig <[email protected]>
7373

7474
Maintainers
7575
-----------
@@ -84,6 +84,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
8484
mission is to support the collaborative development of Odoo features and
8585
promote its widespread use.
8686

87-
This module is part of the `OCA/stock-logistics-request <https://github.com/OCA/stock-logistics-request/tree/17.0/stock_request_submit>`_ project on GitHub.
87+
This module is part of the `OCA/stock-logistics-request <https://github.com/OCA/stock-logistics-request/tree/18.0/stock_request_submit>`_ project on GitHub.
8888

8989
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

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": "17.0.1.0.0",
8+
"version": "18.0.1.0.0",
99
"license": "LGPL-3",
1010
"website": "https://github.com/OCA/stock-logistics-request",
1111
"author": "Open Source Integrators, Odoo Community Association (OCA)",

stock_request_submit/models/stock_request_order.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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
66
from odoo.exceptions import UserError
77

88

@@ -12,7 +12,9 @@ class StockRequestOrder(models.Model):
1212
def action_submit(self):
1313
if not self.stock_request_ids:
1414
raise UserError(
15-
_("There should be at least one request item for submiting the order.")
15+
self.env._(
16+
"There should be at least one request item for submiting the order."
17+
)
1618
)
1719
self.stock_request_ids.action_submit()
1820
self.state = "submitted"

stock_request_submit/static/description/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ <h1 class="title">Stock Request Submit</h1>
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370370
!! source digest: sha256:ca41960fde6daff7e994d454e8c91c2433338fc031a9da6beb73ba66f0a8c04b
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
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/17.0/stock_request_submit"><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_submit"><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=17.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/18.0/stock_request_submit"><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-18-0/stock-logistics-request-18-0-stock_request_submit"><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=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373373
<p>This module adds a new state ‘Submitted’ to Stock Request.</p>
374374
<p>The porpose of this state is to allow Supervisors to validate the
375375
submitted request enabling them to correct Routes if required.</p>
@@ -390,7 +390,7 @@ <h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
390390
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/stock-logistics-request/issues">GitHub Issues</a>.
391391
In case of trouble, please check there if your issue has already been reported.
392392
If you spotted it first, help us to smash it by providing a detailed and welcomed
393-
<a class="reference external" href="https://github.com/OCA/stock-logistics-request/issues/new?body=module:%20stock_request_submit%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
393+
<a class="reference external" href="https://github.com/OCA/stock-logistics-request/issues/new?body=module:%20stock_request_submit%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
394394
<p>Do not contact contributors directly about support or help with technical issues.</p>
395395
</div>
396396
<div class="section" id="credits">
@@ -427,7 +427,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
427427
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
428428
mission is to support the collaborative development of Odoo features and
429429
promote its widespread use.</p>
430-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-request/tree/17.0/stock_request_submit">OCA/stock-logistics-request</a> project on GitHub.</p>
430+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/stock-logistics-request/tree/18.0/stock_request_submit">OCA/stock-logistics-request</a> project on GitHub.</p>
431431
<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>
432432
</div>
433433
</div>

stock_request_submit/tests/test_stock_request_submit.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright 2017-2020 ForgeFlow S.L. (https://www.forgeflow.com)
22
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0).
33

4-
from odoo import fields
4+
from odoo import Command, fields
55
from odoo.tests import common, new_test_user
66

77
from ..hooks import uninstall_hook
@@ -51,19 +51,17 @@ def setUpClass(cls):
5151
default_code="SH",
5252
uom_id=cls.env.ref("uom.product_uom_unit").id,
5353
company_id=False,
54-
detailed_type="product",
54+
type="consu",
5555
)
5656
)
57-
cls.product.route_ids = [(6, 0, cls.route.ids)]
57+
cls.product.route_ids = [Command.set(cls.route.ids)]
5858
vals = {
5959
"company_id": cls.main_company.id,
6060
"warehouse_id": cls.warehouse.id,
6161
"location_id": cls.warehouse.lot_stock_id.id,
6262
"expected_date": fields.Datetime.now(),
6363
"stock_request_ids": [
64-
(
65-
0,
66-
0,
64+
Command.create(
6765
{
6866
"product_id": cls.product.id,
6967
"product_uom_id": cls.product.uom_id.id,
@@ -81,13 +79,13 @@ def setUpClass(cls):
8179
cls.env,
8280
login="stock_request_user2",
8381
groups="stock_request.group_stock_request_user",
84-
company_ids=[(6, 0, [cls.main_company.id, cls.company_2.id])],
82+
company_ids=[Command.set([cls.main_company.id, cls.company_2.id])],
8583
)
8684
cls.stock_request_manager = new_test_user(
8785
cls.env,
8886
login="stock_request_manager",
8987
groups="stock_request.group_stock_request_manager",
90-
company_ids=[(6, 0, [cls.main_company.id, cls.company_2.id])],
88+
company_ids=[Command.set([cls.main_company.id, cls.company_2.id])],
9189
)
9290
cls.order = cls.request_order.with_user(cls.stock_request_user).create(vals)
9391
cls.stock_request = cls.order.stock_request_ids

stock_request_submit/views/stock_request_order_views.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Copyright 2019-2020 ForgeFlow S.L. (https://www.forgeflow.com)
33
License LGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
44
<odoo>
5-
<record model="ir.ui.view" id="stock_request_order_form">
5+
<record id="stock_request_order_form" model="ir.ui.view">
66
<field name="name">stock.request.order.form</field>
77
<field name="model">stock.request.order</field>
88
<field name="inherit_id" ref="stock_request.stock_request_order_form" />

0 commit comments

Comments
 (0)