Merge PR #1047 into 9.0

Signed-off-by StefanRijnhart
This commit is contained in:
OCA-git-bot
2020-08-20 13:18:56 +00:00
2 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ sudo: false
cache: pip
addons:
postgresql: "9.2" # minimal postgresql version for the daterange method
postgresql: "9.6" # minimal postgresql version for the daterange method
apt:
packages:
- expect-dev # provides unbuffer utility

View File

@@ -42,7 +42,7 @@ def migrate_followup_data(env):
def set_followup_data(env):
today = fields.Date.context_today
today = fields.Date.context_today(env.user)
policy = env['credit.control.policy.level'].search([])[:-1]
if policy:
env.cr.execute("""
@@ -52,7 +52,7 @@ def set_followup_data(env):
AND aa.internal_type = 'receivable'
AND aml.reconciled IS NULL
AND aml.date_maturity < %s
""", today)
""", (today,))
data = env.cr.dictfetchall()
for line in data:
env['credit.control.line'].create({