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

Issue 64541002: tryton-env: Remove starting wildcard when searching on codes and numbers

Can't Edit
Can't Publish+Mail
Start Review
Created:
2 months, 2 weeks ago by pokoli
Modified:
1 month, 1 week ago
Reviewers:
ced, reviewbot
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add changelogs, only use code for *like and manage %% #

Total comments: 3

Patch Set 3 : Add helper function and use it on modules #

Total comments: 5

Patch Set 4 : Fix comments #

Total comments: 14

Patch Set 5 : Fix comments #

Total comments: 1

Patch Set 6 : Use ilike, remove escape char and do not mimic etst on msg #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -16 lines) Patch
M modules/account/CHANGELOG View 1 1 chunk +1 line, -0 lines 0 comments Download
M modules/account/account.py View 1 2 3 4 5 3 chunks +9 lines, -3 lines 0 comments Download
M modules/account/journal.py View 1 2 3 4 5 2 chunks +5 lines, -2 lines 0 comments Download
M modules/account/tax.py View 1 2 3 4 5 2 chunks +5 lines, -2 lines 0 comments Download
M modules/bank/CHANGELOG View 1 1 chunk +2 lines, -0 lines 0 comments Download
M modules/bank/party.py View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M modules/country/CHANGELOG View 1 1 chunk +1 line, -0 lines 0 comments Download
M modules/country/country.py View 1 2 3 4 5 2 chunks +7 lines, -3 lines 0 comments Download
M modules/party/CHANGELOG View 1 1 chunk +1 line, -0 lines 0 comments Download
M modules/party/party.py View 1 2 3 4 5 2 chunks +6 lines, -2 lines 0 comments Download
M modules/product/CHANGELOG View 1 1 chunk +2 lines, -0 lines 0 comments Download
M modules/product/product.py View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M modules/purchase/CHANGELOG View 1 1 chunk +2 lines, -0 lines 0 comments Download
M modules/purchase/product.py View 1 2 3 4 5 2 chunks +5 lines, -1 line 0 comments Download
M trytond/CHANGELOG View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M trytond/trytond/tests/test_tools.py View 1 2 3 4 5 2 chunks +36 lines, -1 line 1 comment Download
M trytond/trytond/tools/misc.py View 1 2 3 4 5 1 chunk +17 lines, -0 lines 2 comments Download

Messages

