Skip to content

Commit

Permalink
[MIG] account_payment_partner: Switch renaming order
Browse files Browse the repository at this point in the history
If we put first the field renaming, the property renaming will fail.
  • Loading branch information
pedrobaeza committed Aug 29, 2018
1 parent 32ca70b commit f591615
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions account_payment_partner/migrations/9.0.1.0.0/pre-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@

@openupgrade.migrate(use_env=True)
def migrate(env, version=None):
openupgrade.rename_fields(
env, [
('res.partner', 'res_partner', 'supplier_payment_mode',
'supplier_payment_mode_id'),
('res.partner', 'res_partner', 'customer_payment_mode',
'customer_payment_mode_id'),
],
)
openupgrade.rename_property(
env.cr, 'res.partner', 'supplier_payment_mode',
'supplier_payment_mode_id',
Expand All @@ -23,3 +15,11 @@ def migrate(env, version=None):
env.cr, 'res.partner', 'customer_payment_mode',
'customer_payment_mode_id',
)
openupgrade.rename_fields(
env, [
('res.partner', 'res_partner', 'supplier_payment_mode',
'supplier_payment_mode_id'),
('res.partner', 'res_partner', 'customer_payment_mode',
'customer_payment_mode_id'),
],
)

0 comments on commit f591615

Please sign in to comment.