purchase-workflow icon indicating copy to clipboard operation
purchase-workflow copied to clipboard

[16.0][FIX] purchase_return: restore display_type logic on purchase return orders

Open AlexPForgeFlow opened this issue 1 year ago • 3 comments

On migration commit a new display_type was introduced, 'product', but logic was not fully adapted and I was having issues when printing purchase return order report or when creating a refund. I have also added a migration script in order to restore those lines with display_type = 'product'.

AlexPForgeFlow avatar Sep 09 '24 11:09 AlexPForgeFlow

Hi @JordiBForgeFlow, some modules you are maintaining are being modified, check this out!

OCA-git-bot avatar Sep 09 '24 11:09 OCA-git-bot

Can you explain a bit more the solution? Are you disabling the field display_type? If there are records with display_type='line_section' or 'line_note' this migration script can cause issues I think.

@AaronHForgeFlow I'm not disabling the field. I just remove an option 'product' on display type selection, that was added in migration to v16. This module was not working properly, I think was not fully adapted, but I don't see the need of adding the display type product. As you can see, there was a proposal in v14 https://github.com/OCA/purchase-workflow/pull/1273, that do not introduce that change.

With the migration script, I just pretend to remove from the purchase return order lines the display type 'product', so the other types 'line_section' or 'line_note' shouldn't be affected

AlexPForgeFlow avatar Sep 09 '24 13:09 AlexPForgeFlow

@AlexPForgeFlow , ok thanks. I thought that "product" was the normal display_type when creating lines. But if it is not a section nor a note the display_type is empty then.

AaronHForgeFlow avatar Sep 09 '24 14:09 AaronHForgeFlow

@JordiBForgeFlow can we get it merged?

AlexPForgeFlow avatar Mar 14 '25 16:03 AlexPForgeFlow

/ocabot merge patch

JordiBForgeFlow avatar Mar 25 '25 08:03 JordiBForgeFlow

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

OCA-git-bot avatar Mar 25 '25 08:03 OCA-git-bot

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

OCA-git-bot avatar Mar 25 '25 08:03 OCA-git-bot