mrp_view.xml 1.5 KB

123456789101112131415161718192021222324252627
  1. <?xml version="1.0"?>
  2. <openerp>
  3. <data>
  4. <record id="mrp_production_form_view" model="ir.ui.view">
  5. <field name="name">eirusoft.mrp.production.form</field>
  6. <field name="model">mrp.production</field>
  7. <field name="type">form</field>
  8. <field name="inherit_id" ref="mrp.mrp_production_form_view"/>
  9. <field name="arch" type="xml">
  10. <xpath expr="//group[@string='Products to Consume']/field" position="attributes">
  11. <attribute name="context">{'default_location_id':location_src_id, 'default_location_dest_id': %(stock.location_production)d, 'default_name':'Unplanned consumption' }</attribute>
  12. </xpath>
  13. <xpath expr="//group[@string='Products to Consume']/field/tree" position="attributes">
  14. <attribute name="editable">bottom</attribute>
  15. </xpath>
  16. <xpath expr="//group[@string='Products to Consume']/field/tree/field[@name='state']" position="after">
  17. <field name="name" invisible="1"/>
  18. <field name="location_id" invisible="1"/>
  19. <field name="location_dest_id" invisible="1"/>
  20. </xpath>
  21. <xpath expr="//group[@string='Products to Consume']/field/tree/field[@name='product_id']" position="replace">
  22. <field name="product_id" on_change="onchange_product_id(product_id,location_id,location_dest_id)" />
  23. </xpath>
  24. </field>
  25. </record>
  26. </data>
  27. </openerp>