abstract_event.xml 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <record model="ir.ui.view" id="view_abstract_event_tree">
  5. <field name="name">abstract_event.tree</field>
  6. <field name="model">farm.event</field>
  7. <field name="type">tree</field>
  8. <field name="arch" type="xml">
  9. <tree string="Event">
  10. <field name="state"/>
  11. <field name="lot"/>
  12. <field name="animal_type"/>
  13. </tree>
  14. </field>
  15. </record>
  16. <record model="ir.ui.view" id="view_abstract_event_form">
  17. <field name="name">abstract_event.form</field>
  18. <field name="model">farm.event</field>
  19. <field name="type">form</field>
  20. <field name="arch" type="xml">
  21. <form string="Event">
  22. <header>
  23. <field name="state" widget="statusbar" statusbar_visible="draft,validated" statusbar_colors='{"invoice_except":"red","waiting_date":"blue"}'/>
  24. </header>
  25. <sheet>
  26. <group col="4" colspan="2" attrs="{'readonly': [('state', '=', 'validated')]}">
  27. <field name="animal_type"/>
  28. <field name="farm"/>
  29. <field name="specie"/>
  30. <field name="animal"
  31. attrs="{'invisible':[('animal_type','=','group')],
  32. 'required':['|',('animal_type','=','individual'),('animal_type','=', 'male'),('animal_type','=', 'female')]}"
  33. domain="[('type', '=', animal_type),('farm', '=', farm)]"/>
  34. <field name="animal_group"
  35. attrs="{'invisible':[('animal_type','!=','group')],'required':[('animal_type','=','group')]}"
  36. domain="[('farm', '=', farm), ('state', '!=', 'sold')]"/>
  37. <field name="lot"/>
  38. </group>
  39. <group col="4" colspan="2">
  40. <field name="timestamp"/>
  41. <field name="employee"/>
  42. </group>
  43. <group>
  44. <field name="notes"/>
  45. </group>
  46. </sheet>
  47. </form>
  48. </field>
  49. </record>
  50. <record id="view_abstract_event_import_mixin_tree" model="ir.ui.view">
  51. <field name="name">abstract_event.import_mixin.tree</field>
  52. <field name="model">farm.event.import.mixin</field>
  53. <field name="inherit_id" ref="view_abstract_event_tree"/>
  54. <field name="arch" type="xml">
  55. <field name="animal_type" position="after">
  56. <field name="imported"/>
  57. </field>
  58. </field>
  59. </record>
  60. <record id="view_abstract_event_import_mixin_form" model="ir.ui.view">
  61. <field name="name">abstract_event.import_mixin.form</field>
  62. <field name="model">farm.event.import.mixin</field>
  63. <field name="inherit_id" ref="view_abstract_event_form"/>
  64. <field name="arch" type="xml">
  65. <field name="lot" position="after">
  66. <field name="imported"/>
  67. </field>
  68. </field>
  69. </record>
  70. </data>
  71. </openerp>