[17.0][IMP] account_payment_mode: change type of payment_mode.note field from Text to Html#1445
Conversation
|
What a great day to merge this nice PR. Let's do it! |
|
Congratulations, your PR was merged at d774cd6. Thanks a lot for contributing to OCA. ❤️ |
|
@pedrobaeza @pilarvargas-tecnativa Shouldn't this need a migration script? |
Hi @etobella, this change was made in v16 with his script, when migrating the module to v17 this commit had not been included so the bd's that have already been migrated to v17 have the field as text and contain something like |
|
👍 I didn't notice that it comes from a Forward Port. Thanks for the clarification |
|
Actually, After giving 5 seconds of thought the Scripts are necessary. Imagine that you started on 17. Then the field was text, and after this change, it might be broken. |
Right, different scenarios:
Within these scenarios, if you add the script otherwise, you have to redo by hand in one of the first two. How do you decide which is the priority? |
|
Well, there are options for this. For example: 1- Check the migration version (not the best option, but it might work in 90% of the cases) |
|
The second is not very feasible, and the first one may have several variables. Please go ahead with the script if you have it clear. |
|
Using the following query might work (tested with other fields and tables) SELECT id from account_payment_mode where note::text ~* '<[^>]+>' LIMIT 1If it is OK for you, I can do the migration script. |
|
OK, go ahead with it, which seems good enough |
fw-port of #1360
@Tecnativa TT56010
@pedrobaeza @sergio-teruel please review