Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: In-App Purchase

Entity: iap.account

Compute Method: _compute_balance

View 19.0 View 20.0
Inputs Method Outputs
  • balance_amount
  • service_id
  • service_id.integer_balance
  • service_id.unit_name
+ for account in self:
+             balance_amount = round(account.balance_amount, None if account.service_id.integer_balance else 4)
+             account.balance = f"{balance_amount} {account.service_id.unit_name or ''}"
  • balance

Back to entity