I found this line inside __compute, mapping{ in account.py
'debit': "COALESCE(SUM(l.debit), 0) as debit",
but I don't understand what is l.debit or l.credit also the parent_right parent_left mechanics
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I found this line inside __compute, mapping{ in account.py
'debit': "COALESCE(SUM(l.debit), 0) as debit",
but I don't understand what is l.debit or l.credit also the parent_right parent_left mechanics
Debit and Credit are basic accounting concepts, used in the double-entry bookkeeping system.
COALESCE
is this case works like Oracle's NVL
and SQLServer's IsNull
: COALESCE(a, b)
returns a
if a is not null, and returns b
if a
is null.
It safely defaults to a zero value if no data is found.
well I already knew all of that. What im asking is how the mapping to l.debit or other l. variables works, and how the parent_right and parent_left are generated and what is their role in the calculation.
for the parent_right parent_left mechanics :see https://answers.launchpad.net/openobject-server/+question/186704
Thx thats good information