Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
4600 Visualizzazioni

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?

 

Avatar
Abbandona
Risposta migliore

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.

Avatar
Abbandona

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

@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'.

Autore Risposta migliore

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

Avatar
Abbandona

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

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
Post correlati Risposte Visualizzazioni Attività
2
feb 25
5973
1
dic 24
1497
1
nov 22
16072
3
ago 22
13126
2
ago 22
4571