Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
15bd5fa
[ADD] estate : implement estate module and estate_property table cre…
aykhu-odoo Mar 10, 2026
52fa0f3
[IMP] estate : added access rights
aykhu-odoo Mar 11, 2026
99d70a3
[IMP] estate: added action and menu
aykhu-odoo Mar 12, 2026
53c0bc3
[IMP] estate: improved list view and form view
aykhu-odoo Mar 13, 2026
c83862c
[IMP] estate: Implemented model relations and search views
aykhu-odoo Mar 16, 2026
ff255a5
[IMP] estate: Added computed fields
aykhu-odoo Mar 24, 2026
d927193
[IMP] estate: Implemented onchange logic and validity with inverse fu…
aykhu-odoo Mar 26, 2026
2018ac5
[IMP] estate: add state transition actions with validation
aykhu-odoo Mar 30, 2026
e47d710
[IMP] estate: add offer state actions and enforce single acceptance
aykhu-odoo Mar 31, 2026
6fc1fcb
[IMP] estate: add SQL constraints for prices and uniqueness
aykhu-odoo Apr 2, 2026
cdba32e
[IMP] estate: enforce minimum selling price at 90% of expected
aykhu-odoo Apr 6, 2026
f4a48cc
[IMP] estate: ui improvements and stat button integration
aykhu-odoo Apr 8, 2026
fee412e
[IMP] estate: implement model and view inheritance
aykhu-odoo Apr 10, 2026
f00c08d
[IMP] estate: integrate accounting module and add kanban view
aykhu-odoo Apr 14, 2026
5241d27
[IMP] estate: add visit scheduling and issue reporting
aykhu-odoo Apr 23, 2026
54901bb
[IMP] estate: enhance offers workflow and UI improvements
aykhu-odoo Apr 20, 2026
5fa3a74
[IMP] awesome_owl: complete Owl component tutorial (counter, todos, c…
aykhu-odoo Apr 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions awesome_owl/static/src/card/card.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Component, useState } from "@odoo/owl";

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

setup(){
this.state = useState({
isOpen: true,
});
}

toggle() {
this.state.isOpen = !this.state.isOpen;
}

static props = {
title : String,
slots: Object,
}
}
18 changes: 18 additions & 0 deletions awesome_owl/static/src/card/card.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<templates xml:space="preserve">
<t t-name="awesome_owl.Card">
<div class="card m-3 d-inline-block shadow-sm">
<div class="card-header">
<t t-esc="props.title"/>
<button class="btn btn-secondary" t-on-click="toggle">
<t t-if="state.isOpen">Hide</t>
<t t-else="">Show</t>
</button>
</div>
<t t-if="state.isOpen">
<div class="card-body">
<t t-slot="default"/>
</div>
</t>
</div>
</t>
</templates>
16 changes: 16 additions & 0 deletions awesome_owl/static/src/counter/counter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Component, useState } from "@odoo/owl";

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

setup() {
this.state = useState({ value: 0 });
}

increment() {
this.state.value++;
if (this.props.onincrement) {
this.props.onincrement();
Comment on lines +12 to +13
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can you please enable linter -> ./addons/web/tooling/enable.sh

}
}
}
10 changes: 10 additions & 0 deletions awesome_owl/static/src/counter/counter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<templates xml:space="preserve">
<t t-name="awesome_owl.Counter">
<div class="p-3">
Counter: <t t-esc="state.value"/>
<button class="btn ms-3 bg-primary" t-on-click="increment">
Increment
</button>
</div>
</t>
</templates>
14 changes: 13 additions & 1 deletion awesome_owl/static/src/playground.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
import { Component } from "@odoo/owl";
import { Component, useState } from "@odoo/owl";
import { Counter } from "./counter/counter";
import { Card } from "./card/card";
import { TodoList } from "./todo/todo_list";

export class Playground extends Component {
static template = "awesome_owl.playground";
static components = { Counter, Card, TodoList };

setup() {
this.sum = useState({ value: 0 });
}

incrementSum() {
this.sum.value++;
}
}
13 changes: 9 additions & 4 deletions awesome_owl/static/src/playground.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">

