animal.xml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <record model="ir.ui.view" id="view_animal_tree">
  5. <field name="name">animal.tree</field>
  6. <field name="model">farm.animal</field>
  7. <field name="type">tree</field>
  8. <field name="arch" type="xml">
  9. <tree string="Animal">
  10. <field name="type" />
  11. <field name="specie" />
  12. <field name="breed" />
  13. <field name="current_cycle" attrs="{'invisible':[('type','!=','female')]}"/>
  14. <field name="number" />
  15. <field name="weight"/>
  16. </tree>
  17. </field>
  18. </record>
  19. <record model="ir.ui.view" id="view_animal_animal_weigth_tree">
  20. <field name="name">animal_animal_weigth.tree</field>
  21. <field name="model">farm.animal.weight</field>
  22. <field name="type">tree</field>
  23. <field name="arch" type="xml">
  24. <tree string="Animal Weigth">
  25. <field name="timestamp" />
  26. <field name="weight" />
  27. </tree>
  28. </field>
  29. </record>
  30. <record model="ir.ui.view" id="view_animal_form">
  31. <field name="name">animal.form</field>
  32. <field name="model">farm.animal</field>
  33. <field name="type">form</field>
  34. <field name="arch" type="xml">
  35. <form string="Animal">
  36. <header>
  37. <field name="state" widget="statusbar"
  38. attrs="{'invisible':[('type','!=','female')]}" />
  39. <button string="Feed events"
  40. class="oe_stat_button"
  41. icon="fa-building-o" name="%(animal_open_feed_events)d" type="action"
  42. />
  43. <button string="Medication events"
  44. class="oe_stat_button"
  45. icon="fa-building-o" name="%(animal_open_medication_events)d" type="action"
  46. />
  47. </header>
  48. <sheet>
  49. <group>
  50. <field name="type" />
  51. </group>
  52. <group col="4" colspam="2">
  53. <field name="specie" />
  54. <field name="breed" domain="[('specie', '=', specie)]" />
  55. </group>
  56. <group>
  57. <field name="lot" attrs="{'required': True}"/>
  58. <field name="number" />
  59. </group>
  60. <group col="4" colspam="2">
  61. <field name="active" />
  62. </group>
  63. <group col="4" colspan="2">
  64. <field name="farm" attrs="{'required': True}" />
  65. <field name="initial_location" domain="['|',('location_id', '=', farm),('location_id.location_id', '=', farm)]" />
  66. <field name="location" attrs="{'readonly': True}" />
  67. <field name="origin" />
  68. </group>
  69. <group col="4" colspam="2">
  70. <field name="arrival_date" />
  71. <field name="birthdate" />
  72. </group>
  73. <group col="4" colspam="2">
  74. <field name="removal_date" />
  75. <field name="removal_reason" />
  76. </group>
  77. <group>
  78. <field name="weight"/>
  79. </group>
  80. <group col="4" colspam="2">
  81. <field name="current_weight" />
  82. <field name="consumed_feed" />
  83. </group>
  84. <group col="4" colspam="2">
  85. <field name="sex" />
  86. <field name="purpose" />
  87. </group>
  88. <group>
  89. <field name="notes" />
  90. </group>
  91. <group attrs="{'invisible':[('type','!=','male')]}">
  92. <field name="extractions" />
  93. <field name="last_extraction" />
  94. </group>
  95. <group attrs="{'invisible':[('type','!=','female')]}">
  96. <field name="cycles" attrs="{'readonly': True}"/>
  97. <field name="current_cycle" />
  98. <field name="first_mating" />
  99. <field name="days_from_insemination" />
  100. <field name="last_produced_group" />
  101. <field name="days_from_farrowing" />
  102. </group>
  103. <group>
  104. <field name="account" attrs="{'readonly': True}"/>
  105. </group>
  106. </sheet>
  107. </form>
  108. </field>
  109. </record>
  110. <record model="ir.ui.view" id="view_animal_weight_form">
  111. <field name="name">animalWeight.form</field>
  112. <field name="model">farm.animal.weight</field>
  113. <field name="type">form</field>
  114. <field name="arch" type="xml">
  115. <form string="Weight">
  116. <sheet>
  117. <group>
  118. <field name="timestamp" />
  119. <field name="uom" />
  120. <field name="weight" />
  121. </group>
  122. </sheet>
  123. </form>
  124. </field>
  125. </record>
  126. <record model="ir.ui.view" id="view_cycle_form">
  127. <field name="name">cycle.form</field>
  128. <field name="model">farm.animal.female_cycle</field>
  129. <field name="type">form</field>
  130. <field name="arch" type="xml">
  131. <form string="Female Cycle">
  132. <header>
  133. <field name="state" widget="statusbar" />
  134. </header>
  135. <sheet>
  136. <group col="4" colspan="2">
  137. <field name="animal" />
  138. <field name="sequence" attrs="{'readonly': True}" />
  139. <field name="ordination_date" />
  140. </group>
  141. <group col="4" colspan="2">
  142. <field name="insemination_events" />
  143. <field name="days_between_wearing_and_insemination" />
  144. <field name="diagnosis_events" />
  145. <field name="pregnant" />
  146. <field name="farrowing_event" />
  147. <field name="abort_event" />
  148. <field name="live"/>
  149. <field name="dead"/>
  150. <field name="fostered" />
  151. <field name="foster_events" />
  152. <field name="weaning_event" />
  153. <field name="weared" />
  154. <field name="days_between_farrowing_weaning"/>
  155. <field name="removed" />
  156. </group>
  157. </sheet>
  158. </form>
  159. </field>
  160. </record>
  161. <record model="ir.ui.view" id="animal_search_view">
  162. <field name="name">animal.search</field>
  163. <field name="model">farm.animal</field>
  164. <field name="arch" type="xml">
  165. <search string="Search Animal">
  166. <group>
  167. <field name="type" />
  168. <field name="specie" />
  169. <field name="breed" />
  170. <field name="current_cycle" attrs="{'invisible':[('type','!=','female')]}"/>
  171. <field name="number" />
  172. </group>
  173. <newline />
  174. <group expand="0" string="Group by...">
  175. <filter string="Farm"
  176. domain="[]"
  177. context="{'group_by': 'farm'}" />
  178. <filter string="Location"
  179. domain="[]"
  180. context="{'group_by': 'location'}" />
  181. <filter string="State"
  182. domain="[]"
  183. context="{'group_by': 'state'}" />
  184. </group>
  185. </search>
  186. </field>
  187. </record>
  188. <record model="ir.ui.view" id="view_cycle_tree">
  189. <field name="name">cycle.tree</field>
  190. <field name="model">farm.animal.female_cycle</field>
  191. <field name="type">tree</field>
  192. <field name="arch" type="xml">
  193. <tree string="Female Cycle">
  194. <field name="state" widget="statusbar" />
  195. <field name="sequence" attrs="{'readonly': True}" />
  196. <field name="pregnant" />
  197. <field name="fostered" />
  198. <field name="weared" />
  199. </tree>
  200. </field>
  201. </record>
  202. </data>
  203. </openerp>