product_replenish_views.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="view_product_replenish" model="ir.ui.view">
  4. <field name="name">Replenish</field>
  5. <field name="model">product.replenish</field>
  6. <field name="arch" type="xml">
  7. <form string="Replenish wizard">
  8. <p>
  9. Use this assistant to replenish your stock.
  10. Depending on your product configuration, launching a replenishment may trigger a request for quotation,
  11. a manufacturing order or a transfer.
  12. </p>
  13. <group>
  14. <field name="product_tmpl_id" invisible="1"/>
  15. <field name="product_has_variants" invisible="1"/>
  16. <field name="product_id"
  17. domain="[('product_tmpl_id', '=', product_tmpl_id)]"
  18. attrs="{'readonly': [('product_has_variants', '=', False)]}"
  19. options="{'no_create_edit':1}"/>
  20. <field name="product_uom_category_id" invisible="1"/>
  21. <label for="quantity"/>
  22. <div class="o_row">
  23. <field name="quantity" />
  24. <field name="product_uom_id"
  25. domain="[('category_id', '=', product_uom_category_id)]"
  26. groups="uom.group_uom"/>
  27. </div>
  28. <field name="date_planned"/>
  29. <field name="warehouse_id"
  30. groups="stock.group_stock_multi_warehouses"/>
  31. <field name="route_ids"
  32. widget="many2many_tags"/>
  33. <field name="company_id" invisible="1"/>
  34. </group>
  35. <footer>
  36. <button name="launch_replenishment"
  37. string="Confirm"
  38. type="object"
  39. data-hotkey="q"
  40. class="btn-primary"/>
  41. <button string="Discard"
  42. class="btn-secondary"
  43. special="cancel" data-hotkey="z" />
  44. </footer>
  45. </form>
  46. </field>
  47. </record>
  48. <record id="action_product_replenish" model="ir.actions.act_window">
  49. <field name="name">Replenish</field>
  50. <field name="type">ir.actions.act_window</field>
  51. <field name="res_model">product.replenish</field>
  52. <!-- binding_model_id evaluated to False
  53. to remove it in existing db's as it was bug-prone -->
  54. <field name="binding_model_id" eval="False"/>
  55. <field name="view_mode">form</field>
  56. <field name="view_id" ref="view_product_replenish"/>
  57. <field name="target">new</field>
  58. </record>
  59. </odoo>