From 8a145d960f070bb91d3a5c272731e00af1581315 Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Wed, 3 Jun 2026 08:13:06 +0700 Subject: [PATCH] first commit --- .gitignore | 3 +++ README.md | 8 ++++++++ __init__.py | 2 ++ __manifest__.py | 15 +++++++++++++++ views/pos_payment_views.xml | 6 ++++++ views/pos_session_views.xml | 13 +++++++++++++ 6 files changed, 47 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 __init__.py create mode 100644 __manifest__.py create mode 100644 views/pos_payment_views.xml create mode 100644 views/pos_session_views.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0d1a15e --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.pyc +*.pyo +__pycache__/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..fcc2402 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# POS Hide Payments In Progress + +This module hides the Payments smart button on POS sessions and filters out payment records from the Payments menu while their sessions are still in progress. + +## Features + +* Hides the Payments smart button at the top of the POS Session form view when the session status is In Progress (opened). +* Hides payment records in the Orders -> Payments menu for any sessions that are currently In Progress (opened). diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..67dee8c --- /dev/null +++ b/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. diff --git a/__manifest__.py b/__manifest__.py new file mode 100644 index 0000000..96155ab --- /dev/null +++ b/__manifest__.py @@ -0,0 +1,15 @@ +{ + 'name': 'POS Hide Payments In Progress', + 'version': '19.0.1.0.0', + 'category': 'Point of Sale', + 'summary': 'Hide Payments smart button on POS Session and POS payments list from In Progress sessions', + 'author': 'Suherdy Yacob', + 'depends': ['point_of_sale'], + 'data': [ + 'views/pos_session_views.xml', + 'views/pos_payment_views.xml', + ], + 'installable': True, + 'application': False, + 'license': 'LGPL-3', +} diff --git a/views/pos_payment_views.xml b/views/pos_payment_views.xml new file mode 100644 index 0000000..ef88a10 --- /dev/null +++ b/views/pos_payment_views.xml @@ -0,0 +1,6 @@ + + + + [('session_id.state', '!=', 'opened')] + + diff --git a/views/pos_session_views.xml b/views/pos_session_views.xml new file mode 100644 index 0000000..dde8f0a --- /dev/null +++ b/views/pos_session_views.xml @@ -0,0 +1,13 @@ + + + + pos.session.form.inherit.hide.payments + pos.session + + + + state == 'opened' + + + +