Odoo Help

Welcome!

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.

1

Doubt in Python code

By
Remya
on 9/21/13, 2:25 AM 554 views

I have two models.

In first model

I have two field: Place(textbox), Type(Selection)-Source,Destination,Both

In second model

I have source, destination, both are many2one fields.

in source field,i want place with type source & both

in destination field,i want place with type destination & both

How can i write the code?

For example:

3 places -- src,dest,both

src (type:source),

dest(type:destination) ,

both(type:both).

When call the source field in any other form, i want to list down src,both in my source field.

0
klacus
On 9/21/13, 3:46 AM

You have to check the docs. The python is just one thing what you should now. https://doc.openerp.com/v6.1/developer/03_modules_2/ https://doc.openerp.com/trunk/server/api_models/

You can find easy way the solutions if you check the source code. I can paste the code here, but I think you cannot use in proper way.

Can you please provide the code?

Remya
on 9/21/13, 3:51 AM

Please define more deeply, the following: " in source field,i want place with type source & both

in destination field,i want place with type destination & both

"

klacus
on 9/21/13, 4:09 AM

For example: src (type:source), dest(type:destination) , both(type:both). When call the source field in any other form, i want to list down src,both in my source field.

Remya
on 9/21/13, 4:14 AM

Try for a function field of type selection

Maniganda
on 9/24/13, 11:26 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)

Stats

Asked: 9/21/13, 2:25 AM
Seen: 554 times
Last updated: 3/16/15, 8:10 AM