Skip to content

Commit

Permalink
Merge pull request OCA#4545 from Tecnativa/16.0-ou-fix-payment-is_pub…
Browse files Browse the repository at this point in the history
…lished

[16.0][FIX] payment: is_published state
  • Loading branch information
pedrobaeza authored Sep 9, 2024
2 parents 8a2b36c + fb3c4f1 commit 7e955f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
from openupgradelib import openupgrade


def _set_published_state(env):
"""Set published state according to the provider state as that will keep the former
visibility state"""
env["payment.provider"].search([("state", "=", "enabled")]).is_published = True


@openupgrade.migrate()
def migrate(env, version):
openupgrade.load_data(env.cr, "payment", "16.0.2.0/noupdate_changes.xml")
Expand All @@ -17,3 +23,4 @@ def migrate(env, version):
"payment.payment_acquirer_test",
],
)
_set_published_state(env)
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ payment / payment.provider / code (selection) : NEW re
payment / payment.provider / allow_express_checkout (boolean): NEW
payment / payment.provider / available_country_ids (many2many): NEW relation: res.country
payment / payment.provider / express_checkout_form_view_id (many2one): NEW relation: ir.ui.view
# NOTHING TO DO: new features

payment / payment.provider / is_published (boolean) : NEW
# DONE: Set it on enabled providers to keep the former behavior.

payment / payment.provider / maximum_amount (float) : NEW
payment / payment.provider / token_inline_form_view_id (many2one): NEW relation: ir.ui.view
# NOTHING TO DO: new features
Expand Down

0 comments on commit 7e955f5

Please sign in to comment.