Skip to content

Commit

Permalink
[MIG] fieldservice_repair: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ilo committed Sep 11, 2024
1 parent bd71a93 commit 99c1fa2
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions fieldservice_repair/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Contributors
- Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
- Marcel Savegnago - Escodoo <marcel.savegnago@escodoo.com.br>
- Freni Patel <fpatel@opensourceintegrators.com>
- Italo LOPES <italo.lopes@camptocamp.com>

Other credits
-------------
Expand Down
2 changes: 1 addition & 1 deletion fieldservice_repair/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/field-service",
"depends": [
"fieldservice_equipment_stock",
"repair",
"fieldservice_equipment_stock",
],
"data": ["data/fsm_order_type.xml", "views/fsm_order_view.xml"],
"license": "AGPL-3",
Expand Down
3 changes: 1 addition & 2 deletions fieldservice_repair/models/fsm_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class FSMOrder(models.Model):
def create(self, vals):
# if FSM order with type repair is created then
# create a repair order
order = super(FSMOrder, self).create(vals)
order = super().create(vals)
if order.type.internal_type == "repair":
if order.equipment_id and order.equipment_id.current_stock_location_id:
equipment = order.equipment_id
Expand All @@ -28,7 +28,6 @@ def create(self, vals):
or False,
"lot_id": equipment.lot_id.id or "",
"product_qty": 1,
"invoice_method": "none",
"internal_notes": order.description,
"partner_id": order.location_id.partner_id
and order.location_id.partner_id.id
Expand Down
1 change: 1 addition & 0 deletions fieldservice_repair/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
- Serpent Consulting Services Pvt. Ltd. \<<support@serpentcs.com>\>
- Marcel Savegnago - Escodoo \<<marcel.savegnago@escodoo.com.br>\>
- Freni Patel \<<fpatel@opensourceintegrators.com>\>
- Italo LOPES \<<italo.lopes@camptocamp.com>\>
1 change: 1 addition & 0 deletions fieldservice_repair/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ <h2><a class="toc-backref" href="#toc-entry-8">Contributors</a></h2>
<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>Marcel Savegnago - Escodoo &lt;<a class="reference external" href="mailto:marcel.savegnago&#64;escodoo.com.br">marcel.savegnago&#64;escodoo.com.br</a>&gt;</li>
<li>Freni Patel &lt;<a class="reference external" href="mailto:fpatel&#64;opensourceintegrators.com">fpatel&#64;opensourceintegrators.com</a>&gt;</li>
<li>Italo LOPES &lt;<a class="reference external" href="mailto:italo.lopes&#64;camptocamp.com">italo.lopes&#64;camptocamp.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="other-credits">
Expand Down
4 changes: 2 additions & 2 deletions fieldservice_repair/tests/test_fsm_repair.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class TestFSMRepairCommon(TransactionCase):
def setUp(self):
super(TestFSMRepairCommon, self).setUp()
super().setUp()
self.test_location = self.env.ref("fieldservice.test_location")
self.stock_location = self.env.ref("stock.stock_location_customers")
self.FSMOrder = self.env["fsm.order"]
Expand All @@ -20,7 +20,7 @@ def setUp(self):
self.product1 = self.env["product.product"].create(
{"name": "Product A", "type": "product"}
)
self.lot1 = self.env["stock.production.lot"].create(
self.lot1 = self.env["stock.lot"].create(
{
"name": "sn11",
"product_id": self.product1.id,
Expand Down
2 changes: 1 addition & 1 deletion fieldservice_repair/views/fsm_order_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<field
name="repair_id"
readonly="1"
attrs="{'invisible': [('internal_type', '!=', 'repair')]}"
invisible="internal_type != 'repair'"
/>

</field>
Expand Down

0 comments on commit 99c1fa2

Please sign in to comment.