diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py index ddf66b6caa..04edf6f0f2 100644 --- a/addons/account/models/account_move.py +++ b/addons/account/models/account_move.py @@ -5276,7 +5276,9 @@ class AccountMoveLine(models.Model): elif context.get('initial_bal'): domain += [(date_field, '<', context['date_from'])] else: - domain += [(date_field, '>=', context['date_from'])] + # domain += [(date_field, '>=', context['date_from'])] + domain += ['|', (date_field, '>=', context['date_from']), + ('account_id.user_type_id.include_initial_balance', '=', True)] if context.get('journal_ids'): domain += [('journal_id', 'in', context['journal_ids'])] diff --git a/addons/account/wizard/account_report_common.py b/addons/account/wizard/account_report_common.py index dbfd84d765..8135d7d271 100644 --- a/addons/account/wizard/account_report_common.py +++ b/addons/account/wizard/account_report_common.py @@ -10,8 +10,8 @@ class AccountCommonReport(models.TransientModel): company_id = fields.Many2one('res.company', string='Company', required=True, default=lambda self: self.env.company) journal_ids = fields.Many2many('account.journal', string='Journals', required=True, default=lambda self: self.env['account.journal'].search([('company_id', '=', self.company_id.id)])) - date_from = fields.Date(string='Start Date') - date_to = fields.Date(string='End Date') + date_from = fields.Date(string='Start Date', required=True) + date_to = fields.Date(string='End Date', required=True) target_move = fields.Selection([('posted', 'All Posted Entries'), ('all', 'All Entries'), ], string='Target Moves', required=True, default='posted')