Also avoid to have '/' on move line label of supplier invoices
This commit is contained in:
16
account_usability/migrations/8.0.0.3/pre-migration.py
Normal file
16
account_usability/migrations/8.0.0.3/pre-migration.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
def migrate(cr, version):
|
||||
if not version:
|
||||
return
|
||||
|
||||
# cf the inherit of action_number() of account.invoice
|
||||
# in account_usability/account.py
|
||||
cr.execute(
|
||||
"UPDATE account_move_line SET name=account_move.name "
|
||||
"FROM account_move WHERE account_move_line.move_id = account_move.id "
|
||||
"AND account_move_line.name='/' "
|
||||
"AND account_move_line.journal_id in "
|
||||
"(SELECT id FROM account_journal WHERE type in ('purchase', 'purchase_refund'))")
|
||||
Reference in New Issue
Block a user