ช่วยเหลือ

0

How to add custom group on field by xpath?

Avatar
Dharmesh Chudasama
<xpath expr="//field[@name='coach_id']" position="after">
<field name="manager" groups="base.group_no_one"/>
</xpath>
I want to add custom group on manager field by xpath.
Avatar
Discard
1 Answer
0
Avatar
Alex Lazich
Best Answer

That should work if manager isn't yet defined on your view. If manager is already defined on a previous view, you should alter the attributes section of the field.

<xpath expr="//field[@name='manager']" position="attributes">
    <attribute name="groups">base.group_no_one</attribute>
</xpath>
Avatar
Discard