Handle the case where name of account_move_line has the name field of the invoice
This commit is contained in:
@@ -9,6 +9,7 @@ def migrate(cr, version):
|
||||
# cf the inherit of action_number() of account.invoice
|
||||
# in account_usability/account.py
|
||||
cr.execute(
|
||||
"UPDATE account_move_line SET name=ref WHERE name='/' "
|
||||
"AND ref is not null AND journal_id in "
|
||||
"UPDATE account_move_line SET name= "
|
||||
"CASE WHEN name='/' THEN ref ELSE ref||' - '||name END "
|
||||
"WHERE ref is not null AND journal_id in "
|
||||
"(SELECT id FROM account_journal WHERE type in ('sale', 'sale_refund'))")
|
||||
|
||||
Reference in New Issue
Block a user