Its My JS code
/** @odoo-module **/
import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen";
import { patch } from "@web/core/utils/patch";
import { useService } from "@web/core/utils/hooks";
patch(ProductScreen.prototype, {
setup() {
super.setup();
this.orm = useService("orm");
},
async onMounted() {
const value = await this.orm.call("product.pricelist", "get_mrp");
console.log(value);
console.log(value.name);
},
});
Is MY py file
from odoo import fields, models, api
class Pricelist(models.Model):
_inherit = "product.pricelist"
@api.model
def get_mrp(self):
return self.env['product.pricelist'].search([], limit=1)
I am tryong to get all field of single row from db
but when i execute the code the output is :
product.pricelist(2,) point_of_sale.assets_prod.min.js
undefined point_of_sale.assets_prod.min.js
Can Anyone help how to fit all data in to variable value ??