[7.0] updating account_invoice.partner_id change 'number' field & crash
Hi,
I'm trying to run openUpgrade on a database and I have a problem in the migration of 'account' module.
in the post_migration.py script, there is a call to 'set_partner_
This function does a 'write' with vals={'partner_id' : XXX}
In this operation, the orm try to change 'number' fields and raise an error.
ERROR my_db_name openerp.sql_db: bad query: update "account_invoice" set "number"='26' where id = 33
I don't understand why changing a 'partner_id' raise the change of 'number' but the fact is that the function "_store_get_values" in orm.py return 'number' reference.
Temporary workaround I found is to replace (in openupgrade_70.py) the line :
model.write(cr, SUPERUSER_ID, row[0], {partner_field: row[1]})
by :
cr.execute(
Are you facing with the same kind of behaviour ?
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Sylvain LE GAL (GRAP) for more information if necessary.