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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
3
Replies
1981
Views
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
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