@ -22,7 +22,7 @@
{
'name': 'Dynamic Financial Reports',
'version': '14.0.1.2.4',
'version': '14.0.1.2.5',
'category': 'Accounting',
'live_test_url': 'https://www.youtube.com/watch?v=gVQi9q9Rs-E&t=5s',
'summary': """Dynamic Financial Reports with drill
@ -31,3 +31,8 @@
#### Version 14.0.1.2.4
#### UPDT
- Translation issue and Calendar format issue
#### 15.01.2022
#### Version 14.0.1.2.5
- Arabic Translation added
@ -397,6 +397,7 @@ class AgeingView(models.TransientModel):
partners_amount[partner_id] += line_amount
if i + 1 == 5:
period5 = i + 1
if partner_id:
lines[partner_id].append({
'period5': period5,
'line': line,
@ -413,6 +414,7 @@ class AgeingView(models.TransientModel):
})
elif i + 1 == 4:
period4 = i + 1
'period4': period4,
@ -430,6 +432,7 @@ class AgeingView(models.TransientModel):
elif i + 1 == 3:
period3 = i + 1
'period3': period3,
@ -447,6 +450,7 @@ class AgeingView(models.TransientModel):
elif i + 1 == 2:
period2 = i + 1
'period2': period2,
@ -464,6 +468,7 @@ class AgeingView(models.TransientModel):
else:
period1 = i + 1
'period1': period1,
@ -84,8 +84,17 @@ class BalanceSheetView(models.TransientModel):
new_records = list(filter(filter_code, records['Accounts']))
records['Accounts'] = new_records
trans_tag = self.env['ir.translation'].search([('value', '=', tag), ('module', '=', 'dynamic_accounts_report')],
limit=1).src
if trans_tag:
tag_upd = trans_tag
tag_upd = tag
account_report_id = self.env['account.financial.report'].with_context(lang='en_US').search([
('name', 'ilike', tag)])
('name', 'ilike', tag_upd)])
new_data = {'id': self.id, 'date_from': False,
'enable_filter': True,
@ -42,18 +42,20 @@ class GeneralView(models.TransientModel):
def view_report(self, option, title):
r = self.env['account.general.ledger'].search([('id', '=', option[0])])
new_title = ''
trans_title = self.env['ir.translation'].search([('value', '=', title), ('module', '=', 'dynamic_accounts_report')], limit=1).src
journals = r.journal_ids
if title == 'General Ledger':
if title == 'General Ledger' or trans_title == 'General Ledger':
new_title = 'General Ledger'
if title == 'Bank Book':
new_title = title
if title == 'Bank Book' or trans_title == 'Bank Book':
journals = self.env['account.journal'].search([('type', '=', 'bank')],
limit=1)
new_title = 'Bank Book'
if title == 'Cash Book':
if title == 'Cash Book' or trans_title == 'Cash Book':
journals = self.env['account.journal'].search([('type', '=', 'cash')],
new_title = 'Cash Book'
r.write({
'titles': new_title,
@ -332,6 +334,7 @@ class GeneralView(models.TransientModel):
params = tuple(where_params)
params = (tuple(accounts.ids),) + tuple(where_params)
cr.execute(sql, params)
for row in cr.dictfetchall():
@ -148,9 +148,9 @@ class TrialView(models.TransientModel):
wheres.append(where_clause.strip())
filters = " AND ".join(wheres)
if data['target_move'] == 'posted':
filters += " AND account_move_line__move_id.state = 'posted'"
filters += " AND account_move_line.parent_state = 'posted'"
filters += " AND account_move_line__move_id.state in ('draft','posted')"
filters += " AND account_move_line.parent_state in ('draft','posted')"
if data.get('date_from'):
filters += " AND account_move_line.date >= '%s'" % data.get('date_from')
if data.get('date_to'):
@ -207,9 +207,9 @@ class TrialView(models.TransientModel):
filters += " AND account_move_line.date < '%s'" % data.get('date_from')