Skip to content

Commit

Permalink
[MIG] fieldservice_stock_request: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
peluko00 committed Apr 12, 2024
1 parent ea37d54 commit ca7c651
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 83 deletions.
14 changes: 8 additions & 6 deletions fieldservice_stock_request/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Field Service - Stock Request
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:47fd02fe1cfdabea79c6efc01cbda86297c6f85bf661b0f967f0bd7cc907a971
!! source digest: sha256:814fcea97c78db0a0d9f0de05677ba2b6a1a64c55a1404934702e65f3835b431
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand All @@ -17,13 +17,13 @@ Field Service - Stock Request
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github
:target: https://github.com/OCA/field-service/tree/14.0/fieldservice_stock_request
:target: https://github.com/OCA/field-service/tree/16.0/fieldservice_stock_request
:alt: OCA/field-service
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/field-service-14-0/field-service-14-0-fieldservice_stock_request
:target: https://translation.odoo-community.org/projects/field-service-16-0/field-service-16-0-fieldservice_stock_request
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/field-service&target_branch=14.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/field-service&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -81,7 +81,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/field-service/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_stock_request%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_stock_request%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Expand All @@ -100,6 +100,8 @@ Contributors
* Brian McMaster <brian@mcmpest.com>
* Sandip Mangukiya <smangukiya@opensourceintegrators.com>
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
* [APSL](https://apsl.tech):
* Antoni Marroig <amarroig@apsl.net>

Other credits
~~~~~~~~~~~~~
Expand Down Expand Up @@ -138,6 +140,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-brian10048| |maintainer-wolfhall| |maintainer-max3903| |maintainer-smangukiya|

This module is part of the `OCA/field-service <https://github.com/OCA/field-service/tree/14.0/fieldservice_stock_request>`_ project on GitHub.
This module is part of the `OCA/field-service <https://github.com/OCA/field-service/tree/16.0/fieldservice_stock_request>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion fieldservice_stock_request/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Field Service - Stock Request",
"summary": "Integrate Stock Requests with Field Service Orders",
"version": "14.0.1.0.0",
"version": "16.0.1.0.0",
"category": "Field Service",
"author": "Open Source Integrators, "
"Brian McMaster, "
Expand Down
3 changes: 2 additions & 1 deletion fieldservice_stock_request/models/stock_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _update_stock_request_order_data(self):

@api.onchange("direction", "fsm_order_id")
def _onchange_location_id(self):
super()._onchange_location_id()
res = super()._onchange_location_id()
if self.fsm_order_id:
if self.direction == "outbound":
# Inventory location of the FSM location of the order
Expand All @@ -45,6 +45,7 @@ def _onchange_location_id(self):
else:
self.location_id = self.fsm_order_id.warehouse_id.lot_stock_id.id
self._update_stock_request_order_data()
return res

def prepare_stock_request_order_values(self):
res = {
Expand Down
6 changes: 4 additions & 2 deletions fieldservice_stock_request/models/stock_request_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class StockRequestOrder(models.Model):

@api.onchange("warehouse_id", "direction", "fsm_order_id")
def _onchange_location_id(self):
super()._onchange_location_id()
res = super()._onchange_location_id()
if self.fsm_order_id:
if self.direction == "outbound":
# Inventory location of the FSM location of the order
Expand All @@ -24,12 +24,14 @@ def _onchange_location_id(self):
# Otherwise the stock location of the warehouse
self.location_id = self.fsm_order_id.warehouse_id.lot_stock_id.id

Check warning on line 25 in fieldservice_stock_request/models/stock_request_order.py

View check run for this annotation

Codecov / codecov/patch

fieldservice_stock_request/models/stock_request_order.py#L25

Added line #L25 was not covered by tests
self.change_childs()
return res

def change_childs(self):
super().change_childs()
res = super().change_childs()
if not self._context.get("no_change_childs", False):
for line in self.stock_request_ids:
line.fsm_order_id = self.fsm_order_id.id
return res

def _prepare_procurement_group_values(self):
if self.fsm_order_id:
Expand Down
2 changes: 2 additions & 0 deletions fieldservice_stock_request/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* Brian McMaster <brian@mcmpest.com>
* Sandip Mangukiya <smangukiya@opensourceintegrators.com>
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
* [APSL](https://apsl.tech):
* Antoni Marroig <amarroig@apsl.net>
10 changes: 6 additions & 4 deletions fieldservice_stock_request/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ <h1 class="title">Field Service - Stock Request</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:47fd02fe1cfdabea79c6efc01cbda86297c6f85bf661b0f967f0bd7cc907a971
!! source digest: sha256:814fcea97c78db0a0d9f0de05677ba2b6a1a64c55a1404934702e65f3835b431
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/14.0/fieldservice_stock_request"><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-14-0/field-service-14-0-fieldservice_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/field-service&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<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_request"><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_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/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>
<p>This module is an add-on for the Field Service application in Odoo.
It provides stock requests in field service orders.</p>
<p><strong>Table of contents</strong></p>
Expand Down Expand Up @@ -431,7 +431,7 @@ <h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/field-service/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_stock_request%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_stock_request%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -449,6 +449,8 @@ <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<li>Brian McMaster &lt;<a class="reference external" href="mailto:brian&#64;mcmpest.com">brian&#64;mcmpest.com</a>&gt;</li>
<li>Sandip Mangukiya &lt;<a class="reference external" href="mailto:smangukiya&#64;opensourceintegrators.com">smangukiya&#64;opensourceintegrators.com</a>&gt;</li>
<li>Serpent Consulting Services Pvt. Ltd. &lt;<a class="reference external" href="mailto:support&#64;serpentcs.com">support&#64;serpentcs.com</a>&gt;</li>
<li>[APSL](<a class="reference external" href="https://apsl.tech">https://apsl.tech</a>):
* Antoni Marroig &lt;<a class="reference external" href="mailto:amarroig&#64;apsl.net">amarroig&#64;apsl.net</a>&gt;</li>
</ul>
</div>
<div class="section" id="other-credits">
Expand All @@ -467,7 +469,7 @@ <h2><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h2>
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<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>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/field-service/tree/14.0/fieldservice_stock_request">OCA/field-service</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/field-service/tree/16.0/fieldservice_stock_request">OCA/field-service</a> project on GitHub.</p>
<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>
</div>
</div>
Expand Down
Loading

0 comments on commit ca7c651

Please sign in to comment.