[IMP] document_page_reference: auto-fill reference when not supplied.

also, make reference optional in tree view and not the first field.
This commit is contained in:
Lois Rilo
2022-11-16 18:15:26 +01:00
committed by Anusha
parent 8cef3f268b
commit 9eb3d42dad
3 changed files with 51 additions and 9 deletions

View File

@@ -9,7 +9,10 @@
<field name="arch" type="xml">
<xpath expr="//h1" position="before">
<h2>
<field name="reference" placeholder="internal_reference" />
<field
name="reference"
placeholder="internal_reference (autofilled if not value is provided)"
/>
</h2>
</xpath>
<field name="content" position="attributes">
@@ -56,8 +59,8 @@
<field name="model">document.page</field>
<field name="inherit_id" ref="document_page.view_wiki_tree" />
<field name="arch" type="xml">
<field name="name" position="before">
<field name="reference" />
<field name="name" position="after">
<field name="reference" optional="hidden" />
</field>
</field>
</record>