Hello Odoo Community!
I'm working with Odoo (v9 Enterprise) since 3 months for now and I'm having my first issue where I need your help ;)
The requirement: I have multiple fields that must set/remove read-only attribute depending on multiple, changing conditions. Every time the view is being displayed or certain fields / groups memberships are being changed, the attributes must change. On top it would be nice if I could retrieve the current conditions for readonly, if existent.
My attempt: First I was looking for something like a __init__ for my Model but instead I've found "fields_view_get" which in super also calls the __init__ of the model. Now I've already managed to retrieve the user groups and to override the conditions set in the XML file. The problem is that I've absolutly no chance to obtain any URL paramaters (like the ID, for a search) or field values itself.
The Problem: I really need one of those to access the field values so that I can set additional conditions to the different fields :/ is there either an alternative to "fields_view_get" that allows be to access field values and to set attributes or is there any way to get the URL/Field parameter in fields_view_get?
Thanks for any help in advance! I hope that my english is understandable.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 5/17/16, 6:29 AM|
|Seen: 721 times|
|Last updated: 5/17/16, 6:42 AM|