diff options
| author | Laurent Smet <las@odoo.com> | 2018-11-21 13:12:19 +0000 |
|---|---|---|
| committer | Laurent Smet <las@odoo.com> | 2018-11-22 13:37:13 +0000 |
| commit | eaf76bff5a8dbc5c8418bf9b24b86c9b942dbda0 (patch) | |
| tree | dcb7d15f7fa52b4466d882d8b6207be97f1dbea4 /addons/web/static/src/js/views/basic/basic_controller.js | |
| parent | 879a7194788bf36b60dacfc4902a7cf02f21bbe7 (diff) | |
[FIX] account: Fix regex matching rule in reconciliation model
Before:
Suppose 'invoices 2018/0002 and 2018/0003' that becomes '2018000220180003' after
REGEXP_REPLACE(st_line.name, '[^0-9]', '', 'g').
'2018000220180003' ~ '20180002' match: OK
'2018000220180003' ~ '2018' match: NOT OK
'2018000220180003' ~ '' match: NOT OK
After this commit:
move.name/move.ref giving an empty string are filtered out.
'invoices 2018/0002 and 2018/0003'
becomes ' 20180002 20180003' after REGEXP_REPLACE(st_line.name, '[^(0-9|\s)]', '', 'g')
and becomes {"",2018001,2018002} after the regexp_split_to_array.
Then, the matching is now done by a comparison instead of a pattern matching between the move
and this array of potential candidates.
'20180002' = ANY({"",2018001,2018002}) match: OK
'2018' = ANY({"",2018001,2018002}) not match: OK
'' is filtered out: OK
closes odoo/odoo#28962
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions
