In Odoo, customer, suppliers, and other types of contacts are all stored in the same model (database table).
In Odoo 12 it was easy to see whether a contact was a customer or a vendor (supplier), and you could make changes.

In Odoo 13, the fields “Is a Customer” and “Is a Supplier” on a contact have been removed. Instead there are two new fields: Customer Rank and Supplier Rank – but they are not displayed.
Remove customer/supplier fields on res.partner [GitHub]
Fortunately, if you create a contact from the Customer menu option it will be a Customer, which means that it will have Customer Rank set to 1 (the equivalent of Is a Customer set to ‘True’ in Odoo 12).
Note: In Odoo 13 it is possible to select any contact as a customer on a Quotation / Sales Order whether or not the Customer Rank is set.
Similar logic applies for suppliers / vendors.
The possible problems in Odoo 13 are
- We create a contact and then remember they should have been a customer (or a supplier)
- We have a contact who is both a customer and a supplier
So we will create a Server Action to set Customer Rank, or Supplier Rank, or both, to 1.
You need to be in Developer mode. Then navigate to Settings / Technical / Server Actions

Click on “Create”

- Enter an action name (“Set as Customer”)
- Select the Model (Contact / res.partner)
- In “Data to Write”
- Select the field (Customer Rank)
- Enter the value (1)
Press Save.
Contextual Action
The next step is to click on “Create Contextual Action”

And you will find it in the “Action” dropdown:


It’s simple to go a little bit further, and set a contact to be both a customer and a supplier:

You could do the same in Odoo 12 or earlier, the only differences being the field names and values:

Perfect, thank you.
LikeLike
Hi, Thank you for your post. It is working in SO and PO.
But I still can’t find Vendor in Purchase at Product. Inventory > Product > Purchase > Vendor
LikeLike
Sorry, I am not clear on the meaning. Can you post a link to a screenshot to give me more information?
LikeLiked by 1 person
1. Created server actions , and set Yangon Factory as Vendor.
2. Tried applied this record on both Yangon factory and SBAYW company.
3. PO > Vendor (still can’t see)
4. PO > Change company from SBAYW to Yangon Factory, can see all contact from Yangon Factory.
My goal is to set Yangon Factory as Vendor in Inventory > A product > Purchase.
Please check vendor5.png from Google drive link . https://drive.google.com/open?id=1nuu1Ay9-vfq9-bPruG6PwDClLEUz6ZYV
Thank you.
LikeLike
My understanding is that you have two companies (Yangon factory and SBAYW company). I suggest that you change the company on vendor Yangon factory to be blank and then you can use it in SBAYW company. More on multicompany here: https://odootricks.tips/multicompany-in-odoo-13/
LikeLike
I tried this, but a contact I set as customer is showing up as a vendor in the vendor selection field.
Please I need help with this thanks
LikeLike
As explained above, when creating an RFQ / PO you can select any contact, so it needs customization to limit it to vendors only. This seems odd, but that is how it currently works!
LikeLike
Please, how can I return an action using server action?
I want to create a record in a model from a button click, see code below:
def create_po(self):
par=self.env[‘purchase.order’].create({‘partner_id’:self.x_product_requisition.x_ven_id})
action = {par}
self.x_product_requisition.x_ven_id is the record I want to be in the partner_id field i.e vendor field, in Purchase module
but it is not working
Please help me out
LikeLike