Total messages: 22
pokoli
2 months, 2 weeks ago (2019-01-03 12:16:00 UTC) #1
ced
Missing changelog entries https://codereview.tryton.org/64541002/diff/1/modules/account/account.py File modules/account/account.py (right): https://codereview.tryton.org/64541002/diff/1/modules/account/account.py#newcode427 modules/account/account.py:427: code_value = clause[2][1:] if clause[2].startswith('%') else ...
2 months, 2 weeks ago (2019-01-03 12:29:46 UTC) #2
reviewbot
flake8 OK URL: https://codereview.tryton.org/64541002
2 months, 2 weeks ago (2019-01-03 12:49:49 UTC) #3
pokoli
Add changelogs, only use code for *like and manage %%
2 months, 1 week ago (2019-01-08 18:20:57 UTC) #4
reviewbot
flake8 OK URL: https://codereview.tryton.org/64541002
2 months, 1 week ago (2019-01-08 18:46:30 UTC) #5
ced
https://codereview.tryton.org/64541002/diff/20001/modules/account/account.py File modules/account/account.py (right): https://codereview.tryton.org/64541002/diff/20001/modules/account/account.py#newcode429 modules/account/account.py:429: code_value = clause[2][clause[2].rfind('%', 0, 2) + 1:] I do ...
2 months ago (2019-01-15 14:12:54 UTC) #6
pokoli
https://codereview.tryton.org/64541002/diff/20001/modules/account/account.py File modules/account/account.py (right): https://codereview.tryton.org/64541002/diff/20001/modules/account/account.py#newcode429 modules/account/account.py:429: code_value = clause[2][clause[2].rfind('%', 0, 2) + 1:] On 2019/01/15 ...
2 months ago (2019-01-17 07:50:07 UTC) #7
ced
https://codereview.tryton.org/64541002/diff/20001/modules/account/account.py File modules/account/account.py (right): https://codereview.tryton.org/64541002/diff/20001/modules/account/account.py#newcode429 modules/account/account.py:429: code_value = clause[2][clause[2].rfind('%', 0, 2) + 1:] On 2019/01/17 ...
2 months ago (2019-01-17 08:44:18 UTC) #8
pokoli
Add helper function and use it on modules
1 month, 4 weeks ago (2019-01-21 14:35:41 UTC) #9
reviewbot
patch is not applicable URL: https://codereview.tryton.org/64541002
1 month, 4 weeks ago (2019-01-21 14:39:07 UTC) #10
ced
https://codereview.tryton.org/64541002/diff/40001/trytond/trytond/tools/misc.py File trytond/trytond/tools/misc.py (right): https://codereview.tryton.org/64541002/diff/40001/trytond/trytond/tools/misc.py#newcode253 trytond/trytond/tools/misc.py:253: def strip_like_wildcard(clause): I do not think the name should ...
1 month, 3 weeks ago (2019-01-22 10:26:33 UTC) #11
pokoli
Fix comments
1 month, 2 weeks ago (2019-02-01 09:07:56 UTC) #12
reviewbot
https://codereview.tryton.org/64541002/diff/60001/trytond/trytond/tests/test_tools.py#newcode30 trytond/trytond/tests/test_tools.py:30: E501 line too long (90 > 79 characters) https://codereview.tryton.org/64541002/diff/60001/trytond/trytond/tools/misc.py#newcode270 trytond/trytond/tools/misc.py:270: E226 missing whitespace ...
1 month, 2 weeks ago (2019-02-01 09:21:00 UTC) #13
ced
https://codereview.tryton.org/64541002/diff/60001/modules/account/account.py File modules/account/account.py (right): https://codereview.tryton.org/64541002/diff/60001/modules/account/account.py#newcode428 modules/account/account.py:428: if 'like' in clause[1]: Probably also for ilike and ...
1 month, 1 week ago (2019-02-05 08:56:43 UTC) #14
pokoli
Fix comments
1 month, 1 week ago (2019-02-06 15:41:42 UTC) #15
pokoli
https://codereview.tryton.org/64541002/diff/60001/modules/account/account.py File modules/account/account.py (right): https://codereview.tryton.org/64541002/diff/60001/modules/account/account.py#newcode428 modules/account/account.py:428: if 'like' in clause[1]: On 2019/02/05 08:56:42, ced wrote: ...
1 month, 1 week ago (2019-02-06 15:41:49 UTC) #16
reviewbot
patch is not applicable URL: https://codereview.tryton.org/64541002
1 month, 1 week ago (2019-02-06 15:47:00 UTC) #17
ced
https://codereview.tryton.org/64541002/diff/60001/modules/account/account.py File modules/account/account.py (right): https://codereview.tryton.org/64541002/diff/60001/modules/account/account.py#newcode428 modules/account/account.py:428: if 'like' in clause[1]: On 2019/02/06 15:41:48, pokoli wrote: ...
1 month, 1 week ago (2019-02-06 16:20:50 UTC) #18
ced
https://codereview.tryton.org/64541002/diff/80001/trytond/trytond/tests/test_tools.py File trytond/trytond/tests/test_tools.py (right): https://codereview.tryton.org/64541002/diff/80001/trytond/trytond/tests/test_tools.py#newcode147 trytond/trytond/tests/test_tools.py:147: msg='strip_wildcard(%s) != %s' % (clause, result)) I do not ...
1 month, 1 week ago (2019-02-06 18:41:44 UTC) #19
pokoli
Use ilike, remove escape char and do not mimic etst on msg
1 month, 1 week ago (2019-02-09 18:44:15 UTC) #20
reviewbot
https://codereview.tryton.org/64541002/diff/100001/trytond/trytond/tests/test_tools.py#newcode30 trytond/trytond/tests/test_tools.py:30: E501 line too long (90 > 79 characters) URL: https://codereview.tryton.org/64541002
1 month, 1 week ago (2019-02-09 18:49:00 UTC) #21
ced
1 month, 1 week ago (2019-02-11 18:08:52 UTC) #22
https://codereview.tryton.org/64541002/diff/100001/trytond/trytond/tests/test...
File trytond/trytond/tests/test_tools.py (right):

https://codereview.tryton.org/64541002/diff/100001/trytond/trytond/tests/test...
trytond/trytond/tests/test_tools.py:147: msg='%s != %s' % (clause, result))
For me, msg only need to show clause as assertEqual will display the difference.

https://codereview.tryton.org/64541002/diff/100001/trytond/trytond/tools/misc.py
File trytond/trytond/tools/misc.py (right):

https://codereview.tryton.org/64541002/diff/100001/trytond/trytond/tools/misc...
trytond/trytond/tools/misc.py:260: return string[idx:]
I still do not understand why str.strip can not be used.

https://codereview.tryton.org/64541002/diff/100001/trytond/trytond/tools/misc...
trytond/trytond/tools/misc.py:267: return string.rstrip(wildcard)
It is missing now the escape char, you can not strip '\%'
Sign in to reply to this message.

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