I want to directly modify the website application in odoo 14. I am using web.rpc for this, in this way but I cannot find documentation to do a more refined search.
odoo.define("website.user_custom_code", function (require) {
;("use strict")
require("web.dom_ready")
rpc = require("web.rpc")
const model = "product.template"
const method = "search_read"
// Use an empty array to search for all the records
const domain = ["fields_get"]
// Use an empty array to read all the fields of the records
const fields = [] //accessoADatos.map(x => x.campo)
const options = {
model,
method,
args: [domain, fields],
}
rpc
.query(options)
.then(products => console.log(products))
.catch(err => console.error(err))
})