Comments (5)
Have you tried to put that part in SQL to see if the time is reduced?
from account-financial-reporting.
Yes, I tried with the following method (instead of the existing one, easy-ugly fix) and the time is reduced (quasi immediate) :
def _get_move_ids_from_periods(self, account_id, period_start, period_stop,
target_move):
period_obj = self.pool.get('account.period')
periods = period_obj.build_ctx_periods(
self.cursor, self.uid, period_start.id, period_stop.id)
if not periods:
return []
move_state = ['draft', 'posted']
if target_move == 'posted':
move_state = ['posted', '']
#return move_line_obj.search(self.cursor, self.uid, search)
sql = """select aml.id
from account_move_line aml
LEFT JOIN account_move am ON (am.id = aml.move_id)
where aml.period_id in %s
and aml.account_id = %s
and am.state IN %s
"""
self.cursor.execute(sql, (tuple(periods), account_id,
tuple(move_state)))
res = self.cursor.fetchall()
return res
from account-financial-reporting.
I also tried to set auto_join=True
on the column move_id of account.move.line and the result is also quasi immediate.
from account-financial-reporting.
I proposed the following PR to odoo (to add auto_join):
odoo/odoo#5573
from account-financial-reporting.
PR is closed, so I closed this issue.
from account-financial-reporting.
Related Issues (20)
- tax report does not show base amount when a tax consist of group of taxes HOT 1
- Initial balance is not correct in General Ledger HOT 1
- PDF reports are not aligned properly HOT 1
- [14.0] account_financial_report : The invoicing manager can not cretae date range and date range type
- [12.0] partner_statement / report activity statement : wrong balance forward for foreign currency
- [9.0] Wrong reference for report_xlsx module
- [16.0][Account_financial_reporting] General ledger doesn´t group by taxes HOT 2
- [16.0] account_financial_report: Showing error while activating this module in apps "ValueError: invalid literal for int() with base 10: 'false'"
- [RFC] account_financial_report: Improve UX in accounting reports and wizards HOT 4
- [17.0] account_financial_reporting - Translation error on accents HOT 1
- [17.0] Error exporting report when clicking on Export from View HOT 1
- [14] Partner statement does not work on Odoo 14 HOT 8
- Total of all lines (General Ledger)
- account-financial_reporting: general ledger, create a grouping to have a single line per invoice
- View report doesn't work
- [SUPPORT] inconsistencies in trial balance v16 HOT 1
- [17.0] account-financial-reporting: translation ar.po is showing as ????? instead of actual translation
- Error in report Open Items
- [16.0] account-financial-report - error when exporting the trial balance xlsx report
- [16.0] account-financial-report - trial balance report missing total amounts of foreign currency columns
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from account-financial-reporting.