Browse Source

Jul 12 : [UPDT] Updated 'base_accounting_kit'

pull/266/head
AjmalCybro 2 years ago
parent
commit
409f53d7e7
  1. 2
      base_accounting_kit/__manifest__.py
  2. 5
      base_accounting_kit/doc/RELEASE_NOTES.md
  3. 21
      base_accounting_kit/models/account_journal.py

2
base_accounting_kit/__manifest__.py

@ -22,7 +22,7 @@
{ {
'name': 'Odoo 16 Full Accounting Kit', 'name': 'Odoo 16 Full Accounting Kit',
'version': '16.0.2.0.4', 'version': '16.0.2.0.5',
'category': 'Accounting', 'category': 'Accounting',
'live_test_url': 'https://www.youtube.com/watch?v=peAp2Tx_XIs', 'live_test_url': 'https://www.youtube.com/watch?v=peAp2Tx_XIs',
'summary': """ Asset and Budget Management, 'summary': """ Asset and Budget Management,

5
base_accounting_kit/doc/RELEASE_NOTES.md

@ -19,3 +19,8 @@
#### Version 16.0.2.0.4 #### Version 16.0.2.0.4
#### UPDT #### UPDT
- Bug Fix - Bug Fix
#### 11.07.2023
#### Version 16.0.2.0.5
#### UPDT
- Cash journal Bug Fix

21
base_accounting_kit/models/account_journal.py

@ -20,7 +20,7 @@
# #
############################################################################# #############################################################################
from odoo import models, api from odoo import models, _
class AccountJournal(models.Model): class AccountJournal(models.Model):
@ -52,15 +52,18 @@ class AccountJournal(models.Model):
def action_open_reconcile(self): def action_open_reconcile(self):
if self.type in ['bank', 'cash']: if self.type in ['bank', 'cash']:
# Open reconciliation view for bank statements belonging to this journal # 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 { return {
'type': 'ir.actions.client', 'type': 'ir.actions.client',
'tag': 'bank_statement_reconciliation_view', '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: else:
# Open reconciliation view for customers/suppliers # 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': if self.type == 'sale':
action_context.update({'mode': 'customers'}) action_context.update({'mode': 'customers'})
elif self.type == 'purchase': elif self.type == 'purchase':
@ -70,3 +73,13 @@ class AccountJournal(models.Model):
'tag': 'manual_reconciliation_view', 'tag': 'manual_reconciliation_view',
'context': action_context, '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},
}

Loading…
Cancel
Save