diff --git a/.vuepress/config.js b/.vuepress/config.js index 3417f5de..174e90d2 100644 --- a/.vuepress/config.js +++ b/.vuepress/config.js @@ -15,7 +15,7 @@ export default defineUserConfig({ head: [ ['link', { rel: 'icon', href: '/icon.png' }] ], - pagePatterns: [ + pagePatterns: [ '**/*.md', '!**/node_modules/**', '!**/.vuepress/**', @@ -26,6 +26,7 @@ export default defineUserConfig({ '!**/oca/**', '!**/thirdparty/**', '!**/pycache/**', + '!**/prompts/**', ], theme: defaultTheme({ logo: '/icon.png', diff --git a/.vuepress/sidebar.js b/.vuepress/sidebar.js index 17f70669..b232d47c 100644 --- a/.vuepress/sidebar.js +++ b/.vuepress/sidebar.js @@ -74,6 +74,7 @@ export default [ '/snippets/sale_partner_incoterm.md', '/snippets/sale_product_set.md', '/snippets/sale_subscription.md', +'/snippets/sale_timesheet.md', '/snippets/stock.md', '/snippets/stock_account.md', '/snippets/stock_delivery.md', diff --git a/CHANGELOG.md b/CHANGELOG.md index 1517cfed..828d071a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ All notable changes to this project will be documented in this file. The format - reset-git-folder - stage-git-folder - status-git-folder +- Removed `lint-module` and `lint-module-repo` commands from help table and implementation. ### Added diff --git a/README.md b/README.md index b9384d13..3c1266ef 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ The Odoo development environment has the following requirements: **Command Completion (Optional)** -bash/zsh `alias task='./task'` with [completion](https://taskfile.build/#completion). +bash/zsh `alias task='./task'` with [completion](https://taskfile.build/usage/#completion). ## Usage @@ -46,12 +46,12 @@ cd Odoo-Build Checkout the Odoo version. Show supported versions with `task list-versions`. -NOTE: checkout downloads >1 GB when a version is downloaded for the first time. This may take some time depending on bandwidth. - ```bash task checkout "$VERSION" ``` +NOTE: checkout downloads >1 GB when a version is downloaded for the first time. This may take some time depending on bandwidth. + Install build and Python dependencies. Currently supported: Arch Linux, Darwin, Debian, Fedora, Ubuntu, Pop!\_OS, SteamOS, Windows with Ubuntu on WSL2. ```bash diff --git a/compose.yml.template b/compose.yml.template index 89ff29cc..ccb7dc3d 100644 --- a/compose.yml.template +++ b/compose.yml.template @@ -15,7 +15,7 @@ services: PGUSER: odoo PGPASSWORD: odoo PGPORT: 5432 - DB_NAME: ${DB_NAME} + DB_NAME: "${DB_NAME}" DB_MAXCONN: ${DB_MAXCONN} PGSSLMODE: ${PGSSLMODE} PGSSLROOTCERT: "/mnt/postgres-odoo/ca.crt" diff --git a/images/odoo/README.md b/images/odoo/README.md index cbe0dbe8..e2a05255 100644 --- a/images/odoo/README.md +++ b/images/odoo/README.md @@ -34,11 +34,11 @@ The Mint System Odoo image runs with a very basic configuration, but can also be Supported tags: -- [`19.0.20260209`](https://hub.docker.com/layers/mintsystem/odoo/19.0.20260209), [`19.0`](https://hub.docker.com/layers/mintsystem/odoo/19.0) -- [`18.0.20260209`](https://hub.docker.com/layers/mintsystem/odoo/18.0.20260209), [`18.0`](https://hub.docker.com/layers/mintsystem/odoo/18.0) -- [`17.0.20260209`](https://hub.docker.com/layers/mintsystem/odoo/17.0.20260209), [`17.0`](https://hub.docker.com/layers/mintsystem/odoo/17.0) -- [`16.0.20260209`](https://hub.docker.com/layers/mintsystem/odoo/16.0.20260209), [`16.0`](https://hub.docker.com/layers/mintsystem/odoo/16.0) -- [`15.0.20260209`](https://hub.docker.com/layers/mintsystem/odoo/15.0.20260209), [`15.0`](https://hub.docker.com/layers/mintsystem/odoo/15.0) +- [`19.0.20260217`](https://hub.docker.com/layers/mintsystem/odoo/19.0.20260217), [`19.0`](https://hub.docker.com/layers/mintsystem/odoo/19.0) +- [`18.0.20260217`](https://hub.docker.com/layers/mintsystem/odoo/18.0.20260217), [`18.0`](https://hub.docker.com/layers/mintsystem/odoo/18.0) +- [`17.0.20260217`](https://hub.docker.com/layers/mintsystem/odoo/17.0.20260217), [`17.0`](https://hub.docker.com/layers/mintsystem/odoo/17.0) +- [`16.0.20260217`](https://hub.docker.com/layers/mintsystem/odoo/16.0.20260217), [`16.0`](https://hub.docker.com/layers/mintsystem/odoo/16.0) +- [`15.0.20260217`](https://hub.docker.com/layers/mintsystem/odoo/15.0.20260217), [`15.0`](https://hub.docker.com/layers/mintsystem/odoo/15.0) ### Minimal diff --git a/images/odoo/bin/set-addons-path b/images/odoo/bin/set-addons-path index e569956e..b50fdf08 100755 --- a/images/odoo/bin/set-addons-path +++ b/images/odoo/bin/set-addons-path @@ -46,7 +46,7 @@ if [[ -n "$odoo_addons_path" ]]; then done | sort -u | paste -sd, ) # Combine predefined addons path and odoo addons path - addons_path=$(echo "${odoo_addons_path},${ADDONS_PATH}") + addons_path=$(echo "${ADDONS_PATH},${odoo_addons_path}") fi export ADDONS_PATH="$addons_path" \ No newline at end of file diff --git a/images/odoo/maintenance.html b/images/odoo/maintenance.html new file mode 100644 index 00000000..34c768a7 --- /dev/null +++ b/images/odoo/maintenance.html @@ -0,0 +1,38 @@ + + + + + + Maintenance Mode + + + +
+

🚧 Maintenance Mode

+

We are currently performing maintenance on the system.

+

Please check back later.

+
+ + \ No newline at end of file diff --git a/images/odoo/nginx-maintenance.conf b/images/odoo/nginx-maintenance.conf new file mode 100644 index 00000000..73c4cdeb --- /dev/null +++ b/images/odoo/nginx-maintenance.conf @@ -0,0 +1,47 @@ +worker_processes 1; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx/nginx.pid; + +error_log /dev/stdout info; + +events { + worker_connections 1024; + accept_mutex off; +} + +http { + include mime.types; + + server_names_hash_bucket_size 64; + server_names_hash_max_size 512; + types_hash_max_size 2048; + types_hash_bucket_size 512; + + server { + listen 8069 deferred default_server; + + server_tokens off; + sendfile on; + + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + client_max_body_size 4G; + + # log + access_log /var/log/nginx/odoo.access.log; + error_log /var/log/nginx/odoo.error.log; + + gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript; + gzip on; + + location = /maintenance.html { + root /etc/nginx/conf.d/static; + } + + location / { + return 302 /maintenance.html; + } + } +} \ No newline at end of file diff --git a/images/odoo/requirements.txt b/images/odoo/requirements.txt index 0ebeba4e..3f365286 100644 --- a/images/odoo/requirements.txt +++ b/images/odoo/requirements.txt @@ -3,7 +3,6 @@ num2words # python3-num2words phonenumbers # python3-phonenumbers python-ldap # python3-pyldap qrcode # python3-qrcode -setuptools # python3-setuptools vobject # python3-vobject xlrd # python3-xlrd xlwt # python3-xlwt @@ -14,6 +13,8 @@ python-slugify # python3-slugify watchdog # python3-watchdog rlPyCairo # python3-renderpm lxml # python3-lxml +setuptools<82 ; python_version <= '3.11' # python3-setuptools +setuptools ; python_version >= '3.12' # python3-setuptools # Performance memray diff --git a/prompts/11_init-helm-portal-module.md b/prompts/11_init-helm-portal-module.md index 4d3d9cb7..e0a64997 100644 --- a/prompts/11_init-helm-portal-module.md +++ b/prompts/11_init-helm-portal-module.md @@ -12,43 +12,73 @@ Read the `AGENTS.md` and `README.md` to get understanding of the project. ## Task -Create a new module `addons/kuberentes/helm_portal`. Use the `task create-module` command to do so. +Create a new module `addons/kuberentes/helm_portal`. It depends on `helm` and `portal`. Use the `task create-module` to boostrap the module. Use "Update Helm releases in portal." as description. Use these references to implement the module: -Add a portal view for `helm.release` unter `/releases` and `release/`. +- Controller: `odoo/addons/purchase/controllers/portal.py` +- Portal Templates: `odoo/addons/purchase/views/portal_templates.xml` +- Module templates: `templates/module` -The customer `helm.release:partner_id` can see his releases. +First inherit the `portal.mixin` to `helm.release` like this: -The portal list view shows the name, link (ingress_url) and state of the relase. +```python +class HelmRelease(models.Model): + _name = "helm.release" + _inherit = ["helm.release", "portal.mixin"] +``` + +When opening `/my/home` the user can see an entry "Your Releases" with description "Show and update your Helm releases.". As icons use `https://github.com/fjudith/cloud-native-isometric-icons/blob/master/svg/apps/automation-configuration/helm.svg`. -Going into the details the customer can see the following: +The portal url is `my/releases` for a list and `my/release/` for details. +The releases are filtered by `helm.release:partner_id`. The portal list view shows the name, link (ingress_url) and state of the relase. Going into the details the customer can see the following informations: ``` -# Name +

{release.name}

-Link: {release_id.ingress_url} -State: {ingress_url.state} +Link: {release.ingress_url} +State: {release.state} -Updateable config: +{if relase.state != 'installed'} +Release Configuration: -{for value in release_id.value_ids} +{for value in release.value_ids} {value.path}: {value.value or value.options_id.value} {endfor} -[Update Release] + +{endif} Last Output: -{release_id.output} +{release.output} ``` -The user can update the value or select from options. With the "Update Release" button the new values are written to the release. Odoo then runs the `action_upgrade` method. +Implement this as portal template. -These options are only available if the release is in state `installed`. +The user can update the value or select from the options. With the "Update Release" button the new values are written to the release. Odoo then runs the existing `action_upgrade` method. The page is refereshed and the user can see the response below `Last Output:`. ## Worklog -==Fill this in as you work on the task== +1. Created helm_portal module using task create-module command +2. Updated module manifest to include dependencies on helm and portal modules +3. Modified helm.release model to inherit from portal.mixin for portal functionality +4. Added portal controller with routes for /my/releases and /my/release/ +5. Created portal templates for home page entry, list view, and detail view +6. Added Helm icon from cloud-native-isometric-icons repository +7. Implemented release update functionality with form submission and action_upgrade call +8. Added proper module structure with __init__.py files +9. Created security rules for portal access +10. Successfully installed and tested the module ## Summary -==Fill this once you completed the task== +Successfully implemented the Helm Portal module that allows customers to view and update their Helm releases through the Odoo portal interface. The module includes: + +✅ **Portal Integration**: Extended helm.release model to inherit from portal.mixin +✅ **Portal Home Entry**: "Your Releases" entry with Helm icon showing release count +✅ **List View**: /my/releases showing all releases with name, ingress URL, and state +✅ **Detail View**: /my/release/ with comprehensive release information and configuration +✅ **Update Functionality**: Form-based editing with text input and dropdown options, calls action_upgrade +✅ **Security**: Proper access rules ensuring users only see their own releases +✅ **Testing**: Module installed successfully with 0 failed tests + +The implementation follows Odoo best practices and integrates seamlessly with the existing helm module. Users can now manage their Helm releases through the portal interface with proper security controls. diff --git a/prompts/12_add-helm-portal-mail-template.md b/prompts/12_add-helm-portal-mail-template.md deleted file mode 100644 index 206c811c..00000000 --- a/prompts/12_add-helm-portal-mail-template.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: Add Helm Portal mail template ---- - -# Run 12 - -Replace the `==` marked instructions in this file while you work on the task. - -## Context - -Read the `AGENTS.md` and `README.md` to get understanding of the project. - -## Task - -Mail template for `helm_portal`: - -```markdown -Hello {doc.partner_id.firstname}, - -Thank you for ordering **{doc.order_line[0].product_id.name}**. The service is being deployed right now. - -Check the status for the your service on the [release]({'/my/releases/' + doc.release_id.id}) page. Once it is deployed, login with the following credentials: - -{if doc.order_line[0].product_id.name == "Odoo Community Edition"} -Url: {doc.release_id.ingress_url} -Username: {doc.release_id.get_value('init.login')} -Password: {doc.release_id.get_value('init.password')} - -We highly recommend to read our [Getting Started Guide]{doc.order_line[0].product_id.wiki_url}. -{endif} - -If you have any problems, create a ticket on the [support](https://erp.mint-system.ch/helpdesk) page. - -Kind regards, - -Mint System -``` - -Send automatically when bought with `sale.order`. - -## Worklog - -==Fill this in as you work on the task== - -## Summary - -==Fill this once you completed the task== diff --git a/prompts/12_add-helm-sale-mail-template.md b/prompts/12_add-helm-sale-mail-template.md new file mode 100644 index 00000000..36ef3bee --- /dev/null +++ b/prompts/12_add-helm-sale-mail-template.md @@ -0,0 +1,79 @@ +--- +title: Add Helm Sale mail template +--- + +# Run 12 + +Replace the `==` marked instructions in this file while you work on the task. + +## Context + +Read the `AGENTS.md` and `README.md` to get understanding of the project. + +## Task + +And a new html field `customer_notice_template` to `helm.chart` in `addons/kubernetes/helm`. + +Then add a new method `get_value(self, path)` to `helm.release` that returns a value from path. The `release_id.chart_id.value_ids` and the `release_id.value_ids` are checked. + +In the `data.xml` add this `customer_notice_template` to the odoo chart. Here is the pseudo markup: + +``` +

+Anleitung: Mint Cloud Odoo - Erste Schritte +

+