Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: US Sales Tax Engine
Entity: us.tax.provider
Compute Method: _compute_limit_status
| Inputs | Method | Outputs |
|---|---|---|
|
+ for rec in self: + if rec.monthly_call_limit == 0: + rec.limit_status = "unlimited" + rec.limit_usage_pct = 0.0 + else: + pct = rec.calls_this_month / rec.monthly_call_limit + rec.limit_usage_pct = round(pct * 100, 1) + if pct >= 1.0: + rec.limit_status = "exceeded" + elif pct >= LIMIT_WARNING_THRESHOLD: + rec.limit_status = "warning" + else: + rec.limit_status = "ok" |
|
