[7.0] Incorrect behaviour for account.invoice.line migration (note & name)

Bug #1227929 reported by Sylvain LE GAL (GRAP)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenUpgrade Addons
Status tracked in 7.0
7.0
Fix Released
Medium
Unassigned

Bug Description

Hi,

I think that there is a little bug in account module. In the merging of 'name' and 'note' field in account.invoice.line model.

Reproduce the bug.

6.1 :
row #1 : {name : 'my name' ; note : 'my note'}
row #2 : {name : 'my name' ; note : None}

Expected datas after migration in 7.0 :
row #1 : {name : 'my name' + '\n' + 'my note'}
row #2 : {name : 'my name'}

Observed datas :
row #1 : {name : 'my name' + '\n' + 'my note'}
row #2 : {name : None}

Observed log :
WARNING : Table 'account_invoice_line': unable to set a NOT NULL constraint on column 'name' !

Related branches

no longer affects: openupgrade-addons/7.0
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Thank you for fixing this!

If someone got caught by this, they can fix it on an already migrated database with:

    update account_invoice_line set name = openupgrade_legacy_7_0_name where name is NULL and openupgrade_legacy_7_0_name is not NULL;

Changed in openupgrade-addons:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.