-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[ADD] awesome_owl module #1009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 18.0
Are you sure you want to change the base?
[ADD] awesome_owl module #1009
Conversation
alan-odoo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @@ -1,10 +0,0 @@ | |||
| /** @odoo-module **/ | |||
|
|
|||
There was a problem hiding this comment.
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.
awesome_owl/static/src/card/card.js
Outdated
| import { Component, useState } from "@odoo/owl"; | ||
|
|
||
| export class Card extends Component { | ||
| static template = "awesome_owl.card"; |
There was a problem hiding this comment.
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.
| 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"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| static template = "awesome_owl.todo_list"; | |
| static template = "awesome_owl.TodoList"; |
awesome_owl/static/src/playground.js
Outdated
| this.state.sum++; | ||
| } | ||
|
|
||
| static components = { Counter, Card, TodoList }; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 @@ | |||
| { | |||
There was a problem hiding this comment.
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.

No description provided.