trasformation_event.xml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <record id="view_trasformation_event_tree" model="ir.ui.view">
  5. <field name="name">trasformation_event.tree</field>
  6. <field name="model">farm.transformation.event</field>
  7. <field name="mode">primary</field>
  8. <field name="inherit_id" ref="view_abstract_event_tree"/>
  9. <field name="arch" type="xml">
  10. <field name="lot" position="after">
  11. <field name="from_location"/>
  12. <field name="to_location"/>
  13. </field>
  14. </field>
  15. </record>
  16. <record id="view_trasformation_event_form" model="ir.ui.view">
  17. <field name="name">trasformation_event.form</field>
  18. <field name="model">farm.transformation.event</field>
  19. <field name="mode">primary</field>
  20. <field name="inherit_id" ref="view_abstract_event_form"/>
  21. <field name="arch" type="xml">
  22. <field name="state" position="after">
  23. <h1>Trasformation</h1>
  24. </field>
  25. <field name="lot" position="after">
  26. <field name="to_animal_type"/>
  27. <field name="quantity"/>
  28. <field name="to_animal"
  29. attrs="{'invisible':[('to_animal_type', '=', 'group')],
  30. 'readonly': True}"/>
  31. <field name="to_animal_group"
  32. attrs="{'invisible':[('to_animal_type', '!=', 'group')]}"
  33. domain="[('state', '!=', 'sold')]"/>
  34. <field name="from_location"/>
  35. <field name="to_location"/>
  36. <field name="move"
  37. attr="{'invisible':[('state', '=', 'draft')]"/>
  38. </field>
  39. </field>
  40. </record>
  41. </data>
  42. </openerp>