stock_inventory_conflict.xml 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="stock_inventory_conflict_form_view" model="ir.ui.view">
  4. <field name="name">stock.inventory.conflict.form.view</field>
  5. <field name="model">stock.inventory.conflict</field>
  6. <field name="mode">primary</field>
  7. <field name="arch" type="xml">
  8. <form>
  9. <div>
  10. <strong>Due to some stock moves done between your initial update of the quantity and now, the difference of quantity is not consistent anymore.</strong>
  11. </div>
  12. <div>
  13. You can either :
  14. <ul>
  15. <li>Keep the <strong>Counted Quantity</strong> (the Difference will be updated)</li>
  16. <li>Keep the <strong>Difference</strong> (the Counted Quantity will be updated to reflect the same difference as when you counted)</li>
  17. <li>Discard and manually resolve the conflict</li>
  18. </ul>
  19. </div>
  20. <div>
  21. <br/>
  22. <field name="quant_ids" invisible="1"/>
  23. <field name="quant_to_fix_ids" readonly="1" style="margin-top:10px;">
  24. <tree editable="bottom" create="0" delete="0">
  25. <field name="id" invisible="1"/>
  26. <field name="tracking" invisible="1"/>
  27. <field name="company_id" invisible="1"/>
  28. <field name="product_id" attrs="{'readonly': [('id', '!=', False)]}" invisible="context.get('single_product', False)" readonly="context.get('single_product', False)" force_save="1" options="{'no_create': True}"/>
  29. <field name="location_id" attrs="{'readonly': [('id', '!=', False)]}" invisible="context.get('hide_location', False)" options="{'no_create': True}"/>
  30. <field name="lot_id" groups="stock.group_production_lot" attrs="{
  31. 'readonly': ['|', ('id', '!=', False), ('tracking', 'not in', ['serial', 'lot'])],
  32. 'required': [('tracking', '!=', 'none')]
  33. }" invisible="context.get('hide_lot', False)" context="{'default_product_id': product_id, 'default_company_id': company_id}"/>
  34. <field name="package_id" groups="stock.group_tracking_lot" attrs="{'readonly': [('id', '!=', False)]}"/>
  35. <field name="owner_id" groups="stock.group_tracking_owner" attrs="{'readonly': [('id', '!=', False)]}" options="{'no_create': True}"/>
  36. <field name="quantity" string="Quantity"/>
  37. <field name="inventory_quantity" string="Counted Quantity" decoration-muted="inventory_quantity == 0" readonly="0"/>
  38. <field name="inventory_diff_quantity" string="Difference" decoration-muted="inventory_quantity == 0" decoration-danger="inventory_diff_quantity &lt; 0" decoration-success="inventory_diff_quantity &gt; 0" decoration-bf="inventory_diff_quantity != 0"/>
  39. <field name="product_uom_id" groups="uom.group_uom"/>
  40. <field name='company_id' groups="base.group_multi_company" optional="show"/>
  41. </tree>
  42. </field>
  43. </div>
  44. <footer>
  45. <button name="action_keep_counted_quantity" string="Keep Counted Quantity" type="object" class="btn-primary" data-hotkey="q"/>
  46. <button name="action_keep_difference" string="Keep Difference" type="object" class="btn-primary" data-hotkey="w"/>
  47. <button name="cancel_button" string="Discard" class="btn-secondary" special="cancel" data-hotkey="z"/>
  48. </footer>
  49. </form>
  50. </field>
  51. </record>
  52. </odoo>