Odoo Help

0

How to create a drop down list field that allows user to "Create and Edit"

By
Ken Kasai
on 1/19/15, 7:44 AM 828 views

I created a custom model called "x_hr.accounttype" in settings > database > models. Then in the custom model, I created a field called "Account Type" (char size = 0). After that, in HR Employee, I created a many2one field called "Account Type" and object relation as "x_hr.accounttype". It works,

But when I create anything in "Create and Edit" field of the Account Type, the output is always "x_hr.accounttype,1" is there anyone can help?

 

1

Hi,

You just need to define "name" field in your model. It will resolve your issue.

If you are creating new model using python code then you can give either one column with "name" or you need to set _rec_name = '<column>'.

I hope it will fix your issu.

Can we take any other filed than 'name' directly using many2one relation..

aci aisha
on 1/20/15, 1:05 AM

@Aci, not without coding. There are ways, but if you want to just create everything out of configuration, you have to have a field called 'name'.

Ivan
on 1/20/15, 2:13 AM
0
Ken Kasai
On 1/20/15, 12:55 AM

how to define the "name" field in the model? can you give me an example? thank you

Hi, You just need to make one more field with field name is "name". I think it is clear to you.

Emipro Technologies Pvt. Ltd.
on 1/20/15, 1:02 AM
Hi, thank you for your help. I added a field called "name" in the model. but the output of the drop downlist became "False". 

On Tue, Jan 20, 2015 at 2:02 PM, Emipro Technologies Pvt. Ltd. <erp@emiprotechnologies.com> wrote:

Hi, You just need to make one more field with field name is "name". I think it is clear to you.

Emipro Technologies is best in Odoo & eCommerce Application development based outsourcing software firm. We deliver any kind of complex solutions in the domain of Odoo and eCommerce to customers accross the globe. Being in IT business since 2011, We have a strong team of skilled experienced IT experts.Our customers are companies of all sizes ranging from startups to large enterprises who realize that they need a professional internet solution to generate revenue streams, establish communication channels or streamline business operations.

Our Services in Odoo includes,
  • Installation
  • Customization
  • Configuration
  • Software Training
  • After Sale Support
  • Maintenance
  • Consulting
Contact info@emiprotechnologies.com for any kind of queries in Odoo. Visit www.emiprotechnologies.com for more details.




 

Sent by Odoo S.A. using Odoo about Forum Post How to create a drop down list field that allows user to "Create and Edit" (73550)



--
Regards,

Ken Kasai, Software Engineer
NABI Computer Systems
Tel     : 632-985-6755
Fax    : 632-854-2643
skype/ym id: kenkasai222
Ken Kasai
on 1/20/15, 1:05 AM

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 1/19/15, 7:44 AM
Seen: 828 times
Last updated: 3/16/15, 8:10 AM