I have a many2one field to 'res.partner' it's preferred vendor field , it showing both vendors and customers, and when I create partner from this field not listing in vendor list . how can I manage it ?
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
Hi,
You can simply add domain in many2one field ,
Like
<field name="may2one" domain="[('supplier_rank', '=', True)]" context="{'default_supplier_rank': 1}"/>
It'll display vendors only , and if you create vendor from many2one field the partner will display in your vendor list .
Regards
For customers use customer_rank instead of supplier_rank
Hi Sergio:
Odoo 13 has done away with tagging a partner as a customer and a vendor using a boolean field. It has introduced the concept of a customer rank and a supplier rank which is maintained dynamically based on sales and purchases processed in the system. A partner with a customer_rank > 0 is treated as a customer and a partner with a supplier_rank > 0 is treated as a vendor. A partner could be both if both ranks are > 0.
You can find more information in the following thread:
https://www.odoo.com/forum/help-1/question/customer-supplier-odoo-13-157583
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up