-
-
Notifications
You must be signed in to change notification settings - Fork 699
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-ADD] payment #3918
[16.0][OU-ADD] payment #3918
Conversation
openupgrade_scripts/scripts/payment/16.0.2.0/upgrade_analysis_work.txt
Outdated
Show resolved
Hide resolved
de9ae8c
to
eac477a
Compare
@legalsylvain Can you reference this PR with the OCABot ? :) |
/ocabot migration payment |
DEL payment.acquirer: payment.payment_acquirer_adyen (noupdate) | ||
DEL payment.acquirer: payment.payment_acquirer_alipay (noupdate) | ||
DEL payment.acquirer: payment.payment_acquirer_authorize (noupdate) | ||
DEL payment.acquirer: payment.payment_acquirer_buckaroo (noupdate) | ||
DEL payment.acquirer: payment.payment_acquirer_mollie (noupdate) | ||
DEL payment.acquirer: payment.payment_acquirer_ogone (noupdate) | ||
DEL payment.acquirer: payment.payment_acquirer_paypal (noupdate) | ||
DEL payment.acquirer: payment.payment_acquirer_payulatam (noupdate) | ||
DEL payment.acquirer: payment.payment_acquirer_payumoney (noupdate) | ||
DEL payment.acquirer: payment.payment_acquirer_sepa_direct_debit (noupdate) | ||
DEL payment.acquirer: payment.payment_acquirer_sips (noupdate) | ||
DEL payment.acquirer: payment.payment_acquirer_stripe (noupdate) | ||
DEL payment.acquirer: payment.payment_acquirer_test (noupdate) | ||
DEL payment.acquirer: payment.payment_acquirer_transfer (noupdate) | ||
# NOTHING TO DO: replaced by payment.provider element (see below) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure about this? The user could have put modifications in these records that will not be carried over to the newly created records.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure there is no change by the user on theses data. It contains data like this:
<record id="payment_acquirer_adyen" model="payment.acquirer">
<field name="name">Adyen</field>
<field name="display_as">Credit Card (powered by Adyen)</field>
<field name="image_128" type="base64" file="payment_adyen/static/src/img/adyen_icon.png"/>
<field name="module_id" ref="base.module_payment_adyen"/>
<field name="description" type="html">
<p>
A payment gateway to accept online payments via credit cards, debit cards and bank
transfers.
</p>
<ul class="list-inline">
<li class="list-inline-item"><i class="fa fa-check"/>Online Payment</li>
<li class="list-inline-item"><i class="fa fa-check"/>Payment Status Tracking</li>
</ul>
</field>
<!-- https://www.adyen.com/payment-methods -->
<field name="payment_icon_ids"
eval="[(6, 0, [
ref('payment.payment_icon_cc_bancontact'),
ref('payment.payment_icon_cc_maestro'),
ref('payment.payment_icon_cc_mastercard'),
ref('payment.payment_icon_cc_visa'),
ref('payment.payment_icon_cc_discover'),
ref('payment.payment_icon_cc_diners_club_intl'),
ref('payment.payment_icon_cc_jcb'),
ref('payment.payment_icon_cc_unionpay'),
])]"/>
</record>
to
<record id="payment_provider_adyen" model="payment.provider">
<field name="name">Adyen</field>
<field name="display_as">Credit Card (powered by Adyen)</field>
<field name="image_128" type="base64" file="payment_adyen/static/description/icon.png"/>
<field name="module_id" ref="base.module_payment_adyen"/>
<!-- https://www.adyen.com/payment-methods -->
<field name="payment_icon_ids"
eval="[(6, 0, [
ref('payment.payment_icon_cc_bancontact'),
ref('payment.payment_icon_cc_maestro'),
ref('payment.payment_icon_cc_mastercard'),
ref('payment.payment_icon_cc_visa'),
ref('payment.payment_icon_cc_discover'),
ref('payment.payment_icon_cc_diners_club_intl'),
ref('payment.payment_icon_cc_jcb'),
ref('payment.payment_icon_cc_unionpay'),
])]"/>
</record>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Users can absolutely modify these records.
In any case, currently after migration, you just get duplicates of everything:
> select id, name from payment_provider where cast(name->'en_US' as text) ilike '%mollie%';
+----+---------------------+
| id | name |
|----+---------------------|
| 5 | {"en_US": "Mollie"} |
| 23 | {"en_US": "Mollie"} |
+----+---------------------+
SELECT 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum, indeed. I did not watch other field of the model. I will look deeper at this.
Thanks for pointing this out. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that I fixed it. :)
Renamed xmlids, added payment_provider in noupdate_changes, and loaded it.
Changes: - acquirer is now provider - some fields and xmlids moved from payment to account_payment Details in the upgrade_analysis_work file. Loads noupdate_changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! As account has already been merged, this can go on as well? TT42266
Hi, @remytms, thanks for the migration. I have redone it in #4193 (as I can't push here) for being totally correct. Please take notes for other scripts you do of the following comments:
|
Hi @pedrobaeza Thanks for your comments. I take good note of your advice. :) |
Changes:
acquirer
is nowprovider
payment
toaccount_payment
Details in the
upgrade_analysis_work
file.Testing is partial, because there is no migration script for the
account
module. Therefore the upgrade fails. But at least, the migration script forpayment
does not fail.