Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
1319 มุมมอง

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)

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Have you tried to update base to resolve the issue

อวตาร
ละทิ้ง
ผู้เขียน

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.พ. 20
4299
1
ก.ย. 18
7787
0
มี.ค. 15
4942
2
มี.ค. 15
6915
1
พ.ค. 25
2340