stock_assign_serial_numbers.xml 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <odoo>
  3. <record id="view_assign_serial_numbers_production" model="ir.ui.view">
  4. <field name="name">mrp_assign_serial_numbers</field>
  5. <field name="model">stock.assign.serial</field>
  6. <field name="arch" type="xml">
  7. <form string="Serial Mass Produce">
  8. <group>
  9. <field name="production_id" readonly="True"/>
  10. </group>
  11. <group>
  12. <group>
  13. <field name="next_serial_number"/>
  14. </group>
  15. <group>
  16. <label for="next_serial_count"/>
  17. <div class="o_row">
  18. <span><field name="next_serial_count"/></span>
  19. <button name="generate_serial_numbers_production" type="object" class="btn btn-secondary" title="Generate Serial Numbers">
  20. <span>Generate</span>
  21. </button>
  22. </div>
  23. </group>
  24. </group>
  25. <group>
  26. <field name="serial_numbers" placeholder="copy paste a list and/or use Generate"/>
  27. </group>
  28. <field name="multiple_lot_components_names" invisible="1"/>
  29. <group col="1">
  30. <p class="o_form_label oe_inline text-danger" attrs="{'invisible': [('multiple_lot_components_names', '=', False)]}">
  31. Note that components <field name="multiple_lot_components_names" readonly="True"/> have multiple lot reservations.<br/>
  32. Do you want to confirm anyway ?
  33. </p>
  34. </group>
  35. <field name="show_apply" invisible="1" />
  36. <field name="show_backorders" invisible="1" />
  37. <group>
  38. <group>
  39. <field name="produced_qty" readonly="True" force_save="True"/>
  40. </group>
  41. <group>
  42. <field name="expected_qty" readonly="True"/>
  43. </group>
  44. <p col="1" class="o_form_label oe_inline" attrs="{'invisible': [('show_backorders', '=', False)]}">
  45. You have entered less serial numbers than the quantity to produce.<br/>
  46. Create a backorder if you expect to process the remaining quantities later.<br/>
  47. Do not create a backorder if you will not process the remaining products.
  48. </p>
  49. </group>
  50. <footer>
  51. <button name="apply" string="Apply" type="object" class="btn-primary" attrs="{'invisible': [('show_apply', '=', False)]}"/>
  52. <button name="create_backorder" string="Create Backorder" type="object" class="btn-primary" attrs="{'invisible': [('show_backorders', '=', False)]}"/>
  53. <button name="no_backorder" string="No Backorder" type="object" class="btn-primary" attrs="{'invisible': [('show_backorders', '=', False)]}"/>
  54. <button string="Cancel" class="btn-secondary" special="cancel" />
  55. </footer>
  56. </form>
  57. </field>
  58. </record>
  59. <record id="act_assign_serial_numbers_production" model="ir.actions.act_window">
  60. <field name="name">Assign Serial Numbers</field>
  61. <field name="type">ir.actions.act_window</field>
  62. <field name="res_model">stock.assign.serial</field>
  63. <field name="view_id" ref="view_assign_serial_numbers_production"/>
  64. <field name="view_mode">form</field>
  65. <field name="context">{}</field>
  66. <field name="target">new</field>
  67. </record>
  68. </odoo>