mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] don't expect columns to be in the right order
and give default value for newly added required column
This commit is contained in:
@@ -36,10 +36,16 @@ def migrate(cr, installed_version):
|
||||
return
|
||||
|
||||
query = "INSERT INTO account_banking_mandate " \
|
||||
"(id, create_uid, create_date, write_date, write_uid, "\
|
||||
"partner_bank_id, last_debit_date, scan, company_id, state, "\
|
||||
"unique_mandate_reference, signature_date, sepa_migrated, "\
|
||||
"original_mandate_identification, recurrent_sequence_type, type, "\
|
||||
"scheme) "\
|
||||
"SELECT id, create_uid, create_date, write_date, write_uid, " \
|
||||
"partner_bank_id, last_debit_date, scan, company_id, state, " \
|
||||
"unique_mandate_reference, signature_date, sepa_migrated, " \
|
||||
"original_mandate_identification, recurrent_sequence_type, type " \
|
||||
"original_mandate_identification, recurrent_sequence_type, type, "\
|
||||
"'CORE' "\
|
||||
"FROM sdd_mandate"
|
||||
cr.execute(query)
|
||||
query2 = "UPDATE account_invoice SET mandate_id=sdd_mandate_id"
|
||||
|
||||
Reference in New Issue
Block a user