changeset 75e1c4e0ae5e in modules/account_invoice:default
details:
https://hg.tryton.org/modules/account_invoice?cmd=changeset&node=75e1c4e0ae5e
description:
Call column_is_type only if column exists
issue9645
diffstat:
payment_term.py | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (19 lines):
diff -r 6675d0caa210 -r 75e1c4e0ae5e payment_term.py
--- a/payment_term.py Mon Apr 12 20:56:08 2021 +0200
+++ b/payment_term.py Mon Apr 12 22:01:08 2021 +0200
@@ -278,10 +278,12 @@
# Migration from 5.0: use ir.calendar
migrate_calendar = False
- if backend.TableHandler.table_exist(cls._table):
+ if (backend.TableHandler.table_exist(cls._table)
+ and table_h.column_exist('month')
+ and table_h.column_exist('weekday')):
migrate_calendar = (
- (table_h.column_is_type('month', 'VARCHAR')
- or (table_h.column_is_type('weekday', 'VARCHAR'))
+ table_h.column_is_type('month', 'VARCHAR')
+ or table_h.column_is_type('weekday', 'VARCHAR'))
if migrate_calendar:
table_h.column_rename('month', '_temp_month')
table_h.column_rename('weekday', '_temp_weekday')