Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
2225 Prikazi

I have a One2many field in my form view.

And that One2many field has a Many2many field in it. 

If I apply -> widget="many2many_checkboxes" for that Many2many field, an error raises if I add a line to One2many field and save it.

Im using Odoo 16.


The table below is an example for my situation. (One2many field in a form view)

field1

field2

field3

many2many field




many2many_checkboxes


Thanks


UncaughtPromiseError > OwlError
Uncaught Promise > Invalid loop expression
OwlError: Invalid loop expression
at prepareList (http://localhost:8069/web/assets/1174-29e6fa9/web.assets_common.min.js:1666:12)
at Many2ManyCheckboxesField.template (eval at compile (http://localhost:8069/web/assets/1174-29e6fa9/web.assets_common.min.js:2045:370), :17:54)
at Fiber._render (http://localhost:8069/web/assets/1174-29e6fa9/web.assets_common.min.js:1491:96)
at Fiber.render (http://localhost:8069/web/assets/1174-29e6fa9/web.assets_common.min.js:1490:6)
at ComponentNode.initiateRender (http://localhost:8069/web/assets/1174-29e6fa9/web.assets_common.min.js:1558:47)



Avatar
Opusti
Best Answer

Dear Oguzhan,
In odoo 16,the widget=many2many_checkboxesis not supported directly within a One2many field.The many2many_checkboxes widget is designed to be used with many2many fields,not within the One2many fields. 
If you want to display a many2many field as checkboxes within a One2many field,
you can achieve this by creating-a custom widget and implementing the desired functionality.
I hope this infomation is helpful to you.
Feel free for further assistance on contact@geminatecs\.com 
Thank\\ you 
Geminate\\ Consultancy\\ Services\\ W\\ :\\ www.geminatecs.com

Avatar
Opusti