Skip to content

Commit

Permalink
Merge pull request #1 from are-agilebg/14.0-fix-fieldservice_accont_a…
Browse files Browse the repository at this point in the history
…nalytic

Add missing @api.model decorator to FSMOrder.create() override
  • Loading branch information
michelerusti committed Dec 13, 2023
2 parents 89ec76d + 365001e commit d97b09d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fieldservice_sale/models/fsm_order.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2019 Brian McMaster
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, fields, models
from odoo import _, api, fields, models


class FSMOrder(models.Model):
Expand All @@ -27,6 +27,7 @@ def write(self, vals):
vals.update({"customer_id": order.sale_id.partner_id.id})
return super(FSMOrder, self).write(vals)

@api.model
def create(self, vals):
sale_id = self.env["sale.order"].browse(vals.get("sale_id"))
if sale_id:
Expand Down

0 comments on commit d97b09d

Please sign in to comment.