summaryrefslogtreecommitdiff
path: root/addons/point_of_sale/views/pos_payment_views.xml
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/point_of_sale/views/pos_payment_views.xml
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/point_of_sale/views/pos_payment_views.xml')
-rw-r--r--addons/point_of_sale/views/pos_payment_views.xml73
1 files changed, 73 insertions, 0 deletions
diff --git a/addons/point_of_sale/views/pos_payment_views.xml b/addons/point_of_sale/views/pos_payment_views.xml
new file mode 100644
index 00000000..af855fb1
--- /dev/null
+++ b/addons/point_of_sale/views/pos_payment_views.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <record id="view_pos_payment_form" model="ir.ui.view">
+ <field name="name">pos.payment.form</field>
+ <field name="model">pos.payment</field>
+ <field name="arch" type="xml">
+ <form string="Payments" create="0" delete="0">
+ <sheet>
+ <group>
+ <field name="currency_id" invisible="1" />
+ <field name="name" />
+ <field name="amount" />
+ <field name="pos_order_id" />
+ <field name="payment_method_id" />
+ <field name="card_type" attrs="{'invisible': [('card_type', '=', False)]}"/>
+ <field name="cardholder_name" attrs="{'invisible': [('cardholder_name', '=', False)]}"/>
+ <field name="transaction_id" attrs="{'invisible': [('transaction_id', '=', False)]}"/>
+ <field name="session_id" />
+ </group>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="view_pos_payment_tree" model="ir.ui.view">
+ <field name="name">pos.payment.tree</field>
+ <field name="model">pos.payment</field>
+ <field name="arch" type="xml">
+ <tree string="Payments" create="0" delete="0">
+ <field name="currency_id" invisible="1" />
+ <field name="payment_date"/>
+ <field name="payment_method_id" />
+ <field name="pos_order_id" />
+ <field name="amount" />
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_pos_payment_search" model="ir.ui.view">
+ <field name="name">pos.payment.search.view</field>
+ <field name="model">pos.payment</field>
+ <field name="arch" type="xml">
+ <search string="Payments">
+ <field name="name"/>
+ <field name="amount"/>
+ <field name="pos_order_id" />
+ <group expand="0" string="Group By">
+ <filter name="group_by_payment_method" string="Payment Method" domain="[]" context="{'group_by':'payment_method_id'}"/>
+ <filter name="group_by_session" string="Session" domain="[]" context="{'group_by':'session_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record id="action_pos_payment_form" model="ir.actions.act_window">
+ <field name="name">Payments</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">pos.payment</field>
+ <field name="view_mode">tree,kanban,form</field>
+ <field name="view_id" eval="False"/>
+ <field name="domain">[]</field>
+ <field name="context">{'search_default_group_by_payment_method': 1}</field>
+ <field name="help" type="html">
+ <p class="o_view_nocontent_empty_folder">
+ No orders found
+ </p><p>
+ To record new orders, start a new session.
+ </p>
+ </field>
+ </record>
+
+ <menuitem id="menu_pos_payment" parent="menu_point_of_sale" action="action_pos_payment_form" sequence="3" groups="group_pos_manager,group_pos_user"/>
+</odoo>