This question has been flagged

2 documents on:

  • how to configure OOTB to have different names for the same product
  • how to import this information later to the product template
Avatar
Discard
Author Best Answer

I’ll share with 2 documents with you:

1. A PDF with the step by step on how to configure OOTB to have different names for the same product, for example, Product is called PPProduct bye the Client A and Producttt by client B and we want this reflected on their SO

Context:
When a product has different names or codes for different clients, and we want to have the
name/code of product on the SO that correspond to the customer we are selling the product.
*So, one product and different name/codes for different customers and/or vendors
Product: Test product
Client name for “Test Product” is: Name
Client code for “Test Product” is: Code
So we want to have →

Solution:
There are 2 solutions:
1) We add the Customer on the Vendor tab, with their product’s name/code and Odoo will
use that info on the SO


Problems: we will have vendors and customers mixed on the same list

2) We add a new tab, for the customers and one more for the vendors, so we split the
existing tab/field in two and we will have the product’s name/code on the SO, by using
the same base field (“seller_ids”)

Step by Step solution:

Here the details on how to:
1) We create the tab on the product template for the Product’s name – client


2) Then we add a one2many field linked to “Supplier Pricelist”


And we will name this field “Clients” for example.


3) We go to the list view of the new field and add a new Boolean field called “Customer”:


*We will hide this field later, but we need it now, to check that our flow is working
correctly.

4) Here we can modify the fields displayed according to your client’s needs. We can delete
some fields from here like currency, quantity, UoM, price. Then add: vendor name and
vendor code (Of course we should change the name of the fields so the user does not get
confused)
Also, we need to make the field now called “Customer” editable, (it comes as read only)


5. Go to the list view of our field, we will go to the tab “view” and make it editable, so the
user will not see the options we delete from the view, like price, currency, etc.


6) Now we go to “more” information about the field “Clients” and we will modify the domain
as: [('x_studio_customer','=',True)]

7) And we will also add a context to this field: context="{'default_x_studio_customer': True}"


After saving the last modifications it will look like this: 


8) And it is ready to use and add some client’s SKU: 


9) Now if we go and sell this product to this client, it will show like:


10) You can apply almost the same steps to now add the tab for the vendors (steps 1 to 3,
and 6 – 7)


11) And finally, you can hide the “customer” and “vendor” boolean fields:


12) You can hide the base field of the purchase tab, it will contain both, customers and vendor.


 Resume of Formulas/Code used:
*Formula:
Context field customer: "{'default_x_studio_customer': True}"
Domain: [["x_studio_customer","=",True]]
Contexte field vendor: "{'default_x_studio_vendor: True}"
Domain : [["x_studio_vendor","=",True]]

Advise and Tips:
*You must create 2 boolean fields, one for vendors and one for customer, otherwise the domain
“filter” will not work.

*Be careful with the list order: once you add vendors and clients, remember that odoo will take
the first on the list (for any route configured: Reordering rules/MTO), and it could be a vendor or
a customer (depending which you added first).
Solution: You can hide this field for almost all users and let it visible for the managers so they will
be able to check the entire list and move registers if needed. 


2. A template on how to import this information later to the product template.




Avatar
Discard

Nice one! Thanks!