Skip to content

Commit 67fc2f3

Browse files
committed
[MIG] fieldservice_sale: Migration to 13.0
1 parent 2186dc5 commit 67fc2f3

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed

fieldservice_sale/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
33
{
44
"name": "Field Service - Sales",
5-
"version": "12.0.2.5.1",
5+
"version": "13.0.1.0.0",
66
"summary": "Sell field services.",
77
"category": "Field Service",
88
"author": "Open Source Integrators, Odoo Community Association (OCA)",

fieldservice_sale/models/sale_order.py

-6
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class SaleOrder(models.Model):
2222
string="FSM Orders", compute="_compute_fsm_order_ids"
2323
)
2424

25-
@api.multi
2625
@api.depends("order_line")
2726
def _compute_fsm_order_ids(self):
2827
for order in self:
@@ -79,7 +78,6 @@ def _field_create_fsm_order_prepare_values(self):
7978
"company_id": self.company_id.id,
8079
}
8180

82-
@api.multi
8381
def _field_create_fsm_order(self):
8482
""" Generate fsm_order for the given Sale Order, and link it.
8583
:return a mapping with the sale order id and its linked fsm_order
@@ -113,7 +111,6 @@ def _field_create_fsm_order(self):
113111
result[so.id] = fsm_order
114112
return result
115113

116-
@api.multi
117114
def _field_find_fsm_order(self):
118115
""" Find the fsm_order generated by the Sale Order. If no fsm_order
119116
linked, it will be created automatically.
@@ -138,7 +135,6 @@ def _field_find_fsm_order(self):
138135
result[so.id] = fsm_order
139136
return result
140137

141-
@api.multi
142138
def _action_confirm(self):
143139
""" On SO confirmation, some lines generate field service orders. """
144140
result = super(SaleOrder, self)._action_confirm()
@@ -150,7 +146,6 @@ def _action_confirm(self):
150146
self.order_line._field_service_generation()
151147
return result
152148

153-
@api.multi
154149
def action_invoice_create(self, grouped=False, final=False):
155150
invoice_ids = super().action_invoice_create(grouped, final)
156151
result = invoice_ids or []
@@ -205,7 +200,6 @@ def action_invoice_create(self, grouped=False, final=False):
205200
result.append(new.id)
206201
return result
207202

208-
@api.multi
209203
def action_view_fsm_order(self):
210204
fsm_orders = self.mapped("fsm_order_ids")
211205
action = self.env.ref("fieldservice.action_fsm_dash_order").read()[0]

fieldservice_sale/models/sale_order_line.py

-6
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,13 @@ def _compute_product_updatable(self):
2525
else:
2626
super(SaleOrderLine, line)._compute_product_updatable()
2727

28-
@api.multi
2928
@api.depends("product_id")
3029
def _compute_qty_delivered_method(self):
3130
super(SaleOrderLine, self)._compute_qty_delivered_method()
3231
for line in self:
3332
if not line.is_expense and line.product_id.field_service_tracking == "line":
3433
line.qty_delivered_method = "field_service"
3534

36-
@api.multi
3735
@api.depends("fsm_order_id.stage_id")
3836
def _compute_qty_delivered(self):
3937
super(SaleOrderLine, self)._compute_qty_delivered()
@@ -73,7 +71,6 @@ def _field_create_fsm_order_prepare_values(self):
7371
"company_id": self.company_id.id,
7472
}
7573

76-
@api.multi
7774
def _field_create_fsm_order(self):
7875
""" Generate fsm_order for the given so line, and link it.
7976
:return a mapping with the so line id and its linked fsm_order
@@ -108,7 +105,6 @@ def _field_create_fsm_order(self):
108105
result[so_line.id] = fsm_order
109106
return result
110107

111-
@api.multi
112108
def _field_find_fsm_order(self):
113109
""" Find the fsm_order generated by the so lines. If no fsm_order
114110
linked, it will be created automatically.
@@ -132,7 +128,6 @@ def _field_find_fsm_order(self):
132128
res[so_line.id] = fsm_order
133129
return res
134130

135-
@api.multi
136131
def _field_service_generation(self):
137132
""" For service lines, create the field service order. If it already
138133
exists, it simply links the existing one to the line.
@@ -145,7 +140,6 @@ def _field_service_generation(self):
145140
if rec.product_id.field_service_tracking == "line":
146141
rec._field_find_fsm_order()
147142

148-
@api.multi
149143
def _prepare_invoice_line(self, qty):
150144
res = super()._prepare_invoice_line(qty)
151145
res.update({"fsm_order_id": self.fsm_order_id.id})

0 commit comments

Comments
 (0)