1

Impacted versions: odoo12

Steps to reproduce: Created a Manufacturing Order. Completed the Work order. Clicking Mark as Done. The error is coming.

Current behavior: Struggling with the error. I duplicated the Manufacturing order and processed it. It closed smoothly without any issue/error.

Expected behavior: Manufacturing order should move to done state as soon as Mark As done is clicked.

Video/Screenshot link (optional): https://ibb.co/Lp5PntS

DonFeraRRi
  • 13
  • 5

1 Answers1

1

Follow the below steps to fix the bug for odoo stock issue. In order to implement it you need to follow below steps:

  1. Debug mode

  2. Technical/server actions

  3. Create

  4. Action name: e.g. fix unreserved qty

  5. model: ir.actions.server

  6. Action to do: “execute python code”

  7. copy/paste the fix underneath the pre-existing code

  8. “save”

  9. “create contextual action”

  10. Refresh page

  11. Action/fix “fix unreserved qty”

  12. Wait for it to load

  13. “remove contextual action”

  14. Action/delete

It happens because the reserved quantity in your inventory does not reflect the one on your pickings. It’s probably due to a small configuration change while some pickings where open.

An easy way to remove it is to create a server action that executes this code

https://gist.github.com/jaa-odoo/8eb0a7250e1cecb2e412563ae6346052

Solution Code.

It should repair all the inconsistencies in your data.

Fix Decimal for stock unreversed issue.

https://gist.github.com/jaa-odoo/a6315513bf7b2d8525a60c6f36c0f897

code

Jainik Patel
  • 2,284
  • 1
  • 15
  • 35
  • I tried this method. But what it actually does is... it makes the unreseve quantity as 0 but it doeasn't unreservee the quantity and make it available in stock. – DonFeraRRi Jul 17 '20 at 08:18