diff --git a/__manifest__.py b/__manifest__.py index fce6818..cec5441 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- { 'name': 'Account Reconciliation Reference', - 'version': '17.0.1.0.2', + 'version': '19.0.1.0.2', 'category': 'Accounting/Accounting', 'summary': 'Show Reference on reconciliation kanban/list and add to search', 'description': """ @@ -23,6 +23,7 @@ Show Reference on reconciliation UI 'assets': { 'web.assets_backend': [ 'account_reconcile_reference/static/src/xml/bank_rec_form_inherit.xml', + 'account_reconcile_reference/static/src/xml/bank_rec_kanban_inherit.xml', ], }, 'installable': True, diff --git a/__pycache__/__init__.cpython-312.pyc b/__pycache__/__init__.cpython-312.pyc index 6bdb85e..56cc11c 100644 Binary files a/__pycache__/__init__.cpython-312.pyc and b/__pycache__/__init__.cpython-312.pyc differ diff --git a/models/__init__.py b/models/__init__.py index 72761ca..7c68785 100644 --- a/models/__init__.py +++ b/models/__init__.py @@ -1,2 +1 @@ -# -*- coding: utf-8 -*- -from . import bank_rec_widget \ No newline at end of file +# -*- coding: utf-8 -*- \ No newline at end of file diff --git a/models/__pycache__/__init__.cpython-312.pyc b/models/__pycache__/__init__.cpython-312.pyc index 7b806b1..58365ef 100644 Binary files a/models/__pycache__/__init__.cpython-312.pyc and b/models/__pycache__/__init__.cpython-312.pyc differ diff --git a/models/__pycache__/bank_rec_widget.cpython-312.pyc b/models/__pycache__/bank_rec_widget.cpython-312.pyc index 31615db..0439c08 100644 Binary files a/models/__pycache__/bank_rec_widget.cpython-312.pyc and b/models/__pycache__/bank_rec_widget.cpython-312.pyc differ diff --git a/models/bank_rec_widget.py b/models/bank_rec_widget.py deleted file mode 100644 index 206f52f..0000000 --- a/models/bank_rec_widget.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- -from odoo import models - - -class BankRecWidget(models.Model): - _inherit = "bank.rec.widget" - - def _line_value_changed_ref(self, line): - """ - Persist the typed Reference as both: - - Journal Entry Reference (move.ref) so it shows on journal items - - Statement Line Reference (st_line.ref) so it remains visible after validation - Works for liquidity and non-liquidity lines in Manual Operations. - """ - self.ensure_one() - ref_val = line.ref or False - # Persist to the move (journal entry) - self.st_line_id.move_id.ref = ref_val - # Persist to the statement line so the OWL form keeps showing it after validation - # (bank_rec_form.xml shows Reference for liquidity based on line.data.ref which maps to st_line.ref) - self.st_line_id.ref = ref_val - # Reload liquidity line and the record to reflect the updated reference - self._action_reload_liquidity_line() - self.return_todo_command = {"reset_record": True, "reset_global_info": True} - - def _action_validate(self): - """ - Ensure the typed Reference is flushed to the target move before reconciliation creates/replaces lines. - This covers the case when the user clicks Validate immediately after typing in Manual Operations. - """ - self.ensure_one() - line = self._lines_get_line_in_edit_form() - if line and getattr(line, "ref", False): - ref_val = line.ref - self.st_line_id.move_id.ref = ref_val - self.st_line_id.ref = ref_val - return super()._action_validate() \ No newline at end of file diff --git a/static/src/xml/bank_rec_kanban_inherit.xml b/static/src/xml/bank_rec_kanban_inherit.xml new file mode 100644 index 0000000..1febfa2 --- /dev/null +++ b/static/src/xml/bank_rec_kanban_inherit.xml @@ -0,0 +1,10 @@ + + + + +
+ +
+
+
+
diff --git a/views/account_reconcile_views.xml b/views/account_reconcile_views.xml index 223318f..37ddaff 100644 --- a/views/account_reconcile_views.xml +++ b/views/account_reconcile_views.xml @@ -1,16 +1,16 @@ - - - - - account.move.line.tree.reconcile.inherit.ref.visible - account.move.line - - - - show - 0 - - - - + + + + + account.move.line.tree.reconcile.inherit.ref.visible + account.move.line + + + + show + 0 + + + + \ No newline at end of file diff --git a/views/bank_rec_widget_views.xml b/views/bank_rec_widget_views.xml index 08e9caf..2f1fe7f 100644 --- a/views/bank_rec_widget_views.xml +++ b/views/bank_rec_widget_views.xml @@ -1,42 +1,40 @@ - - - - - - account.bank.statement.line.kanban.inherit.ref - account.bank.statement.line - - - -
- -
-
-
-
- - - - account.bank.statement.line.tree.inherit.ref.visible - account.bank.statement.line - - - - show - - - - - - - account.bank.statement.line.search.inherit.add.ref - account.bank.statement.line - - - - - - - -
+ + + + + + account.bank.statement.line.kanban.inherit.ref + account.bank.statement.line + + + + + + + + + + + account.bank.statement.line.tree.inherit.ref.visible + account.bank.statement.line + + + + show + + + + + + + account.bank.statement.line.search.inherit.add.ref + account.bank.statement.line + + + + + + + + \ No newline at end of file