Compare commits
2 Commits
16.0
...
0e70d3ea80
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0e70d3ea80 | ||
|
|
ea255c184e |
@@ -1,42 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Run the Python tests of the given Odoo modules.
|
|
||||||
#
|
|
||||||
# This script is meant to be executed *inside* an Elabore doodba image
|
|
||||||
# (docker.0k.io/mirror/odoo:rc_<version>-ELABORE-LIGHT), with a
|
|
||||||
# PostgreSQL service reachable at $PGHOST. The modules under test are
|
|
||||||
# read from the current working directory (the checked-out repository),
|
|
||||||
# which is prepended to the addons path so that the PR's code takes
|
|
||||||
# precedence over the modules already baked in the image.
|
|
||||||
#
|
|
||||||
# Usage: odoo-tests.sh <module1,module2,...>
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
modules="${1:?usage: odoo-tests.sh <module1,module2,...>}"
|
|
||||||
|
|
||||||
export PGHOST=postgres
|
|
||||||
export PGUSER=odoo
|
|
||||||
export PGPASSWORD=odoopassword
|
|
||||||
export PGDATABASE="test_$(basename "$PWD" | tr '.-' '__')"
|
|
||||||
export WITHOUT_DEMO=all
|
|
||||||
export DB_FILTER='.*'
|
|
||||||
|
|
||||||
# Generate /opt/odoo/auto/odoo.conf from the environment and wait for
|
|
||||||
# the database to accept connections.
|
|
||||||
/opt/odoo/common/entrypoint
|
|
||||||
|
|
||||||
# Odoo test-tags format: "/module1,/module2" (one leading slash).
|
|
||||||
tags="/$(echo "$modules" | tr ',' ',/')"
|
|
||||||
|
|
||||||
exec odoo \
|
|
||||||
--config=/opt/odoo/auto/odoo.conf \
|
|
||||||
--max-cron-threads=0 \
|
|
||||||
--limit-time-real=10000 \
|
|
||||||
--workers=0 \
|
|
||||||
--test-enable \
|
|
||||||
--stop-after-init \
|
|
||||||
--addons-path="$PWD,/opt/odoo/auto/addons" \
|
|
||||||
-d "$PGDATABASE" \
|
|
||||||
-i "$modules" \
|
|
||||||
--test-tags "$tags"
|
|
||||||
@@ -2,6 +2,8 @@ name: pre-commit
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "16.0*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pre-commit:
|
pre-commit:
|
||||||
@@ -13,10 +15,10 @@ jobs:
|
|||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
- name: Get python version
|
- name: Get python version
|
||||||
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||||
- uses: https://gitea.com/actions/cache@v3
|
# - uses: actions/cache@v4
|
||||||
with:
|
# with:
|
||||||
path: ~/.cache/pre-commit
|
# path: ~/.cache/pre-commit
|
||||||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
# key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||||
- name: Install pre-commit
|
- name: Install pre-commit
|
||||||
run: pip install pre-commit
|
run: pip install pre-commit
|
||||||
- name: Run pre-commit
|
- name: Run pre-commit
|
||||||
|
|||||||
@@ -1,79 +0,0 @@
|
|||||||
name: tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- "16.0*"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: odoo-ci
|
|
||||||
container:
|
|
||||||
image: docker.0k.io/mirror/odoo:rc_16.0-ELABORE-LIGHT
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: docker.0k.io/postgres:17.2.0-myc
|
|
||||||
env:
|
|
||||||
POSTGRES_USER: odoo
|
|
||||||
POSTGRES_PASSWORD: odoopassword
|
|
||||||
POSTGRES_DB: postgres
|
|
||||||
steps:
|
|
||||||
# The doodba image ships no Node.js, so actions/checkout@v4 cannot
|
|
||||||
# run here. The repository is private, so the job token is required.
|
|
||||||
- name: Checkout
|
|
||||||
env:
|
|
||||||
SECRET_GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
SECRET_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
set -eu
|
|
||||||
token="${GITEA_TOKEN:-${GITHUB_TOKEN:-${SECRET_GITEA_TOKEN:-${SECRET_GITHUB_TOKEN:-}}}}"
|
|
||||||
if [ -z "$token" ]; then
|
|
||||||
echo "::error::No job token available to clone the repository"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
server="${GITHUB_SERVER_URL:-https://git.elabore.coop}"
|
|
||||||
repo="${GITHUB_REPOSITORY:?GITHUB_REPOSITORY is not set}"
|
|
||||||
ref="${GITHUB_REF:-${GITHUB_SHA:?neither GITHUB_REF nor GITHUB_SHA is set}}"
|
|
||||||
auth_url="$(printf '%s' "${server%/}/${repo}.git" |
|
|
||||||
sed -E "s#^https://#https://${token}@#")"
|
|
||||||
git init -q .
|
|
||||||
git config --global --add safe.directory "$PWD"
|
|
||||||
git remote add origin "$auth_url"
|
|
||||||
git fetch -q --depth=1 origin "$ref"
|
|
||||||
git checkout -q FETCH_HEAD
|
|
||||||
|
|
||||||
- name: Detect changed modules
|
|
||||||
id: changed
|
|
||||||
run: |
|
|
||||||
set -eu
|
|
||||||
if [ -n "${GITHUB_BASE_REF:-}" ]; then
|
|
||||||
git fetch -q --depth=1 origin "refs/heads/$GITHUB_BASE_REF"
|
|
||||||
base_rev="FETCH_HEAD"
|
|
||||||
scope="diff against $GITHUB_BASE_REF"
|
|
||||||
else
|
|
||||||
base_rev=""
|
|
||||||
scope="all installable modules (manual run)"
|
|
||||||
fi
|
|
||||||
if [ -n "$base_rev" ]; then
|
|
||||||
modules="$(
|
|
||||||
git diff --name-only "$base_rev" HEAD |
|
|
||||||
awk -F/ '{print $1}' | sort -u |
|
|
||||||
while read -r dir; do
|
|
||||||
[ -f "$dir/__manifest__.py" ] && echo "$dir"
|
|
||||||
done | paste -sd, -
|
|
||||||
)"
|
|
||||||
else
|
|
||||||
modules="$(
|
|
||||||
for dir in */; do
|
|
||||||
dir="${dir%/}"
|
|
||||||
[ -f "$dir/__manifest__.py" ] && echo "$dir"
|
|
||||||
done | paste -sd, -
|
|
||||||
)"
|
|
||||||
fi
|
|
||||||
echo "modules=$modules" >> "$GITHUB_OUTPUT"
|
|
||||||
echo "Modules to test ($scope): ${modules:-<none>}"
|
|
||||||
|
|
||||||
- name: Run Odoo tests
|
|
||||||
if: steps.changed.outputs.modules != ''
|
|
||||||
run: bash .gitea/scripts/odoo-tests.sh "${{ steps.changed.outputs.modules }}"
|
|
||||||
88
.gitignore
vendored
88
.gitignore
vendored
@@ -1,88 +0,0 @@
|
|||||||
# Byte-compiled / optimized / DLL files
|
|
||||||
__pycache__/
|
|
||||||
*.py[cod]
|
|
||||||
/.venv
|
|
||||||
/.pytest_cache
|
|
||||||
/.ruff_cache
|
|
||||||
|
|
||||||
# C extensions
|
|
||||||
*.so
|
|
||||||
|
|
||||||
# Distribution / packaging
|
|
||||||
.Python
|
|
||||||
env/
|
|
||||||
bin/
|
|
||||||
build/
|
|
||||||
develop-eggs/
|
|
||||||
dist/
|
|
||||||
eggs/
|
|
||||||
lib64/
|
|
||||||
parts/
|
|
||||||
sdist/
|
|
||||||
var/
|
|
||||||
*.egg-info/
|
|
||||||
.installed.cfg
|
|
||||||
*.egg
|
|
||||||
*.eggs
|
|
||||||
|
|
||||||
# Windows installers
|
|
||||||
*.msi
|
|
||||||
|
|
||||||
# Debian packages
|
|
||||||
*.deb
|
|
||||||
|
|
||||||
# Redhat packages
|
|
||||||
*.rpm
|
|
||||||
|
|
||||||
# MacOS packages
|
|
||||||
*.dmg
|
|
||||||
*.pkg
|
|
||||||
|
|
||||||
# Installer logs
|
|
||||||
pip-log.txt
|
|
||||||
pip-delete-this-directory.txt
|
|
||||||
|
|
||||||
# Unit test / coverage reports
|
|
||||||
htmlcov/
|
|
||||||
.tox/
|
|
||||||
.coverage
|
|
||||||
.cache
|
|
||||||
nosetests.xml
|
|
||||||
coverage.xml
|
|
||||||
|
|
||||||
# Translations
|
|
||||||
*.mo
|
|
||||||
|
|
||||||
# Pycharm
|
|
||||||
.idea
|
|
||||||
|
|
||||||
# Eclipse
|
|
||||||
.settings
|
|
||||||
|
|
||||||
# Visual Studio cache/options directory
|
|
||||||
.vs/
|
|
||||||
.vscode
|
|
||||||
|
|
||||||
# OSX Files
|
|
||||||
.DS_Store
|
|
||||||
|
|
||||||
# Django stuff:
|
|
||||||
*.log
|
|
||||||
|
|
||||||
# Mr Developer
|
|
||||||
.mr.developer.cfg
|
|
||||||
.project
|
|
||||||
.pydevproject
|
|
||||||
|
|
||||||
# Rope
|
|
||||||
.ropeproject
|
|
||||||
|
|
||||||
# Sphinx documentation
|
|
||||||
docs/_build/
|
|
||||||
|
|
||||||
# Backup files
|
|
||||||
*~
|
|
||||||
*.swp
|
|
||||||
|
|
||||||
# OCA rules
|
|
||||||
!static/lib/
|
|
||||||
@@ -49,9 +49,12 @@ repos:
|
|||||||
$(git rev-parse --show-toplevel))"'
|
$(git rev-parse --show-toplevel))"'
|
||||||
- id: oca-gen-addon-readme
|
- id: oca-gen-addon-readme
|
||||||
entry:
|
entry:
|
||||||
bash -c 'oca-gen-addon-readme --addons-dir=. --branch=$(git symbolic-ref
|
bash -c 'oca-gen-addon-readme
|
||||||
|
--addons-dir=.
|
||||||
|
--branch=$(git symbolic-ref
|
||||||
refs/remotes/origin/HEAD | sed "s@^refs/remotes/origin/@@")
|
refs/remotes/origin/HEAD | sed "s@^refs/remotes/origin/@@")
|
||||||
--repo-name=$(basename $(git rev-parse --show-toplevel)) --org-name="Elabore"
|
--repo-name=$(basename $(git rev-parse --show-toplevel))
|
||||||
|
--org-name="Elabore"
|
||||||
--if-source-changed --keep-source-digest'
|
--if-source-changed --keep-source-digest'
|
||||||
|
|
||||||
- repo: https://github.com/OCA/odoo-pre-commit-hooks
|
- repo: https://github.com/OCA/odoo-pre-commit-hooks
|
||||||
|
|||||||
@@ -21,11 +21,3 @@ class MaintenanceEquipment(models.Model):
|
|||||||
def _compute_name_fr(self):
|
def _compute_name_fr(self):
|
||||||
for record in self:
|
for record in self:
|
||||||
record.name_fr = record.with_context(lang="fr_FR").name
|
record.name_fr = record.with_context(lang="fr_FR").name
|
||||||
|
|
||||||
def write(self, vals):
|
|
||||||
res = super().write(vals)
|
|
||||||
if "active" in vals:
|
|
||||||
self.with_context(active_test=False).service_ids.write(
|
|
||||||
{"active": vals["active"]}
|
|
||||||
)
|
|
||||||
return res
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ class ServiceInstance(models.Model):
|
|||||||
service_id = fields.Many2one('service', string='Service', required=True)
|
service_id = fields.Many2one('service', string='Service', required=True)
|
||||||
version_id = fields.Many2one('service.version', string='Version')
|
version_id = fields.Many2one('service.version', string='Version')
|
||||||
service_url = fields.Char(string='Service Url')
|
service_url = fields.Char(string='Service Url')
|
||||||
active = fields.Boolean(default=True)
|
|
||||||
|
|
||||||
|
|
||||||
class BackupServer(models.Model):
|
class BackupServer(models.Model):
|
||||||
|
|||||||
@@ -45,27 +45,6 @@
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="service_instance_view_search" model="ir.ui.view">
|
|
||||||
<field name="name">service.instance.view.search</field>
|
|
||||||
<field name="model">service.instance</field>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<search string="Search Service Instances">
|
|
||||||
<field name="equipment_id"/>
|
|
||||||
<field name="service_id"/>
|
|
||||||
<field name="version_id"/>
|
|
||||||
<field name="service_url"/>
|
|
||||||
<separator/>
|
|
||||||
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
|
|
||||||
<separator/>
|
|
||||||
<group expand="0" string="Group By">
|
|
||||||
<filter string="Equipment" name="group_equipment" context="{'group_by': 'equipment_id'}"/>
|
|
||||||
<filter string="Service" name="group_service" context="{'group_by': 'service_id'}"/>
|
|
||||||
<filter string="Version" name="group_version" context="{'group_by': 'version_id'}"/>
|
|
||||||
</group>
|
|
||||||
</search>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<!-- ACTIONS -->
|
<!-- ACTIONS -->
|
||||||
<record id="service_action" model="ir.actions.act_window">
|
<record id="service_action" model="ir.actions.act_window">
|
||||||
<field name="name">Service</field>
|
<field name="name">Service</field>
|
||||||
@@ -142,6 +121,6 @@
|
|||||||
name="Services"
|
name="Services"
|
||||||
parent="maintenance.menu_maintenance_title"
|
parent="maintenance.menu_maintenance_title"
|
||||||
action="service_instance_action"
|
action="service_instance_action"
|
||||||
sequence="10"/>
|
sequence="35"/>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
@@ -15,43 +15,7 @@ If the service has a URL, a request is made.
|
|||||||
If a request fails and a maintenance task has already been created for the same day,
|
If a request fails and a maintenance task has already been created for the same day,
|
||||||
no new task is added.
|
no new task is added.
|
||||||
|
|
||||||
The default values for the cron jobs are located in `data/cron.xml`.
|
The default values for the cron jobs are located in `data/cron.xml`.
|
||||||
|
|
||||||
|
|
||||||
Webhook Notification
|
|
||||||
====================
|
|
||||||
|
|
||||||
When a new maintenance request is created (HTTP check failure), the module can
|
|
||||||
send a webhook notification to an external service (e.g., n8n, Rocket.Chat, Slack).
|
|
||||||
|
|
||||||
Configuration
|
|
||||||
-------------
|
|
||||||
|
|
||||||
Go to **Settings > Technical > Parameters > System Parameters** and configure:
|
|
||||||
|
|
||||||
+--------------------------------------------------------+----------------------------------------+
|
|
||||||
| Key | Description |
|
|
||||||
+========================================================+========================================+
|
|
||||||
| ``maintenance_service_http_monitoring.webhook_url`` | Webhook URL (POST endpoint) |
|
|
||||||
+--------------------------------------------------------+----------------------------------------+
|
|
||||||
| ``maintenance_service_http_monitoring.webhook_user`` | Basic Auth username (optional) |
|
|
||||||
+--------------------------------------------------------+----------------------------------------+
|
|
||||||
| ``maintenance_service_http_monitoring.webhook_password``| Basic Auth password (optional) |
|
|
||||||
+--------------------------------------------------------+----------------------------------------+
|
|
||||||
|
|
||||||
Webhook Payload
|
|
||||||
---------------
|
|
||||||
|
|
||||||
The webhook sends a JSON POST with the following structure::
|
|
||||||
|
|
||||||
{
|
|
||||||
"id": 42,
|
|
||||||
"name": "[HTTP KO] Server Name",
|
|
||||||
"priority": "2",
|
|
||||||
"description": "Service KO: https://example.com",
|
|
||||||
"equipment": "Server Name",
|
|
||||||
"link": "https://odoo.example.com/web#id=42&model=maintenance.request&view_type=form"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
"depends": ["base", "maintenance", "maintenance_server_data"],
|
"depends": ["base", "maintenance", "maintenance_server_data"],
|
||||||
"external_dependencies": {"python": ["requests"]},
|
"external_dependencies": {"python": ["requests"]},
|
||||||
"data": [
|
"data": [
|
||||||
"data/ir_config_parameter.xml",
|
|
||||||
"data/cron.xml",
|
"data/cron.xml",
|
||||||
"views/service_instance_views.xml",
|
"views/service_instance_views.xml",
|
||||||
"views/maintenance_equipment_views.xml"
|
"views/maintenance_equipment_views.xml"
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<odoo noupdate="1">
|
|
||||||
<record id="config_param_webhook_url" model="ir.config_parameter">
|
|
||||||
<field name="key">maintenance_service_http_monitoring.webhook_url</field>
|
|
||||||
<field name="value"></field>
|
|
||||||
</record>
|
|
||||||
<record id="config_param_webhook_user" model="ir.config_parameter">
|
|
||||||
<field name="key">maintenance_service_http_monitoring.webhook_user</field>
|
|
||||||
<field name="value"></field>
|
|
||||||
</record>
|
|
||||||
<record id="config_param_webhook_password" model="ir.config_parameter">
|
|
||||||
<field name="key">maintenance_service_http_monitoring.webhook_password</field>
|
|
||||||
<field name="value"></field>
|
|
||||||
</record>
|
|
||||||
</odoo>
|
|
||||||
@@ -1,16 +1,6 @@
|
|||||||
import logging
|
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from odoo import models, fields, api
|
from odoo import models, fields, api
|
||||||
|
|
||||||
try:
|
|
||||||
import requests as http_requests
|
|
||||||
except ImportError:
|
|
||||||
http_requests = None
|
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
WEBHOOK_TIMEOUT = 10 # seconds
|
|
||||||
|
|
||||||
class MaintenanceEquipment(models.Model):
|
class MaintenanceEquipment(models.Model):
|
||||||
_inherit = 'maintenance.equipment'
|
_inherit = 'maintenance.equipment'
|
||||||
|
|
||||||
@@ -100,51 +90,8 @@ class MaintenanceEquipment(models.Model):
|
|||||||
vals['maintenance_team_id'] = team.id
|
vals['maintenance_team_id'] = team.id
|
||||||
request = self.env['maintenance.request'].create(vals)
|
request = self.env['maintenance.request'].create(vals)
|
||||||
self.http_maintenance_request = request.id
|
self.http_maintenance_request = request.id
|
||||||
self._notify_webhook(request, ko_services)
|
|
||||||
return request
|
return request
|
||||||
|
|
||||||
def _notify_webhook(self, request, ko_services):
|
|
||||||
"""Send a webhook notification when a new maintenance request is created."""
|
|
||||||
ICP = self.env['ir.config_parameter'].sudo()
|
|
||||||
webhook_url = ICP.get_param(
|
|
||||||
'maintenance_service_http_monitoring.webhook_url', ''
|
|
||||||
)
|
|
||||||
if not webhook_url:
|
|
||||||
return
|
|
||||||
webhook_user = ICP.get_param(
|
|
||||||
'maintenance_service_http_monitoring.webhook_user', ''
|
|
||||||
)
|
|
||||||
webhook_password = ICP.get_param(
|
|
||||||
'maintenance_service_http_monitoring.webhook_password', ''
|
|
||||||
)
|
|
||||||
base_url = ICP.get_param('web.base.url', '')
|
|
||||||
link = (
|
|
||||||
f"{base_url}/web#id={request.id}"
|
|
||||||
f"&model=maintenance.request&view_type=form"
|
|
||||||
)
|
|
||||||
payload = {
|
|
||||||
'id': request.id,
|
|
||||||
'name': request.name,
|
|
||||||
'description': request.description or '',
|
|
||||||
'equipment': self.name,
|
|
||||||
'link': link,
|
|
||||||
}
|
|
||||||
auth = None
|
|
||||||
if webhook_user and webhook_password:
|
|
||||||
auth = (webhook_user, webhook_password)
|
|
||||||
try:
|
|
||||||
http_requests.post(
|
|
||||||
webhook_url,
|
|
||||||
json=payload,
|
|
||||||
auth=auth,
|
|
||||||
timeout=WEBHOOK_TIMEOUT,
|
|
||||||
)
|
|
||||||
except Exception as e:
|
|
||||||
_logger.warning(
|
|
||||||
"Webhook notification failed for maintenance request %s: %s",
|
|
||||||
request.id, e,
|
|
||||||
)
|
|
||||||
|
|
||||||
def _build_ko_services_description(self, ko_services):
|
def _build_ko_services_description(self, ko_services):
|
||||||
lines = [f"Service KO: {s.service_url or s.name}" for s in ko_services]
|
lines = [f"Service KO: {s.service_url or s.name}" for s in ko_services]
|
||||||
return '\n'.join(lines)
|
return '\n'.join(lines)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class ServiceInstance(models.Model):
|
|||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def cron_check_http_services(self):
|
def cron_check_http_services(self):
|
||||||
domain = [('active', '=', True), ('service_url', '!=', False), ('equipment_id', '!=', False)]
|
domain = [('service_url', '!=', False), ('equipment_id', '!=', False)]
|
||||||
services = self.search(domain)
|
services = self.search(domain)
|
||||||
for service in services:
|
for service in services:
|
||||||
equipment = service.equipment_id
|
equipment = service.equipment_id
|
||||||
|
|||||||
@@ -17,24 +17,4 @@
|
|||||||
</field>
|
</field>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<!-- Inherit from base search view to add HTTP monitoring filters -->
|
|
||||||
<record id="service_instance_http_monitoring_search" model="ir.ui.view">
|
|
||||||
<field name="name">service.instance.http.monitoring.search</field>
|
|
||||||
<field name="model">service.instance</field>
|
|
||||||
<field name="inherit_id" ref="maintenance_server_data.service_instance_view_search"/>
|
|
||||||
<field name="arch" type="xml">
|
|
||||||
<field name="service_url" position="after">
|
|
||||||
<field name="last_http_status_code" string="Status Code"/>
|
|
||||||
</field>
|
|
||||||
<filter name="inactive" position="before">
|
|
||||||
<filter string="Status OK" name="status_ok" domain="[('http_status_ok', '=', True)]"/>
|
|
||||||
<filter string="Status Error" name="status_error" domain="[('http_status_ok', '=', False)]"/>
|
|
||||||
<separator/>
|
|
||||||
</filter>
|
|
||||||
<filter name="group_version" position="after">
|
|
||||||
<filter string="Status Code" name="group_status_code" context="{'group_by': 'last_http_status_code'}"/>
|
|
||||||
</filter>
|
|
||||||
</field>
|
|
||||||
</record>
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
Reference in New Issue
Block a user