[FIX] account: Account group search bar

The search bar had a trace back when searching on a name, and searching on the code prefix did not work.

This was not working because using str(self) does not work in v16, str is not defined in filter domain.

By removing the str and adapting the filter domain logic, it now works as it should. And the behavior of version 15 is restored

closes odoo/odoo#105381

Task-id: 3058778
X-original-commit: 9173e4da3912f8e46f163cc0d38a4a037b591c60
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
This commit is contained in:
maximilien(malb)
2022-11-09 14:00:33 +01:00
parent c22afcbe0d
commit 246666fe7d
+1 -1
View File
@@ -27,7 +27,7 @@
<field name="arch" type="xml">
<search string="Account groups">
<field name="name"
filter_domain="['|', ('code_prefix_start', '=like', str(self) + '%'), ('name', 'ilike', self)]"
filter_domain="['|', ('code_prefix_start', '=like', self + '%'), ('name', 'ilike', self)]"
string="Account group"/>
</search>
</field>