Skip to content

Commit 3c05ca0

Browse files
tafaRUbrian10048
authored andcommitted
[IMP] Invoice customer not related to any location
1 parent bb6ec03 commit 3c05ca0

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

fieldservice_account_analytic/models/fsm_order.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (C) 2018 - TODAY, Open Source Integrators
22
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
33

4-
from odoo import api, fields, models
4+
from odoo import fields, models
55

66

77
class FSMOrder(models.Model):
@@ -26,12 +26,6 @@ def _compute_total_cost(self):
2626
for order in self:
2727
order.total_cost = 0.0
2828

29-
@api.onchange("customer_id")
30-
def _onchange_customer_id_location(self):
31-
self.location_id = (
32-
self.customer_id.service_location_id if self.customer_id else False
33-
)
34-
3529
def write(self, vals):
3630
res = super().write(vals)
3731
for order in self:

fieldservice_account_analytic/tests/test_fsm_account_wizard.py

-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ def test_fsm_orders_1(self):
182182
"name": "Test01",
183183
}
184184
)
185-
order._onchange_customer_id_location()
186185
self.test_location2._onchange_fsm_parent_id_account()
187186
self.env["res.partner"].with_context(location_id=self.test_location2.id).search(
188187
[]

0 commit comments

Comments
 (0)