Skip to content

Commit

Permalink
Add missing @api.model decorator to FSMOrder.create() override
Browse files Browse the repository at this point in the history
  • Loading branch information
are-agilebg committed May 30, 2023
1 parent 89ec76d commit 365001e
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 365001e

Please sign in to comment.