mrp_production_backorder.xml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data>
  4. <!-- MO Backorder -->
  5. <record id="view_mrp_production_backorder_form" model="ir.ui.view">
  6. <field name="name">Create Backorder</field>
  7. <field name="model">mrp.production.backorder</field>
  8. <field name="arch" type="xml">
  9. <form string="Create a Backorder">
  10. <group>
  11. <p colspan="2">
  12. Create a backorder if you expect to process the remaining products later. Do not create a backorder if you will not process the remaining products.
  13. </p>
  14. </group>
  15. <field name="show_backorder_lines" invisible="1"/>
  16. <field name="mrp_production_backorder_line_ids" nolabel="1" attrs="{'invisible': [('show_backorder_lines', '=', False)]}">
  17. <tree create="0" delete="0" editable="top">
  18. <field name="mrp_production_id" force_save="1"/>
  19. <field name="to_backorder" widget="boolean_toggle"/>
  20. </tree>
  21. </field>
  22. <footer>
  23. <button name="action_backorder" string="Create backorder" data-hotkey="q"
  24. colspan="1" type="object" class="btn-primary" attrs="{'invisible': [('show_backorder_lines', '!=', False)]}"/>
  25. <button name="action_backorder" string="Validate" data-hotkey="q"
  26. colspan="1" type="object" class="btn-primary" attrs="{'invisible': [('show_backorder_lines', '=', False)]}"/>
  27. <button name="action_close_mo" type="object" string="No Backorder" attrs="{'invisible': [('show_backorder_lines', '!=', False)]}" data-hotkey="x"/>
  28. <button string="Discard" class="btn-secondary" special="cancel" data-hotkey="z" />
  29. </footer>
  30. </form>
  31. </field>
  32. </record>
  33. <record id="action_mrp_production_backorder" model="ir.actions.act_window">
  34. <field name="name">You produced less than initial demand</field>
  35. <field name="type">ir.actions.act_window</field>
  36. <field name="res_model">mrp.production.backorder</field>
  37. <field name="view_mode">form</field>
  38. <field name="target">new</field>
  39. </record>
  40. </data>
  41. </odoo>