From eb2cd470e7769ccd4a3f0ca8da85cebc51199ca6 Mon Sep 17 00:00:00 2001 From: "Suherdy SYC. Yacob" Date: Mon, 29 Sep 2025 14:43:59 +0700 Subject: [PATCH] first commit --- __init__.py | 3 ++ __manifest__.py | 31 +++++++++++++ __pycache__/__init__.cpython-312.pyc | Bin 0 -> 206 bytes models/__init__.py | 2 + models/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 220 bytes .../bank_rec_widget.cpython-312.pyc | Bin 0 -> 2171 bytes models/bank_rec_widget.py | 37 +++++++++++++++ static/src/xml/bank_rec_form_inherit.xml | 29 ++++++++++++ views/account_reconcile_views.xml | 16 +++++++ views/bank_rec_widget_views.xml | 42 ++++++++++++++++++ 10 files changed, 160 insertions(+) create mode 100644 __init__.py create mode 100644 __manifest__.py create mode 100644 __pycache__/__init__.cpython-312.pyc create mode 100644 models/__init__.py create mode 100644 models/__pycache__/__init__.cpython-312.pyc create mode 100644 models/__pycache__/bank_rec_widget.cpython-312.pyc create mode 100644 models/bank_rec_widget.py create mode 100644 static/src/xml/bank_rec_form_inherit.xml create mode 100644 views/account_reconcile_views.xml create mode 100644 views/bank_rec_widget_views.xml diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..a6ffc5f --- /dev/null +++ b/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- +# Account Reconciliation Reference addon +from . import models \ No newline at end of file diff --git a/__manifest__.py b/__manifest__.py new file mode 100644 index 0000000..cd9760c --- /dev/null +++ b/__manifest__.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +{ + 'name': 'Account Reconciliation Reference', + 'version': '17.0.1.0.2', + 'category': 'Accounting/Accounting', + 'summary': 'Show Reference on reconciliation kanban/list and add to search', + 'description': """ +Show Reference on reconciliation UI +- Adds 'ref' on bank reconciliation kanban cards (account.bank.statement.line) +- Shows 'ref' column in bank reconciliation list view +- Adds 'ref' field in bank reconciliation search +- Also shows 'ref' in Journal Items Reconcile list +- Shows 'ref' on Manual Operations panel and persists it on Validate +""", + 'author': 'Your Company', + 'website': 'https://example.com', + 'license': 'LGPL-3', + 'depends': ['account_accountant'], + 'data': [ + 'views/account_reconcile_views.xml', + 'views/bank_rec_widget_views.xml', + ], + 'assets': { + 'web.assets_backend': [ + 'account_reconcile_reference/static/src/xml/bank_rec_form_inherit.xml', + ], + }, + 'installable': True, + 'auto_install': False, + 'application': False, +} \ No newline at end of file diff --git a/__pycache__/__init__.cpython-312.pyc b/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6bdb85e545319fd4dac6b3b5c3bf7043119d47cd GIT binary patch literal 206 zcmX@j%ge<81nUfMWrPFi#~=<2FhLog1%Qm{3@HpLj5!Rsj8Tk?43$ip%r6;%!kUb? z*mCnzQge#^G?{KO6fpzERx*4B>HOuHVii+RS(1^Tmkd-9lb@2GZ)hHqTv}X`pPQJH zlAl)`lbD>GUz%4EUzC~*RF#>N3S_0F7NzDTr^dv`XXa&=#K-FuRQ}?y0a{X;lWJGQ a0W=w8aWTlVNJ$c z{7H#<+3`iG$?@fxDe0*tews|T7>byIk}DZLgN*nUkYW{6P+5|ZpO>7Uk{XkrlAmvA z9+O;JT#}!gn39s8R~(a=oSa{pR{}Bys46oj7060UElSNxPL0V0YRV~&iI30B%PfhH m*DI*}#bE;!EX_%^E8+lJ0CGq%i1C4$k&*EkgKQBSkOKf!0X#ea literal 0 HcmV?d00001 diff --git a/models/__pycache__/bank_rec_widget.cpython-312.pyc b/models/__pycache__/bank_rec_widget.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..31615db8181d400a8c2deb4b62e1563b6ce0b4a8 GIT binary patch literal 2171 zcma)7-EUMy6rb6T_ENT9Cq?cU|?OqrRb zv?&P>M7IwHNi^lb2Ol;3BPPC3S<`ys1JU^4i)pMz!jot2z578^qO;lAnRCziosWBd zXTKjD96+#w6LIyEK7@X?m-Z@VhmBKkSVjyn9HBZcV~ld>9AddUh~+u171{>f-v{~h zT+YuI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 --- /dev/null +++ b/models/bank_rec_widget.py @@ -0,0 +1,37 @@ +# -*- 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_form_inherit.xml b/static/src/xml/bank_rec_form_inherit.xml new file mode 100644 index 0000000..2491cfb --- /dev/null +++ b/static/src/xml/bank_rec_form_inherit.xml @@ -0,0 +1,29 @@ + + + + + +
+
+ +
+
+
+ + +
+
+
+
+ + + + + false + +
+
\ No newline at end of file diff --git a/views/account_reconcile_views.xml b/views/account_reconcile_views.xml new file mode 100644 index 0000000..26e4d24 --- /dev/null +++ b/views/account_reconcile_views.xml @@ -0,0 +1,16 @@ + + + + + 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 new file mode 100644 index 0000000..ac95bbe --- /dev/null +++ b/views/bank_rec_widget_views.xml @@ -0,0 +1,42 @@ + + + + + + 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