lunch_cashmove_views.xml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="lunch_cashmove_view_search" model="ir.ui.view">
  4. <field name='name'>lunch.cashmove.search</field>
  5. <field name='model'>lunch.cashmove</field>
  6. <field name='arch' type='xml'>
  7. <search string="lunch employee payment">
  8. <field name="description"/>
  9. <field name="user_id"/>
  10. <filter name='is_mine_group' string="My Account grouped" domain="[('user_id','=',uid)]" context="{'group_by':'user_id'}"/>
  11. <filter name="group_by_user" string="By User" context="{'group_by':'user_id'}"/>
  12. </search>
  13. </field>
  14. </record>
  15. <record id="lunch_cashmove_view_tree" model="ir.ui.view">
  16. <field name="name">lunch.cashmove.tree</field>
  17. <field name="model">lunch.cashmove</field>
  18. <field name="arch" type="xml">
  19. <tree string="cashmove tree">
  20. <field name="currency_id" invisible="1"/>
  21. <field name="date"/>
  22. <field name="user_id"/>
  23. <field name="description"/>
  24. <field name="amount" sum="Total" widget="monetary"/>
  25. </tree>
  26. </field>
  27. </record>
  28. <record id="lunch_cashmove_view_form" model="ir.ui.view">
  29. <field name="name">lunch.cashmove.form</field>
  30. <field name="model">lunch.cashmove</field>
  31. <field name="arch" type="xml">
  32. <form string="cashmove form">
  33. <sheet>
  34. <group>
  35. <field name="currency_id" invisible="1"/>
  36. <field name="user_id" required="1"/>
  37. <field name="date"/>
  38. <field name="amount" widget="monetary"/>
  39. </group>
  40. <label for='description'/>
  41. <field name="description"/>
  42. </sheet>
  43. </form>
  44. </field>
  45. </record>
  46. <record id="view_lunch_cashmove_kanban" model="ir.ui.view">
  47. <field name="name">lunch.cashmove.kanban</field>
  48. <field name="model">lunch.cashmove</field>
  49. <field name="arch" type="xml">
  50. <kanban class="o_kanban_mobile">
  51. <field name="date"/>
  52. <field name="user_id"/>
  53. <field name="description"/>
  54. <field name="amount"/>
  55. <field name="currency_id" invisible="1"/>
  56. <templates>
  57. <t t-name="kanban-box">
  58. <div t-attf-class="oe_kanban_global_click">
  59. <div class="row mb4">
  60. <div class="col-8">
  61. <span>
  62. <strong class="o_kanban_record_title"><t t-esc="record.description.value"/></strong>
  63. </span>
  64. </div>
  65. <div class="col-4 text-end">
  66. <span class="badge rounded-pill">
  67. <strong><i class="fa fa-money" role="img" aria-label="Amount" title="Amount"/> <field name="amount" widget="monetary"/></strong>
  68. </span>
  69. </div>
  70. </div>
  71. <div class="row">
  72. <div class="col-6">
  73. <i class="fa fa-clock-o" role="img" aria-label="Date" title="Date"/>
  74. <t t-esc="record.date.value"/>
  75. </div>
  76. <div class="col-6">
  77. <div class="float-end">
  78. <field name="user_id" widget="many2one_avatar_user"/>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. </t>
  84. </templates>
  85. </kanban>
  86. </field>
  87. </record>
  88. <record id="lunch_cashmove_action_payment" model="ir.actions.act_window">
  89. <field name="name">Cash Moves</field>
  90. <field name="res_model">lunch.cashmove</field>
  91. <field name="view_mode">tree,kanban,form</field>
  92. <field name="search_view_id" ref="lunch_cashmove_view_search"/>
  93. <field name="view_id" ref="lunch_cashmove_view_tree"/>
  94. <field name="help" type="html">
  95. <p class="o_view_nocontent_smiling_face">
  96. Register a payment
  97. </p><p>
  98. Payments are used to register liquidity movements. You can process those payments by your own means or by using installed facilities.
  99. </p>
  100. </field>
  101. </record>
  102. </odoo>