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

[Fix][16.0] Fix model_create_multi in generic_mixin_uuid #6

Open
YuriyGural opened this issue Oct 3, 2023 · 0 comments
Open

[Fix][16.0] Fix model_create_multi in generic_mixin_uuid #6

YuriyGural opened this issue Oct 3, 2023 · 0 comments

Comments

@YuriyGural
Copy link

In addon generic_mixin need to change file generic_mixin_uuid.py:

Replace def create(self, vals)... on

@api.model_create_multi
def create(self, vals_list):
    for vals in vals_list:
        vals_uuid = vals.get(self._generic_mixin_uuid_field_name, '/')
        if not vals_uuid or vals_uuid == '/':
            # If uuid is not provided in vals, or is equeal to '/', then we
            # have to generate new uuid
            vals[self._generic_mixin_uuid_field_name] = (
                self._generic_mixin_uuid__generate_new())
    return super(GenericMixinUUID, self).create(vals_list)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant