[FIX] account: coa search functionality crashing

Searching for anything in the Chart Of Account view would make a stacktrace appear.

FIX -->  classic domain names instead of 'str(self)+'%''

Task-2951261

closes odoo/odoo#97991

Signed-off-by: Laurent Smet <las@odoo.com>
This commit is contained in:
Camille Spiritus
2022-08-11 19:15:01 +02:00
parent 06b81a71aa
commit 8852ff2767
@@ -140,7 +140,7 @@
<field name="model">account.account</field>
<field name="arch" type="xml">
<search string="Accounts">
<field name="name" filter_domain="['|', ('name','ilike',self), ('code','=like',str(self)+'%')]" string="Account"/>
<field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Account"/>
<filter string="Receivable" name="receivableacc" domain="[('account_type','=','asset_receivable')]"/>
<filter string="Payable" name="payableacc" domain="[('account_type','=','liability_payable')]"/>
<filter string="Equity" name="equityacc" domain="[('internal_group','=', 'equity')]"/>