changeset 608f39bc1c25 in modules/account_invoice:6.0
details:
https://hg.tryton.org/modules/account_invoice?cmd=changeset&node=608f39bc1c25
description:
Use select to True on create_date
If the index is created only in __register__ then it is dropped before
being
created again.
issue11197
review389881002
(grafted from 0621a612c34f8f227f82b142e4f263e985613bf3)
diffstat:
invoice.py | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diffs (21 lines):
diff -r 79aec7c017d8 -r 608f39bc1c25 invoice.py
--- a/invoice.py Thu Feb 03 22:25:56 2022 +0100
+++ b/invoice.py Thu Feb 03 22:29:08 2022 +0100
@@ -257,6 +257,7 @@
@classmethod
def __setup__(cls):
super(Invoice, cls).__setup__()
+ cls.create_date.select = True
cls._check_modify_exclude = {
'state', 'payment_lines', 'move', 'cancel_move',
'invoice_report_cache', 'invoice_report_format', 'lines'}
@@ -395,9 +396,6 @@
# Migration from 4.0: Drop not null on payment_term
table.not_null_action('payment_term', 'remove')
- # Add index on create_date
- table.index_action('create_date', action='add')
-
# Migration from 5.6: rename state cancel to cancelled
cursor.execute(*sql_table.update(
[sql_table.state], ['cancelled'],