Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The model ...fieldservice_vehicle.... is not overriding the create method in batch.... v16 #1191

Open
legacyplumbing opened this issue May 31, 2024 · 1 comment
Labels

Comments

@legacyplumbing
Copy link

OCA/OCB odoo v16

upon install of Field-Service v16

2024-05-31 00:24:16,090 159591 WARNING blounts.5.14.24 odoo.api.create: The model odoo.addons.fieldservice_vehicle.models.fsm_order is not overriding the create method in batch

Thank ya'll

@legacyplumbing
Copy link
Author

I fixed this in my local repo... like so
/field-service/fieldservice_vehicle/models/fsm_order.py

Original section for @api.model

@api.model  
def create(self, vals):
    res = super(FSMOrder, self).create(vals)
    if not vals.get("vehicle_id") and vals.get("person_id"):
        self._onchange_person_id()
    return res

CHANGED TO:

@api.model_create_multi
def create(self, vals_list):
    for vals in vals_list:
        res = super(FSMOrder, self).create(vals)
    if not vals.get("vehicle_id") and vals.get("person_id"):
        self._onchange_person_id()
    return res

No more warning in odoo-server.log... hope I did that correctly.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant