lunch_cashmove_report_views.xml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="lunch_cashmove_report_view_search" model="ir.ui.view">
  4. <field name='name'>lunch.cashmove.report.search</field>
  5. <field name='model'>lunch.cashmove.report</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_payment' string="Payment" domain="[('amount', '>', 0)]"/>
  11. <separator/>
  12. <filter name='is_mine_group' string="My Account grouped" domain="[('user_id','=',uid)]" context="{'group_by':'user_id'}"/>
  13. <filter name="group_by_user" string="By User" context="{'group_by':'user_id'}"/>
  14. </search>
  15. </field>
  16. </record>
  17. <record id="lunch_cashmove_report_view_search_2" model="ir.ui.view">
  18. <field name='name'>lunch.cashmove.report.search</field>
  19. <field name='model'>lunch.cashmove.report</field>
  20. <field name='arch' type='xml'>
  21. <search string="lunch cashmove">
  22. <field name="description"/>
  23. <field name="user_id"/>
  24. <group expand="0" string="Group By">
  25. <filter name='group_by_user' string="By Employee" context="{'group_by':'user_id'}"/>
  26. </group>
  27. </search>
  28. </field>
  29. </record>
  30. <record id="lunch_cashmove_report_view_tree" model="ir.ui.view">
  31. <field name="name">lunch.cashmove.report.tree</field>
  32. <field name="model">lunch.cashmove.report</field>
  33. <field name="arch" type="xml">
  34. <tree string="cashmove tree">
  35. <field name="currency_id" invisible="1"/>
  36. <field name="date"/>
  37. <field name="user_id"/>
  38. <field name="description"/>
  39. <field name="amount" sum="Total" widget="monetary"/>
  40. </tree>
  41. </field>
  42. </record>
  43. <record id="lunch_cashmove_report_view_tree_2" model="ir.ui.view">
  44. <field name="name">lunch.cashmove.report.tree</field>
  45. <field name="model">lunch.cashmove.report</field>
  46. <field name="arch" type="xml">
  47. <tree string="cashmove tree" create='false'>
  48. <field name="currency_id" invisible="1"/>
  49. <field name="date"/>
  50. <field name="description"/>
  51. <field name="amount" sum="Total" widget="monetary"/>
  52. </tree>
  53. </field>
  54. </record>
  55. <record id="lunch_cashmove_report_view_form" model="ir.ui.view">
  56. <field name="name">lunch.cashmove.report.form</field>
  57. <field name="model">lunch.cashmove.report</field>
  58. <field name="arch" type="xml">
  59. <form string="cashmove form">
  60. <sheet>
  61. <group>
  62. <field name="currency_id" invisible="1"/>
  63. <field name="user_id" required="1"/>
  64. <field name="date"/>
  65. <field name="amount" widget="monetary"/>
  66. </group>
  67. <label for='description'/>
  68. <field name="description"/>
  69. </sheet>
  70. </form>
  71. </field>
  72. </record>
  73. <record id="view_lunch_cashmove_report_kanban" model="ir.ui.view">
  74. <field name="name">lunch.cashmove.report.kanban</field>
  75. <field name="model">lunch.cashmove.report</field>
  76. <field name="arch" type="xml">
  77. <kanban class="o_kanban_mobile">
  78. <field name="date"/>
  79. <field name="user_id"/>
  80. <field name="description"/>
  81. <field name="amount"/>
  82. <field name="currency_id" invisible="1"/>
  83. <templates>
  84. <t t-name="kanban-box">
  85. <div t-attf-class="oe_kanban_global_click">
  86. <div class="row mb4">
  87. <div class="col-8">
  88. <span>
  89. <strong class="o_kanban_record_title"><t t-esc="record.description.value"/></strong>
  90. </span>
  91. </div>
  92. <div class="col-4 text-end">
  93. <span class="badge rounded-pill">
  94. <strong><i class="fa fa-money" role="img" aria-label="Amount" title="Amount"/> <field name="amount" widget="monetary"/></strong>
  95. </span>
  96. </div>
  97. </div>
  98. <div class="row">
  99. <div class="col-6">
  100. <i class="fa fa-clock-o" role="img" aria-label="Date" title="Date"/>
  101. <t t-esc="record.date.value"/>
  102. </div>
  103. <div class="col-6">
  104. <div class="float-end">
  105. <field name="user_id" widget="many2one_avatar_user"/>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. </t>
  111. </templates>
  112. </kanban>
  113. </field>
  114. </record>
  115. <record id="lunch_cashmove_report_action_account" model="ir.actions.act_window">
  116. <field name="name">My Account</field>
  117. <field name="res_model">lunch.cashmove.report</field>
  118. <field name="view_mode">tree</field>
  119. <field name="search_view_id" ref="lunch_cashmove_report_view_search"/>
  120. <field name="domain">[('user_id','=',uid)]</field>
  121. <field name="view_id" ref="lunch_cashmove_report_view_tree_2"/>
  122. <field name="help" type="html">
  123. <p class="o_view_nocontent_empty_folder">
  124. No cash move yet
  125. </p><p>
  126. Here you can see your cash moves.<br/>A cash move can either be an expense or a payment.
  127. An expense is automatically created when an order is received while a payment is a reimbursement to the company encoded by the manager.
  128. </p>
  129. </field>
  130. </record>
  131. <record id="lunch_cashmove_report_action_control_accounts" model="ir.actions.act_window">
  132. <field name="name">Control Accounts</field>
  133. <field name="res_model">lunch.cashmove.report</field>
  134. <field name="view_mode">tree,kanban,form</field>
  135. <field name="search_view_id" ref="lunch_cashmove_report_view_search_2"/>
  136. <field name="context">{"search_default_group_by_user":1}</field>
  137. <field name="view_id" ref="lunch_cashmove_report_view_tree"/>
  138. <field name="help" type="html">
  139. <p class="o_view_nocontent_smiling_face">
  140. Create a new payment
  141. </p><p>
  142. A cashmove can either be an expense or a payment.<br/>
  143. An expense is automatically created at the order receipt.<br/>
  144. A payment represents the employee reimbursement to the company.
  145. </p>
  146. </field>
  147. </record>
  148. </odoo>