Uncaught Typeerror: Cannot Read Property '1' of Undefined
Hullo guys, I am facing this trouble when i am trying to create a new customer. Tin can you delight help me correct this bug. Thank you in advance
12 Semua Jawaban
This error is because there is a belongings field in that model, on that form that doesn't accept his generic value defined, probably someone delete information technology.
you should be getting this aforementioned mistake in one case for every property with no generic value inside that form.
the model is the object, for example the partner 'res.partner'
What is a holding field?
https://accounts.openerp.com/forum/Help-1/question/24622/
Where can I ascertain the generic value?
first you need to know the belongings y'all are going define, to know that, get developer mode on that form and bank check for fields that begins with 'belongings', properties are usually accounts, in res.partner we as well have the toll-lists.
so lets say for case our belongings is 'property_account_receivable' from the partner object, which is a many2one field to the object account.account
now we go to settings --> parameters --> configuration parameters
we filter for generics and search for it, if at that place is no lines, then thats a problem and we need one.
so nosotros create 1 with the name:'property_account_receivable', field: Account Receivable, type:many2one, resource:[no value], account.account, and the default account we would want to put.
Hullo.
The solution is:
In the file /addons/web/static/src/js/view_form.js
Replace the lines:
if (! no_recurse) { var dataset = new case.web.DataSetStatic(this, this.field.relation, cocky.build_context()); this.live(dataset.name_get([self.get("value")])).washed(part(data) { self.display_value["" + self.become("value")] = data[0][1]; cocky.render_value(true); }); }
By:
if (! no_recurse) { var dataset = new instance.web.DataSetStatic(this, this.field.relation, cocky.build_context()); this.alive(dataset.name_get([cocky.get("value")])).done(role(data) { if(typeof data[0] != "undefined" && data[0] != nil && data[0].length > 0){ self.display_value["" + cocky.get("value")] = information[0][1]; self.render_value(true); } else { return false; } }); }
Usually this mistake comes when you lot endeavor to pass an non existing id to a many2many/many2one field.
This fault occurs in Chrome Browser when you read a property or call a method on an undefined object . Uncaught TypeError: Cannot read property of undefined mistake is probably easiest to sympathize from the perspective of undefined, since undefined is not considered an object type at all (simply its own undefined type instead), and backdrop can only belong to objects within JavaScript. There are a few variations of this mistake depending on the property you lot are trying to admission. Sometimes instead of undefined it volition say null.
http://internet-informations.com/js/iq/unerror.htm
You could become the real reason with a minor js print to debug.
Go to \addons/spider web/static/src/js/view_form.js#L533 and add together the following lines:
panel.log("FIELDNAME " +fieldname); console.log(self.fields);
After reproduce the error and then check on your browser developer tools console to see the problem.
For chrome use right-click and inspect option and see the console.
Answer by @oscarolar
If using nginx, read this mail >>
http://www.developpez.net/forums/d1498867/logiciels/solutions-d-entreprise/erp/odoo-ex-openerp/v8-importation-csv-error-cannot-read-property-1-of-undefined/
I am getting this fault when trying to add a customer invoice. The error appears when I try to add an invoice line, it gives this error and does not permit me to add an invoice line.
I checked the property fields as suggested and all fields seems to be there. The system is a fresh install with a custom nautical chart of accounts. Account payable and receivable are available for the customer. Also income and expense accounts are available for the product.
Please aid.
UPDATE: The result is now fixed. At that place was non default account set for the generic properties of receivable, payable, expense and income accounts. Thanks then much for your help.
This is happening also with my when I access the Products form and click on Create. Post-obit the instructions I found five property values on product class: 3 for stock counter parts (property_stock_procurement, property_stock_production and property_stock_inventory) and 2 for accounting (property_account_income and property_account_expense). All v holding values are defined on settings / parameters / configuration parameters. Any idea please?
I am besides getting this same mistake when creating a new product from the point of sale menu. When I create a new product from anywhere else (like purchase menu) I do not get this fault.
It happens for all users for me.
I take tried setting defaults in debug manner only that doesn't seem to discover this 'undefined ' field.
The only matter I might exist able to attribute this to is deleting the others category from point of sale categories (but it recreates it automatically).
Source: https://www.odoo.com/id_ID/forum/bantuan-1/uncaught-typeerror-cannot-read-property-1-of-undefined-28100
0 Response to "Uncaught Typeerror: Cannot Read Property '1' of Undefined"
Publicar un comentario