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.

160 lines
7.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="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. <sheet>
  43. <h1>
  44. <field name="invoice_id" placeholder="Choose an invoice..."/>
  45. <label for="type" string="Based on:" class="oe_inline"/>
  46. <field name="type" class="oe_inline"/>
  47. </h1>
  48. <group>
  49. <field name="last_action_date" />
  50. <field name="close_date" />
  51. </group>
  52. <group>
  53. <separator colspan="4" string="Hours Quantity / Amount"/>
  54. <field name="amount_hours_block" string="Bought"/>
  55. <field name="amount_hours_block_done" string="Used"/>
  56. <field name="amount_hours_block_delta" string="Difference"/>
  57. </group>
  58. <group>
  59. <separator colspan="4" string="Invoice's related information"/>
  60. <field name="date_invoice"/>
  61. <field name="name"/>
  62. <field name="number"/>
  63. <field name="partner_id" groups="base.group_user"/>
  64. <field name="user_id"/>
  65. <field name="company_id" groups="base.group_multi_company" widget="selection"/>
  66. <field name="journal_id" invisible="1"/>
  67. <field name="period_id" invisible="1" groups="account.group_account_user"/>
  68. <field name="currency_id"/>
  69. <newline/>
  70. <field name="residual" sum="Residual Amount"/>
  71. <field name="amount_total" sum="Total Amount"/>
  72. <field name="state"/>
  73. </group>
  74. </sheet>
  75. </form>
  76. </field>
  77. </record>
  78. <record model="ir.ui.view" id="invoice_tree_hour_block">
  79. <field name="name">account.hours.block.tree</field>
  80. <field name="model">account.hours.block</field>
  81. <field name="arch" type="xml">
  82. <tree colors="blue:state in ('draft');black:state in ('proforma','proforma2','open');gray:state in ('cancel')" string="Invoice">
  83. <field name="date_invoice"/>
  84. <field name="partner_id" groups="base.group_user"/>
  85. <field name="name"/>
  86. <field name="amount_hours_block" sum="Quantity of hours bought"/>
  87. <field name="amount_hours_block_done" sum="Quantity of hours used" />
  88. <field name="amount_hours_block_delta" sum="Quantity of hours difference"/>
  89. <field name="last_action_date" />
  90. <field name="close_date" />
  91. <field name="journal_id" invisible="1"/>
  92. <field name="period_id" invisible="1" groups="account.group_account_user"/>
  93. <field name="company_id" groups="base.group_multi_company" widget="selection"/>
  94. <field name="user_id"/>
  95. <field name="currency_id"/>
  96. <field name="residual" sum="Residual Amount"/>
  97. <field name="amount_total" sum="Total Amount"/>
  98. <field name="state"/>
  99. </tree>
  100. </field>
  101. </record>
  102. <!--
  103. Add related act_window from partner and Hours Block
  104. -->
  105. <act_window name="All blocks hours"
  106. domain="[('partner_id', '=', active_id)]"
  107. res_model="account.hours.block"
  108. src_model="res.partner"
  109. id="act_block_hour_from_partner"/>
  110. <!--
  111. Link to invoice on hours block view
  112. -->
  113. <act_window
  114. domain="[('account_hours_block_ids', '=', active_id)]"
  115. id="act_invoice_from_hours_block"
  116. name="Invoice"
  117. res_model="account.invoice"
  118. src_model="account.hours.block"
  119. view_mode="tree,form"
  120. view_type="form"/>
  121. <!--
  122. Link to analytic lines on hours block view
  123. -->
  124. <act_window
  125. domain="[('invoice_id.account_hours_block_ids', '=', active_id)]"
  126. id="act_analytic_lines_from_hours_block"
  127. name="Analytic Lines"
  128. res_model="account.analytic.line"
  129. src_model="account.hours.block"
  130. view_mode="tree,form"
  131. view_type="form"/>
  132. <!--
  133. Link to hours block on invoice view
  134. -->
  135. <act_window
  136. domain="[('invoice_id', '=', active_id)]"
  137. id="act_hours_block_from_invoice"
  138. name="Hours Block"
  139. res_model="account.hours.block"
  140. src_model="account.invoice"
  141. view_mode="tree,form,calendar,graph"
  142. view_type="form"/>
  143. </data>
  144. </openerp>