|
@ -115,6 +115,7 @@ class AccountTrialBalance(models.TransientModel): |
|
|
:return: List of dictionaries representing the financial report. |
|
|
:return: List of dictionaries representing the financial report. |
|
|
:rtype: list |
|
|
:rtype: list |
|
|
""" |
|
|
""" |
|
|
|
|
|
|
|
|
if options == {}: |
|
|
if options == {}: |
|
|
options = None |
|
|
options = None |
|
|
if options is None: |
|
|
if options is None: |
|
@ -207,7 +208,7 @@ class AccountTrialBalance(models.TransientModel): |
|
|
domain = [('date', '>=', com_start_date), |
|
|
domain = [('date', '>=', com_start_date), |
|
|
('account_id', '=', account_id.id), |
|
|
('account_id', '=', account_id.id), |
|
|
('date', '<=', com_end_date), |
|
|
('date', '<=', com_end_date), |
|
|
('parent_state', 'in', option_domain), ] |
|
|
('parent_state', 'in', option_domain)] |
|
|
if journal_list: |
|
|
if journal_list: |
|
|
domain.append( |
|
|
domain.append( |
|
|
('journal_id', 'in', journal_list), ) |
|
|
('journal_id', 'in', journal_list), ) |
|
@ -243,15 +244,14 @@ class AccountTrialBalance(models.TransientModel): |
|
|
('parent_state', 'in', option_domain), ] |
|
|
('parent_state', 'in', option_domain), ] |
|
|
if journal_list: |
|
|
if journal_list: |
|
|
domain.append( |
|
|
domain.append( |
|
|
('journal_id', 'in', journal_list), ) |
|
|
('journal_id', 'in', journal_list)) |
|
|
if analytic: |
|
|
if analytic: |
|
|
domain.append( |
|
|
domain.append( |
|
|
('analytic_line_ids', 'in', analytic)) |
|
|
('analytic_line_ids', 'in', analytic)) |
|
|
if method is not None and 'cash' in method: |
|
|
if method is not None and 'cash' in method: |
|
|
domain.append(('journal_id', 'in', |
|
|
domain.append(('journal_id', 'in', |
|
|
self.env.company.tax_cash_basis_journal_id.ids)) |
|
|
self.env.company.tax_cash_basis_journal_id.ids)) |
|
|
move_lines = self.env['account.move.line'].search( |
|
|
move_lines = self.env['account.move.line'].search(domain) |
|
|
domain) |
|
|
|
|
|
dynamic_date_num[ |
|
|
dynamic_date_num[ |
|
|
f"dynamic_date_num{i}"] = 'Q' + ' ' + str( |
|
|
f"dynamic_date_num{i}"] = 'Q' + ' ' + str( |
|
|
get_quarter_number(com_start_date)) + ' ' + str( |
|
|
get_quarter_number(com_start_date)) + ' ' + str( |
|
@ -265,7 +265,7 @@ class AccountTrialBalance(models.TransientModel): |
|
|
domain = [('date', '>=', start_date), |
|
|
domain = [('date', '>=', start_date), |
|
|
('account_id', '=', account_id.id), |
|
|
('account_id', '=', account_id.id), |
|
|
('date', '<=', end_date), |
|
|
('date', '<=', end_date), |
|
|
('parent_state', 'in', option_domain), ] |
|
|
('parent_state', 'in', option_domain)] |
|
|
if journal_list: |
|
|
if journal_list: |
|
|
domain.append( |
|
|
domain.append( |
|
|
('journal_id', 'in', journal_list), ) |
|
|
('journal_id', 'in', journal_list), ) |
|
|