Skip to content

Commit

Permalink
Merge PR OCA#126 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Mar 22, 2021
2 parents 36410d3 + afb4700 commit b1352c9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion account_credit_control/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Copyright 2019-2020 Tecnativa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{'name': 'Account Credit Control',
'version': '12.0.3.0.3',
'version': '12.0.3.0.4',
'author': "Camptocamp,"
"Odoo Community Association (OCA),"
"Okia,"
Expand Down
15 changes: 15 additions & 0 deletions account_credit_control/migrations/12.0.3.0.4/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2021 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
"""Restore action domain, which was probably polluted.
This patch release fixes a bug whose result may be stored in database, so
although it's still a patch, we need to clear the database, just in case.
"""
action = env.ref("account_credit_control.credit_control_communication_action")
action.domain = []
2 changes: 1 addition & 1 deletion account_credit_control/wizard/credit_control_emailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def email_lines(self):
if not communications:
return {'type': 'ir.actions.act_window_close'}
action = self.sudo().env.ref(
"account_credit_control.credit_control_communication_action")
"account_credit_control.credit_control_communication_action").read()[0]
action['name'] = _('Generated communications')
action["domain"] = [('id', 'in', communications.ids)]
return action

0 comments on commit b1352c9

Please sign in to comment.