DEV Community

Jeevachaithanyan Sivanandan
Jeevachaithanyan Sivanandan

Posted on

OWL Odoo framework

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.

Top comments (1)

Collapse
 
zainab8585 profile image
zainab8585

how to leanr or study to become odoo frontend js developer?
what is roadmap to become odoo js dev?