Skip to content

Conversation

@MatteoLeroy
Copy link

No description provided.

@robodoo
Copy link

robodoo commented Oct 27, 2025

Pull request status dashboard

Copy link

@alan-odoo alan-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MatteoLeroy 😃,

Here is a quick review of your code.

Thanks for your work!

@@ -1,10 +0,0 @@
/** @odoo-module **/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be in your PR as this file has never been merge with any deployed branch. Same for the other files you removed.

import { Component, useState } from "@odoo/owl";

export class Card extends Component {
static template = "awesome_owl.card";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, yes static template = "awesome_owl.playground"; should be static template = "awesome_owl.Playground"; this mistake is in the tutorial code and not in yours.

Suggested change
static template = "awesome_owl.card";
static template = "awesome_owl.Card";

import { Component, useState } from "@odoo/owl";

export class Counter extends Component {
static template = "awesome_owl.counter";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
static template = "awesome_owl.counter";
static template = "awesome_owl.Counter";

import { Component, useState } from "@odoo/owl";

export class TodoItem extends Component {
static template = "awesome_owl.todo_item";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
static template = "awesome_owl.todo_item";
static template = "awesome_owl.TodoItem";

import { TodoItem } from "./todo_item";

export class TodoList extends Component {
static template = "awesome_owl.todo_list";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
static template = "awesome_owl.todo_list";
static template = "awesome_owl.TodoList";

this.state.sum++;
}

static components = { Counter, Card, TodoList };

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The static fields should be placed at the the top of your class just before the methods.

};

toggleState() {
this.props.todo.isCompleted = !this.props.todo.isCompleted

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not forget ; at the end of your line. It's good js practice as it may prevent some errors.

@@ -0,0 +1,2 @@
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be in your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants