mirror of
https://gitlab.com/flectra-community/server-ux.git
synced 2024-11-14 18:22:05 +00:00
146 lines
5.9 KiB
XML
146 lines
5.9 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!-- Copyright 2020 Tecnativa - Ernesto Tejeda
|
|
Copyright 2020 Tecnativa - Pedro M. Baeza
|
|
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
|
<flectra>
|
|
<!-- Chained Swapper -->
|
|
<record id="chained_swapper_view_form" model="ir.ui.view">
|
|
<field name="name">chained.swapper.form</field>
|
|
<field name="model">chained.swapper</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<sheet>
|
|
<div class="oe_button_box" name="buttons">
|
|
<field name="ref_ir_act_window_id" invisible="1" />
|
|
<!--string="Create Contextual Action"-->
|
|
<button
|
|
name="add_action"
|
|
type="object"
|
|
string="Add Action"
|
|
attrs="{'invisible':[('ref_ir_act_window_id','!=',False)]}"
|
|
class="oe_stat_button"
|
|
icon="fa-plus"
|
|
help="Add a new contextual action of related documents to open a composition wizard"
|
|
/>
|
|
<button
|
|
name="unlink_action"
|
|
type="object"
|
|
string="Remove Action"
|
|
class="oe_stat_button"
|
|
icon="fa-minus"
|
|
attrs="{'invisible':[('ref_ir_act_window_id','=',False)]}"
|
|
help="Remove the contextual action to use this template on related documents"
|
|
widget="statinfo"
|
|
/>
|
|
</div>
|
|
<div class="oe_title">
|
|
<label for="name" class="oe_edit_only" />
|
|
<h1>
|
|
<field name="name" required="1" />
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<group name="model_id">
|
|
<field
|
|
name="model_id"
|
|
required="1"
|
|
attrs="{'readonly':[('ref_ir_act_window_id','!=',False)]}"
|
|
/>
|
|
<field name="field_id" />
|
|
</group>
|
|
</group>
|
|
<notebook colspan="4">
|
|
<page string="Sub-fields">
|
|
<field name="sub_field_ids" nolabel="1" />
|
|
</page>
|
|
<page string="Constraints">
|
|
<field name="constraint_ids" nolabel="1" />
|
|
</page>
|
|
<page string="Security">
|
|
<field name="group_ids" nolabel="1" />
|
|
</page>
|
|
<page
|
|
string="Advanced"
|
|
attrs="{'invisible':[('ref_ir_act_window_id','=',False)]}"
|
|
>
|
|
<group colspan="2" col="2">
|
|
<field name="ref_ir_act_window_id" />
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
<field name="allowed_field_ids" invisible="1" />
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="chained_swapper_view_tree" model="ir.ui.view">
|
|
<field name="name">chained.swapper.tree</field>
|
|
<field name="model">chained.swapper</field>
|
|
<field name="arch" type="xml">
|
|
<tree>
|
|
<field name="name" />
|
|
<field name="model_id" />
|
|
<field name="field_id" />
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record id="chained_swapper_action" model="ir.actions.act_window">
|
|
<field name="name">Field Swaps</field>
|
|
<field name="res_model">chained.swapper</field>
|
|
<field name="view_mode">tree,form</field>
|
|
</record>
|
|
<!-- Chained Swapper Sub-fields -->
|
|
<record id="chained_swapper_sub_field_view_tree" model="ir.ui.view">
|
|
<field name="name">chained.swapper.sub.field.tree</field>
|
|
<field name="model">chained.swapper.sub.field</field>
|
|
<field name="arch" type="xml">
|
|
<tree editable="bottom">
|
|
<field name="sub_field_chain" />
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<!-- Chained Swapper Constraints -->
|
|
<record id="chained_swapper_constraint_view_tree" model="ir.ui.view">
|
|
<field name="name">chained.swapper.constraint.tree</field>
|
|
<field name="model">chained.swapper.constraint</field>
|
|
<field name="arch" type="xml">
|
|
<tree editable="bottom">
|
|
<field name="name" />
|
|
<field name="expression" />
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record id="chained_swapper_constraint_view_form" model="ir.ui.view">
|
|
<field name="name">chained.swapper.constraint.form</field>
|
|
<field name="model">chained.swapper.constraint</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<group>
|
|
<field name="name" />
|
|
</group>
|
|
<group string="Constraint expression">
|
|
<field
|
|
name="expression"
|
|
nolabel="1"
|
|
widget="ace"
|
|
options="{'mode': 'python'}"
|
|
/>
|
|
</group>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<!-- Menus -->
|
|
<menuitem
|
|
id="chained_swapper_menu"
|
|
name="Field Swaps"
|
|
parent="base.menu_administration"
|
|
sequence="7"
|
|
/>
|
|
<menuitem
|
|
id="chained_swapper_submenu"
|
|
action="chained_swapper_action"
|
|
parent="chained_swapper_menu"
|
|
/>
|
|
|
|
</flectra>
|