mrp_production_views.xml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="mrp_production_subcontracting_form_view" model="ir.ui.view">
  4. <field name="name">mrp.production.subcontracting.form.view</field>
  5. <field name="model">mrp.production</field>
  6. <field name="mode">primary</field>
  7. <field name="priority">1000</field>
  8. <field name="inherit_id" ref="mrp.mrp_production_form_view" />
  9. <field name="arch" type="xml">
  10. <xpath expr="//header" position="replace">
  11. <field name="state" invisible="1"/>
  12. </xpath>
  13. <xpath expr="//div[@name='button_box']" position="replace"/>
  14. <xpath expr="//div[hasclass('oe_title')]" position="replace"/>
  15. <xpath expr="//group[@name='group_extra_info']" position="attributes">
  16. <attribute name="invisible">1</attribute>
  17. </xpath>
  18. <xpath expr="//page[@name='operations']" position="attributes">
  19. <attribute name="invisible">1</attribute>
  20. </xpath>
  21. <xpath expr="//field[@name='lot_producing_id']" position="attributes">
  22. <attribute name="attrs">{'invisible': [('product_tracking', 'in', ('none', False))], 'required': [('product_tracking', 'not in', ('none', False))]}</attribute>
  23. </xpath>
  24. <xpath expr="//page[@name='miscellaneous']" position="attributes">
  25. <attribute name="invisible">1</attribute>
  26. </xpath>
  27. <xpath expr="//label[@name='bom_label']" position="attributes">
  28. <attribute name="invisible">1</attribute>
  29. </xpath>
  30. <xpath expr="//div[@name='bom_div']" position="attributes">
  31. <attribute name="invisible">1</attribute>
  32. </xpath>
  33. <xpath expr="//field[@name='move_byproduct_ids']" position="replace"/>
  34. <xpath expr="//field[@name='workorder_ids']" position="replace"/>
  35. <xpath expr="//button[@name='action_generate_serial']" position="attributes">
  36. <attribute name="invisible">1</attribute>
  37. </xpath>
  38. <xpath expr="//field[@name='move_finished_ids']" position="replace"/>
  39. <xpath expr="//field[@name='move_raw_ids']" position="replace">
  40. <field name="bom_product_ids" invisible="1"/>
  41. <field name="move_line_raw_ids" force_save="1"
  42. context="{'tree_view_ref': 'mrp_subcontracting.mrp_subcontracting_stock_move_line_tree_view', 'default_company_id': company_id, 'default_location_id': location_src_id, 'default_location_dest_id': production_location_id, 'bom_product_ids': bom_product_ids}"
  43. />
  44. </xpath>
  45. <xpath expr="//sheet" position="inside">
  46. <footer>
  47. <button name="subcontracting_record_component" attrs="{'invisible': ['|', ('state', '=', 'to_close'), ('qty_producing', '&lt;', 0.001)]}" string="Continue" type="object" class="oe_highlight" data-hotkey="q"/>
  48. <button name="subcontracting_record_component" attrs="{'invisible': [('state', '!=', 'to_close')]}" string="Record Production" type="object" class="oe_highlight" data-hotkey="q"/>
  49. <button string="Discard" special="cancel" data-hotkey="z" />
  50. </footer>
  51. </xpath>
  52. <xpath expr="//div[hasclass('oe_chatter')]" position="replace"/>
  53. </field>
  54. </record>
  55. <record id="mrp_production_subcontracting_portal_form_view" model="ir.ui.view">
  56. <field name="name">mrp.production.subcontracting.portal.form.view</field>
  57. <field name="model">mrp.production</field>
  58. <field name="mode">primary</field>
  59. <field name="priority">1000</field>
  60. <field name="inherit_id" ref="mrp_production_subcontracting_form_view" />
  61. <field name="arch" type="xml">
  62. <xpath expr="//field[@name='product_id']" position="attributes">
  63. <attribute name="options">{'no_create_edit': True, 'no_open': True}</attribute>
  64. </xpath>
  65. <xpath expr="//field[@name='product_qty']" position="attributes">
  66. <attribute name="attrs">{'readonly': True}</attribute>
  67. </xpath>
  68. <xpath expr="//field[@name='lot_producing_id']" position="attributes">
  69. <attribute name="domain">[('id', '=', False)]</attribute>
  70. <attribute name="options">{'no_create_edit': True, 'no_open': True}</attribute>
  71. </xpath>
  72. <xpath expr="//field[@name='move_line_raw_ids']" position="attributes">
  73. <attribute name="context">{'tree_view_ref': 'mrp_subcontracting.mrp_subcontracting_portal_stock_move_line_tree_view', 'default_company_id': company_id, 'default_location_id': location_src_id, 'default_location_dest_id': production_location_id, 'bom_product_ids': bom_product_ids}</attribute>
  74. </xpath>
  75. <xpath expr="//field[@name='forecasted_issue']" position="replace"/>
  76. <xpath expr="//button[@name='%(mrp.action_change_production_qty)d']" position="replace"/>
  77. <xpath expr="//button[@name='action_product_forecast_report']" position="replace"/>
  78. <xpath expr="//button[@name='action_product_forecast_report']" position="replace"/>
  79. </field>
  80. </record>
  81. <record id="mrp_production_subcontracting_tree_view" model="ir.ui.view">
  82. <field name="name">mrp.production.subcontracting.tree</field>
  83. <field name="model">mrp.production</field>
  84. <field name="mode">primary</field>
  85. <field name="priority">1000</field>
  86. <field name="inherit_id" ref="mrp.mrp_production_tree_view" />
  87. <field name="arch" type="xml">
  88. <xpath expr="//field[@name='name']" position="after">
  89. <field name="incoming_picking"/>
  90. </xpath>
  91. </field>
  92. </record>
  93. <record id="mrp_production_subcontracting_filter" model="ir.ui.view">
  94. <field name="name">mrp.production.subcontracting.select</field>
  95. <field name="model">mrp.production</field>
  96. <field name="mode">primary</field>
  97. <field name="priority">1000</field>
  98. <field name="inherit_id" ref="mrp.view_mrp_production_filter" />
  99. <field name="arch" type="xml">
  100. <xpath expr="//field[@name='name']" position="after">
  101. <field name="name" string="Incoming transfer" filter_domain="[('incoming_picking.name', 'ilike', self)]"/>
  102. </xpath>
  103. </field>
  104. </record>
  105. </odoo>