odoo/industry#1909

Created by fw-bot
Merged at cd345f8cdf2c3aa0baa6f98362e041a6307bf8e6

Statuses:

label
odoo-dev:saas-18.4-saas-18.2-replace-regex-with-ast-vava-511900-fw
head
4f223d8cff2ea3ce3d1030fbafa60bde975171b1
merged
4 days ago by Industry, Vallaeys Valentin (vava)
odoo/industry
saas-18.2 #1894
saas-18.3 #1906
saas-18.4 #1909
19.0 #1919
saas-19.1 #1926
saas-19.2 #1927
master #1928

[FIX] test_generic: improve test using ast instead of regex

There is a test ensuring that there is no use of search([...]).id
without adding a limit=1 (or using .ids). This test was relying on a
complicated regex. This commit improves the test by relying on ast and
corrects remaining occurrences that were not raised by previous version
of the test.

opw-6037120

Forward-Port-Of: #1906
Forward-Port-Of: #1894