This module solves the problem of **compounded margins** when using chained pricelists in Odoo. By default, Odoo applies each pricelist rule's margin on top of the previous result, leading to compounded percentages. This module provides an option to calculate margins **additively** instead.

**Problem Solved:**

When you chain pricelists (Pricelist A → Pricelist B), standard Odoo applies margins in cascade:

* Base price: 4.68€
* Pricelist A: -5% discount → 4.68 × 0.95 = 4.446€
* Pricelist B: 25% markup → 4.446 × 1.25 = 5.5575€
* **Result:** 5.56€ (effective margin: 18.8%) ❌

**With this module (Total Margin Mode):**

Calculate the **total margin** by summing percentages:

* Base price: 4.68€
* Total margin: -5% + 25% = 20%
* **Markup (on cost):** 4.68 × 1.20 = 5.616€ ✅
* **Commercial Margin (on PVP):** 4.68 / 0.80 = 5.85€ ✅

**Key Features:**

* ✅ **Additive margin calculation** across chained pricelists
* ✅ **Two calculation methods:** Markup (on cost) or Commercial Margin (on PVP)
* ✅ **Global min/max margin limits** with independent calculation type
* ✅ **Opt-in via checkbox** - doesn't affect existing pricelists
* ✅ **Compatible with custom bases** (e.g., last_purchase_price)
* ✅ **Supports all formula extras** (price_round, price_surcharge, price_min/max_margin)
* ✅ **Multi-level chains** - works with 2+ pricelists in sequence
* ✅ **Currency conversion** - handles multi-currency scenarios
* ✅ **Detailed logging** - debug pricing calculations easily
