When setting a default record in one2many field that has a many2many too. Odoo crashes when access from mobile browser (chrome) but works fine with desktop browser(chrome)
Impacted versions: Almost all. Tested in odoo 11CE
Steps to reproduce:
Its just simple thing Create an object and add one o2m in it. That one2many should have one m2m in it.
Now just set default_get method that sets default record in that one2many when you click 'add an item'
the default get should also set that m2m in it. for eg:
Now if you access this it will work fine from your desktop but when accessed in mobile browser after activating debugging tools
in android mobile settings. and access the same db from chrome you get this
Uncaught TypeError: Cannot read property 'views' of undefined
at Class._processX2ManyCommands (web.assets_backend.js:1274)
at web.assets_backend.js:1277
at Function._.each._.forEach (web.assets_common.js:12)
at Class._processX2ManyCommands (web.assets_backend.js:1275)
at Class.applyDefaultValues (web.assets_backend.js:1114)
at Object.<anonymous> (web.assets_backend.js:1264)
at Object.<anonymous> (web.assets_common.js:802)
at fire (web.assets_common.js:796)
at Object.fireWith [as resolveWith] (web.assets_common.js:801)
at Object.deferred.<computed> [as resolve] (web.assets_common.js:803
When setting a default record in one2many field that has a many2many too. Odoo crashes when access from mobile browser (chrome) but works fine with desktop browser(chrome)
Impacted versions: Almost all. Tested in odoo 11CE
Steps to reproduce: Its just simple thing Create an object and add one o2m in it. That one2many should have one m2m in it. Now just set default_get method that sets default record in that one2many when you click 'add an item' the default get should also set that m2m in it. for eg:
Now if you access this it will work fine from your desktop but when accessed in mobile browser after activating debugging tools in android mobile settings. and access the same db from chrome you get this
THE PROBLEM HERE IS THE tax_id FIELD IF YOU COMMENT IT OUT IT WORKS BUT THAT SHOULD WORK WITHOUT COMMENTING IT. Related issue and fix but that is not working
https://github.com/odoo/odoo/commit/034c075e7e58ad9e5a2dce34782106c0dbd1c786
Current behavior: crashes Expected behavior: should set default