Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # inside a model
- myfield = fields.Boolean('My Label', states={
- 'readonly': ~Eval('active', True),
- }, depends=['active'])
- # on form_view one can click a checkbox to set true/false
- # there is a menuitem which asigns an action that shows only record where myfield = false, using domain
- <record model="ir.action.act_window" id="act_myid">
- <field name="name">my Name</field>
- <field name="res_model">mymodel.model</field>
- <field name="domain">[('myfield','=','false')]</field>
- </record>
- # on tree_view
- <!-- other code-->
- <field name="myfield"/>
- <!-- other code -->
- # the treeview displays just fine ..when i click on a record, not the record opens, but the myfield checkbox is being set to 'true'
- # i would like to open a record instead..
- <field name="myfield" readonly="1"/> does not work
Advertisement
Add Comment
Please, Sign In to add comment