Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][OU-FIX] stock: do not try to compute quantity_done for canceled stock moves #4705

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

em230418
Copy link
Contributor

@pedrobaeza
Copy link
Member

Is it possible to have stock.move.line with quantity done when the move is cancelled?

@em230418 em230418 marked this pull request as ready for review December 26, 2024 04:10
@em230418
Copy link
Contributor Author

Is it possible to have stock.move.line with quantity done when the move is cancelled?

Yes.

  1. Make sure your user is in group "Manage Multiple Stock Locations"
  2. Inventory -> Configuration -> Operation Types
  3. For example choose "Delivery orders"
  4. Add tick on "Show Detailed Operations" checkbox, save
  5. Inventory -> Operations -> Transfers
  6. Create transfer with "Delivery orders" type, add product that exist in stock. Demand value for example 1. Save
  7. "Mark as Todo" button
  8. "Set quantities" button
  9. "Cancel" button

In "detailed operations" tab you will see red line with value 1 quantity done.

Reproduced here.
http://oca-event-15-0-a74d199cc222.runboat.odoo-community.org/web?debug=1#cids=1&menu_id=108&action=234&model=stock.picking&view_type=form&id=32

In production database on 14.0 I have 2180 canceled stock move lines from 2022 to 2024.

@em230418
Copy link
Contributor Author

Today I checked, that my patch worked so marked as ready for review.,

@pedrobaeza pedrobaeza changed the title [OU-FIX] stock: do not try to compute quantity_done for canceled stock moves [16.0][OU-FIX] stock: do not try to compute quantity_done for canceled stock moves Dec 26, 2024
@pedrobaeza pedrobaeza added this to the 16.0 milestone Dec 26, 2024
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, it doesn't harm either.

@pedrobaeza pedrobaeza merged commit c31d4d6 into OCA:16.0 Dec 26, 2024
2 checks passed
@em230418 em230418 deleted the 16.0-stock_no_cancel branch December 26, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants