mrp_production.xml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <record id="act_so_2_mo" model="ir.actions.act_window">
  5. <field name="name">Production</field>
  6. <field name="res_model">mrp.production</field>
  7. <field name="view_type">form</field>
  8. <field name="view_mode">tree,form,graph</field>
  9. <field name="context">{'search_default_sale_order_id': active_id}</field>
  10. </record>
  11. <record id="sale_order_form_buttons" model="ir.ui.view">
  12. <field name="name">sale.order.form.buttons</field>
  13. <field name="model">sale.order</field>
  14. <field name="inherit_id" ref="sale.view_order_form"/>
  15. <field name="priority" eval="30"/>
  16. <field name="arch" type="xml">
  17. <xpath expr="//h1" position="attributes">
  18. <attribute name="class">oe_left</attribute>
  19. </xpath>
  20. <xpath expr="//h1" position="after">
  21. <div class="oe_right oe_button_box" name="buttons">
  22. <button class="oe_inline oe_stat_button" type="action"
  23. name="%(act_so_2_mo)d"
  24. attrs="{'invisible': [('production_count', '=', 0)]}"
  25. icon="fa-gears">
  26. <field string="Production" name="production_count" widget="statinfo"/>
  27. </button>
  28. </div>
  29. </xpath>
  30. </field>
  31. </record>
  32. <record id="mrp_production_sale_info_search_view" model="ir.ui.view">
  33. <field name="name">mrp.production.sale.info.search</field>
  34. <field name="model">mrp.production</field>
  35. <field name="inherit_id" ref="mrp.view_mrp_production_filter"/>
  36. <field name="arch" type="xml">
  37. <field name="product_id" position="after">
  38. <field name="partner_id" string="Customer"/>
  39. <field name="sale_order_id" string="Sale Order"/>
  40. </field>
  41. <filter string="Product" position="before">
  42. <filter string="Customer" icon="terp-accessories-archiver"
  43. domain="[]" context="{'group_by':'partner_id'}"/>
  44. <filter string="Sale Order" icon="terp-accessories-archiver"
  45. domain="[]" context="{'group_by':'sale_order_id'}"/>
  46. </filter>
  47. </field>
  48. </record>
  49. </data>
  50. </openerp>