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][FIX] l10n_it_delivery_note: create delivery note only after quantity done has been set #4526

Merged

Conversation

are-agilebg
Copy link
Contributor

@are-agilebg are-agilebg commented Jan 14, 2025

I documenti di trasporto generati utilizzando la modalità Base e lasciando che sia Odoo ad impostare le quantità completate nel trasferimento (You have not recorded done quantities yet, by clicking on apply Odoo will process all the quantities) riportano le quantità prodotto erroneamente a 0.

Il problema nasce dal fatto che all'intero del metodo stock_picking.button_validate() la creazione del documento di trasporto precede l'aggiornamento delle quantità completate nel trasferimento di origine.

Passi per riprodurre la problematica su Runboat:

  1. Andare su Inventory > Operations > Transfers
  2. Cliccare su New
  3. Inserire un partner valido in Contact e selezionare 'YourCompany: Delivery Orders' in Operation Type
  4. Aggiungere una riga nel tab Operations selezionando un prodotto (es. CONS_0001) ed impostare Demand ad un valore disponibile a magazzino (es. 1.00)
  5. Salvare il record
  6. Cliccare su Mark as Todo
  7. Cliccare su Validate
  8. Nel popup Immediate Transfer cliccare su Apply

@OCA-git-bot
Copy link
Contributor

Hi @MarcoCalcagni, @renda-dev, @aleuffre,
some modules you are maintaining are being modified, check this out!

@are-agilebg are-agilebg force-pushed the 16.0-l10n_it_delivery_note-fix-product-qty branch 4 times, most recently from be8bd99 to d3b9b6f Compare January 15, 2025 09:22
@are-agilebg are-agilebg marked this pull request as ready for review January 15, 2025 10:04
Copy link

@stevech091 stevech091 left a comment

Choose a reason for hiding this comment

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

functional review ok

Copy link
Member

@tafaRU tafaRU left a comment

Choose a reason for hiding this comment

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

Grazie 1K della PR! Review del codice 👍

Solo giusto un paio di nitpick:

l10n_it_delivery_note/models/stock_picking.py Show resolved Hide resolved
The method stock_picking.button_validate() can be invoked multiple
times during the validation process: it is important to create the
delivery note only after the stock_move.quantity_done values has
been updated otherwise delivery note and picking will be misaligned.
@are-agilebg are-agilebg force-pushed the 16.0-l10n_it_delivery_note-fix-product-qty branch from d3b9b6f to 4a49a7d Compare January 16, 2025 14:42
@tafaRU
Copy link
Member

tafaRU commented Jan 16, 2025

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-4526-by-tafaRU-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 741bba4 into OCA:16.0 Jan 16, 2025
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 8a0a8d8. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

l10n_it_delivery_note - non stampa qty per picking con operazioni dettagliate in base mode
4 participants