feed_event.xml 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <record model="ir.actions.act_window" id="animal_group2_open_feed_events">
  5. <field name="domain">[('animal_group', '=', active_ids)]</field>
  6. <field name="name">Feed events</field>
  7. <field name="view_type">form</field>
  8. <field name="view_mode">tree,form,graph</field>
  9. <field name="res_model">farm.feed.event</field>
  10. </record>
  11. <record model="ir.actions.act_window" id="animal_open_feed_events">
  12. <field name="domain">[('animal', '=', active_ids)]</field>
  13. <field name="name">Feed events</field>
  14. <field name="res_model">farm.feed.event</field>
  15. </record>
  16. <record model="ir.ui.view" id="farm_feed_event_graph_view">
  17. <field name="name">farm.feed.event.graph</field>
  18. <field name="model">farm.feed.event</field>
  19. <field name="type">graph</field>
  20. <field name="arch" type="xml">
  21. <graph string="Feed diagram" type="bar">
  22. <field name="quantity" type="col"/>
  23. <field name="start_date" type="row" interval="month"/>
  24. <field name="feed_quantity" type="measure"/>
  25. </graph>
  26. </field>
  27. </record>
  28. <record id="view_feed_event_tree" model="ir.ui.view">
  29. <field name="name">feed_event.tree</field>
  30. <field name="model">farm.feed.event</field>
  31. <field name="mode">primary</field>
  32. <field name="inherit_id" ref="view_abstract_event_tree"/>
  33. <field name="arch" type="xml">
  34. <field name="lot" position="after">
  35. <field name="feed_quantity" sum="Tot. feed quantity"/>
  36. <field name="feed_product"/>
  37. <field name="feed_lot"/>
  38. </field>
  39. </field>
  40. </record>
  41. <record id="view_feed_event_form" model="ir.ui.view">
  42. <field name="name">feed_event.form</field>
  43. <field name="model">farm.feed.event</field>
  44. <field name="mode">primary</field>
  45. <field name="inherit_id" ref="view_abstract_event_form"/>
  46. <field name="arch" type="xml">
  47. <field name="state" position="after">
  48. <h1>Feed Event</h1>
  49. </field>
  50. <field name="lot" position="after">
  51. <field name="feed_quantity"/>
  52. <field name="feed_quantity_animal_day"/>
  53. <field name="location"/>
  54. <field name="quantity"/>
  55. <field name="feed_location"/>
  56. <field name="feed_product"/>
  57. <field name="feed_lot"
  58. domain="[('product_id', '=', feed_product)]"/>
  59. <field name="uom"/>
  60. <field name="start_date"/>
  61. <field name="end_date"/>
  62. <field name="move"/>
  63. </field>
  64. </field>
  65. </record>
  66. <record model="ir.ui.view" id="feed_event_search_view">
  67. <field name="name">farm.feed.event.search</field>
  68. <field name="model">farm.feed.event</field>
  69. <field name="arch" type="xml">
  70. <search string="Search feed event">
  71. <group>
  72. <field name="farm" />
  73. <field name="feed_product" />
  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="Month"
  81. domain="[]"
  82. context="{'group_by': 'start_date:month'}" />
  83. <filter string="Location"
  84. domain="[]"
  85. context="{'group_by': 'location'}" />
  86. <filter string="State"
  87. domain="[]"
  88. context="{'group_by': 'state'}" />
  89. </group>
  90. </search>
  91. </field>
  92. </record>
  93. </data>
  94. </openerp>