DEV Community

Jeevachaithanyan Sivanandan
Jeevachaithanyan Sivanandan

Posted on

2

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.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

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?

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay