Files
odoo_source/addons/website/views/ir_actions_server_views.xml
T
Damien Bouvy 69397e2bcb [FIX] website: broken ir.act_server view
Since the refactoring of base_automation, the 'website-publishing'
option of server actions was broken; it did get included in the view
but outside of a group node and without labels. The result was a
floating checkbox which would trigger a label-less char field upon
selection - not the clearest of UIs.

This commit properly insert these fields into a group node. Note that
since server actions can normally only be reached by going through
technical menus, the fact that this section of view is now in a
group_no_one-only section should not change anything functionally.

closes odoo/odoo#151498

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2024-01-29 20:22:47 +00:00

52 lines
2.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record model="ir.ui.view" id="view_server_action_form_website">
<field name="name">ir.actions.server.form.website</field>
<field name="model">ir.actions.server</field>
<field name="inherit_id" ref="base.view_server_action_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//group[@groups='base.group_no_one']" position="inside">
<group>
<field name="website_published"
invisible="state != 'code'"/>
<field name="xml_id" invisible="1"/>
<field name="website_path"
invisible="not website_published or state != 'code'"/>
<field name="website_url" widget="url"
readonly="1"
invisible="not website_published or state != 'code'"/>
</group>
</xpath>
</data>
</field>
</record>
<record model="ir.ui.view" id="view_server_action_tree_website">
<field name="name">ir.actions.server.tree.website</field>
<field name="model">ir.actions.server</field>
<field name="inherit_id" ref="base.view_server_action_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='model_id']" position="after">
<field name="website_url"/>
</xpath>
</field>
</record>
<record model="ir.ui.view" id="view_server_action_search_website">
<field name="name">ir.actions.server.search.website</field>
<field name="model">ir.actions.server</field>
<field name="inherit_id" ref="base.view_server_action_search"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='state']" position="after">
<filter string="Website" name="website"
domain="[('website_published', '=', True), ('state', '=', 'code')]"/>
</xpath>
</field>
</record>
</data>
</odoo>