Crash when creating new records with checkboxes expanding more than one row
This is what is described in https://discuss.tryton.org/t/problema-al-crear-productos-en-sao-despues-de-actualizar-de-6-2-a-7-0/8970 The following error is shown in the browser console: ``` jQuery.Deferred exception: cols[(i - 1)] is undefined set_grid_template@http://localhost:8000/dist/tryton-sao.js:15468:21 display/<@http://localhost:8000/dist/tryton-sao.js:15146:35 c@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:25304 add@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:25583 display@http://localhost:8000/dist/tryton-sao.js:15122:18 display@http://localhost:8000/dist/tryton-sao.js:13618:45 record_modified@http://localhost:8000/dist/tryton-sao.js:13527:29 Sao.Group/array.record_modified@http://localhost:8000/dist/tryton-sao.js:7837:28 Sao.Group/array.record_modified@http://localhost:8000/dist/tryton-sao.js:7843:35 _set_value@http://localhost:8000/dist/tryton-sao.js:9912:23 set@http://localhost:8000/dist/tryton-sao.js:9928:18 set_default@http://localhost:8000/dist/tryton-sao.js:10015:25 set_default@http://localhost:8000/dist/tryton-sao.js:8601:56 default_get/<@http://localhost:8000/dist/tryton-sao.js:8571:33 e@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27028 Deferred/then/l/</t<@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27330 setTimeout handler*Deferred/then/l/<@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27594 c@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:25304 add@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:25583 Deferred/then/<@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27691 Deferred@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:28106 then@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27620 default_get@http://localhost:8000/dist/tryton-sao.js:8556:28 new_/<@http://localhost:8000/dist/tryton-sao.js:13806:34 e@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27028 Deferred/then/l/</t<@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27330 setTimeout handler*Deferred/then/l/<@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27594 c@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:25304 add@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:25583 Deferred/then/<@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27691 Deferred@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:28106 then@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27620 new_@http://localhost:8000/dist/tryton-sao.js:13793:24 new_/<@http://localhost:8000/dist/tryton-sao.js:11401:36 e@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27028 Deferred/then/l/</t<@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27330 setTimeout handler*Deferred/then/l/<@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27594 c@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:25304 fireWith@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:26053 fire@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:26089 c@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:25304 fireWith@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:26053 e@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27300 Deferred/then/l/</t<@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27330 setTimeout handler*Deferred/then/l/<@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27594 c@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:25304 add@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:25583 Deferred/then/<@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27691 Deferred@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:28106 then@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:27620 modified_save@http://localhost:8000/dist/tryton-sao.js:11361:50 new_@http://localhost:8000/dist/tryton-sao.js:11400:25 create_toolbar/add_button/<@http://localhost:8000/dist/tryton-sao.js:10839:35 dispatch@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:40035 add/v.handle@http://localhost:8000/bower_components/jquery/dist/jquery.min.js:2:38006 undefined 4 jquery.min.js:2:28648 ``` The problem is raised because there are several checkboxes in the checkboxes group and they do not have enought space to be shown in a single row and are expanded into two rows: ![imatge.png](/uploads/f276ebeec0b4778ff83b532b3324a399/imatge.png) This is because a new field is added in custom module with the following xml: ```xml <xpath expr="//group[@id='checkboxes']" position="inside"> <newline /> <label name="show_in_web_sale" /> <field name="show_in_web_sale" /> </xpath> ``` Removing such field from the view fixes the error and everything works as expected.
issue