Skip to content

Commit 4692e6e

Browse files
[MIG] payment_transfer
1 parent ace5606 commit 4692e6e

File tree

5 files changed

+49
-5
lines changed

5 files changed

+49
-5
lines changed

addons/payment_transfer/migrations/13.0.1.0/noupdate_changes.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version='1.0' encoding='utf-8'?>
22
<odoo>
33
<record id="payment.payment_acquirer_transfer" model="payment.acquirer">
4-
<field name="environment"/>
5-
<field name="image" type="base64" file="payment_transfer/static/src/img/transfer_icon.png"/>
6-
<field name="pre_msg"/>
7-
<field name="website_published"/>
4+
<!-- <field name="environment"/>-->
5+
<!-- <field name="image" type="base64" file="payment_transfer/static/src/img/transfer_icon.png"/>-->
6+
<!-- <field name="pre_msg"/>-->
7+
<!-- <field name="website_published"/>-->
88
<field name="image_128" type="base64" file="payment_transfer/static/src/img/transfer_icon.png"/>
99
<field name="pending_msg"><![CDATA[
1010
<h3>Please make a payment to: </h3>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---Models in module 'payment_transfer'---
2+
---Fields in module 'payment_transfer'---
3+
payment_transfer / payment.acquirer / provider (False) : selection_keys is now '['adyen', 'alipay', 'authorize', 'buckaroo', 'manual', 'ogone', 'paypal', 'payulatam', 'payumoney', 'sips', 'stripe', 'test', 'transfer']' ('['adyen', 'authorize', 'buckaroo', 'manual', 'ogone', 'paypal', 'payumoney', 'sips', 'stripe', 'transfer']')
4+
# NOTHING TO DO: new option 'alipay'
5+
6+
---XML records in module 'payment_transfer'---
7+
ir.ui.view: payment_transfer.transfer_form (noupdate) (noupdate switched)
8+
# DONE: pre-migration: handled noupdate switched
9+
10+
DEL payment.acquirer: payment.payment_acquirer_custom (noupdate)
11+
# DONE: post-migration: try to delete
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2020 ForgeFlow <http://www.forgeflow.com>
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
from openupgradelib import openupgrade
4+
5+
6+
@openupgrade.migrate()
7+
def migrate(env, version):
8+
openupgrade.load_data(
9+
env.cr, "payment_transfer", "migrations/13.0.1.0/noupdate_changes.xml")
10+
openupgrade.delete_records_safely_by_xml_id(
11+
env, [
12+
"payment.payment_acquirer_custom",
13+
]
14+
)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2020 ForgeFlow <http://www.forgeflow.com>
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
from openupgradelib import openupgrade
4+
5+
6+
def switch_noupdate_records(env):
7+
openupgrade.set_xml_ids_noupdate_value(
8+
env,
9+
"payment_transfer",
10+
[
11+
"transfer_form",
12+
],
13+
True,
14+
)
15+
16+
17+
@openupgrade.migrate()
18+
def migrate(env, version):
19+
switch_noupdate_records(env)

odoo/openupgrade/doc/source/modules120-130.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ missing in the new release are marked with |del|.
487487
+----------------------------------------------+-------------------------------------------------+
488488
| |new| payment_test | |
489489
+----------------------------------------------+-------------------------------------------------+
490-
|payment_transfer | |
490+
|payment_transfer | Done |
491491
+----------------------------------------------+-------------------------------------------------+
492492
|phone_validation | Nothing to do |
493493
+----------------------------------------------+-------------------------------------------------+

0 commit comments

Comments
 (0)