Skip to content

Commit 39f5e99

Browse files
committed
[17.0][MIG] fieldservice_stock: Migration to 17.0
1 parent 251629d commit 39f5e99

19 files changed

+76
-84
lines changed

fieldservice_stock/README.rst

+28-28
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ Field Service - Stock
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github
20-
:target: https://github.com/OCA/field-service/tree/16.0/fieldservice_stock
20+
:target: https://github.com/OCA/field-service/tree/17.0/fieldservice_stock
2121
:alt: OCA/field-service
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/field-service-16-0/field-service-16-0-fieldservice_stock
23+
:target: https://translation.odoo-community.org/projects/field-service-17-0/field-service-17-0-fieldservice_stock
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/field-service&target_branch=16.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/field-service&target_branch=17.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
3030

31-
This module is an add-on for the Field Service application in Odoo.
32-
It provides a generic framework to allow you to link inventory and
33-
stock operations with your field service operations.
31+
This module is an add-on for the Field Service application in Odoo. It
32+
provides a generic framework to allow you to link inventory and stock
33+
operations with your field service operations.
3434

3535
**Table of contents**
3636

@@ -40,7 +40,8 @@ stock operations with your field service operations.
4040
Installation
4141
============
4242

43-
To install Field Service and have the mapping features, you need to install GeoEngine.
43+
To install Field Service and have the mapping features, you need to
44+
install GeoEngine.
4445

4546
Please refer to the installation instructions available at:
4647
https://github.com/OCA/geospatial/tree/13.0/base_geoengine
@@ -50,65 +51,64 @@ Configuration
5051

5152
To configure this module, you need to:
5253

53-
* Go to Field Service > Master Data > Locations
54-
* Create or select a location and set the inventory location
54+
- Go to Field Service > Master Data > Locations
55+
- Create or select a location and set the inventory location
5556

5657
If you are in a multi-warehouse situation:
5758

58-
* Go to Field Service > Configuration > Territories
59-
* Create or select a territory
60-
* Set the warehouse that will serve this territory
59+
- Go to Field Service > Configuration > Territories
60+
- Create or select a territory
61+
- Set the warehouse that will serve this territory
6162

6263
Usage
6364
=====
6465

65-
This module primarily establishes a connection between stock and
66-
field service operations so therefore has no specific usage
67-
instructions.
66+
This module primarily establishes a connection between stock and field
67+
service operations so therefore has no specific usage instructions.
6868

6969
Known issues / Roadmap
7070
======================
7171

7272
The roadmap of the Field Service application is documented on
73-
`Github <https://github.com/OCA/field-service/issues/1>`_.
73+
`Github <https://github.com/OCA/field-service/issues/1>`__.
7474

7575
Bug Tracker
7676
===========
7777

7878
Bugs are tracked on `GitHub Issues <https://github.com/OCA/field-service/issues>`_.
7979
In case of trouble, please check there if your issue has already been reported.
8080
If you spotted it first, help us to smash it by providing a detailed and welcomed
81-
`feedback <https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_stock%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
81+
`feedback <https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_stock%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
8282

8383
Do not contact contributors directly about support or help with technical issues.
8484

8585
Credits
8686
=======
8787

8888
Authors
89-
~~~~~~~
89+
-------
9090

9191
* Open Source Integrators
9292
* Brian McMaster
9393

9494
Contributors
95-
~~~~~~~~~~~~
95+
------------
9696

97-
* Brian McMaster <brian@mcmpest.com>
98-
* Sandip Mangukiya <smangukiya@opensourceintegrators.com>
99-
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
100-
* Marcel Savegnago <marcel.savegnago@escodoo.com.br>
101-
* Freni Patel <fpatel@opensourceintegrators.com>
97+
- Brian McMaster <brian@mcmpest.com>
98+
- Sandip Mangukiya <smangukiya@opensourceintegrators.com>
99+
- Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
100+
- Marcel Savegnago <marcel.savegnago@escodoo.com.br>
101+
- Freni Patel <fpatel@opensourceintegrators.com>
102102

103103
Other credits
104-
~~~~~~~~~~~~~
104+
-------------
105105

106106
The development of this module has been financially supported by:
107107

108-
* Open Source Integrators <https://opensourceintegrators.com>
108+
- Open Source Integrators <https://opensourceintegrators.com>
109109

110110
Maintainers
111-
~~~~~~~~~~~
111+
-----------
112112

113113
This module is maintained by the OCA.
114114

@@ -137,6 +137,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
137137

138138
|maintainer-brian10048| |maintainer-wolfhall| |maintainer-max3903| |maintainer-smangukiya|
139139

140-
This module is part of the `OCA/field-service <https://github.com/OCA/field-service/tree/16.0/fieldservice_stock>`_ project on GitHub.
140+
This module is part of the `OCA/field-service <https://github.com/OCA/field-service/tree/17.0/fieldservice_stock>`_ project on GitHub.
141141

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

