sepa attachments migration fix

Sometimes sepa file could have been detached
from the corresponding payment order.
This commit is contained in:
Stéphane Bidoul
2015-06-13 11:21:07 +02:00
committed by Carlos Roca
parent 989d329e5a
commit 4521c51b98

View File

@@ -39,6 +39,8 @@ def migrate(cr, version):
''')
for sepa_file in cr.dictfetchall():
if not sepa_file['payment_order_id']:
continue
filename = 'sct_%s.xml' % sepa_file['reference'].replace('/', '-')
pool['ir.attachment'].create(
cr, SUPERUSER_ID, {