Hi,
In a particular case, i need to make invisible the name field on the party
model and use only code field. In this case i need to make visible a page.
I use the classmethod view_attributes
@classmethod
def view_attributes(cls):
return [('/form//field[@name="name"]', 'states', {
'invisible': Eval('is_robot'),
}),
('//page[@id="party_robot_data"]', 'states', {
'invisible': ~Eval('is_robot'),
}),
]
The second part works fine, but the field "name" not change. I tried with
/form/field[@name="name"] /form//field[@name="name"] /
/form/field[@name="name"] //field[@name="name"] /field[@name="name"]...
I don't know if I am writing bad the xpath or there is another error
Thanks
--
You received this message because you are subscribed to the Google Groups
"tryton" group.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tryton/3f04a10d-76ce-4d88-8f6c-914799264d06%40googlegroups.com.