OWL Odoo framework

Jeevachaithanyan Sivanandan - May 28 - - Dev Community

When we work with odoo, it is important with the namecases and caps. I spent like many hours to find out an error like below

Image description

and my code is below

export class PPPProductIdFieldInSO extends Many2OneField {
    setup() {
        super.setup();
        this.dialog = useService("dialog");
    }

}
PPPProductIdFieldInSO.template = "web.Many2OneField"

export const PPPProductIdFieldInSO = {
    ...many2OneField,
    component: PPPProductIdFieldInSO,
};

registry.category("fields").add("pppproduct_id_with_warning", PPPProductIdFieldInSO);
Enter fullscreen mode Exit fullscreen mode

and the fixed code is below

export class PPPProductIdFieldInSO extends Many2OneField {
    setup() {
        super.setup();
        this.dialog = useService("dialog");
    }

}
PPPProductIdFieldInSO.template = "web.Many2OneField"

export const pPPProductIdFieldInSO = {
    ...many2OneField,
    component: PPProductIdFieldInSO,
};

registry.category("fields").add("pppproduct_id_with_warning", pPPProductIdFieldInSO);
Enter fullscreen mode Exit fullscreen mode

can you spot the issue ? if you did so fast, then you are good but it took me a while to get into that fix.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player