Skip to Content
Menu
This question has been flagged
1 Reply
782 Views

Problem Description:

I've added a dropdown field to the product model using Odoo Studio and would like to visually represent the selected value by adding a ribbon to the product image in both the Sales and Inventory modules.

Details:

  1. Field Information:
    • Field Type: Dropdown (Selection)
    • Technical Name: Assume it's x_my_field (replace with the actual technical name you have).
    • Values: Example: [('value1', 'Label 1'), ('value2', 'Label 2'), ...] (replace with your actual dropdown values).
  2. Desired Behavior:
    • When viewing a product in the Sales or Inventory module, based on the selected value of the dropdown, a ribbon should be displayed on the product image.
    • The ribbon should show the label or value of the dropdown selection.
    • It would be ideal if the ribbon color could change based on the dropdown selection, though this is not mandatory.
  3. Current Status:
    • I've successfully added the dropdown field using Odoo Studio.
    • I'm currently unsure how to proceed with adding the ribbon to the product image based on the dropdown value.


Avatar
Discard
Author Best Answer

i fixed the issue by adding the code bellow in product template xml :

   

   

   

   


"

Avatar
Discard