← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~0k.io/web-addons/7.0_web_m2x_options_fix_can_create_2 into lp:web-addons

 

Nicolas JEUDY has proposed merging lp:~0k.io/web-addons/7.0_web_m2x_options_fix_can_create_2 into lp:web-addons.

Requested reviews:
  Web-Addons Core Editors (webaddons-core-editors)

For more details, see:
https://code.launchpad.net/~0k.io/web-addons/7.0_web_m2x_options_fix_can_create_2/+merge/197658

Correct bug with many2many fields.

- If you use many2many field without "options" param, it raise an error:

"can_create not define"

Function can_create is not supported actually on many2many fields. Will add it next time.
-- 
https://code.launchpad.net/~0k.io/web-addons/7.0_web_m2x_options_fix_can_create_2/+merge/197658
Your team Web-Addons Core Editors is requested to review the proposed merge of lp:~0k.io/web-addons/7.0_web_m2x_options_fix_can_create_2 into lp:web-addons.
=== modified file 'web_m2x_options/static/src/js/form.js'
--- web_m2x_options/static/src/js/form.js	2013-11-30 08:29:11 +0000
+++ web_m2x_options/static/src/js/form.js	2013-12-04 08:59:24 +0000
@@ -186,7 +186,7 @@
                 }
                 // quick create
 
-                if ((typeof self.options.create === 'undefined' && can_create) ||
+                if ((typeof self.options.create === 'undefined') ||
                     self.options.create) {
 
                     var raw_result = _(data.result).map(function(x) {return x[1];});
@@ -204,7 +204,7 @@
 
                 // create...
 
-                if ((typeof self.options.create_edit === 'undefined' && can_create) ||
+                if ((typeof self.options.create_edit === 'undefined') ||
                     self.options.create_edit) {
 
                     values.push({


Follow ups