You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

174 lines
8.2 KiB

12 years ago
  1. <?xml version="1.0" ?>
  2. <openerp>
  3. <data>
  4. <!--
  5. Hours block search form
  6. -->
  7. <record id="view_account_invoice_filter" model="ir.ui.view">
  8. <field name="name">account.hours.block.select</field>
  9. <field name="model">account.hours.block</field>
  10. <field name="arch" type="xml">
  11. <search string="Search Invoice">
  12. <group col="7" colspan="4">
  13. <filter name="draft" icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Hours Blocks"/>
  14. <filter name="running" icon="terp-dolar" string="Running" domain="[('close_date','=',False),('state','&lt;&gt;','draft')]" help="All Running Hours Block"/>
  15. <separator orientation="vertical"/>
  16. <filter name="overdue" icon="terp-dolar_ok!" string="Overdue" domain="[('amount_hours_block_delta','&lt;','0.0')]" help="Overdue Hours Block"/>
  17. <separator orientation="vertical"/>
  18. <field name="number"/>
  19. <field name="partner_id"/>
  20. <field name="department_id" string="Department"/>
  21. <field name="user_id" select="1" widget="selection" string="Salesman">
  22. <filter domain="[('user_id','=',uid)]" help="My invoices" icon="terp-personal" separator="1"/>
  23. </field>
  24. <field name="company_id" widget="selection"/>
  25. </group>
  26. <newline/>
  27. <group expand="0" string="Group By...">
  28. <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
  29. <filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
  30. <filter string="Department" icon="terp-personal" domain="[]" context="{'group_by':'department_id'}"/>
  31. <filter string="Invoice State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
  32. </group>
  33. </search>
  34. </field>
  35. </record>
  36. <!--
  37. Hours Block View
  38. -->
  39. <record id="hours_block_invoice_form" model="ir.ui.view">
  40. <field name="name">account.hours.block.form</field>
  41. <field name="model">account.hours.block</field>
  42. <field name="arch" type="xml">
  43. <form string="Hours Blocks" version="7.0">
  44. <label for="type" string="Based on:" class="oe_inline"/>
  45. <field name="type" class="oe_inline"/>
  46. <header>
  47. <button name="action_send_block" type="object" string="Send by Email" class="oe_highlight"/>
  48. </header>
  49. <sheet>
  50. <h1>
  51. <field name="invoice_id" placeholder="Choose an invoice..."/>
  52. <label for="type" string="Based on:" class="oe_inline"/>
  53. <field name="type" class="oe_inline"/>
  54. </h1>
  55. <group>
  56. <field name="last_action_date" />
  57. <field name="close_date" />
  58. </group>
  59. <group>
  60. <separator colspan="4" string="Hours Quantity / Amount"/>
  61. <field name="amount_hours_block" string="Bought"/>
  62. <field name="amount_hours_block_done" string="Used"/>
  63. <field name="amount_hours_block_delta" string="Difference"/>
  64. </group>
  65. <group>
  66. <separator colspan="4" string="Invoice's related information"/>
  67. <field name="date_invoice"/>
  68. <field name="name"/>
  69. <field name="number"/>
  70. <field name="partner_id" groups="base.group_user"/>
  71. <field name="user_id"/>
  72. <field name="company_id" groups="base.group_multi_company" widget="selection"/>
  73. <field name="department_id" widget="selection"/>
  74. <field name="journal_id" invisible="1"/>
  75. <field name="period_id" invisible="1" groups="account.group_account_user"/>
  76. <field name="currency_id"/>
  77. <newline/>
  78. <field name="residual" sum="Residual Amount"/>
  79. <field name="amount_total" sum="Total Amount"/>
  80. <field name="state"/>
  81. </group>
  82. </sheet>
  83. <div class="oe_chatter">
  84. <field name="message_follower_ids" widget="mail_followers"/>
  85. <field name="message_ids" widget="mail_thread"/>
  86. </div>
  87. </form>
  88. </field>
  89. </record>
  90. <record model="ir.ui.view" id="invoice_tree_hour_block">
  91. <field name="name">account.hours.block.tree</field>
  92. <field name="model">account.hours.block</field>
  93. <field name="arch" type="xml">
  94. <tree colors="blue:state in ('draft');black:state in ('proforma','proforma2','open');gray:state in ('cancel')" string="Invoice">
  95. <field name="date_invoice"/>
  96. <field name="partner_id" groups="base.group_user"/>
  97. <field name="name"/>
  98. <field name="amount_hours_block" sum="Quantity of hours bought"/>
  99. <field name="amount_hours_block_done" sum="Quantity of hours used" />
  100. <field name="amount_hours_block_delta" sum="Quantity of hours difference"/>
  101. <field name="last_action_date" />
  102. <field name="close_date" />
  103. <field name="journal_id" invisible="1"/>
  104. <field name="period_id" invisible="1" groups="account.group_account_user"/>
  105. <field name="company_id" groups="base.group_multi_company" widget="selection"/>
  106. <field name="department_id" widget="selection"/>
  107. <field name="user_id"/>
  108. <field name="currency_id"/>
  109. <field name="residual" sum="Residual Amount"/>
  110. <field name="amount_total" sum="Total Amount"/>
  111. <field name="state"/>
  112. </tree>
  113. </field>
  114. </record>
  115. <!--
  116. Add related act_window from partner and Hours Block
  117. -->
  118. <act_window name="All blocks hours"
  119. domain="[('partner_id', '=', active_id)]"
  120. res_model="account.hours.block"
  121. src_model="res.partner"
  122. id="act_block_hour_from_partner"/>
  123. <!--
  124. Link to invoice on hours block view
  125. -->
  126. <act_window
  127. domain="[('account_hours_block_ids', '=', active_id)]"
  128. id="act_invoice_from_hours_block"
  129. name="Invoice"
  130. res_model="account.invoice"
  131. src_model="account.hours.block"
  132. view_mode="tree,form"
  133. view_type="form"/>
  134. <!--
  135. Link to analytic lines on hours block view
  136. -->
  137. <act_window
  138. domain="[('invoice_id.account_hours_block_ids', '=', active_id)]"
  139. id="act_analytic_lines_from_hours_block"
  140. name="Analytic Lines"
  141. res_model="account.analytic.line"
  142. src_model="account.hours.block"
  143. view_mode="tree,form"
  144. view_type="form"/>
  145. <!--
  146. Link to hours block on invoice view
  147. -->
  148. <act_window
  149. domain="[('invoice_id', '=', active_id)]"
  150. id="act_hours_block_from_invoice"
  151. name="Hours Block"
  152. res_model="account.hours.block"
  153. src_model="account.invoice"
  154. view_mode="tree,form,calendar,graph"
  155. view_type="form"/>
  156. </data>
  157. </openerp>