Odoo Help


This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


adding new fields to sales order?

on 5/20/13, 10:45 AM 1,330 views

I created a model called res.reference to manage customer references, and it was done successfully. Now i want to add two fields of res.reference to sales order view so i added them in sale.order, but when i add them i got this error KeyError: 'name' please help... File "C:\Program Files\OpenERP 6.1-1\server.\openerp\osv\orm.py", line 2258, in name_get KeyError: 'name'

what is field name you are using if you use field name(name) change it its works show me code or post the code

on 5/20/13, 10:51 AM
On 5/20/13, 10:52 AM

what is field name you are using, if you use field name(name) change it, its works, show me code or post the code. or you did not give in your new module __openerp.py give 'depends': ['sale'],

if you use inherit class sale_order(osv.osv): _inherit = 'sale.order' _columns = {
'target_value':fields.integer('Target Value'), 'lead_target':fields.integer('Lead Target'), } sale_order() you dont want to give _name ="new name"

on 5/20/13, 11:02 AM

if the answer is correct just help the others or wrong just show me the code i will help you

on 5/20/13, 11:02 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


Asked: 5/20/13, 10:45 AM
Seen: 1330 times
Last updated: 3/16/15, 8:10 AM