Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda

Hello Everyone!

I have migrated Odoo 18 to another server running same Odoo 18, soon I started encontering an Error: "res.partner"."vat_label" field is undefined. I have even tried adding the field to the res.partner model but nothing seems to work.  Please have anyone encounter such an error?
Full error code below:

UncaughtPromiseError > OwlError

Uncaught Promise > An error occured in the owl lifecycle (see this Error's "cause" property)

Occured on mydomain.com on 2025-05-26 03:22:40 GMT

OwlError: An error occured in the owl lifecycle (see this Error's "cause" property)

Error: An error occured in the owl lifecycle (see this Error's "cause" property)

at handleError (https://mydomain.com/web/assets/cc8f8e6/web.assets_web.min.js:947:101)

at App.handleError (https://mydomain.com/web/assets/cc8f8e6/web.assets_web.min.js:1579:29)

at ComponentNode.initiateRender (https://mydomain.com/web/assets/cc8f8e6/web.assets_web.min.js:1037:19)

Caused by: Error: "res.partner"."vat_label" field is undefined.

at Field.parseFieldNode (https://mydomain.com/web/assets/cc8f8e6/web.assets_web.min.js:7592:330)

at https://mydomain.com/web/assets/cc8f8e6/web.assets_web.min.js:8506:927

at visit (https://mydomain.com/web/assets/cc8f8e6/web.assets_web.min.js:4652:51)

at visitChildren (https://mydomain.com/web/assets/cc8f8e6/web.assets_web.min.js:4651:171)

at visit (https://mydomain.com/web/assets/cc8f8e6/web.assets_web.min.js:4652:129)

at visitChildren (https://mydomain.com/web/assets/cc8f8e6/web.assets_web.min.js:4651:171)

at visit (https://mydomain.com/web/assets/cc8f8e6/web.assets_web.min.js:4652:129)

at visitChildren (https://mydomain.com/web/assets/cc8f8e6/web.assets_web.min.js:4651:171)

at visit (https://mydomain.com/web/assets/cc8f8e6/web.assets_web.min.js:4652:129)

at visitXML (https://mydomain.com/web/assets/cc8f8e6/web.assets_web.min.js:4652:202)

Avatar
Buang
Jawaban Terbai

Go to Debug Mode
In Odoo, activate Developer (Debug) Mode.

Go to:
SettingsTechnicalViews

Search:
In the search bar, type:

vat_label

Open each view found and remove this line if present:
<field name="vat_label"/>

Save the view. Repeat for all views that use vat_label.

A view is trying to show a field vat_label that no longer exists. Removing it from the view stops the error.

Avatar
Buang
Jawaban Terbai

Hi,



The error comes because the field doesn't load into the model 'res.partner'

* Check whether the model is inherited correctly

* Check the init file.

* Check the view that is inherited.


You can try something like this.


Python 


from odoo import models, fields

class ResPartner(models.Model):

    _inherit = 'res.partner'


    vat_label = fields.Char(string="Vat Label")



Init 


from . import res_partner



XML



<record id="res_partner_view_form" model="ir.ui.view">

    <field name="name">res.partner.view.form.inherit</field>

    <field name="model">res.partner</field>

    <field name="inherit_id" ref="base.view_partner_form"/>

    <field name="arch" type="xml">

         <xpath expr="//field[@name='vat']" position="after">

            <field name="vat_label"/>

        </xpath>

    </field>

</record



Manifest


'data': [

    'views/res_partner_views.xml',

],



Hope it helps

Avatar
Buang
Jawaban Terbai

Have you tried to update base to resolve the issue

Avatar
Buang
Penulis

If you click to update the base module, it will still popup the same error message, therefore you cannot update

Post Terkait Replies Tampilan Aktivitas
2
Feb 20
4133
1
Sep 18
7557
0
Mar 15
4730
2
Mar 15
6755
1
Mei 25
2110