Skip to content

Commit f2ab0a9

Browse files
committed
[IMP] agreement_legal: Placeholder creator section layout
1 parent 17e6f0d commit f2ab0a9

5 files changed

Lines changed: 90 additions & 51 deletions

File tree

agreement_legal/views/agreement.xml

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -97,37 +97,48 @@
9797
<field name="readonly" invisible="1" />
9898
</group>
9999
</group>
100-
<field name="description" required="True" />
101-
<group class="oe_edit_only">
102-
<group>
103-
<field
104-
name="field_id"
105-
domain="[('model_id', '=', 'agreement'),
106-
('ttype', '!=', 'one2many'),
107-
('ttype', '!=', 'many2many')]"
108-
/>
109-
<field name="sub_object_id" readonly="1" />
110-
<field
111-
name="sub_model_object_field_id"
112-
domain="[('model_id', '=', sub_object_id),
113-
('ttype', '!=', 'one2many'),
114-
('ttype', '!=', 'many2many')]"
115-
readonly="sub_object_id == False"
116-
required="sub_object_id != False"
117-
/>
118-
<field name="default_value" />
119-
<field name="copyvalue" />
120-
</group>
121-
<p>
122-
This section (on the left) allows you to add dynamic fields inside the description and special terms.
123-
<ol>
124-
<li>Select the agreement field</li>
125-
<li>Select the sub-field</li>
126-
<li>Enter the default value if the field is empty</li>
127-
<li
128-
>Copy and paste the placeholder expression in the description or the special terms</li>
129-
</ol>
130-
</p>
100+
<group string="Description">
101+
<field
102+
name="description"
103+
required="True"
104+
nolabel="1"
105+
colspan="2"
106+
placeholder="Enter description here..."
107+
/>
108+
<div
109+
class="oe_edit_only alert alert-light d-flex justify-content-between flex-xl-row flex-column"
110+
role="status"
111+
>
112+
<group class="flex-fill">
113+
<field
114+
name="field_id"
115+
domain="[('model_id', '=', 'agreement'),
116+
('ttype', '!=', 'one2many'),
117+
('ttype', '!=', 'many2many')]"
118+
/>
119+
<field name="sub_object_id" readonly="1" />
120+
<field
121+
name="sub_model_object_field_id"
122+
domain="[('model_id', '=', sub_object_id),
123+
('ttype', '!=', 'one2many'),
124+
('ttype', '!=', 'many2many')]"
125+
readonly="sub_object_id == False"
126+
required="sub_object_id != False"
127+
/>
128+
<field name="default_value" />
129+
<field name="copyvalue" />
130+
</group>
131+
<p class="px-xl-4">
132+
This section (on the left) allows you to add dynamic fields inside the description and special terms.
133+
<ol>
134+
<li>Select the agreement field</li>
135+
<li>Select the sub-field</li>
136+
<li>Enter the default value if the field is empty</li>
137+
<li
138+
>Copy and paste the placeholder expression in the description or the special terms</li>
139+
</ol>
140+
</p>
141+
</div>
131142
</group>
132143
<group name="parties" string="Parties">
133144
<group name="cust_parties">

agreement_legal/views/agreement_appendix.xml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,16 @@
4444
<field name="sequence" />
4545
</group>
4646
</group>
47-
<field name="content" widget="html" />
48-
<group class="oe_edit_only">
49-
<group>
47+
<field
48+
name="content"
49+
widget="html"
50+
placeholder="Enter content here..."
51+
/>
52+
<div
53+
class="oe_edit_only alert alert-light d-flex justify-content-between flex-xl-row flex-column"
54+
role="status"
55+
>
56+
<group class="flex-fill">
5057
<field
5158
name="field_id"
5259
domain="[('model_id', '=', 'agreement.appendix'),
@@ -65,7 +72,7 @@
6572
<field name="default_value" />
6673
<field name="copyvalue" />
6774
</group>
68-
<p>
75+
<p class="px-xl-4">
6976
This section (on the left) allows you to add dynamic fields inside the content.
7077
<ol>
7178
<li>Select the appendix field</li>
@@ -75,7 +82,7 @@
7582
>Copy and paste the placeholder expression in the content</li>
7683
</ol>
7784
</p>
78-
</group>
85+
</div>
7986
</sheet>
8087
</form>
8188
</field>

