We’re running Odoo 14 Enterprise in a cloud deployment and experiencing issues with pricing rules not applying correctly for multi-customer groups. Our setup includes tiered pricing based on customer groups (Gold, Silver, Bronze) with specific discount rules configured in the pricing management module.
The problem occurs when customers belong to multiple groups - the system seems to apply only the first rule it encounters rather than evaluating all applicable rules and selecting the best price. We’ve verified the rule priority settings and sequence numbers are correct. The configuration works fine in our test environment but fails in production cloud.
Here’s our current pricelist configuration:
Pricelist Rules:
- Gold Customer: 15% discount, Priority 10
- Silver Customer: 10% discount, Priority 20
- Bronze Customer: 5% discount, Priority 30
- Multi-group override: Best price selection enabled
Has anyone encountered similar issues with pricelist evaluation in cloud deployments? We need to ensure the correct pricing applies for customers in overlapping groups.
Check your customer group hierarchy configuration. In Odoo 14, when multiple groups are assigned, the system should evaluate based on the most specific group first, but this behavior can be overridden by custom modules or incorrect priority settings. Navigate to Sales > Configuration > Pricelists and verify that your ‘Apply On’ conditions are set correctly for each rule. Also confirm that the ‘Base Pricelist’ field isn’t creating circular references between your group-based pricelists.
Thank you all for the suggestions! The custom computation method from integration_expert_23 worked perfectly. We implemented it as a custom module and deployed it to our cloud instance. After clearing the cache and restarting the workers, the multi-group pricing is now evaluating correctly and selecting the best price across all applicable customer groups. We also increased our worker count to 6 as recommended, which improved overall performance. Much appreciated!
I encountered this exact scenario with a client running Odoo 14 Enterprise in a cloud environment. The issue stems from how the pricelist computation engine handles multiple customer group memberships when the rules have overlapping conditions. The problem is that the standard computation method in cloud deployments doesn’t properly aggregate all applicable rules before selecting the best price - it exits early after finding the first matching rule based on priority order.
Here’s the solution that worked for us:
from odoo import models, fields, api
class ProductPricelist(models.Model):
_inherit = 'product.pricelist'
@api.model
def _compute_price_rule_multi_group(self, products_qty_partner, date=False, uom_id=False):
# Override to evaluate ALL applicable rules for multi-group customers
self.ensure_one()
if not products_qty_partner:
return {}
# Get all customer groups for partner
partner = products_qty_partner[0][2]
if partner:
partner_groups = self.env['res.partner.category'].search([
('partner_ids', 'in', partner.id)
])
# Evaluate rules for each group and select best price
all_prices = []
for group in partner_groups:
group_rules = self.item_ids.filtered(
lambda r: group in r.categ_id
)
for rule in group_rules:
price = rule._compute_price(products_qty_partner[0][0],
products_qty_partner[0][1],
partner, date, uom_id)
all_prices.append((price, rule.id))
# Return minimum price with rule reference
if all_prices:
return min(all_prices, key=lambda x: x[0])
return super()._compute_price_rule_multi_group(products_qty_partner, date, uom_id)
You’ll need to add this as a custom module in your cloud deployment. Also ensure your cloud instance has the proper worker configuration to handle concurrent price calculations - set --workers=4 minimum and --max-cron-threads=2 in your deployment configuration. After implementing this, clear the pricelist cache using the command line interface or restart your cloud instance to force cache invalidation.