consume_stock.xml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <openerp>
  3. <data>
  4. <record model="ir.ui.view" id="view_consume_stock_tree">
  5. <field name="name">consume.stock.tree</field>
  6. <field name="model">farm.consume.stock</field>
  7. <field name="type">tree</field>
  8. <field name="arch" type="xml">
  9. <tree string="Event">
  10. <field name="state"/>
  11. <field name="to_location"/>
  12. <field name="date"/>
  13. </tree>
  14. </field>
  15. </record>
  16. <record model="ir.ui.view" id="view_consume_stock_form">
  17. <field name="name">consume.stock.form</field>
  18. <field name="model">farm.consume.stock</field>
  19. <field name="type">form</field>
  20. <field name="arch" type="xml">
  21. <form string="Consume stock">
  22. <header>
  23. <field name="state" widget="statusbar"/>
  24. <button name="confirm" states="draft"
  25. string="Confirm Consume" id="consume_confirm"
  26. type="object" />
  27. </header>
  28. <sheet>
  29. <group col="4" colspan="2">
  30. <field name="type" attrs="{'readonly': [('state', '=', 'confirmed')]}"/>
  31. <field name="date" attrs="{'readonly': [('state', '=', 'confirmed')]}"/>
  32. <field name="origin" attrs="{'readonly': [('state', '=', 'confirmed')]}"/>
  33. <field name="to_location" attrs="{'readonly': [('state', '=', 'confirmed')]}"/>
  34. <field name="product_id" attrs="{'readonly': [('state', '=', 'confirmed')]}"/>
  35. <field name="lot_id" attrs="{'readonly': [('state', '=', 'confirmed')]}"/>
  36. <field name="quantity" attrs="{'readonly': [('state', '=', 'confirmed')]}"/>
  37. </group>
  38. </sheet>
  39. </form>
  40. </field>
  41. </record>
  42. <record model="ir.ui.view" id="farm_consume_stock_search_view">
  43. <field name="name">farm.consume.stock.search</field>
  44. <field name="model">farm.consume.stock</field>
  45. <field name="arch" type="xml">
  46. <search string="Search consume stock">
  47. <group>
  48. <field name="product_id" />
  49. </group>
  50. <newline />
  51. <group expand="0" string="Group by...">
  52. <filter string="Origin"
  53. domain="[]"
  54. context="{'group_by': 'origin'}" />
  55. <filter string="Destinity"
  56. domain="[]"
  57. context="{'group_by': 'to_location'}" />
  58. <filter string="State"
  59. domain="[]"
  60. context="{'group_by': 'state'}" />
  61. </group>
  62. </search>
  63. </field>
  64. </record>
  65. </data>
  66. </openerp>