Skip to content

Commit 364658c

Browse files
committed
[FIX] Makes the module compatible with Odoo community
1 parent 573e0fd commit 364658c

File tree

1 file changed

+6
-1
lines changed
  • web_m2x_options/static/src/js

1 file changed

+6
-1
lines changed

web_m2x_options/static/src/js/form.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
1919
'web_m2x_options.search_more',
2020
'web_m2x_options.m2o_dialog',];
2121

22+
// In odoo 9.c FielMany2One is not exposed by form_relational
23+
// To bypass this limitation we use the widget registry to get the
24+
// reference to the FielMany2One widget.
25+
var FieldMany2One = core.form_widget_registry.get('many2one');
26+
2227
var M2ODialog = Dialog.extend({
2328
template: "M2ODialog",
2429
init: function(parent) {
@@ -52,7 +57,7 @@ odoo.define('web_m2x_options.web_m2x_options', function (require) {
5257
},
5358
});
5459

55-
form_relational.FieldMany2One.include({
60+
FieldMany2One.include({
5661

5762
start: function() {
5863
this._super.apply(this, arguments);

0 commit comments

Comments
 (0)