Skip to content

Commit

Permalink
🎉 Relax!
Browse files Browse the repository at this point in the history
  • Loading branch information
yelizariev committed Mar 23, 2024
1 parent 34f52ec commit f6ade36
Show file tree
Hide file tree
Showing 13 changed files with 98 additions and 0 deletions.
5 changes: 5 additions & 0 deletions relax/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Relaxation Room

Step into the future with 3D rooms inside Odoo!

Demo: TODO
Empty file added relax/__init__.py
Empty file.
27 changes: 27 additions & 0 deletions relax/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2024 Ivan Yelizariev <https://twitter.com/yelizariev>
# License OPL-1 (https://www.odoo.com/documentation/user/14.0/legal/licenses/licenses.html#odoo-apps)
{
"name": "Relaxation Room",
"version": "16.0.1.0.0",
"author": "Ivan Yelizariev",
"license": "OPL-1",
"category": "Human Resources",
"images": ["images/oobo7.jpg"],
"website": "https://odoo-debranding.com",
"support": "[email protected]",
"depends": [],
"data": [
"views/relax_views.xml",
"data/relax_data.xml",
],
"assets": {
"web.assets_backend": [
"relax/static/src/js/relax.js",
"relax/static/src/xml/relax.xml",
"relax/static/src/scss/relax.scss",
]
},
"application": True,
"auto_install": False,
"installable": True,
}
9 changes: 9 additions & 0 deletions relax/data/relax_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!--Copyright 2024 Ivan Yelizariev <https://twitter.com/yelizariev>
License OPL-1 (https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html#odoo-apps) for derivative work.-->
<record id="relax_url" model="ir.config_parameter">
<field name="key">relax.url</field>
<field name="value">https://bucha.lamourism.com/Brodsky2023.html</field>
</record>
</odoo>
Empty file added relax/doc/src/index.html
Empty file.
1 change: 1 addition & 0 deletions relax/doc/src/info.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
slogan: Relaxation Room for your employees
Binary file added relax/images/oobo7.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added relax/static/description/icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added relax/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions relax/static/src/js/relax.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/** @odoo-module **/
import { registry } from "@web/core/registry";
import rpc from "web.rpc";

const { Component, onWillStart } = owl;

export class RelaxMenu extends Component {
setup() {
this.config = rpc.query({
model: "ir.config_parameter",
method: "get_param",
args: ["relax.url"],
});

onWillStart(async () => {
this.relax_url = await this.config;
});
}
}

RelaxMenu.template = "relax.template";

registry.category("actions").add("relax", RelaxMenu);
10 changes: 10 additions & 0 deletions relax/static/src/scss/relax.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.relax_container {
width: 100%;
height: 100%;
}

.relax_container iframe {
display: block;
height: 100vh;
width: 100vw;
}
6 changes: 6 additions & 0 deletions relax/static/src/xml/relax.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates xml:space="preserve">
<div t-name="relax.template" class="relax_container o_home_menu_background" owl="1">
<iframe t-att-src="relax_url" />
</div>
</templates>
17 changes: 17 additions & 0 deletions relax/views/relax_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--Copyright 2024 Ivan Yelizariev <https://twitter.com/yelizariev>
License OPL-1 (https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html#odoo-apps) for derivative work.-->
<odoo>
<!-- Main menu -->
<record id="relax_action_main_menu" model="ir.actions.client">
<field name="name">Relaxation Room</field>
<field name="tag">relax</field>
<field name="target">fullscreen</field>
</record>
<menuitem
id="relax_main_menu"
action="relax_action_main_menu"
web_icon="relax,static/description/icon.jpg"
sequence="1024"
/>
</odoo>

0 comments on commit f6ade36

Please sign in to comment.