fieldservice_stock/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"name": "Field Service - Stock",
66
"summary": "Integrate the logistics operations with Field Service",
7-
"version": "16.0.1.2.1",
7+
"version": "17.0.1.0.0",
88
"category": "Field Service",
99
"author": "Open Source Integrators, "
1010
"Brian McMaster, "

fieldservice_stock/hooks.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
# Copyright (C) 2022 - OCA
22
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
33

4-
from odoo import SUPERUSER_ID, api
54

6-
7-
def _pre_init_hook(cr):
5+
def _pre_init_hook(env):
86
"""Assign default inventory location to an existing fsm.location"""
97

10-
env = api.Environment(cr, SUPERUSER_ID, {})
118
default_location_id = env.ref("stock.stock_location_customers").id
129

13-
cr.execute(
10+
env.cr.execute(
1411
"""
1512
ALTER TABLE
1613
fsm_location
@@ -19,6 +16,6 @@ def _pre_init_hook(cr):
1916
"""
2017
)
2118

22-
cr.execute(
19+
env.cr.execute(
2320
"""UPDATE fsm_location SET inventory_location_id=%s;""", (default_location_id,)
2421
)

fieldservice_stock/pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
To configure this module, you need to:
2+
3+
- Go to Field Service \> Master Data \> Locations
4+
- Create or select a location and set the inventory location
5+
6+
If you are in a multi-warehouse situation:
7+
8+
- Go to Field Service \> Configuration \> Territories
9+
- Create or select a territory
10+
- Set the warehouse that will serve this territory

fieldservice_stock/readme/CONFIGURE.rst

-10
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- Brian McMaster \<<brian@mcmpest.com>\>
2+
- Sandip Mangukiya \<<smangukiya@opensourceintegrators.com>\>
3+
- Serpent Consulting Services Pvt. Ltd. \<<support@serpentcs.com>\>
4+
- Marcel Savegnago \<<marcel.savegnago@escodoo.com.br>\>
5+
- Freni Patel \<<fpatel@opensourceintegrators.com>\>

fieldservice_stock/readme/CONTRIBUTORS.rst

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
The development of this module has been financially supported by:
22

3-
* Open Source Integrators <https://opensourceintegrators.com>
3+
- Open Source Integrators \<<https://opensourceintegrators.com>\>
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This module is an add-on for the Field Service application in Odoo. It
2+
provides a generic framework to allow you to link inventory and stock
3+
operations with your field service operations.

fieldservice_stock/readme/DESCRIPTION.rst

-3
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
To install Field Service and have the mapping features, you need to install GeoEngine.
1+
To install Field Service and have the mapping features, you need to
2+
install GeoEngine.
23

34
Please refer to the installation instructions available at:
4-
https://github.com/OCA/geospatial/tree/13.0/base_geoengine
5+
<https://github.com/OCA/geospatial/tree/13.0/base_geoengine>
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
The roadmap of the Field Service application is documented on
2-
`Github <https://github.com/OCA/field-service/issues/1>`_.
2+
[Github](https://github.com/OCA/field-service/issues/1).

fieldservice_stock/readme/USAGE.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This module primarily establishes a connection between stock and field
2+
service operations so therefore has no specific usage instructions.

fieldservice_stock/readme/USAGE.rst

-3
This file was deleted.

fieldservice_stock/static/description/index.html

+10-10
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,10 @@ <h1 class="title">Field Service - Stock</h1>
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370370
!! source digest: sha256:f75f72c1f954b476baec0d3661a5fcf450a0d2ee8f789d06e6d718fafc80b5f4
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/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/field-service/tree/16.0/fieldservice_stock"><img alt="OCA/field-service" src="https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/field-service-16-0/field-service-16-0-fieldservice_stock"><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/field-service&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-
<p>This module is an add-on for the Field Service application in Odoo.
374-
It provides a generic framework to allow you to link inventory and
375-
stock operations with your field service operations.</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/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/field-service/tree/17.0/fieldservice_stock"><img alt="OCA/field-service" src="https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/field-service-17-0/field-service-17-0-fieldservice_stock"><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/field-service&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373+
<p>This module is an add-on for the Field Service application in Odoo. It
374+
provides a generic framework to allow you to link inventory and stock
375+
operations with your field service operations.</p>
376376
<p><strong>Table of contents</strong></p>
377377
<div class="contents local topic" id="contents">
378378
<ul class="simple">
@@ -392,7 +392,8 @@ <h1 class="title">Field Service - Stock</h1>
392392
</div>
393393
<div class="section" id="installation">
394394
<h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
395-
<p>To install Field Service and have the mapping features, you need to install GeoEngine.</p>
395+
<p>To install Field Service and have the mapping features, you need to
396+
install GeoEngine.</p>
396397
<p>Please refer to the installation instructions available at:
397398
<a class="reference external" href="https://github.com/OCA/geospatial/tree/13.0/base_geoengine">https://github.com/OCA/geospatial/tree/13.0/base_geoengine</a></p>
398399
</div>
@@ -412,9 +413,8 @@ <h1><a class="toc-backref" href="#toc-entry-2">Configuration</a></h1>
412413
</div>
413414
<div class="section" id="usage">
414415
<h1><a class="toc-backref" href="#toc-entry-3">Usage</a></h1>
415-
<p>This module primarily establishes a connection between stock and
416-
field service operations so therefore has no specific usage
417-
instructions.</p>
416+
<p>This module primarily establishes a connection between stock and field
417+
service operations so therefore has no specific usage instructions.</p>
418418
</div>
419419
<div class="section" id="known-issues-roadmap">
420420
<h1><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h1>
@@ -426,7 +426,7 @@ <h1><a class="toc-backref" href="#toc-entry-5">Bug Tracker</a></h1>
426426
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/field-service/issues">GitHub Issues</a>.
427427
In case of trouble, please check there if your issue has already been reported.
428428
If you spotted it first, help us to smash it by providing a detailed and welcomed
429-
<a class="reference external" href="https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_stock%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
429+
<a class="reference external" href="https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_stock%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
430430
<p>Do not contact contributors directly about support or help with technical issues.</p>
431431
</div>
432432
<div class="section" id="credits">
@@ -464,7 +464,7 @@ <h2><a class="toc-backref" href="#toc-entry-10">Maintainers</a></h2>
464464
promote its widespread use.</p>
465465
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
466466
<p><a class="reference external image-reference" href="https://github.com/brian10048"><img alt="brian10048" src="https://github.com/brian10048.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/wolfhall"><img alt="wolfhall" src="https://github.com/wolfhall.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/max3903"><img alt="max3903" src="https://github.com/max3903.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/smangukiya"><img alt="smangukiya" src="https://github.com/smangukiya.png?size=40px" /></a></p>
467-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/field-service/tree/16.0/fieldservice_stock">OCA/field-service</a> project on GitHub.</p>
467+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/field-service/tree/17.0/fieldservice_stock">OCA/field-service</a> project on GitHub.</p>
468468
<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>
469469
</div>
470470
</div>

fieldservice_stock/tests/test_fsm_stock.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class TestFSMStockCommon(TransactionCase):
1212
def setUp(self):
13-
super(TestFSMStockCommon, self).setUp()
13+
super().setUp()
1414
self.location = self.env["fsm.location"]
1515
self.FSMOrder = self.env["fsm.order"]
1616
self.Product = self.env["product.product"].search([], limit=1)

fieldservice_stock/tests/test_fsm_wizard.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class FSMWizard(TransactionCase):
1010
"""
1111

1212
def setUp(self):
13-
super(FSMWizard, self).setUp()
13+
super().setUp()
1414
self.Wizard = self.env["fsm.wizard"]
1515
self.test_partner = self.env.ref("fieldservice.test_partner")
1616

fieldservice_stock/views/fsm_order.xml

+4-12
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
name="action_view_delivery"
1212
class="oe_stat_button"
1313
icon="fa-truck"
14-
attrs="{'invisible': [('delivery_count', '=', 0)]}"
14+
invisible="delivery_count == 0"
1515
groups="base.group_user"
1616
>
1717
<field
@@ -25,7 +25,7 @@
2525
name="action_view_returns"
2626
class="oe_stat_button"
2727
icon="fa-truck"
28-
attrs="{'invisible': [('return_count', '=', 0)]}"
28+
invisible="return_count == 0"
2929
groups="base.group_user"
3030
>
3131
<field name="return_count" widget="statinfo" string="Returns" />
@@ -42,11 +42,7 @@
4242
</group>
4343
<group id="stock-right" />
4444
</group>
45-
<field
46-
name="move_ids"
47-
readonly="1"
48-
attrs="{'invisible': [('move_ids', '=', False)]}"
49-
>
45+
<field name="move_ids" readonly="1" invisible="move_ids == False">
5046
<tree
5147
decoration-muted="state == 'cancel'"
5248
default_order='date, picking_id, sequence'
@@ -58,11 +54,7 @@
5854
<field name="origin" />
5955
<field name="product_id" />
6056
<field name="product_uom_qty" string="Requested Quantity" />
61-
<field
62-
name="reserved_availability"
63-
string="Allocated Quantity"
64-
/>
65-
<field name="quantity_done" string="Done Quantity" />
57+
<field name="quantity" string="Quantity" />
6658
<field
6759
name="product_uom"
6860
options="{'no_open': True, 'no_create': True}"

0 commit comments

Comments
 (0)