Fields are now ordered as returned by the Docuseal API: a sequence field (reorderable with drag & drop) is written by ``action_fetch_fields`` according to the API field order, so deleting a mapping line and re-fetching restores the original order instead of appending it at the end. Also refresh the French catalog (new Sequence field, new help texts, stale smart_search entries dropped). Covered by a unit test reproducing the delete-then-refetch scenario. Assisted-By: GLM-5.3-Flash
79 lines
3.2 KiB
XML
79 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
|
|
<record id="docuseal_template_view_list" model="ir.ui.view">
|
|
<field name="name">docuseal.template.list</field>
|
|
<field name="model">docuseal.template</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Docuseal templates">
|
|
<field name="name"/>
|
|
<field name="template_id"/>
|
|
<field name="submitter_role"/>
|
|
<field name="server_action_id"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="docuseal_template_view_form" model="ir.ui.view">
|
|
<field name="name">docuseal.template.form</field>
|
|
<field name="model">docuseal.template</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Docuseal template">
|
|
<header>
|
|
<button
|
|
name="action_create_server_action"
|
|
string="Create contextual action"
|
|
type="object"
|
|
class="btn-primary"
|
|
invisible="server_action_id"
|
|
/>
|
|
<button
|
|
name="action_delete_server_action"
|
|
string="Delete contextual action"
|
|
type="object"
|
|
class="btn-danger"
|
|
invisible="not server_action_id"
|
|
confirm="Delete the contextual action? It will no longer appear in the Action menu on contacts."
|
|
/>
|
|
</header>
|
|
<sheet>
|
|
<group>
|
|
<field name="name"/>
|
|
<field name="template_id"/>
|
|
<field name="submitter_role"/>
|
|
</group>
|
|
<div class="o_row mb8">
|
|
<button
|
|
name="action_fetch_fields"
|
|
string="Fetch template fields"
|
|
type="object"
|
|
class="btn btn-secondary"
|
|
invisible="not template_id"
|
|
/>
|
|
</div>
|
|
<field name="field_ids" string="Field mapping">
|
|
<list editable="bottom">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="docuseal_field_name" readonly="1"/>
|
|
<field
|
|
name="partner_field_id"
|
|
domain="[('model', '=', 'res.partner'), ('ttype', 'not in', ['one2many', 'many2many', 'binary'])]"
|
|
/>
|
|
</list>
|
|
</field>
|
|
<group>
|
|
<field name="server_action_id" readonly="1"/>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="docuseal_template_action" model="ir.actions.act_window">
|
|
<field name="name">Docuseal templates</field>
|
|
<field name="res_model">docuseal.template</field>
|
|
<field name="view_mode">list,form</field>
|
|
</record>
|
|
|
|
</odoo>
|