companies = env["res.company"].search([("name", "like", "Atlas")])
env = env(context=dict(env.context, allowed_company_ids=companies.ids)) # the user must be allowed in the parent and every member
engine = env["taqnix.acc.engine"] # the consolidated reports are Accounting Pro reports: same engine, same access rights
# the Consolidated Balance Sheet of the latest validated run of the default group, with a column per member
table = engine.get_table("cons_balance_sheet", {"extra": {"run": "latest", "members": True}})
for row in table["rows"][:6]:
print(row["type"], [cell.get("text") for cell in row["cells"]][:7]) # group ['Current assets', '1,474,320.46', ..., '-72,326.45', '4,657,830.90']
# the runs of a group: state and the main consolidated figures (a validated or locked run is a snapshot that never changes)
group = env["taqnix.accn.group"].search([("name", "=", "Atlas Holding Group")])
for run in group.run_ids.sorted("date_to"):
print(run.date_to, run.state, run.total_assets, run.net_profit, run.nci_total) # 2026-09-30 validated 5196721.15 1213727.41 341382.47