Tryton Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(231)

Issue 44611002: trytond: Allow to perform unaccented searches on Char fields (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 months, 1 week ago by nicoe
Modified:
4 months ago
Reviewers:
pokoli, rietveld-bot, ced, reviewbot
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : remove useless len() call #

Total comments: 13

Patch Set 3 : Fix remarks and add documentation #

Patch Set 4 : Use Stéphanie #

Total comments: 28

Patch Set 5 : Fix remarks #

Total comments: 2

Patch Set 6 : work on translatable Chars too #

Total comments: 15

Patch Set 7 : fix remarks #

Patch Set 8 : Do not use CommonTestCase anymore and test search of unaccented stored value #

Patch Set 9 : fix flake8 #

Total comments: 16

Patch Set 10 : fix remarks #

Total comments: 2

Patch Set 11 : fix remarks #

Total comments: 1

Patch Set 12 : replace in by endswith #

Unified diffs Side-by-side diffs Delta from patch set Stats (+204 lines, -0 lines) Patch
M CHANGELOG View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M doc/ref/models/fields.rst View 1 2 3 4 5 6 7 8 9 10 1 chunk +9 lines, -0 lines 0 comments Download
M trytond/backend/database.py View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M trytond/backend/postgresql/database.py View 1 2 3 4 5 6 7 8 9 5 chunks +28 lines, -0 lines 0 comments Download
M trytond/model/fields/char.py View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +16 lines, -0 lines 0 comments Download
M trytond/model/fields/field.py View 1 2 3 4 5 3 chunks +5 lines, -0 lines 0 comments Download
M trytond/tests/field_char.py View 1 2 3 4 5 2 chunks +26 lines, -0 lines 0 comments Download
M trytond/tests/test_field_char.py View 1 2 3 4 5 6 7 8 9 2 chunks +111 lines, -0 lines 0 comments Download

Messages

Total messages: 48
nicoe
5 months, 1 week ago (2018-02-05 17:26:49 UTC) #1
nicoe
remove useless len() call
5 months, 1 week ago (2018-02-05 17:28:32 UTC) #2
reviewbot
https://codereview.tryton.org/44611002/diff/20001/trytond/backend/postgresql/database.py#newcode241 trytond/backend/postgresql/database.py:241: E127 continuation line over-indented for visual indent https://codereview.tryton.org/44611002/diff/20001/trytond/backend/postgresql/database.py#newcode423 trytond/backend/postgresql/database.py:423: E131 continuation line unaligned ...
5 months, 1 week ago (2018-02-05 17:54:17 UTC) #3
ced
Missing documentation. https://codereview.tryton.org/44611002/diff/20001/trytond/backend/postgresql/database.py File trytond/backend/postgresql/database.py (right): https://codereview.tryton.org/44611002/diff/20001/trytond/backend/postgresql/database.py#newcode339 trytond/backend/postgresql/database.py:339: "SELECT 1 FROM pg_extension WHERE extname=%s", The ...
5 months, 1 week ago (2018-02-05 18:28:03 UTC) #4
nicoe
Fix remarks and add documentation
5 months, 1 week ago (2018-02-06 16:25:32 UTC) #5
nicoe
https://codereview.tryton.org/44611002/diff/20001/trytond/model/fields/char.py File trytond/model/fields/char.py (right): https://codereview.tryton.org/44611002/diff/20001/trytond/model/fields/char.py#newcode20 trytond/model/fields/char.py:20: context=None, loading=None, autocomplete=None, unaccented=True): On 2018/02/05 18:28:03, ced wrote: ...
5 months, 1 week ago (2018-02-06 16:47:28 UTC) #6
ced
https://codereview.tryton.org/44611002/diff/20001/trytond/tests/test_field_char.py File trytond/tests/test_field_char.py (right): https://codereview.tryton.org/44611002/diff/20001/trytond/tests/test_field_char.py#newcode502 trytond/tests/test_field_char.py:502: 'normal': u'St\xe9phanie', On 2018/02/06 16:47:27, nicoe wrote: > On ...
5 months, 1 week ago (2018-02-06 16:53:22 UTC) #7
reviewbot
https://codereview.tryton.org/44611002/diff/40001/trytond/backend/postgresql/database.py#newcode241 trytond/backend/postgresql/database.py:241: E127 continuation line over-indented for visual indent https://codereview.tryton.org/44611002/diff/40001/trytond/backend/postgresql/database.py#newcode422 trytond/backend/postgresql/database.py:422: E131 continuation line unaligned ...
5 months, 1 week ago (2018-02-06 16:56:47 UTC) #8
nicoe
Use Stéphanie
5 months, 1 week ago (2018-02-06 17:07:37 UTC) #9
reviewbot
https://codereview.tryton.org/44611002/diff/60001/trytond/backend/postgresql/database.py#newcode241 trytond/backend/postgresql/database.py:241: E127 continuation line over-indented for visual indent https://codereview.tryton.org/44611002/diff/60001/trytond/backend/postgresql/database.py#newcode422 trytond/backend/postgresql/database.py:422: E131 continuation line unaligned ...
5 months, 1 week ago (2018-02-06 17:20:26 UTC) #10
ced
https://codereview.tryton.org/44611002/diff/60001/doc/ref/models/fields.rst File doc/ref/models/fields.rst (right): https://codereview.tryton.org/44611002/diff/60001/doc/ref/models/fields.rst#newcode283 doc/ref/models/fields.rst:283: If your database backend supports unaccented searches `ilike` searches ...
5 months, 1 week ago (2018-02-06 18:39:21 UTC) #11
nicoe
https://codereview.tryton.org/44611002/diff/60001/doc/ref/models/fields.rst File doc/ref/models/fields.rst (right): https://codereview.tryton.org/44611002/diff/60001/doc/ref/models/fields.rst#newcode283 doc/ref/models/fields.rst:283: If your database backend supports unaccented searches `ilike` searches ...
5 months, 1 week ago (2018-02-07 11:46:44 UTC) #12
nicoe
Fix remarks
5 months, 1 week ago (2018-02-07 11:47:15 UTC) #13
ced
I think it does not work with translatable fields. https://codereview.tryton.org/44611002/diff/60001/trytond/model/fields/field.py File trytond/model/fields/field.py (right): https://codereview.tryton.org/44611002/diff/60001/trytond/model/fields/field.py#newcode335 trytond/model/fields/field.py:335: ...
5 months, 1 week ago (2018-02-07 11:57:25 UTC) #14
reviewbot
https://codereview.tryton.org/44611002/diff/80001/trytond/backend/postgresql/database.py#newcode241 trytond/backend/postgresql/database.py:241: E127 continuation line over-indented for visual indent https://codereview.tryton.org/44611002/diff/80001/trytond/backend/postgresql/database.py#newcode423 trytond/backend/postgresql/database.py:423: E131 continuation line unaligned ...
5 months, 1 week ago (2018-02-07 11:59:15 UTC) #15
pokoli
5 months, 1 week ago (2018-02-07 12:05:21 UTC) #16
nicoe
https://codereview.tryton.org/44611002/diff/60001/trytond/model/fields/field.py File trytond/model/fields/field.py (right): https://codereview.tryton.org/44611002/diff/60001/trytond/model/fields/field.py#newcode335 trytond/model/fields/field.py:335: column = self._domain_column(table, operator) On 2018/02/07 11:57:25, ced wrote: ...
5 months, 1 week ago (2018-02-07 13:06:43 UTC) #17
ced
https://codereview.tryton.org/44611002/diff/60001/trytond/model/fields/field.py File trytond/model/fields/field.py (right): https://codereview.tryton.org/44611002/diff/60001/trytond/model/fields/field.py#newcode335 trytond/model/fields/field.py:335: column = self._domain_column(table, operator) On 2018/02/07 13:06:42, nicoe wrote: ...
5 months, 1 week ago (2018-02-07 14:01:13 UTC) #18
ced
https://codereview.tryton.org/44611002/diff/80001/trytond/model/fields/char.py File trytond/model/fields/char.py (right): https://codereview.tryton.org/44611002/diff/80001/trytond/model/fields/char.py#newcode73 trytond/model/fields/char.py:73: if self.search_unaccented and operator == 'ilike': Also for not ...
5 months ago (2018-02-09 11:47:17 UTC) #19
nicoe
work on translatable Chars too
5 months ago (2018-02-12 13:19:21 UTC) #20
nicoe
https://codereview.tryton.org/44611002/diff/80001/trytond/model/fields/char.py File trytond/model/fields/char.py (right): https://codereview.tryton.org/44611002/diff/80001/trytond/model/fields/char.py#newcode73 trytond/model/fields/char.py:73: if self.search_unaccented and operator == 'ilike': On 2018/02/09 11:47:16, ...
5 months ago (2018-02-12 13:19:25 UTC) #21
reviewbot
https://codereview.tryton.org/44611002/diff/100001/trytond/backend/postgresql/database.py#newcode241 trytond/backend/postgresql/database.py:241: E127 continuation line over-indented for visual indent https://codereview.tryton.org/44611002/diff/100001/trytond/backend/postgresql/database.py#newcode423 trytond/backend/postgresql/database.py:423: E131 continuation line unaligned ...
5 months ago (2018-02-12 13:26:06 UTC) #22
ced
https://codereview.tryton.org/44611002/diff/100001/trytond/model/fields/char.py File trytond/model/fields/char.py (right): https://codereview.tryton.org/44611002/diff/100001/trytond/model/fields/char.py#newcode85 trytond/model/fields/char.py:85: and isinstance(value, (str, unicode))): What is the case where ...
5 months ago (2018-02-12 23:30:14 UTC) #23
nicoe
https://codereview.tryton.org/44611002/diff/100001/trytond/model/fields/char.py File trytond/model/fields/char.py (right): https://codereview.tryton.org/44611002/diff/100001/trytond/model/fields/char.py#newcode85 trytond/model/fields/char.py:85: and isinstance(value, (str, unicode))): On 2018/02/12 23:30:13, ced wrote: ...
4 months, 2 weeks ago (2018-02-28 12:32:55 UTC) #24
nicoe
fix remarks
4 months, 2 weeks ago (2018-02-28 12:33:37 UTC) #25
reviewbot
https://codereview.tryton.org/44611002/diff/120001/trytond/backend/postgresql/database.py#newcode245 trytond/backend/postgresql/database.py:245: E127 continuation line over-indented for visual indent https://codereview.tryton.org/44611002/diff/120001/trytond/backend/postgresql/database.py#newcode427 trytond/backend/postgresql/database.py:427: E131 continuation line unaligned ...
4 months, 2 weeks ago (2018-02-28 12:51:26 UTC) #26
ced
https://codereview.tryton.org/44611002/diff/100001/trytond/tests/test_field_char.py File trytond/tests/test_field_char.py (right): https://codereview.tryton.org/44611002/diff/100001/trytond/tests/test_field_char.py#newcode495 trytond/tests/test_field_char.py:495: return Pool().get('test.char_unaccented_on') On 2018/02/28 12:32:55, nicoe wrote: > On ...
4 months, 2 weeks ago (2018-02-28 13:34:01 UTC) #27
nicoe
Do not use CommonTestCase anymore and test search of unaccented stored value
4 months, 1 week ago (2018-03-08 21:36:21 UTC) #28
nicoe
https://codereview.tryton.org/44611002/diff/100001/trytond/tests/test_field_char.py File trytond/tests/test_field_char.py (right): https://codereview.tryton.org/44611002/diff/100001/trytond/tests/test_field_char.py#newcode495 trytond/tests/test_field_char.py:495: return Pool().get('test.char_unaccented_on') On 2018/02/28 13:34:00, ced wrote: > On ...
4 months, 1 week ago (2018-03-08 21:36:48 UTC) #29
reviewbot
https://codereview.tryton.org/44611002/diff/140001/trytond/backend/postgresql/database.py#newcode245 trytond/backend/postgresql/database.py:245: E127 continuation line over-indented for visual indent https://codereview.tryton.org/44611002/diff/140001/trytond/backend/postgresql/database.py#newcode427 trytond/backend/postgresql/database.py:427: E131 continuation line unaligned ...
4 months, 1 week ago (2018-03-08 21:48:57 UTC) #30
nicoe
fix flake8
4 months, 1 week ago (2018-03-08 22:16:06 UTC) #31
reviewbot
https://codereview.tryton.org/44611002/diff/160001/trytond/backend/postgresql/database.py#newcode245 trytond/backend/postgresql/database.py:245: E127 continuation line over-indented for visual indent https://codereview.tryton.org/44611002/diff/160001/trytond/backend/postgresql/database.py#newcode427 trytond/backend/postgresql/database.py:427: E131 continuation line unaligned ...
4 months, 1 week ago (2018-03-08 22:23:25 UTC) #32
ced
https://codereview.tryton.org/44611002/diff/100001/trytond/tests/test_field_char.py File trytond/tests/test_field_char.py (right): https://codereview.tryton.org/44611002/diff/100001/trytond/tests/test_field_char.py#newcode524 trytond/tests/test_field_char.py:524: On 2018/03/08 21:36:47, nicoe wrote: > On 2018/02/28 13:34:00, ...
4 months, 1 week ago (2018-03-08 23:41:36 UTC) #33
nicoe
https://codereview.tryton.org/44611002/diff/100001/trytond/tests/test_field_char.py File trytond/tests/test_field_char.py (right): https://codereview.tryton.org/44611002/diff/100001/trytond/tests/test_field_char.py#newcode524 trytond/tests/test_field_char.py:524: On 2018/03/08 23:41:36, ced wrote: > On 2018/03/08 21:36:47, ...
4 months, 1 week ago (2018-03-09 20:16:59 UTC) #34
ced
https://codereview.tryton.org/44611002/diff/160001/doc/ref/models/fields.rst File doc/ref/models/fields.rst (right): https://codereview.tryton.org/44611002/diff/160001/doc/ref/models/fields.rst#newcode285 doc/ref/models/fields.rst:285: :attribute:`search_unaccented` attribute of the field to False. The attribute ...
4 months, 1 week ago (2018-03-10 18:48:59 UTC) #35
nicoe
https://codereview.tryton.org/44611002/diff/160001/doc/ref/models/fields.rst File doc/ref/models/fields.rst (right): https://codereview.tryton.org/44611002/diff/160001/doc/ref/models/fields.rst#newcode285 doc/ref/models/fields.rst:285: :attribute:`search_unaccented` attribute of the field to False. On 2018/03/10 ...
4 months ago (2018-03-14 21:33:14 UTC) #36
nicoe
fix remarks
4 months ago (2018-03-14 21:33:35 UTC) #37
reviewbot
https://codereview.tryton.org/44611002/diff/180001/trytond/backend/postgresql/database.py#newcode245 trytond/backend/postgresql/database.py:245: E127 continuation line over-indented for visual indent https://codereview.tryton.org/44611002/diff/180001/trytond/backend/postgresql/database.py#newcode427 trytond/backend/postgresql/database.py:427: E131 continuation line unaligned ...
4 months ago (2018-03-14 21:49:15 UTC) #38
ced
https://codereview.tryton.org/44611002/diff/160001/trytond/model/fields/char.py File trytond/model/fields/char.py (right): https://codereview.tryton.org/44611002/diff/160001/trytond/model/fields/char.py#newcode73 trytond/model/fields/char.py:73: if self.search_unaccented and operator in {'ilike', 'not ilike'}: On ...
4 months ago (2018-03-14 23:11:00 UTC) #39
ced
https://codereview.tryton.org/44611002/diff/180001/doc/ref/models/fields.rst File doc/ref/models/fields.rst (right): https://codereview.tryton.org/44611002/diff/180001/doc/ref/models/fields.rst#newcode287 doc/ref/models/fields.rst:287: setting the :attribute:`search_unaccented` attribute of the field to As ...
4 months ago (2018-03-15 10:02:51 UTC) #40
nicoe
https://codereview.tryton.org/44611002/diff/160001/trytond/model/fields/char.py File trytond/model/fields/char.py (right): https://codereview.tryton.org/44611002/diff/160001/trytond/model/fields/char.py#newcode73 trytond/model/fields/char.py:73: if self.search_unaccented and operator in {'ilike', 'not ilike'}: On ...
4 months ago (2018-03-15 15:58:59 UTC) #41
nicoe
fix remarks
4 months ago (2018-03-15 15:58:59 UTC) #42
reviewbot
https://codereview.tryton.org/44611002/diff/200001/trytond/backend/postgresql/database.py#newcode245 trytond/backend/postgresql/database.py:245: E127 continuation line over-indented for visual indent https://codereview.tryton.org/44611002/diff/200001/trytond/backend/postgresql/database.py#newcode427 trytond/backend/postgresql/database.py:427: E131 continuation line unaligned ...
4 months ago (2018-03-15 16:19:44 UTC) #43
ced
https://codereview.tryton.org/44611002/diff/200001/trytond/model/fields/char.py File trytond/model/fields/char.py (right): https://codereview.tryton.org/44611002/diff/200001/trytond/model/fields/char.py#newcode80 trytond/model/fields/char.py:80: if self.search_unaccented and operator in {'ilike', 'not ilike'}: idem ...
4 months ago (2018-03-16 13:01:28 UTC) #44
nicoe
replace in by endswith
4 months ago (2018-03-16 16:11:59 UTC) #45
ced
LGTM
4 months ago (2018-03-16 16:20:34 UTC) #46
reviewbot
https://codereview.tryton.org/44611002/diff/220001/trytond/backend/postgresql/database.py#newcode245 trytond/backend/postgresql/database.py:245: E127 continuation line over-indented for visual indent https://codereview.tryton.org/44611002/diff/220001/trytond/backend/postgresql/database.py#newcode427 trytond/backend/postgresql/database.py:427: E131 continuation line unaligned ...
4 months ago (2018-03-16 16:25:09 UTC) #47
rietveld-bot_tryton.org
4 months ago (2018-03-16 17:17:59 UTC) #48
New changeset a0ea0e76a776 by Nicolas ?vrard in branch 'default':
Allow to perform unaccented searches on Char fields
http://hg.tryton.org/trytond/rev/a0ea0e76a776
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 3870a69