Browse Source

[IMP] add security groups on form views

16.0
RemiFr82 9 months ago
parent
commit
001d4350af
  1. 6
      event_type_description/views/event_event.xml
  2. 5
      event_type_description/views/event_type.xml

6
event_type_description/views/event_event.xml

@ -10,7 +10,8 @@
<field name="can_pull" invisible="1" />
</field>
<notebook position="inside">
<page name="description" string="Website description">
<page name="description" string="Website description"
groups="event.group_event_manager,website.group_website_restricted_editor">
<group>
<button type="object" name="pull_type_description" colspan="2"
string="Update this event description from template"
@ -27,7 +28,8 @@
<field name="name">Push template description</field>
<field name="model_id" ref="event.model_event_event" />
<field name="binding_model_id" ref="event.model_event_event" />
<field name="groups_id" eval="[(6, 0, [ref('event.group_event_manager')])]" />
<field name="groups_id"
eval="[(6, 0, [ref('event.group_event_manager'), ref('website.group_website_restricted_editor')])]" />
<field name="state">code</field>
<field name="code">record.push_type_description()</field>
</record>

5
event_type_description/views/event_type.xml

@ -7,7 +7,7 @@
<field name="inherit_id" ref="event.view_event_type_form" />
<field name="arch" type="xml">
<notebook position="inside">
<page string="Website description">
<page string="Website description" groups="event.group_event_manager,website.group_website_restricted_editor">
<field name="description" readonly="1" />
</page>
</notebook>
@ -18,7 +18,8 @@
<field name="name">Clear template description</field>
<field name="model_id" ref="event.model_event_type" />
<field name="binding_model_id" ref="event.model_event_type" />
<field name="groups_id" eval="[(6, 0, [ref('event.group_event_manager' )])]" />
<field name="groups_id"
eval="[(6, 0, [ref('event.group_event_manager' ), ref('website.group_website_restricted_editor')])]" />
<field name="state">code</field>
<field name="code">records.clear_description()</field>
</record>

Loading…
Cancel
Save