Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
9002 Ansichten

Hello,

I'm inheriting analytic_account_views and commenting out a single field which shouldn't be displayed according to my need but what happens here is the view won't change no matter what i change in the inherited view. No errors are thrown and in the UI too my inherited view code gets displayed but the view or the fields that i changed won't change or won't reflect in the view. Can anyone tell why or what's happening?

P.S: Version is 12

<record model="ir.ui.view" id="TestAnalyticAccountCreateForm">
<field
name="name">analytic.analytic.account.form.inherit.test</field>
<field
name="model">account.analytic.account</field>
<field
name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
<field
name="arch" type="xml">
<xpath
expr="/form/sheet/group[@name='main']" position="replace">
<group
name="main">
<group>
<field
name="code"/>
<!--<field
name="partner_id"/>-->
</group>
<group>
<field
name="group_id"/>
<field
name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
<field
name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/>
</group>
</group>
</xpath>
</field>
</record>

Avatar
Verwerfen

please check that the xml file you registered into the manifest.py file and another is make sure yourself that into xml file you don't use <data noupdate="1">

Autor

I made sure of it and there are no noupdate tags present in the xml file

Beste Antwort

Hi,

Try this code,

<record model="ir.ui.view" id="view_account_analytic_account_form_inherit">
<field name="name">analytic.analytic.account.form.inherit.test</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
<field name="arch" type="xml">
<field name="partner_id" position="replace">
</field>
</field>
</record>

Before,



After,



Thanks

Avatar
Verwerfen
Autor

What if i want to insert a new field into that existing group? Also how did you achieve that? I mean without using xpath tag how did the view change?? Can you please tell me what's going on?

Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Nov. 24
2032
5
Juli 24
94171
1
Dez. 23
3376
1
Mai 22
4210
1
Sept. 21
9077