diff --git a/base_accounting_kit/__manifest__.py b/base_accounting_kit/__manifest__.py index 9ac03723b..19ad58def 100644 --- a/base_accounting_kit/__manifest__.py +++ b/base_accounting_kit/__manifest__.py @@ -22,7 +22,7 @@ { 'name': 'Odoo 16 Full Accounting Kit', - 'version': '16.0.2.0.4', + 'version': '16.0.2.0.5', 'category': 'Accounting', 'live_test_url': 'https://www.youtube.com/watch?v=peAp2Tx_XIs', 'summary': """ Asset and Budget Management, diff --git a/base_accounting_kit/doc/RELEASE_NOTES.md b/base_accounting_kit/doc/RELEASE_NOTES.md index 9f5dec2f2..d3f535f62 100644 --- a/base_accounting_kit/doc/RELEASE_NOTES.md +++ b/base_accounting_kit/doc/RELEASE_NOTES.md @@ -18,4 +18,9 @@ #### 15.06.2023 #### Version 16.0.2.0.4 #### UPDT -- Bug Fix \ No newline at end of file +- Bug Fix + +#### 11.07.2023 +#### Version 16.0.2.0.5 +#### UPDT +- Cash journal Bug Fix \ No newline at end of file diff --git a/base_accounting_kit/models/account_journal.py b/base_accounting_kit/models/account_journal.py index de0fb9b95..e9530280d 100644 --- a/base_accounting_kit/models/account_journal.py +++ b/base_accounting_kit/models/account_journal.py @@ -20,7 +20,7 @@ # ############################################################################# -from odoo import models, api +from odoo import models, _ class AccountJournal(models.Model): @@ -52,15 +52,18 @@ class AccountJournal(models.Model): def action_open_reconcile(self): if self.type in ['bank', 'cash']: # Open reconciliation view for bank statements belonging to this journal - bank_stmt = self.env['account.bank.statement'].search([('journal_id', 'in', self.ids)]).mapped('line_ids') + bank_stmt = self.env['account.bank.statement'].search( + [('journal_id', 'in', self.ids)]).mapped('line_ids') return { 'type': 'ir.actions.client', 'tag': 'bank_statement_reconciliation_view', - 'context': {'statement_line_ids': bank_stmt.ids, 'company_ids': self.mapped('company_id').ids}, + 'context': {'statement_line_ids': bank_stmt.ids, + 'company_ids': self.mapped('company_id').ids}, } else: # Open reconciliation view for customers/suppliers - action_context = {'show_mode_selector': False, 'company_ids': self.mapped('company_id').ids} + action_context = {'show_mode_selector': False, + 'company_ids': self.mapped('company_id').ids} if self.type == 'sale': action_context.update({'mode': 'customers'}) elif self.type == 'purchase': @@ -70,3 +73,13 @@ class AccountJournal(models.Model): 'tag': 'manual_reconciliation_view', 'context': action_context, } + + def create_cash_statement(self): + """for redirecting in to bank statement lines""" + return { + 'name': _("Statements"), + 'type': 'ir.actions.act_window', + 'res_model': 'account.bank.statement.line', + 'view_mode': 'list,form', + 'context': {'default_journal_id': self.id}, + }