Hyper Open Edge Cloud

Common Problems in Accounting

Notes on problems found in erp5_accounting and how to fix.
  • Last Update:2016-04-08
  • Version:001
  • Language:en

This note includes common issues found when working with erp5_accounting and the solutions to fix them.

Table of Contents

Problem: Many had oc SQL Method / Python Scripts

  • Solution: Use Inventory API instead of SQL. (Almost OK, still BankAccount_viewAccountingTransactionList has not been reworked)

Rounding:

  • Solution: Extension to getInventory, the precision parameter must be taken from the currency of the default section. See also the discussion on float rounding

Use real nodes (organisation, person) or categories for section ?

  • Solution: never use categories, always organisation or person (category have no legal existance).
  • Inconsistency ?: we can accept categories for stock and site ...

Define section in which we are interested in the UI or in Reports

group category:
      G1
    /    \
  G11    G22
        /   \
     G221   G222

O1 member of G1 (organisation)
P1 member of G1 (person, member of group by acquisition from the subordination to O1)
O2 member of G22
O3 member of G11
  • Today: You set section_category in preferences. eg. G1 as section category, and all members of G1 are sections (ie. O1, P1, O2, O3)
    • Problems:
      • 1) you cannot get informations for G1 only.
      • 2) you see transactions for all nodes member of G1, even Persons that are member of the group category.
  • Solution 1: specfiy the list of sections explicitly (eg. O1, O2)
    • Problems:
      • 1) this list can be too big
  • Solution 2: use a list of group section_categories, with strict membership.
    • Problems:
      • 1) You cannot exclude Persons.
        • Solution: extend getInventory to support node_filter, section_filter, mirror_node_filter ... etc. Working like filter argument in contentValues.

Validation of accouting transactions

  • Accounting_workflow scripts uses adhoc script to validate accounting transactions, this is ugly and impossible to extend (eg. erp5_accounting_budget needs to check the budget for an account when validating)
    • Solution: rewrite this using constraints.
      • Problem: the constraint for delivered simulation_state must be checked in the workflow before script, when the object is not in delivered state yet.
      • -> this is covered by Products/ERP5/tests/testAccounting.py

How can we see that ownership of goods or immos changed?

  • How can you know that changing section means changing the owner.

getInventory(omit_input=1, **kw) + getInventory(omit_output=1, **kw) == getInventory(**kw) ?

  • This problem appears with movement having the same sections, sames nodes but different payments.

Related Articles