Skip to content

Commit

Permalink
[FIX] Issue in dev mode - adding field options to registry
Browse files Browse the repository at this point in the history
  • Loading branch information
bud-e committed Oct 21, 2024
1 parent cf4ae92 commit 0e4db6b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions web_m2x_options/static/src/components/form.esm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/** @odoo-module **/
import { registry } from "@web/core/registry";
import {
Many2ManyTagsField,
Many2ManyTagsFieldColorEditable,
Expand Down Expand Up @@ -378,3 +379,18 @@ patch(FormController.prototype, {
}
},
});

// O.W.L. v18+: schema is validated in dev mode on adding to registry
patch(registry.category("fields").validationSchema, {
m2oOptionsPropsCreate: { type: Function, optional: true },
m2oOptionsPropsCreateEdit: { type: Function, optional: true },
m2oOptionsPropsLimit: { type: Function, optional: true },
m2oOptionsPropsSearchMore: { type: Function, optional: true },
m2oOptionsPropsOpen: { type: Function, optional: true },
m2oOptionsProps: { type: Function, optional: true },
m2mOptionsPropsCreate: { type: Function, optional: true },
m2mOptionsPropsCreateEdit: { type: Function, optional: true },
m2mOptionsPropsLimit: { type: Function, optional: true },
m2mOptionsPropsSearchMore: { type: Function, optional: true },
m2mOptionsProps: { type: Function, optional: true },
});

0 comments on commit 0e4db6b

Please sign in to comment.