How Can We Help?
A surcharge is an extra charge that changes over time while your part cost
stays the same — a Tariff Surcharge or an Energy Surcharge. Each active surcharge
adds its own line to every quote that is not yet confirmed, at its percent of the net price of
the products it applies to. Part cost is never changed. Manage them in
OJ Setup → Product Setup → Surcharges.
The whole screen and every write to the surcharge tables is gated on the licensed module
SURCHARGES_LEVIES (id 170). Without that module, saves are refused on the server even if the
screen is reachable.
What, where, who, when, why
| What | A list of percent surcharge rates (name + percent + validity window + scope), stored one per row. Each active rate becomes one managed line on every unconfirmed quote/order. |
| Where | OJ Setup → Product Setup → Surcharges. The quote lines themselves are created and removed by the order-entry engine — never edited by hand. |
| Who | Whoever manages pricing. Quote users never see this screen; they only see the resulting line, e.g. “Tariff Surcharge 7.5%”. |
| When | When a tariff, energy or similar percentage adder takes effect; when its rate changes (end the old row, add a new one); when it is withdrawn (set a Valid to or untick Active). |
| Why it matters | The surcharge lives apart from part cost, so it can move with the news without re-costing a single part, and it applies itself to every new quote automatically while confirmed orders keep what they were confirmed with. |
Working with the screen
- Click New, or select a surcharge and click Edit.
- Fill in the fields and click Save; Cancel drops your changes.
- To stop charging a surcharge, set Valid to or untick Active. Delete removes it;
quotes lose the line the next time they are recalculated.
| Field | What it does |
|---|---|
| Name on the quote | The line reads this name and the percent, e.g. “Tariff Surcharge 7.5%”. |
| Percent | Above 0 and at most 100. Applied to the net product price: the line price less any shipping and installation part, times the quantity shipped, of each product line it covers. Service lines are not counted. |
| Valid from / Valid to | The surcharge applies on these days (both included). Leave either empty for no limit. When the tariff changes, end the old one and add a new one. |
| Applies to | All products, One supplier or One series. For a supplier or a series, pick it from the Supplier or Series list that appears; the surcharge list shows its name. A supplier surcharge covers that supplier’s lines, including bought-out items from it. |
| Taxable | Whether the surcharge line is taxed. |
| Active | Untick to stop the surcharge without deleting it. |
| Sequence | Order of the surcharge lines and of this list. |
The New form starts pre-filled: Sequence = highest existing + 1, Valid from =
today, Active = on, Applies to = All products. The ID is assigned by the server on
save. The list shows one row per rate — Seq, Name, %, what it applies to (or “All
products”) and Active — so the whole tariff situation is readable at a glance.
How the surcharge line is computed
A rate produces a line when it is Active, its percent is above 0, and today falls
inside its validity window (both ends inclusive, empty = open). Then, for every product line on the
quote that is not deleted and whose type is not a surcharge line itself, a tax-code line
(types 6/7/8), a service type (120, 121) or an internal note/credit type (over 101), the
engine sums:
base = Σ (price − shipping part − installation part)
× ship quantity, skipping lines where that comes out zero or negative, rounded to cents
(HALF_EVEN).
The line amount is base × percent / 100, and there is at most one line per rate
— if several rates cover the same lines, each adds its own single line.
Worked example
| Field / step | Value | Why |
|---|---|---|
| Rate | “Tariff Surcharge”, 7.5%, All products, active, valid from today | One row in setup; nothing else to configure. |
| Product line 1 | $400.00 × 1 | Net price $400, qty 1 → adds $400.00 to the base. |
| Product line 2 | $1,200.00 × 2 | Net price $1,200, qty 2 → adds $2,400.00 to the base. |
| Base | $2,800.00 | Sum of the covered lines. |
| Surcharge line | $2,800.00 × 7.5% = $210.00 | Added to the quote as “Tariff Surcharge 7.5%”, qty 1, not discountable, cost $0, taxable per the rate. |
- Lines are re-derived on every cart recalculation (including order save). A rate that
stopped applying, or whose base hit zero, has its line removed at that point; hand-edited
surcharge lines are likewise overwritten or removed. One re-run is forced so totals include the
freshly synced line. - Delete in setup has no cascade checks — quotes simply lose the line at their next
recalculation, and confirmed orders are skipped entirely (status ≥ Confirmed, or cart
null, or priced by order), so they keep the surcharge they were confirmed with. - If a rate points at a supplier or series that no longer exists, the list shows
“#<id> (not found)” and the rate no longer matches any line. - Do not confuse these rates with the old header-level Surcharge 1 / 2 / 3 tax-code feature
(line types 6/7/8). That one is a manual percent field on the quote header; this one is automatic,
per-product-scope, date-driven, and excluded from the base above.
On quotes and orders
- The line is added or updated every time the quote is recalculated or saved, using the surcharges
valid today. It is not discountable and costs nothing, so it never triggers the below-cost
warning. - The line is managed by the system: changing or deleting it by hand is undone at the next
recalculation. Change the surcharge in setup instead. - Confirmed orders keep the surcharge they were confirmed with; later changes in setup do not
touch them. - Quotes priced by order (a total typed by hand) get no surcharge line.
- The line prints on quotes, orders and invoices like any other line, and goes to Odoo as a
service line.