purchase-workflow
purchase-workflow copied to clipboard
[16.0][FIX] purchase_return: restore display_type logic on purchase return orders
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'.
Hi @JordiBForgeFlow, some modules you are maintaining are being modified, check this out!
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 , 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.
@JordiBForgeFlow can we get it merged?
/ocabot merge patch
This PR looks fantastic, let's merge it! Prepared branch 16.0-ocabot-merge-pr-2403-by-JordiBForgeFlow-bump-patch, awaiting test results.
Congratulations, your PR was merged at ee99b43cc95cf5ee3a3f5160bfa45ca4ba41b01c. Thanks a lot for contributing to OCA. ❤️