Files
odoo_source/addons/base_automation/views/base_automation_view.xml
T
Alexandre Kühn a87d761fdb [IMP] core: menu tip ux/ui improvement
We would like to make the "no item found" screens more appealing.

Before this commit, it shows a small help tip in the top-left
corner of the screen, just below the "Create" button.

With this commit, these help tips have been replaced by onboarding
screens, which consist of a picture and some text below, both of which
are horizontally centered.

The texts have been slightly changed, so that they are shorter and clearer.

Considered modules:

(A)
    account,
    account_asset,
    account_budget,
    account_test,
    account_voucher,
    analytic
(B)
    barcodes,
    base,
    base_automation,
    board
(C)
    calendar,
    contacts,
    crm
(D)
    delivery
(E)
    event
(F)
    fleet
(G)
    gamification,
    google_drive
(H)
    hr,
    hr_attendance,
    hr_contract,
    hr_expense,
    hr_gamification,
    hr_holidays,
    hr_payroll,
    hr_recruitment,
    hr_timesheet
(I)
    im_livechat
(L)
    l10n_fr_sale_closing,
    link_tracker,
    lunch
(M)
    mail,
    maintenance,
    mass_mailing,
    membership,
    mrp
(N)
    note
(P)
    payment,
    point_of_sale,
    post_mercury,
    pos_restaurant,
    product,
    project,
    purchase,
    purchase_requisition
(R)
    rating,
    repair,
    resource
(S)
    sale,
    sale_timesheet,
    sales_team,
    stock,
    stock_account,
    stock_landed_costs,
    stock_picking_batch,
    survey
(U)
    utm
(W)
    web,
    website,
    website_blog,
    website_customer,
    website_event_track,
    website_forum,
    website_quote,
    website_sale,
    website_sale_digital,
    website_slides
2018-01-18 21:43:29 +01:00

98 lines
4.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Automation Form View -->
<record id="view_base_automation_form" model="ir.ui.view">
<field name="name">Automations</field>
<field name="model">base.automation</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="base.view_server_action_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='create_action']" position="replace">
</xpath>
<xpath expr="//button[@name='unlink_action']" position="replace">
<button name="unlink_action_for_menu" string="Remove Action" type="object"
attrs="{'invisible':[('binding_model_id','=',False)]}"
help="Remove the contextual action related to this server action"/>
</xpath>
<div class="oe_title" position="before">
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button"/>
</button>
</div>
</div>
<xpath expr="//group[@name='action_wrapper']" position="inside">
<group>
<field name="trigger"/>
<field name="filter_pre_domain" widget="domain" options="{'model': 'model_name', 'in_dialog': True}" attrs="{'invisible': [('trigger', 'not in', ['on_write','on_create_or_write'])]}"/>
<field name="filter_domain" widget="domain" options="{'model': 'model_name', 'in_dialog': True}"/>
<field name="on_change_fields"
attrs="{'invisible': [('trigger', '!=', 'on_change')], 'required': [('trigger', '=', 'on_change')]}"/>
<field name="trg_date_id"
attrs="{'invisible': [('trigger', '!=', 'on_time')], 'required': [('trigger', '=', 'on_time')]}"/>
<label for="trg_date_range"
attrs="{'invisible': [('trigger', '!=', 'on_time')]}"/>
<div class="o_row" attrs="{'invisible': [('trigger', '!=', 'on_time')]}">
<field name="trg_date_range" attrs="{'required': [('trigger','=','on_time')]}"/>
<field name="trg_date_range_type" attrs="{'required': [('trigger','=','on_time')]}"/>
</div>
<field name="trg_date_calendar_id"
attrs="{'invisible': ['|', ('trg_date_id','=',False), ('trg_date_range_type', '!=', 'day')]}"/>
</group>
</xpath>
</field>
</record>
<!-- automation Tree View -->
<record id="view_base_automation_tree" model="ir.ui.view">
<field name="name">base.automation.tree</field>
<field name="model">base.automation</field>
<field name="arch" type="xml">
<tree string="Automation">
<field name="sequence" widget="handle"/>
<field name="name"/>
<field name="trigger"/>
<field name="model_id"/>
</tree>
</field>
</record>
<record id="view_base_automation_search" model="ir.ui.view">
<field name="name">base.automation.search</field>
<field name="model">base.automation</field>
<field name="arch" type="xml">
<search>
<field name="name"/>
<field name="model_id"/>
</search>
</field>
</record>
<!-- automation Action -->
<record id="base_automation_act" model="ir.actions.act_window">
<field name="name">Automated Actions</field>
<field name="res_model">base.automation</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_base_automation_tree"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Setup a new automated automation
</p><p>
Use automated actions to automatically trigger actions for
various screens. Example: a lead created by a specific user may
be automatically set to a specific sales channel, or an
opportunity which still has status pending after 14 days might
trigger an automatic reminder email.
</p>
</field>
</record>
<menuitem id="menu_base_automation_form"
parent="base.menu_automation" action="base_automation_act" sequence="1"/>
</odoo>