217 lines
10 KiB
XML
217 lines
10 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<!--
|
|
Workflow Nodes
|
|
-->
|
|
<record id="view_form_soong_workflow_node" model="ir.ui.view">
|
|
<field name="name">soong.workflow.node.form</field>
|
|
<field name="model">soong.workflow.node</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<sheet>
|
|
<field name="workflow_id" invisible="1"/>
|
|
<field name="model_id" invisible="1"/>
|
|
<group>
|
|
<group>
|
|
<field name="name" placeholder="ex. 'Draft' or 'Direct Manager'" required="1"/>
|
|
<field name="node_name" placeholder="ex. 'draft' or 'direct_manager'" required="1"/>
|
|
</group>
|
|
<group>
|
|
<field name="sequence" required="1"/>
|
|
<field name="is_visible"/>
|
|
</group>
|
|
<group>
|
|
<div>
|
|
<label for="use_custom_colors"/>
|
|
<field name="use_custom_colors" class="oe_inline"/>
|
|
</div>
|
|
<group invisible="use_custom_colors == True">
|
|
<field name="res_bg_color" widget="color"/>
|
|
<field name="res_label_color" widget="color"/>
|
|
</group>
|
|
<group invisible="use_custom_colors == False">
|
|
<field name="bg_color" widget="color"/>
|
|
<field name="label_color" widget="color"/>
|
|
</group>
|
|
</group>
|
|
<group>
|
|
<field name="flow_start"/>
|
|
<field name="flow_end"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Buttons">
|
|
<field name="button_ids" mode="tree" context="{'default_node_id':id}"/>
|
|
</page>
|
|
<page string="Fields">
|
|
<button name="btn_load_fields"
|
|
string="Load Model Fields"
|
|
type="object"
|
|
class="oe_highlight"/>
|
|
<field name="field_ids" mode="tree"
|
|
context="{'default_model_id':model_id, 'disable_open': 1}"/>
|
|
</page>
|
|
<page string="Links">
|
|
<separator string="Outgoing Links"/>
|
|
<field name="out_link_ids" mode="tree"/>
|
|
<separator string="Ingoing Links"/>
|
|
<field name="in_link_ids" mode="tree"/>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_tree_soong_workflow_node" model="ir.ui.view">
|
|
<field name="name">soong.workflow.node.tree</field>
|
|
<field name="model">soong.workflow.node</field>
|
|
<field name="arch" type="xml">
|
|
<tree>
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="name"/>
|
|
<field name="is_visible"/>
|
|
<field name="flow_start"/>
|
|
<field name="flow_end"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<!--
|
|
Workflow Nodes Fields
|
|
-->
|
|
<record id="view_form_soong_workflow_node_field" model="ir.ui.view">
|
|
<field name="name">soong.workflow.node.field.form</field>
|
|
<field name="model">soong.workflow.node.field</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<sheet>
|
|
<group>
|
|
<group string="Main Information">
|
|
<field name="model_id" invisible="1"/>
|
|
<field name="name" required="1" domain="[('model_id','=',model_id)]"/>
|
|
</group>
|
|
<group string="Attributes">
|
|
<field name="readonly"/>
|
|
<field name="required"/>
|
|
<field name="invisible"/>
|
|
</group>
|
|
</group>
|
|
<group string="Groups">
|
|
<field name="group_ids" nolabel="1" mode="tree" context="{'disable_open': 1}"/>
|
|
</group>
|
|
<group string="Users">
|
|
<field name="user_ids" nolabel="1" mode="tree" context="{'disable_open': 1}"/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="view_tree_soong_workflow_node_field" model="ir.ui.view">
|
|
<field name="name">soong.workflow.node.field.tree</field>
|
|
<field name="model">soong.workflow.node.field</field>
|
|
<field name="arch" type="xml">
|
|
<tree editable="bottom">
|
|
<field name="model_id" invisible="1"/>
|
|
<field name="name" required="1" domain="[('model_id','=',model_id)]"/>
|
|
<field name="readonly"/>
|
|
<field name="required"/>
|
|
<field name="invisible"/>
|
|
<field name="group_ids" widget="many2many_tags"/>
|
|
<field name="user_ids" widget="many2many_tags"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<!--
|
|
Workflow Node Buttons
|
|
-->
|
|
<record id="view_form_soong_workflow_node_button" model="ir.ui.view">
|
|
<field name="name">soong.workflow.node.button.form</field>
|
|
<field name="model">soong.workflow.node.button</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<field name="workflow_id" invisible="1"/>
|
|
<sheet>
|
|
<group>
|
|
<group>
|
|
<field name="sequence" required="1"/>
|
|
<field name="name" required="1"/>
|
|
<field name="is_highlight"/>
|
|
</group>
|
|
<group>
|
|
<field name="node_id" options="{'no_open': True, 'no_create': True}"
|
|
domain="[('workflow_id','=',workflow_id)]"/>
|
|
<field name="has_icon"/>
|
|
<field name="icon" invisible="has_icon == False" required="has_icon == True"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Condition">
|
|
<group>
|
|
<field name="btn_hide"/>
|
|
</group>
|
|
<group invisible="btn_hide == False">
|
|
<field name="review_type" />
|
|
<field
|
|
name="reviewer_id"
|
|
invisible="review_type != 'individual'"
|
|
/>
|
|
<field
|
|
name="reviewer_group_id"
|
|
invisible="review_type != 'group'"
|
|
/>
|
|
</group>
|
|
<group invisible="review_type != 'expression' or btn_hide == False">
|
|
<div class="alert alert-danger oe_edit_only" role="alert" style="width: max-content;">
|
|
<strong>Note:</strong> The result of executing the expression must be a res.users recordset.
|
|
</div>
|
|
<field name="reviewer_expression" colspan="2" required="1" widget="code" options="{'mode': 'python'}" nolabel="1"/>
|
|
</group>
|
|
</page>
|
|
<page string="Actions">
|
|
<group>
|
|
<field name="action_type" required="1"/>
|
|
</group>
|
|
<group name="link" invisible="action_type != 'link'">
|
|
<field name="link_id"
|
|
domain="[('node_from','=',node_id)]"
|
|
options="{'no_open': True, 'no_create': True}"
|
|
required="action_type == 'link'"/>
|
|
</group>
|
|
<group name="code" invisible="action_type != 'code'">
|
|
<field name="code" widget="code" options="{'mode': 'python'}"
|
|
required="action_type == 'code'"/>
|
|
</group>
|
|
<group name="action" invisible="action_type != 'action'">
|
|
<field name="server_action_id"
|
|
context="{'default_is_workflow':True}"
|
|
options="{'no_open': True, 'no_create': True}"
|
|
required="action_type == 'action'"/>
|
|
</group>
|
|
<group name="win_action" invisible="action_type != 'win_act'">
|
|
<field name="win_act_id" options="{'no_open': True, 'no_create': True}"
|
|
required="action_type == 'win_act'"/>
|
|
</group>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="view_tree_soong_workflow_node_button" model="ir.ui.view">
|
|
<field name="name">soong.workflow.node.button.tree</field>
|
|
<field name="model">soong.workflow.node.button</field>
|
|
<field name="arch" type="xml">
|
|
<tree>
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="name"/>
|
|
<field name="action_type"/>
|
|
<field name="is_highlight"/>
|
|
<field name="node_id"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|