Skip to content
Draft
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
987e6c2
[ADD] estate: initial module setup and ORM configuration
radet-odoo Dec 31, 2025
a94c3cd
[ADD] estate: add access rights for user groups
radet-odoo Dec 31, 2025
8a7b04c
[ADD] estate: add UI actions, menus and defaults
radet-odoo Jan 1, 2026
3981aa4
[FIX] runbot: fix checkpoints error
radet-odoo Jan 1, 2026
0bee4ea
[IMP] estate: add custom list, form, and search views
radet-odoo Jan 2, 2026
464369e
[IMP] Add many2one relation between two tables
radet-odoo Jan 5, 2026
359d3d5
[IMP] estate: add many2many and one2many relations to properties
radet-odoo Jan 6, 2026
9d74e9c
[IMP] estate: computed fields and onchanges
radet-odoo Jan 7, 2026
163c6d9
[IMP] estate: add action buttons for property and offer states
radet-odoo Jan 7, 2026
dff1b27
[IMP] estate: enforce business rules using constraints
radet-odoo Jan 8, 2026
6bef477
[IMP] estate: improve UI with inline views and widgets
radet-odoo Jan 9, 2026
5bb4895
[IMP] estate: enhance UI with views and visual cues
radet-odoo Jan 12, 2026
a8b4338
[IMP] estate: add inheritance and core business rules
radet-odoo Jan 15, 2026
dadd893
[ADD] estate_account: integrate invoicing on property sale
radet-odoo Jan 19, 2026
1f06294
[IMP] estate: add kanban view for properties
radet-odoo Jan 20, 2026
53bd7f4
[ADD] awesome_owl: add Owl component examples in playground
radet-odoo Jan 23, 2026
460982a
[ADD] awesome_owl: counters callbacks and todo list examples
radet-odoo Jan 29, 2026
0865c83
[ADD] awesome_owl: generic Card with slots and toggle
radet-odoo Feb 2, 2026
e7d363e
[ADD] awesome_dashboard: navigation buttons and dashboard items
radet-odoo Feb 5, 2026
cbc433d
[IMP] awesome_dashboard: statistics, caching, charts
radet-odoo Feb 9, 2026
2ff80f3
[IMP] awesome_dashboard: lazy, generic & extensible dashboard
radet-odoo Feb 11, 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
27 changes: 27 additions & 0 deletions awesome_dashboard/static/src/dashboard.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,35 @@
import { Component } from "@odoo/owl";
import { registry } from "@web/core/registry";
import { Layout } from "@web/search/layout";
import { useService } from "@web/core/utils/hooks";
import { DashboardItem } from "./dashboard_item/dashboard_item";

class AwesomeDashboard extends Component {
static template = "awesome_dashboard.AwesomeDashboard";
static components = { Layout, DashboardItem };

setup() {
this.action = useService("action");
this.display = {
controlPanel: {},
};
}

openCustomerView() {
this.action.doAction("base.action_partner_form");
}

openLeads() {
this.action.doAction({
type: "ir.actions.act_window",
name: "All leads",
res_model: "crm.lead",
views: [
[false, "list"],
[false, "form"],
],
});
}
}

registry.category("actions").add("awesome_dashboard.dashboard", AwesomeDashboard);
3 changes: 3 additions & 0 deletions awesome_dashboard/static/src/dashboard.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.o_dashboard {
background-color: black;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should be One empty line at EOF.

18 changes: 17 additions & 1 deletion awesome_dashboard/static/src/dashboard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,23 @@
<templates xml:space="preserve">

<t t-name="awesome_dashboard.AwesomeDashboard">
hello dashboard
<Layout display="display" className="'o_dashboard h-100'">
<t t-set-slot="layout-buttons">
<button class="btn btn-primary" t-on-click="openCustomerView">Customers</button>
<button class="btn btn-primary" t-on-click="openLeads">Leads</button>
</t>
<div class="d-flex flex-wrap">
<DashboardItem>
some content
</DashboardItem>
<DashboardItem size="2">
I love milk
</DashboardItem>
<DashboardItem>
some content
</DashboardItem>
</div>
</Layout>
</t>

</templates>
18 changes: 18 additions & 0 deletions awesome_dashboard/static/src/dashboard_item/dashboard_item.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Component } from "@odoo/owl";

export class DashboardItem extends Component {
static template = "awesome_dashboard.DashboardItem"
static props = {
slots: {
type: Object,
shape: {
default: Object
},
},
size: {
type: Number,
default: 1,
optional: true,
},
};
}
10 changes: 10 additions & 0 deletions awesome_dashboard/static/src/dashboard_item/dashboard_item.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="awesome_dashboard.DashboardItem">
<div class="card m-2 border-dark" t-attf-style="width: {{18*props.size}}rem;">
<div class="card-body">
<t t-slot="default"/>
</div>
</div>
</t>
</templates>
22 changes: 22 additions & 0 deletions awesome_owl/static/src/card/card.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Component, useState } from "@odoo/owl";

export class Card extends Component {
static template = "awesome_owl.Card";
static props = {
title: String,
slots: {
type: Object,
shape: {
default: true
},
},
};

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

toggleContent() {
this.state.isOpen = !this.state.isOpen;
}
}
19 changes: 19 additions & 0 deletions awesome_owl/static/src/card/card.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="awesome_owl.Card">
<div class="card d-inline-block m-2" style="width: 18rem;">
<div class="card-body">
<h5 class="card-title">
<t t-out="props.title"/>
<button class="btn" t-on-click="toggleContent">
<t t-if="state.isOpen">Hide</t>
<t t-else="">Show</t>
</button>
</h5>
<p class="card-text" t-if="state.isOpen">
<t t-slot="default"/>
</p>
</div>
</div>
</t>
</templates>
17 changes: 17 additions & 0 deletions awesome_owl/static/src/counter/counter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Component, useState } from "@odoo/owl";

