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.

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