agreement_legal/views/agreement_clause.xml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,16 @@
4949
<field name="sequence" />
5050
</group>
5151
</group>
52-
<field name="content" widget="html" />
53-
<group class="oe_edit_only">
54-
<group>
52+
<field
53+
name="content"
54+
widget="html"
55+
placeholder="Enter content here..."
56+
/>
57+
<div
58+
class="oe_edit_only alert alert-light d-flex justify-content-between flex-xl-row flex-column"
59+
role="status"
60+
>
61+
<group class="flex-fill">
5562
<field
5663
name="field_id"
5764
domain="[('model_id', '=', 'agreement.clause'),
@@ -70,7 +77,7 @@
7077
<field name="default_value" />
7178
<field name="copyvalue" />
7279
</group>
73-
<p>
80+
<p class="px-xl-4">
7481
This section (on the left) allows you to add dynamic fields inside the content.
7582
<ol>
7683
<li>Select the clause field</li>
@@ -80,7 +87,7 @@
8087
>Copy and paste the placeholder expression in the content</li>
8188
</ol>
8289
</p>
83-
</group>
90+
</div>
8491
</sheet>
8592
</form>
8693
</field>

agreement_legal/views/agreement_recital.xml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,16 @@
4444
<field name="sequence" />
4545
</group>
4646
</group>
47-
<field name="content" widget="html" />
48-
<group class="oe_edit_only">
49-
<group>
47+
<field
48+
name="content"
49+
widget="html"
50+
placeholder="Enter content here..."
51+
/>
52+
<div
53+
class="oe_edit_only alert alert-light d-flex justify-content-between flex-xl-row flex-column"
54+
role="status"
55+
>
56+
<group class="flex-fill">
5057
<field
5158
name="field_id"
5259
domain="[('model_id', '=', 'agreement.recital'),
@@ -65,7 +72,7 @@
6572
<field name="default_value" />
6673
<field name="copyvalue" />
6774
</group>
68-
<p>
75+
<p class="px-xl-4">
6976
This section (on the left) allows you to add dynamic fields inside the content.
7077
<ol>
7178
<li>Select the recital field</li>
@@ -75,7 +82,7 @@
7582
>Copy and paste the placeholder expression in the content</li>
7683
</ol>
7784
</p>
78-
</group>
85+
</div>
7986
</sheet>
8087
</form>
8188
</field>

agreement_legal/views/agreement_section.xml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,16 @@
4646
</group>
4747
<notebook>
4848
<page string="Content">
49-
<field name='content' nolabel="1" />
50-
<group class="oe_edit_only">
51-
<group>
49+
<field
50+
name='content'
51+
nolabel="1"
52+
placeholder="Enter content here..."
53+
/>
54+
<div
55+
class="oe_edit_only alert alert-light d-flex justify-content-between flex-xl-row flex-column"
56+
role="status"
57+
>
58+
<group class="flex-fill">
5259
<field
5360
name="field_id"
5461
domain="[('model_id', '=', 'agreement.section'),
@@ -67,7 +74,7 @@
6774
<field name="default_value" />
6875
<field name="copyvalue" />
6976
</group>
70-
<p>
77+
<p class="px-xl-4">
7178
This section (on the left) allows you to add dynamic fields inside the content.
7279
<ol>
7380
<li>Select the section field</li>
@@ -78,7 +85,7 @@
7885
>Copy and paste the placeholder expression in the content</li>
7986
</ol>
8087
</p>
81-
</group>
88+
</div>
8289
</page>
8390
<page string="Clauses">
8491
<field

0 commit comments

Comments
 (0)