export class Counter extends Component {
static template = "awesome_owl.Counter";
static props = {
onChange: { type: Function, optional: true }
};

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

increment() {
this.state.value = this.state.value + 1;
this.props.onChange && this.props.onChange()
}
}
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 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="awesome_owl.Counter">
<div class="m-2 border d-inline-block">
<button class="btn btn-primary bg-success-subtle" t-on-click="increment">
Pressed <t t-esc="state.value"/> Times
</button>
</div>
</t>
</templates>
17 changes: 16 additions & 1 deletion awesome_owl/static/src/playground.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
import { Component } from "@odoo/owl";
import { Component, markup, useState } from "@odoo/owl";
import { Counter } from "./counter/counter"
import { Card } from "./card/card";
import { TodoList } from "./todo_list/todo_list"

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

setup() {
this.str1 = "<div class='text-primary'>some content</div>";
this.str2 = markup("<div class='text-primary'>some content</div>");
this.sum = useState({ value: 0 })
this.incrementSum = this.incrementSum.bind(this);
}

incrementSum() {
this.sum.value += 1
}
}
12 changes: 12 additions & 0 deletions awesome_owl/static/src/playground.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
<t t-name="awesome_owl.playground">
<div class="p-3">
hello world
<div>
<Counter onChange="incrementSum" />
<Counter onChange="incrementSum" />
<p>Sum is: <t t-esc="sum.value"/></p>
</div>
<div>
<Card title="'card 1'">content of card 1</Card>
<Card title="'card 2'">
Please Click ME!<Counter />
</Card>
</div>
<TodoList/>
</div>
</t>

Expand Down
21 changes: 21 additions & 0 deletions awesome_owl/static/src/todo_list/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 = {
todo: {
type: Object,
shape: { id: Number, description: String, isCompleted: Boolean }
},
toggleState: Function,
removeTodo: Function
};

onChange() {
this.props.toggleState(this.props.todo.id)
}

onDelete() {
this.props.removeTodo(this.props.todo.id);
}
}
13 changes: 13 additions & 0 deletions awesome_owl/static/src/todo_list/todo_item.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="awesome_owl.TodoItem">
<div class="form-check">
<input class="form-check-input" type="checkbox" t-att-id="props.todo.id" t-att-checked="props.todo.isCompleted" t-on-change="onChange"/>
<label t-att-for="props.todo.id" t-att-class="props.todo.isCompleted ? 'text-decoration-line-through text-muted' : '' ">
<t t-esc="props.todo.id"/>.
<t t-esc="props.todo.description"/>
</label>
<span class="fa fa-remove ms-3 text-danger" t-on-click="onDelete"/>
</div>
</t>
</templates>
36 changes: 36 additions & 0 deletions awesome_owl/static/src/todo_list/todo_list.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { Component, useState, useRef } 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.todos = useState([])
this.id = 1
this.inputRef = useRef("input");
useAutofocus(this.inputRef);
this.removeTodo = this.removeTodo.bind(this)
}

addTodo(e){
if (e.keyCode === 13 && e.target.value.trim()) {
this.todos.push({
id: this.id++,
description: e.target.value,
isCompleted: false
});
e.target.value = "";
}
}

toggleState(id) {
const todo = this.todos.find(todo => todo.id === id)
todo.isCompleted = !todo.isCompleted
}

removeTodo(id) {
this.todos.splice(this.todos.findIndex((todo) => todo.id === id), 1)
}
}
12 changes: 12 additions & 0 deletions awesome_owl/static/src/todo_list/todo_list.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<t t-name="awesome_owl.TodoList">
<h2>Todo List</h2>
<div class="d-inline-block border p-2 m-2">
<input type="text" placeholder="Enter a new task" t-on-keyup="addTodo" t-ref="input" />
<t t-foreach="todos" t-as="todo" t-key="todo.id">
<TodoItem todo="todo" toggleState.bind="toggleState" removeTodo="removeTodo"/>
</t>
</div>
</t>
</templates>
9 changes: 9 additions & 0 deletions awesome_owl/static/src/utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { onMounted } from "@odoo/owl";

export function useAutofocus(ref) {
onMounted(() => {
if (ref.el) {
ref.el.focus();
}
});
}
1 change: 1 addition & 0 deletions estate/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
i18n/
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
19 changes: 19 additions & 0 deletions estate/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
'name': 'Real Estate',
'category': 'Real Estate',
'version': '1.0',
'author': 'Radhey Detroja(RADET)',
'license': 'LGPL-3',
'summary': 'Manage real estate properties',
'depends': ['base', 'mail'],
'application': True,
'data': [
'security/ir.model.access.csv',
'views/estate_property_views.xml',
'views/estate_property_offer_views.xml',
'views/estate_property_type_views.xml',
'views/estate_property_tag_views.xml',
'views/res_users_views.xml',
'views/estate_menus.xml',
]
}
5 changes: 5 additions & 0 deletions estate/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from . import estate_property
from . import estate_property_type
from . import estate_property_tag
from . import estate_property_offer
from . import res_users
Loading