diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0764234 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# Python +__pycache__/ +*.py[cod] +*$py.class + +# OS +.DS_Store +Thumbs.db + +# Editor +.vscode/ +.idea/ + +# Odoo +*.pot diff --git a/__manifest__.py b/__manifest__.py index 77b0680..36d1306 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -1,32 +1,32 @@ -{ - 'name': 'Bank Statement Reconciliation', - 'version': '17.0.1.0.0', - 'category': 'Accounting', - 'summary': 'Reconcile bank statement lines with journal entries', - 'description': """ - This module allows users to reconcile bank statement lines with journal entries. - Features: - - Menu to access bank statement lines - - Filter by bank journal - - Select multiple bank lines to reconcile - - Wizard to select journal entries for reconciliation - - Automatic creation of reconciliation journal entries - - Total selected amount widget in list view header - """, - 'author': 'Suherdy Yacob', - 'depends': [ - 'account', - 'base', - 'web', - ], - 'data': [ - 'security/ir.model.access.csv', - 'views/bank_statement_line_views.xml', - 'views/bank_statement_selector_views.xml', - 'wizards/bank_reconcile_wizard_views.xml', - 'views/menu.xml', - ], - # Tree view includes sum="Total Amount" footer for displaying totals - 'installable': True, - 'auto_install': False, +{ + 'name': 'Bank Statement Reconciliation', + 'version': '19.0.1.0.0', + 'category': 'Accounting', + 'summary': 'Reconcile bank statement lines with journal entries', + 'description': """ + This module allows users to reconcile bank statement lines with journal entries. + Features: + - Menu to access bank statement lines + - Filter by bank journal + - Select multiple bank lines to reconcile + - Wizard to select journal entries for reconciliation + - Automatic creation of reconciliation journal entries + - Total selected amount widget in list view header + """, + 'author': 'Suherdy Yacob', + 'depends': [ + 'account', + 'base', + 'web', + ], + 'data': [ + 'security/ir.model.access.csv', + 'views/bank_statement_line_views.xml', + 'views/bank_statement_selector_views.xml', + 'wizards/bank_reconcile_wizard_views.xml', + 'views/menu.xml', + ], + # List view includes sum="Total Amount" footer for displaying totals + 'installable': True, + 'auto_install': False, } \ No newline at end of file diff --git a/models/bank_statement_selector.py b/models/bank_statement_selector.py index f3eec7a..72a5ea4 100644 --- a/models/bank_statement_selector.py +++ b/models/bank_statement_selector.py @@ -1,29 +1,29 @@ -from odoo import models, fields, api - - -class BankStatementSelector(models.TransientModel): - _name = 'bank.statement.selector' - _description = 'Bank Statement Selector' - - journal_id = fields.Many2one('account.journal', - string='Bank Journal', - domain=[('type', '=', 'bank')], - required=True) - - def action_show_statement_lines(self): - """Open the bank statement lines for the selected journal""" - action = { - 'type': 'ir.actions.act_window', - 'name': 'Bank Statement Lines', - 'res_model': 'account.bank.statement.line', - 'view_mode': 'tree,form', - 'domain': [('journal_id', '=', self.journal_id.id)], - 'context': { - 'search_default_journal_id': self.journal_id.id, - }, - 'views': [ - (self.env.ref('bank_statement_reconciliation.view_account_bank_statement_line_tree').id, 'tree'), - (self.env.ref('bank_statement_reconciliation.view_account_bank_statement_line_form').id, 'form') - ] - } +from odoo import models, fields, api + + +class BankStatementSelector(models.TransientModel): + _name = 'bank.statement.selector' + _description = 'Bank Statement Selector' + + journal_id = fields.Many2one('account.journal', + string='Bank Journal', + domain=[('type', '=', 'bank')], + required=True) + + def action_show_statement_lines(self): + """Open the bank statement lines for the selected journal""" + action = { + 'type': 'ir.actions.act_window', + 'name': 'Bank Statement Lines', + 'res_model': 'account.bank.statement.line', + 'view_mode': 'list,form', + 'domain': [('journal_id', '=', self.journal_id.id)], + 'context': { + 'search_default_journal_id': self.journal_id.id, + }, + 'views': [ + (self.env.ref('bank_statement_reconciliation.view_account_bank_statement_line_tree').id, 'list'), + (self.env.ref('bank_statement_reconciliation.view_account_bank_statement_line_form').id, 'form') + ] + } return action \ No newline at end of file diff --git a/views/bank_statement_line_views.xml b/views/bank_statement_line_views.xml index ecbdf6f..d952234 100644 --- a/views/bank_statement_line_views.xml +++ b/views/bank_statement_line_views.xml @@ -1,109 +1,107 @@ - - - - - Bank Statement Lines - account.bank.statement.line - tree,form - {'tree_view_ref': 'bank_statement_reconciliation.view_account_bank_statement_line_tree'} - -

- Select a bank journal to view its statement lines -

-
-
- - - - Reconcile Selected Lines - - - code - - action = { - 'name': 'Select Journal Entry to Reconcile', - 'type': 'ir.actions.act_window', - 'res_model': 'bank.reconcile.wizard', - 'view_mode': 'form', - 'target': 'new', - 'context': { - 'default_bank_line_ids': env.context.get('active_ids'), - } - } - - - - - - account.bank.statement.line.tree - account.bank.statement.line - - - - - - - - - - - - - - - - - - - account.bank.statement.line.form - account.bank.statement.line - -
-
-
- - - - - - - - - - - - - - - - - - - -
-
-
- - - - account.bank.statement.line.search - account.bank.statement.line - - - - - - - - - - - - - - - - - + + + + + Bank Statement Lines + account.bank.statement.line + list,form + {'list_view_ref': 'bank_statement_reconciliation.view_account_bank_statement_line_tree'} + +

+ Select a bank journal to view its statement lines +

+
+
+ + + + Reconcile Selected Lines + + + code + + action = { + 'name': 'Select Journal Entry to Reconcile', + 'type': 'ir.actions.act_window', + 'res_model': 'bank.reconcile.wizard', + 'view_mode': 'form', + 'target': 'new', + 'context': { + 'default_bank_line_ids': env.context.get('active_ids'), + } + } + + + + + + account.bank.statement.line.tree + account.bank.statement.line + + + + + + + + + + + + + + + + + + + account.bank.statement.line.form + account.bank.statement.line + +
+
+
+ + + + + + + + + + + + + + + + + + + +
+
+
+ + + + account.bank.statement.line.search + account.bank.statement.line + + + + + + + + + + + + + + +
\ No newline at end of file