İçereği Atla
Menü
Bu soru işaretlendi
3 Cevaplar
1189 Görünümler

We have a shop with about 5000 different products. Each product can have 5-50+ colour variants. 

Some of the variant colours are discontinued by the manufacturer.

On these variants we want to offer a certain discount %


We now mark the discontinued colours with a specific tag (on the variant). 


How can we define a rule to give x% discounts on the variants with tag y linked to it ? 
The discounted price should be available in POS, webshop and manual order entry. 

I appreciate all help on this topic.


(we are using V17)

Avatar
Vazgeç
Üretici En İyi Yanıt

Thanks Anaghan,

Option 1 is not feasable because the category is also used to direct the financial transactions in our accountancy and therefor does not offer much flexibility. 

Option 2 we tried and it calculates the discount on the webshop on the checkout page, but it does not show the prices with a discount on the product page. 
We also noticed that in POS the entered discount is shown on all products and not only on the selection we made. 


Avatar
Vazgeç
En İyi Yanıt

Hi, you have two options in Odoo that can fit your requirements. You can choose the one that benefits you the most:

  1. POS Pricelist: Allows you to set different product pricing based on product category or by selecting specific products.
  2. POS Discount & Loyalty: Provides features for applying discounts and offering loyalty programs to customers. here is the option product tag.

Please check the picture below to see the details and let me know if you have any questions.

Avatar
Vazgeç
En İyi Yanıt

Hello, one solution maybe is Server action, where modified with python code. In this server action you should search the products with the tags are you interested and modify the field discount.



This solution is easily to programming in odoo with python. You don t need to use a IDE, you con programming in Odoo, in Settings> Technical> Server Action

Code example in comment.

Avatar
Vazgeç

Code Example:

# Create discount value for products with tag 'Discontinued'
discount_percentage = 20 # 20% discount

# Search for the tag 'Discontinued'
discontinued_tag = env["product.tag"].search([("name", "=", "Discontinued")], limit=1)
if discontinued_tag:

discontinued_products = env["product.product"].search(
[("tag_ids", "in", discontinued_tag.id)]
)

# Apply discount to all products with the 'Discontinued' tag
for product in discontinued_products:
original_price = product.lst_price
discounted_price = original_price * (1 - discount_percentage / 100)
product.lst_price = discounted_price

else:
raise UserError("Tag 'Discontinued' not found")

İlgili Gönderiler Cevaplar Görünümler Aktivite
3
Oca 21
10917
1
Mar 18
3572
0
Şub 17
2698
0
Ağu 15
3734
2
Kas 24
2398