Odoo Help

1

How to add values to drpdown from a function?

By
aneesh ATEES Infomedia Pvt Ltd
on 7/31/15, 11:41 PM 431 views

How to add values to dropdown from a function.That means i want to return values to dropdwon from the function in the __py file

i want to display customer have at least one sale order..many2 one filed shows all the customer wen using res.partner. 2.wen using sale.order with one2many which shows correct count but display sale order number.i want customer number instead of sale order number

aneesh ATEES Infomedia Pvt Ltd
on 8/1/15, 12:24 AM
1

Tarek Mohamed Ibrahim

--Tarek Mohamed Ibrahim--
904
| 5 3 7
Gîza, Egypt
--Tarek Mohamed Ibrahim--

I am an old VFP developer on ERP

I have moved to 2p since Nov-2014 and started developing with Python on Odoo.

https://www.linkedin.com/profile/public-profile-settings?trk=prof-edit-edit-public_profile

tibrahim@2p.com.sa

Tarek Mohamed Ibrahim
On 8/1/15, 2:26 AM

Do you mean by a dropdown a many2one field in an Odoo/openERP view ?

create a calculated field in the res.partner table that holds the count of the sales order created for this customer, name it 'sale_count'. Make this field searchable.

in the many2one field that shows the customers add a domain filter as

domain = [('sale_count','>',0)]

I hope this works

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: 7/31/15, 11:41 PM
Seen: 431 times
Last updated: 8/17/15, 5:37 AM