event_order.xml 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <record model="ir.ui.view" id="view_event_order_tree">
  5. <field name="name">event_order.tree</field>
  6. <field name="model">farm.event.order</field>
  7. <field name="type">tree</field>
  8. <field name="arch" type="xml">
  9. <tree string="Event order">
  10. <field name="name" />
  11. <field name="animal_type" />
  12. <field name="event_type" />
  13. <field name="state" />
  14. </tree>
  15. </field>
  16. </record>
  17. <record model="ir.ui.view" id="view_event_order_form">
  18. <field name="name">event_order.form</field>
  19. <field name="model">farm.event.order</field>
  20. <field name="type">form</field>
  21. <field name="arch" type="xml">
  22. <form>
  23. <header>
  24. <field name="state" widget="statusbar" />
  25. <button name="confirm" states="draft"
  26. string="Confirm Order" id="draft_confirm"
  27. type="object" />
  28. </header>
  29. <sheet>
  30. <group>
  31. <field name="name" attrs="{'readonly': [('name', '!=', '*')]}"/>
  32. <field name="specie" attrs="{
  33. 'readonly':[('state','=','validated')]}"/>
  34. <field name="farm" attrs="{
  35. 'readonly':[('state','=','validated')]}"/>
  36. <field name="timestamp"
  37. attrs="{'readonly':[('state','=','validated')]}"/>
  38. <field name="event_type"
  39. attrs="{'readonly':[('state','=','validated')]}"/>
  40. <field name="animal_type"
  41. attrs="{'readonly':[('state','=','validated')]}"/>
  42. <field name="medication_events"
  43. attrs="{'invisible':[('event_type','!=','medication')],
  44. 'readonly':[('state','=','validated')]}"/>
  45. <field name="feed_events"
  46. attrs="{'invisible':[('event_type','!=','feed')],
  47. 'readonly':[('state','=','validated')]}"/>
  48. <field name="insemination_events"
  49. attrs="{'invisible':[('event_type','!=','insemination')],
  50. 'readonly':[('state','=','validated')]}"/>
  51. <field name="pregnancy_diagnosis_events"
  52. attrs="{'invisible':[('event_type','!=','pregnancy_diagnosis')],
  53. 'readonly':[('state','=','validated')]}"/>
  54. <field name="abort_events"
  55. attrs="{'invisible':[('event_type','!=','abort')],
  56. 'readonly':[('state','=','validated')]}"/>
  57. <field name="farrowing_events"
  58. attrs="{'invisible':[('event_type','!=','farrowing')],
  59. 'readonly':[('state','=','validated')]}"/>
  60. <field name="foster_events"
  61. attrs="{'invisible':[('event_type','!=','foster')],
  62. 'readonly':[('state','=','validated')]}"/>
  63. <field name="weaning_events"
  64. attrs="{'invisible':[('event_type','!=','weaning')],
  65. 'readonly':[('state','=','validated')]}"/>
  66. <field name="trasformation_events"
  67. attrs="{'invisible':[('event_type','!=','trasformation_event')],
  68. 'readonly':[('state','=','validated')]}"/>
  69. <field name="notes"/>
  70. </group>
  71. </sheet>
  72. </form>
  73. </field>
  74. </record>
  75. </data>
  76. </openerp>