Browse Source

[ADD][web_action_conditionable] demo data

pull/1205/head
Holger Brunn 6 years ago
parent
commit
d47afaef37
  1. 3
      web_action_conditionable/__openerp__.py
  2. 19
      web_action_conditionable/demo/ir_ui_view.xml

3
web_action_conditionable/__openerp__.py

@ -11,6 +11,9 @@
'web', 'web',
], ],
"license": "AGPL-3", "license": "AGPL-3",
"demo": [
"demo/ir_ui_view.xml",
],
'data': [ 'data': [
'views/view.xml' 'views/view.xml'
], ],

19
web_action_conditionable/demo/ir_ui_view.xml

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="view_res_groups_form" model="ir.ui.view">
<field name="model">res.groups</field>
<field name="inherit_id" ref="base.view_groups_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='model_access']/tree" position="attributes">
<attribute name="create">name == 'Access Rights'</attribute>
<attribute name="delete">name != 'Access Rights'</attribute>
</xpath>
<xpath expr="." position="attributes">
<attribute name="edit">name == 'Access Rights'</attribute>
<attribute name="delete">name != 'Access Rights'</attribute>
</xpath>
</field>
</record>
</data>
</openerp>
Loading…
Cancel
Save