[6.0 & 6.1] [account] def compute needs optimization
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Confirmed
|
Wishlist
|
OpenERP R&D Addons Team 3 |
Bug Description
The def compute of account module no use parent_right & parent_left fields for calculate sum(debit) & sum(credit)
and not in use recursive function's
These is very slow with a big account chart and very much account_move_line
This can optimizate using parent_left & parent_right
Im working for a propose merge with the solution.
Meanwhile i put a script sql with my idea
SELECT MIN(aa_tree_1.code) AS code,
SUM(account_
FROM account_account aa_tree_1
INNER JOIN account_account aa_tree_2
ON aa_tree_
BETWEEN aa_tree_
INNER JOIN account_move_line
ON account_
INNER JOIN account_move
ON account_move.id = account_
AND account_move.state = 'posted'
GROUP BY aa_tree_1.id
These script is functionally without consolidate account, but I'm working
Related branches
- Fabien (Open ERP): Pending requested
- Nhomar - Vauxoo: Pending requested
- Raphaël Valyi - http://www.akretion.com: Pending requested
- Cristian Salamea: Pending requested
- Amit Parik: Pending requested
- OpenERP R&D Addons Team 3: Pending requested
- Ferdinand: Pending requested
- qdp (OpenERP): Pending requested
- Olivier Dony (Odoo): Pending requested
-
Diff: 114 lines (+67/-3) (has conflicts)1 file modifiedaccount/account.py (+67/-3)
- Moisés López - http://www.vauxoo.com: Pending requested
- Fabien (Open ERP): Pending requested
- Olivier Dony (Odoo): Pending requested
- OpenERP R&D Team: Pending (finish, learn improve) requested
-
Diff: 246 lines (+211/-1)3 files modifiedaccount/__openerp__.py (+1/-0)
account/account.py (+99/-1)
account/test/account_compute.yml (+111/-0)
The time difference is huge, with these sql script vs current function.
3 minutes VS 0.3 seconds in my case