first commit
This commit is contained in:
commit
8a145d960f
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
*.pyc
|
||||||
|
*.pyo
|
||||||
|
__pycache__/
|
||||||
8
README.md
Normal file
8
README.md
Normal file
@ -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).
|
||||||
2
__init__.py
Normal file
2
__init__.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||||
15
__manifest__.py
Normal file
15
__manifest__.py
Normal file
@ -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',
|
||||||
|
}
|
||||||
6
views/pos_payment_views.xml
Normal file
6
views/pos_payment_views.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<record id="point_of_sale.action_pos_payment_form" model="ir.actions.act_window">
|
||||||
|
<field name="domain">[('session_id.state', '!=', 'opened')]</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
13
views/pos_session_views.xml
Normal file
13
views/pos_session_views.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<record id="view_pos_session_form_inherit" model="ir.ui.view">
|
||||||
|
<field name="name">pos.session.form.inherit.hide.payments</field>
|
||||||
|
<field name="model">pos.session</field>
|
||||||
|
<field name="inherit_id" ref="point_of_sale.view_pos_session_form"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<xpath expr="//button[@name='action_show_payments_list']" position="attributes">
|
||||||
|
<attribute name="invisible">state == 'opened'</attribute>
|
||||||
|
</xpath>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
</odoo>
|
||||||
Loading…
Reference in New Issue
Block a user