[IMP] base: ir.ui.view inherit search during module update
[IMP] base: ir.ui.view inherit search during module update

During module update, we should only consider views of already
loaded modules. This filter is done by searching on xmlids of views.
We should also search for explicit view ids (current module is not yet
marked as loaded)

However, by doing this `OR` condition, the generated query is not
optimal and forbid postgresql to use the composite index
`ir_model_data_model_res_id_index` on `ir_model_data` table.
This is a performance issue for databases with a lot of ir_model_data rows.

Use 2 quicker search() to avoid this problem.

This only affect the module update. Normal view loading is unchanged.

dfang/odoo,dfang/odoo,ygol/odoo,dfang/odoo,ygol/odoo,ygol/odoo,dfang/odoo,ygol/odoo,hip-odoo/odoo,ygol/odoo,hip-odoo/odoo,hip-odoo/odoo,hip-odoo/odoo,ygol/odoo,dfang/odoo,hip-odoo/odoo,dfang/odoo,ygol/odoo,hip-odoo/odoo