pos_payment_views.xml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="view_pos_payment_form" model="ir.ui.view">
  4. <field name="name">pos.payment.form</field>
  5. <field name="model">pos.payment</field>
  6. <field name="arch" type="xml">
  7. <form string="Payments" create="0" edit="0" delete="0">
  8. <sheet>
  9. <group>
  10. <field name="currency_id" invisible="1" />
  11. <field name="name" />
  12. <field name="amount" />
  13. <field name="pos_order_id" readonly="1"/>
  14. <field name="payment_method_id" readonly="1"/>
  15. <field name="card_type" readonly="1" attrs="{'invisible': [('card_type', '=', False)]}"/>
  16. <field name="cardholder_name" readonly="1" attrs="{'invisible': [('cardholder_name', '=', False)]}"/>
  17. <field name="transaction_id" readonly="1" attrs="{'invisible': [('transaction_id', '=', False)]}"/>
  18. <field name="session_id" />
  19. </group>
  20. </sheet>
  21. </form>
  22. </field>
  23. </record>
  24. <record id="view_pos_payment_tree" model="ir.ui.view">
  25. <field name="name">pos.payment.tree</field>
  26. <field name="model">pos.payment</field>
  27. <field name="arch" type="xml">
  28. <tree string="Payments" create="0" delete="0">
  29. <field name="currency_id" invisible="1" />
  30. <field name="payment_date"/>
  31. <field name="payment_method_id" />
  32. <field name="pos_order_id" />
  33. <field name="amount" />
  34. </tree>
  35. </field>
  36. </record>
  37. <record id="view_pos_payment_search" model="ir.ui.view">
  38. <field name="name">pos.payment.search.view</field>
  39. <field name="model">pos.payment</field>
  40. <field name="arch" type="xml">
  41. <search string="Payments">
  42. <field name="name"/>
  43. <field name="amount"/>
  44. <field name="pos_order_id" />
  45. <group expand="0" string="Group By">
  46. <filter name="group_by_payment_method" string="Payment Method" domain="[]" context="{'group_by':'payment_method_id'}"/>
  47. <filter name="group_by_session" string="Session" domain="[]" context="{'group_by':'session_id'}"/>
  48. </group>
  49. </search>
  50. </field>
  51. </record>
  52. <record id="action_pos_payment_form" model="ir.actions.act_window">
  53. <field name="name">Payments</field>
  54. <field name="type">ir.actions.act_window</field>
  55. <field name="res_model">pos.payment</field>
  56. <field name="view_mode">tree,kanban,form</field>
  57. <field name="view_id" eval="False"/>
  58. <field name="domain">[]</field>
  59. <field name="context">{'search_default_group_by_payment_method': 1}</field>
  60. <field name="help" type="html">
  61. <p class="o_view_nocontent_empty_folder">
  62. No orders found
  63. </p><p>
  64. To record new orders, start a new session.
  65. </p>
  66. </field>
  67. </record>
  68. <menuitem id="menu_pos_payment" parent="menu_point_of_sale" action="action_pos_payment_form" sequence="3" groups="group_pos_manager,group_pos_user"/>
  69. </odoo>