first commit
This commit is contained in:
commit
e4f9c786a3
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
*.py[cod]
|
||||||
|
__pycache__/
|
||||||
|
*.log
|
||||||
27
README.md
Normal file
27
README.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# Aartha Labs Odoo 17
|
||||||
|
|
||||||
|
Local Odoo 17 environment with PostgreSQL and a mounted custom theme module.
|
||||||
|
|
||||||
|
## Start
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
Open <http://localhost:8069>, create a database, then enable developer mode.
|
||||||
|
Open **Apps**, select **Update Apps List**, remove the default Apps filter, and
|
||||||
|
install **Aartha Labs Website Theme**.
|
||||||
|
|
||||||
|
Theme files are under `addons/theme_aarthalabs`. The main stylesheet is
|
||||||
|
`static/src/scss/theme.scss`.
|
||||||
|
|
||||||
|
## Useful commands
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
docker compose logs -f odoo
|
||||||
|
docker compose stop
|
||||||
|
docker compose down
|
||||||
|
```
|
||||||
|
|
||||||
|
`docker compose down` preserves the named database and Odoo volumes. Add `-v`
|
||||||
|
only when you intentionally want to delete all local Odoo data.
|
||||||
15
addons/README.md
Normal file
15
addons/README.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Custom Odoo addons
|
||||||
|
|
||||||
|
Place custom Odoo 17 modules in this directory. It is mounted in the Odoo
|
||||||
|
container at `/mnt/extra-addons`.
|
||||||
|
|
||||||
|
After changing Python or XML files, restart Odoo and upgrade the module:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
docker compose restart odoo
|
||||||
|
docker compose exec odoo odoo -c /etc/odoo/odoo.conf -d <database> -u theme_aarthalabs --stop-after-init
|
||||||
|
docker compose up -d odoo
|
||||||
|
```
|
||||||
|
|
||||||
|
SCSS and JavaScript assets normally reload automatically because the Compose
|
||||||
|
service starts Odoo with `--dev=all`.
|
||||||
1
addons/theme_aarthalabs/__init__.py
Normal file
1
addons/theme_aarthalabs/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
# Theme modules do not require Python initialization code.
|
||||||
19
addons/theme_aarthalabs/__manifest__.py
Normal file
19
addons/theme_aarthalabs/__manifest__.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "Aartha Labs Website Theme",
|
||||||
|
"summary": "Custom website theme for Aartha Labs",
|
||||||
|
"version": "17.0.1.0.0",
|
||||||
|
"category": "Theme/Corporate",
|
||||||
|
"license": "LGPL-3",
|
||||||
|
"author": "Aartha Labs",
|
||||||
|
"depends": ["website"],
|
||||||
|
"data": [
|
||||||
|
"views/templates.xml",
|
||||||
|
],
|
||||||
|
"assets": {
|
||||||
|
"web.assets_frontend": [
|
||||||
|
"theme_aarthalabs/static/src/scss/theme.scss",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
"application": False,
|
||||||
|
"installable": True,
|
||||||
|
}
|
||||||
32
addons/theme_aarthalabs/static/src/scss/theme.scss
Normal file
32
addons/theme_aarthalabs/static/src/scss/theme.scss
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
// Aartha Labs brand tokens. Update these first when adapting the theme.
|
||||||
|
$aartha-primary: #2457d6;
|
||||||
|
$aartha-secondary: #16223a;
|
||||||
|
$aartha-accent: #35c2a1;
|
||||||
|
$aartha-surface: #f6f8fc;
|
||||||
|
|
||||||
|
.aartha-theme {
|
||||||
|
color: $aartha-secondary;
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
background-color: $aartha-primary;
|
||||||
|
border-color: $aartha-primary;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
background-color: darken($aartha-primary, 8%);
|
||||||
|
border-color: darken($aartha-primary, 8%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not(.btn) {
|
||||||
|
color: $aartha-primary;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-aartha-surface {
|
||||||
|
background-color: $aartha-surface;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-aartha-accent {
|
||||||
|
color: $aartha-accent;
|
||||||
|
}
|
||||||
|
}
|
||||||
8
addons/theme_aarthalabs/views/templates.xml
Normal file
8
addons/theme_aarthalabs/views/templates.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<odoo>
|
||||||
|
<template id="layout" inherit_id="website.layout" name="Aartha Labs Layout">
|
||||||
|
<xpath expr="//body" position="attributes">
|
||||||
|
<attribute name="class" add="aartha-theme" separator=" "/>
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
|
</odoo>
|
||||||
5
config/odoo.conf
Normal file
5
config/odoo.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[options]
|
||||||
|
addons_path = /usr/lib/python3/dist-packages/odoo/addons,/mnt/extra-addons
|
||||||
|
data_dir = /var/lib/odoo
|
||||||
|
proxy_mode = False
|
||||||
|
without_demo = False
|
||||||
44
docker-compose.yml
Normal file
44
docker-compose.yml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
name: aarthalabs-odoo17
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: postgres:15-alpine
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: postgres
|
||||||
|
POSTGRES_USER: odoo
|
||||||
|
POSTGRES_PASSWORD: odoo
|
||||||
|
volumes:
|
||||||
|
- postgres-data:/var/lib/postgresql/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U odoo -d postgres"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
|
odoo:
|
||||||
|
image: odoo:17.0
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
ports:
|
||||||
|
- "8069:8069"
|
||||||
|
environment:
|
||||||
|
HOST: db
|
||||||
|
PORT: 5432
|
||||||
|
USER: odoo
|
||||||
|
PASSWORD: odoo
|
||||||
|
command:
|
||||||
|
- odoo
|
||||||
|
- --config=/etc/odoo/odoo.conf
|
||||||
|
- --admin-passwd=change-me
|
||||||
|
- --dev=all
|
||||||
|
volumes:
|
||||||
|
- odoo-data:/var/lib/odoo
|
||||||
|
- ./config/odoo.conf:/etc/odoo/odoo.conf:ro
|
||||||
|
- ./addons:/mnt/extra-addons
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
postgres-data:
|
||||||
|
odoo-data:
|
||||||
Loading…
x
Reference in New Issue
Block a user