Reputation: 1168
I Have added check-box in one2many field. But for marking check this check-box, it takes twice click on this check-box. So, how to active this check-box in single click?
Thanks in advance.
Upvotes: 0
Views: 1372
Reputation: 31
For Odoo CE v12:
In the tree view, placing class="custom-control custom-checkbox"
next to the One2many
field enables checking the box in a single click.
Example:
<field name="your-One2many-field" class="custom-control custom-checkbox"> </field>
Upvotes: 3
Reputation: 2145
I think I understand what you mean. To confirm, this issue is for any One2many
field, which is displayed as a tree view within a form view, correct?
If that is the case, then this is, unfortunately, normal behavior. You must click the line once to place it in "edit" mode and then check or uncheck the checkbox.
I'm not aware of any existing way to override this behavior currently. I expect that changing this would require modifying at least the JavaScript code.
With that being said, you could place a <button>
element somewhere on your One2many
field's tree view that would toggle your checkbox field, but that's not entirely desirable.
Upvotes: 1