oe_edit_only not available in form subtree

Bug #1311199 reported by Florent THOMAS
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

Hy,

I'm trying to hide some buttons when I'm not in edit mode. I set a button in the header and use the class oe_edit_only :

<button name="refresh_record" string="Refresh" type="object" class="oe_edit_only"/>

In the header it works perfectly. Then in the object I have some lines (one2many) and in each line I have a button with the same syntax. Unfortunately, the oe_edit_only class is not transmitted to the tree. The button in subtree still available whatever the state of the form. I made an inspect in HTML mode and no class is specified in the subtree button yet I have a class="oe_edit_only" in the xml view definition

I precise that when I change the HTML part directly in my brower and when I set the class class="oe_link oe_edit_only" on my button in subtree, it worked. So the problem seems to come from the fact that the class is not passed to the subtree.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.