mis.report.view.tree mis.report mis.report.view.form mis.report
mis.report.view.kpi.form mis.report.kpi

Expressions can be any valid python expressions.

The following special elements are recognized in the expressions to compute accounting data: {bal|crd|deb|pbal|nbal}{pieu}[account selector][journal items domain] .

  • bal, crd, deb, pbal, nbal : balance, debit, credit, positive balance, negative balance.
  • p, i, e : respectively variation over the period, initial balance, ending balance
  • The account selector is a like expression on the account code (eg 70%, etc).
  • The journal items domain is an Flectra domain filter on journal items.
  • balu[] : (u for unallocated) is a special expression that shows the unallocated profit/loss of previous fiscal years.

Expressions can involve other KPI, sub KPI and query results by name (eg kpi1 + kpi2, kpi2.subkpi1, query1.field1).

Additionally following variables are available in the evaluation context:

  • sum, min, max, len, avg : behave as expected, very similar to the python builtins.
  • datetime, datetime, dateutil : the python modules.
  • date_from, date_to : beginning and end date of the period.
  • AccountingNone : a null value that behaves as 0 in arithmetic operations.

Examples:

  • bal[70] : variation of the balance of account 70 over the period (it is the same as balp[70].
  • bali[70,60] : initial balance of accounts 70 and 60.
  • bale[1%%] : balance of accounts starting with 1 at end of period.
  • crdp[40%] : sum of all credits on accounts starting with 40 during the period.
  • debp[55%][('journal_id.code', '=', 'BNK1')] : sum of all debits on accounts 55 and journal BNK1 during the period.
  • balp[('user_type_id', '=', ref('account. data_account_type_receivable').id)][] : variation of the balance of all receivable accounts over the period.
  • balp[][('tax_line_id.tag_ids', '=', ref('l10n_be.tax_tag_56').id)] : balance of move lines related to tax grid 56.
  • pbale[55%] : sum of all ending balances of accounts starting with 55 whose ending balance is positive.
MIS Report Templates mis.report form tree,form