Files
contract/agreement_legal/views/agreement_recital.xml
Patrick Wilson 5736d92ace [14.0][MIG] agreement_legal (Version 12.0 to 14.0)
[MIG] Black & Cleanup

[IMP] Reviewer Requested Changes

[IMP] Black

[IMP] Reviewer Suggestion

[FIX] Tests

[FIX] Multiple Issues

- Added 'is_old_version' field to better display old versions. Before these were marked as inactive therefore not showing in the agreement.
- 'is_template' field now copies when making a template revision or copying a template.
- New Versions now retain original create date.
- Moved version/revision and created on/by fields out of footer to top in order to have the save buttons when creating children.
- Moved demo data out of data folder into the demo.xml

[FIX] demo data

[FIX] Revert back to only migration

[FIX] Report dynamic field rendering

[FIX] Test
2021-06-29 09:17:58 -06:00

107 lines
4.5 KiB
XML

<odoo>
<!-- Agreement Recital List View-->
<record model="ir.ui.view" id="agreement_recital_tree">
<field name="name">Agreement Recital Tree</field>
<field name="model">agreement.recital</field>
<field name="arch" type="xml">
<tree string="Recitals" default_order='agreement_id, sequence'>
<field name="sequence" widget="handle" />
<field name="name" />
<field name="title" />
<field name="agreement_id" />
<field name="active" invisible="1" />
</tree>
</field>
</record>
<!-- Agreement Recital Form View -->
<record model="ir.ui.view" id="agreement_recital_form">
<field name="name">Agreement Recital Form</field>
<field name="model">agreement.recital</field>
<field name="arch" type="xml">
<form string="Recital">
<sheet>
<div class="oe_button_box" name="button_box" />
<widget
name="web_ribbon"
title="Archived"
bg_color="bg-danger"
attrs="{'invisible': [('active', '=', True)]}"
/>
<field name="active" invisible="1" />
<div class="oe_title">
<label for="name" class="oe_edit_only" />
<h1><field name="name" /></h1>
</div>
<group>
<group>
<field name="title" />
<field name="agreement_id" />
</group>
<group>
<field name="sequence" />
</group>
</group>
<field name="content" widget="html" />
<group class="oe_edit_only">
<group>
<field
name="field_id"
domain="[('model_id', '=', active_model),
('ttype', '!=', 'one2many'),
('ttype', '!=', 'many2many')]"
/>
<field name="sub_object_id" readonly="1" />
<field
name="sub_model_object_field_id"
domain="[('model_id', '=', sub_object_id),
('ttype', '!=', 'one2many'),
('ttype', '!=', 'many2many')]"
attrs="{'readonly':[('sub_object_id', '=', False)],
'required':[('sub_object_id', '!=', False)]}"
/>
<field name="default_value" />
<field name="copyvalue" />
</group>
<p>
This section (on the left) allows you to add dynamic fields inside the content.
<ol>
<li>Select the recital field</li>
<li>Select the sub-field</li>
<li>Enter the default value if the field is empty</li>
<li
>Copy and paste the placeholder expression in the content</li>
</ol>
</p>
</group>
</sheet>
</form>
</field>
</record>
<!-- Agreement Recital Search View -->
<record model="ir.ui.view" id="agreement_recital_search">
<field name="name">Agreement Recital Search</field>
<field name="model">agreement.recital</field>
<field name="arch" type="xml">
<search string="Recitals">
<field name="name" />
<filter
name="group_agreement"
icon="terp-partner"
context="{'group_by':'agreement_id'}"
/>
</search>
</field>
</record>
<!-- Actions opening views on models -->
<record model="ir.actions.act_window" id="agreement_recital_action">
<field name="name">Recitals</field>
<field name="res_model">agreement.recital</field>
<field name="view_mode">tree,form</field>
</record>
</odoo>