animal_group.xml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <record model="ir.ui.view" id="view_animal_group">
  5. <field name="name">animal_group.form</field>
  6. <field name="model">farm.animal.group</field>
  7. <field name="type">form</field>
  8. <field name="arch" type="xml">
  9. <form string="Animal Group">
  10. <header>
  11. <field name="state" widget="statusbar" />
  12. <button string="Feed events"
  13. class="oe_stat_button"
  14. icon="fa-building-o" name="%(animal_group2_open_feed_events)d" type="action"
  15. />
  16. <button string="Medication events"
  17. class="oe_stat_button"
  18. icon="fa-building-o" name="%(animal_group_open_medication_events)d" type="action"
  19. />
  20. </header>
  21. <sheet>
  22. <group col="4" colspan="2">
  23. <field name="specie" />
  24. <field name="breed" domain="[('specie', '=', specie)]" />
  25. <field name="number" />
  26. <field name="location" attrs="{'readonly': True}" />
  27. <field name="farm" />
  28. <field name="quantity" />
  29. <field name="origin" />
  30. <field name="arrival_date" />
  31. <field name="initial_location" domain="['|',('location_id', '=', farm),('location_id.location_id', '=', farm)]" />
  32. <field name="initial_quantity" />
  33. <field name="removal_date" />
  34. <field name="weights" />
  35. <field name="current_weight" />
  36. <field name="active" />
  37. <field name="consumed_feed" />
  38. <field name="transition_days"/>
  39. <field name="fattening_days"/>
  40. <field name="lot"/>
  41. </group>
  42. <group>
  43. <field name="account" attrs="{'readonly': True}"/>
  44. </group>
  45. </sheet>
  46. </form>
  47. </field>
  48. </record>
  49. <record model="ir.ui.view" id="view_animal_group_tree">
  50. <field name="name">animal_group.tree</field>
  51. <field name="model">farm.animal.group</field>
  52. <field name="type">tree</field>
  53. <field name="arch" type="xml">
  54. <tree string="Animal Group">
  55. <field name="number" />
  56. <field name="arrival_date" />
  57. <field name="weaning_day"/>
  58. <field name="quantity" />
  59. <field name="state"/>
  60. <field name="mother"/>
  61. </tree>
  62. </field>
  63. </record>
  64. <record model="ir.ui.view" id="animal_group_search_view">
  65. <field name="name">animal.group.search</field>
  66. <field name="model">farm.animal.group</field>
  67. <field name="arch" type="xml">
  68. <search string="Search Animal group">
  69. <group>
  70. <field name="number" />
  71. <field name="state" />
  72. <field name="specie" />
  73. <field name="breed" />
  74. </group>
  75. <newline />
  76. <group expand="0" string="Group by...">
  77. <filter string="Farm"
  78. domain="[]"
  79. context="{'group_by': 'farm'}" />
  80. <filter string="Location"
  81. domain="[]"
  82. context="{'group_by': 'location'}" />
  83. <filter string="State"
  84. domain="[]"
  85. context="{'group_by': 'state'}" />
  86. </group>
  87. </search>
  88. </field>
  89. </record>
  90. <record model="ir.ui.view" id="view_animal_group_weigth_tree">
  91. <field name="name">animal_group_weigth.tree</field>
  92. <field name="model">farm.animal.group.weight</field>
  93. <field name="type">tree</field>
  94. <field name="arch" type="xml">
  95. <tree string="Animal Group Weigth">
  96. <field name="timestamp" />
  97. <field name="weight" />
  98. </tree>
  99. </field>
  100. </record>
  101. <record model="ir.ui.view" id="view_animal_group_weigth">
  102. <field name="name">animal_group_weigth.form</field>
  103. <field name="model">farm.animal.group.weight</field>
  104. <field name="type">form</field>
  105. <field name="arch" type="xml">
  106. <form string="Animal Group Weigth">
  107. <sheet>
  108. <group>
  109. <field name="timestamp" />
  110. <field name="quantity" />
  111. <field name="uom" />
  112. <field name="weight" />
  113. </group>
  114. </sheet>
  115. </form>
  116. </field>
  117. </record>
  118. </data>
  119. </openerp>