Managing Customers and Vendors in Odoo: A Guide to Separating Your Contacts

How to Separate Customers and Vendors Contacts in Odoo
July 7, 2024 by
Managing Customers and Vendors in Odoo: A Guide to Separating Your Contacts
Hamed Mohammadi
| No comments yet

Keeping your customer and vendor information organized is crucial for efficient business operations in Odoo. In earlier versions (pre-v13), Odoo relied on boolean fields within the partner model to differentiate between these two categories. However, starting from v13, a more nuanced approach was introduced.

This blog post dives into how Odoo 16 manages customer and vendor contacts, explaining the new system and offering tips for optimal data organization.

From Booleans to Ranks: A Shift in Contact Classification

Prior to v13, Odoo used simple "Is a Customer" and "Is a Supplier" boolean fields to classify contacts. These fields were either true or false, offering a limited way to define a contact's role.

Odoo 16 introduces a more flexible system with two new fields: "Customer Rank" and "Supplier Rank." These fields hold integer values, allowing for a more dynamic classification system.

Odoo auto assigns the value of 1 for customer_rank field for contacts created via sales module. But the field remains as 0 if the contact was created in some other app like contacts app. We have seaveral such contacts to whom we have sent quotations but no invoices have been generated nor have the sales orders been confirmed.

Understanding Customer and Supplier Ranks

Here's how the ranking system works:

  • Rank 0: A contact with both "Customer Rank" and "Supplier Rank" set to 0 signifies they can potentially act as both a customer and a vendor. This is the default setting when creating a contact from the Contacts app.

  • Rank 1:

    • A contact with "Customer Rank" set to 1 and "Supplier Rank" at 0 is identified primarily as a customer. This occurs when a contact is created from any menu associated with Customers (CRM, Sales, Website, etc.).

    • Conversely, a contact with "Supplier Rank" set to 1 and "Customer Rank" at 0 is identified primarily as a vendor. This happens when a contact is created from any Vendors menu (Purchase, Accounting).

Essentially, a higher rank (1 or above) indicates a preferred role for the contact, while a rank of 0 suggests they can potentially fulfill both roles.

A partner is a supplier when the value of the field supplier_rank is greater than 0 and a partner is a customer when the value of the field customer_rank is greater than 0

You can add a domain [('supplier_rank','>=',0)] for suppliers and  [('customer_rank','>=',0)]

Now if you want a partner to be supplier and customer then give supplier_rank and customer_rank a value greater than 0

Additional Considerations for Customer and Vendor Separation

While the ranking system provides a good foundation, here are some additional tips for managing customer and vendor contacts effectively in Odoo 16:

  • Leverage Filters: Odoo automatically applies filters based on contact ranks when creating Sales and Purchase Orders. This ensures you're selecting the right type of contact for each transaction.

  • Custom Fields: If you require a more granular classification system, consider adding custom fields to the partner model. These fields could categorize contacts based on product categories they purchase or services they provide.

  • Data Import Considerations: When importing contacts, be mindful of the default rank (0) assigned through the Contacts app. Update the ranks accordingly if you're importing known customers or vendors.

By understanding the ranking system and implementing these additional strategies, you can ensure your customer and vendor data is well-organized and readily accessible in Odoo 16, streamlining your business processes.

At first glance, the lack of a simple checkbox for classifying contacts as customers or vendors might seem like an odd design choice. However, there's a reason behind it. The Odoo development team opted for a more nuanced ranking system that allows for greater flexibility. This approach provides a more accurate representation of a contact's potential role within your business, acknowledging that some entities might interact with you in both customer and vendor capacities.

Managing Customers and Vendors in Odoo: A Guide to Separating Your Contacts
Hamed Mohammadi July 7, 2024
Share this post
Archive

Please visit our blog at:

https://zehabsd.com/blog

A platform for Flash Stories:

https://readflashy.com

A platform for Persian Literature Lovers:

https://sarayesokhan.com

Sign in to leave a comment