<t t-name="awesome_owl.playground">
<Card title="'Counter Card'">
<Counter onincrement.bind="incrementSum"/>
</Card>
<div class="p-3">
hello world
<Counter onincrement.bind="incrementSum"/>
<Counter onincrement.bind="incrementSum"/>
"The sum is :" <t t-esc="sum.value"/>
</div>
<div>
<TodoList/>
</div>
</t>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unneccary diff.

</templates>
14 changes: 14 additions & 0 deletions awesome_owl/static/src/todo/todoList.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<t t-name="awesome_owl.TodoList">
Todo Input: <input type="text" name="desc" t-on-keyup="addTodo" t-model="inputValue.text" t-ref="InputValue"/>
<div>
<t t-foreach="todos" t-as="todo" t-key="todo.id">
<TodoItem
id="todo.id"
description="todo.description"
isCompleted="todo.isCompleted"
toggleTodo = "toggleTodo"
removeTodo = "removeTodo"
/>
</t>
</div>
</t>
21 changes: 21 additions & 0 deletions awesome_owl/static/src/todo/todo_item.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Component } from "@odoo/owl";

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

static props = {
id: Number,
description: String,
isCompleted: Boolean,
toggleTodo: Function,
removeTodo: Function,
};

onToggle() {
this.props.toggleTodo(this.props.id);
}

onRemove(){
this.props.removeTodo(this.props.id);
}
}
41 changes: 41 additions & 0 deletions awesome_owl/static/src/todo/todo_list.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { Component, useState} from "@odoo/owl";
import { TodoItem } from "./todo_item";
import { useAutofocus } from "../utils";

export class TodoList extends Component {
static template = "awesome_owl.TodoList";
static components = { TodoItem };

setup(){
this.inputRef = useAutofocus("InputValue")
this.todos = useState([]);
this.nextId = 1
this.inputValue = useState({ text: "" });
this.removeTodo = this.removeTodo.bind(this);
}

addTodo(ev)
{
if (ev.keyCode != 13) return
this.todos.push({
id : this.nextId++,
description : this.inputValue.text,
isCompleted : false
})
this.inputValue.text = ""
}

toggleTodo = (id) => {
const todo = this.todos.find(t => t.id == id);
if (todo) {
todo.isCompleted = !todo.isCompleted;
}
}

removeTodo(id) {
const index = this.todos.findIndex(todo => todo.id === id);
if (index !== -1) {
this.todos.splice(index, 1);
}
}
}
14 changes: 14 additions & 0 deletions awesome_owl/static/src/todo/todoitem.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<t t-name="awesome_owl.TodoItem">
<div class="ms-3" t-att-class="{
'text-muted': props.isCompleted,
'text-decoration-line-through': props.isCompleted
}">
<input type="checkbox" t-att-checked="props.isCompleted" t-on-change="onToggle"/>
<span>
id: <t t-esc="props.id"/> -
description: <t t-esc="props.description"/> -
iscompleted: <t t-esc="props.isCompleted"/>
</span>
<span role="button" class="fa fa-remove" t-on-click="onRemove" />
</div>
</t>
11 changes: 11 additions & 0 deletions awesome_owl/static/src/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { useRef, onMounted } from "@odoo/owl";

export function useAutofocus(refName) {
const ref = useRef(refName);

onMounted(() => {
ref.el.focus();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

same linting issue.

});

return ref;
}
1 change: 1 addition & 0 deletions estate/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
26 changes: 26 additions & 0 deletions estate/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
'name': "Estate",
'version': '0.1',
'summary': "Real Estate Advertisement",
'description': """
This module allows you to manage real estate advertisements, including
properties, agents, and customer inquiries.
""",
'author': "aykhu",
'license': 'LGPL-3',
'website': "https://www.odoo.com/app/estate",
'category': 'Tutorials',
'application': True,
'depends': ['base', 'calendar', 'mail'],
'data': [
'security/ir.model.access.csv',
'views/estate_property_issue_views.xml',
'views/estate_property_visit_views.xml',
'views/estate_property_views.xml',
'views/estate_property_offer_views.xml',
'views/estate_property_type_views.xml',
'views/estate_property_tag_views.xml',
'views/estate_menus.xml',
'views/res_users_views.xml',
],
}
7 changes: 7 additions & 0 deletions estate/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from . import estate_property
from . import estate_property_type
from . import estate_property_tag
from . import estate_property_offer
from . import res_users
from . import estate_property_visit
from . import estate_property_issues
Loading