Skip to Content
Menu
This question has been flagged
2 Replies
240 Views

Hello, I'm using Odoo version 17 Community Edition. When I try to access any product or the product reception screen, I encounter the following error message:



and here is the details of the error: 


UncaughtPromiseError > OwlError

Uncaught Promise > The following error occurred in onWillStart: ""product.template"."hs_code" field is undefined."


Avatar
Discard

It's highly unlikely this would happen just out of the blue. Any information on what was done, more or less recently, prior to the first occurrence of this issue? Did you maybe uninstall the stock_delivery module (this is where 'hs_stock' is initially defined) and have a custom view improperly extending a product template view? Any other recent modification/module installations?
Without any additional details its unlikely your issue can be resolved here.

Author

I just installed the website module before the error occurs. now i can acces to the product template but still i cant access to recieve products either from the purchase order smart button or from the inventory and i get the error :  UncaughtPromiseError > OwlError

Uncaught Promise > The following error occurred in onWillStart: ""stock.picking"."carrier_tracking_ref" field is undefined."

Best Answer

Hii,

Activate Developer Mode
Find Views Containing hs_code
  • Go to: Settings > Technical > User Interface > Views
  • Filter:
    • Model: product.template
    • Search in the list: hs_code
Edit the View
  • Click into any view that includes:

<field name="hs_code"/>

Refresh the Product Page

i hope it is use full

Avatar
Discard
Best Answer

Hi,


This error occurs because the Odoo frontend references a field called hs_code, but the field does not exist in your model definition (likely due to missing modules or custom code).


Try any of the methods


1- Upgrade the module where the field hs_code is defined.


2- Define the field in the model.

       from odoo import models, fields


class ProductTemplate(models.Model):
_inherit = 'product.template'

hs_code = fields.Char(string="HS Code")

3- If you don’t care about the hs_code field, then remove the field from the view 



Hope it helps

Avatar
Discard