V18.2:


V18.3+


This was useful for cases in which our clients need to identify our products based on specific names or codes.
We could achieve this again using the Quote Calculator:
Follow the these steps:
1) Enable Quotation Templates from settings and create one adding a Calculator

2) Using Studio, create a new model with the following fields :
- Many2one to Contacts model (res.partner)
- Many2one to Products model (product.product)
- Char field to enter the new name
- Char field to enter the new code


3) Add the list view to the Quote Calculator


4) Inside the Spreadsheet (Quote Calculator), add the field "ID" from the contact and from the Product
Tip: You can copy and paste one of the titles of the columns to copy the correct formula, and only add ".id" at the end of the technical name of the field.
Don't forget to drag down the formula to fill the other cells.
Example:

5) Inside "Sheet1" Odoo will show automatically the information added to the current Sale Order Lines. In this table, add the next columns.
- Product ID (product_id.id)
- Quotation Customer ID (order_partner_id.id)
Tip: You can also copy and paste the original formulas from this table to add the columns. This table uses "=ODOO.LIST.HEADER" and "=ODOO.LIST" formulas.
If not needed, you can also delete/hide the other columns:

6) Then add other 3 columns with only the title as a text (not using formulas yet):
- Product code
- Product name
- Line description

7) Using a Spreadsheets formula, fill the cells for product code and product name in Sheet1, matching the product and customer ID from both sheets:
Option 1: =INDEX('Client product name (List #2)'!F:F,MATCH(1,('Client product name (List #2)'!B:B=B2)*('Client product name (List #2)'!D:D=L2),0))
Explanation: Retrieves column F value from second sheet (This is the "Client product name" column), in which the client ID and product id (in the second sheet) matches the IDs from sheet 1.

Option 2: You could also use an XLookUp, but first you would have to create a new column (in both tables) to, for example, concatenate Product ID and Customer ID in the same cell and use that to look for the correct record.
Example:


Use an "IFERROR" formula to avoid "#N/A" errors if the product doesn't have a new code or name created in the new model, and, moreover, to use the original product code (reference) and name.
You can add the columns to get this information using the same method in step 4 and 5.

8) In the Line Description column, add a formula that concatenates the Code and Name column, and sync the cell with the description field in sale order lines:
To sync the field with the cell, right-click it > "Sync with field" > Select "Description" field, and drag down the cell.

Also add an IF formula to avoid adding brackets when no code is set.

9) Create a new sale order
- Select the customer
- Select the quotation template
- Select the products
- Enter the Quote Calculator smart button
- Click on Save
Now each product will have the custom names and codes based on the selected customer. If no match is found, Odoo will add the original product name and code.
Original sale order:

Custom product names model linked to the quote calculator:

Final customized description for each product in the sale order:

Result:
