event_move.xml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <record model="ir.ui.view" id="view_move_event_tree">
  5. <field name="name">move_event.tree</field>
  6. <field name="model">farm.move.event</field>
  7. <field name="type">tree</field>
  8. <field name="arch" type="xml">
  9. <tree string="Event" position="replace">
  10. <tree string="Animals Moves">
  11. <field name="animal_type" />
  12. <field name="timestamp" />
  13. <field name="quantity" />
  14. <field name="from_location"/>
  15. <field name="to_location" />
  16. </tree>
  17. </tree>
  18. </field>
  19. </record>
  20. <record model="ir.ui.view" id="view_move_event_form">
  21. <field name="name">move_event.form</field>
  22. <field name="model">farm.move.event</field>
  23. <field name="type">form</field>
  24. <field name="arch" type="xml">
  25. <form string="Event" position="replace">
  26. <form string="Animal Move">
  27. <sheet>
  28. <group col="4" colspam="2">
  29. <field name="animal_type" attrs="{'readonly': True}"/>
  30. <field name="timestamp" attrs="{'readonly': True}"/>
  31. <field name="animal" attrs="{'invisible':[('animal_type','=','group')], 'readonly': True}"/>
  32. <field name="animal_group" attrs="{'invisible':[('animal_type','!=','group')], 'readonly': True}" />
  33. <field name="from_location" attrs="{'readonly': True}"/>
  34. <field name="to_location" attrs="{'readonly': True}"/>
  35. </group>
  36. <group>
  37. <field name="move" attrs="{'readonly': True}"/>
  38. </group>
  39. </sheet>
  40. </form>
  41. </form>
  42. </field>
  43. </record>
  44. </data>
  45. </openerp>