Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/ci-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ concurrency:
cancel-in-progress: true

env:
ODOO_ADDONS_PATH: /opt/odoo/odoo/addons,/opt/odoo/odoo/odoo/addons,/mnt/extra-addons/openspp,/mnt/extra-addons/server-ux,/mnt/extra-addons/server-tools,/mnt/extra-addons/queue,/mnt/extra-addons/odoo-job-worker,/mnt/extra-addons/server-backend,/mnt/extra-addons/rest-framework,/mnt/extra-addons/muk-it
ODOO_ADDONS_PATH: /opt/odoo/odoo/addons,/opt/odoo/odoo/odoo/addons,/mnt/extra-addons/openspp,/mnt/extra-addons/server-ux,/mnt/extra-addons/server-tools,/mnt/extra-addons/odoo-job-worker,/mnt/extra-addons/server-backend,/mnt/extra-addons/rest-framework,/mnt/extra-addons/muk-it

jobs:
# ============================================================================
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
cancel-in-progress: true

env:
ODOO_ADDONS_PATH: /opt/odoo/odoo/addons,/opt/odoo/odoo/odoo/addons,/mnt/extra-addons/openspp,/mnt/extra-addons/server-ux,/mnt/extra-addons/server-tools,/mnt/extra-addons/queue,/mnt/extra-addons/odoo-job-worker,/mnt/extra-addons/server-backend,/mnt/extra-addons/rest-framework,/mnt/extra-addons/muk-it
ODOO_ADDONS_PATH: /opt/odoo/odoo/addons,/opt/odoo/odoo/odoo/addons,/mnt/extra-addons/openspp,/mnt/extra-addons/server-ux,/mnt/extra-addons/server-tools,/mnt/extra-addons/odoo-job-worker,/mnt/extra-addons/server-backend,/mnt/extra-addons/rest-framework,/mnt/extra-addons/muk-it

jobs:
# ============================================================================
Expand Down
1 change: 0 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ RUN --mount=type=cache,target=/tmp/downloads,sharing=locked \
}; \
download_module "OCA/server-ux" "server-ux"; \
download_module "OCA/server-tools" "server-tools"; \
download_module "OCA/queue" "queue"; \
download_module "OpenSPP/odoo-job-worker" "odoo-job-worker"; \
download_module "OCA/server-backend" "server-backend"; \
download_module "OCA/rest-framework" "rest-framework"; \
Expand Down
2 changes: 1 addition & 1 deletion docker/odoo.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ list_db = ${LIST_DB}
data_dir = /var/lib/odoo

# Addons path - includes Odoo core, OpenSPP, and OCA modules
addons_path = /opt/odoo/odoo/addons,/opt/odoo/odoo/odoo/addons,/mnt/extra-addons/openspp,/mnt/extra-addons/server-ux,/mnt/extra-addons/server-tools,/mnt/extra-addons/queue,/mnt/extra-addons/odoo-job-worker,/mnt/extra-addons/server-backend,/mnt/extra-addons/rest-framework,/mnt/extra-addons/muk-it
addons_path = /opt/odoo/odoo/addons,/opt/odoo/odoo/odoo/addons,/mnt/extra-addons/openspp,/mnt/extra-addons/server-ux,/mnt/extra-addons/server-tools,/mnt/extra-addons/odoo-job-worker,/mnt/extra-addons/server-backend,/mnt/extra-addons/rest-framework,/mnt/extra-addons/muk-it

Choose a reason for hiding this comment

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

high

There appears to be a duplicated and incorrect path in the addons_path. The path /opt/odoo/odoo/odoo/addons is likely a typo and is redundant, as the correct path /opt/odoo/odoo/addons is already included. This could cause issues with addon loading or performance. It's best to remove the incorrect entry.

addons_path = /opt/odoo/odoo/addons,/mnt/extra-addons/openspp,/mnt/extra-addons/server-ux,/mnt/extra-addons/server-tools,/mnt/extra-addons/odoo-job-worker,/mnt/extra-addons/server-backend,/mnt/extra-addons/rest-framework,/mnt/extra-addons/muk-it


# =============================================================================
# Security
Expand Down
2 changes: 1 addition & 1 deletion scripts/test_single_module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ run_tests_docker() {
--entrypoint "" \
test \
/opt/odoo/odoo/odoo-bin \
--addons-path=/opt/odoo/odoo/addons,/opt/odoo/odoo/odoo/addons,/mnt/extra-addons/openspp,/mnt/extra-addons/server-ux,/mnt/extra-addons/server-tools,/mnt/extra-addons/queue,/mnt/extra-addons/odoo-job-worker,/mnt/extra-addons/server-backend,/mnt/extra-addons/rest-framework,/mnt/extra-addons/muk-it \
--addons-path=/opt/odoo/odoo/addons,/opt/odoo/odoo/odoo/addons,/mnt/extra-addons/openspp,/mnt/extra-addons/server-ux,/mnt/extra-addons/server-tools,/mnt/extra-addons/odoo-job-worker,/mnt/extra-addons/server-backend,/mnt/extra-addons/rest-framework,/mnt/extra-addons/muk-it \

Choose a reason for hiding this comment

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

high

There appears to be a duplicated and incorrect path in the --addons-path. The path /opt/odoo/odoo/odoo/addons is likely a typo and is redundant, as the correct path /opt/odoo/odoo/addons is already included. This could cause issues with addon loading or performance during tests. It's best to remove the incorrect entry.

Suggested change
--addons-path=/opt/odoo/odoo/addons,/opt/odoo/odoo/odoo/addons,/mnt/extra-addons/openspp,/mnt/extra-addons/server-ux,/mnt/extra-addons/server-tools,/mnt/extra-addons/odoo-job-worker,/mnt/extra-addons/server-backend,/mnt/extra-addons/rest-framework,/mnt/extra-addons/muk-it \
--addons-path=/opt/odoo/odoo/addons,/mnt/extra-addons/openspp,/mnt/extra-addons/server-ux,/mnt/extra-addons/server-tools,/mnt/extra-addons/odoo-job-worker,/mnt/extra-addons/server-backend,/mnt/extra-addons/rest-framework,/mnt/extra-addons/muk-it \

-d "$DB_NAME" \
--db_host=db \
--db_port=5432 \
Expand Down
4 changes: 2 additions & 2 deletions spp_hxl_area/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Key Capabilities
processing → done)
- Auto-sync indicators to ``spp.data.value`` for CEL expression access
- Link imports to hazard incidents for disaster response tracking
- Process imports asynchronously via queue_job
- Process imports asynchronously via job_worker

Key Models
~~~~~~~~~~
Expand Down Expand Up @@ -118,7 +118,7 @@ Dependencies
~~~~~~~~~~~~

``spp_hxl``, ``spp_area``, ``spp_cel_domain``, ``spp_hazard``,
``spp_security``, ``queue_job``
``spp_security``, ``job_worker``

**Table of contents**

Expand Down
2 changes: 1 addition & 1 deletion spp_hxl_area/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"spp_cel_domain",
"spp_hazard",
"spp_security",
"queue_job",
"job_worker",
],
"external_dependencies": {
"python": [
Expand Down
4 changes: 2 additions & 2 deletions spp_hxl_area/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Import HXL-tagged field data and aggregate to area-level indicators for humanita
- Track imports as batches with state machine (draft → mapped → processing → done)
- Auto-sync indicators to `spp.data.value` for CEL expression access
- Link imports to hazard incidents for disaster response tracking
- Process imports asynchronously via queue_job
- Process imports asynchronously via job_worker

### Key Models

Expand Down Expand Up @@ -56,4 +56,4 @@ After installing:

### Dependencies

`spp_hxl`, `spp_area`, `spp_cel_domain`, `spp_hazard`, `spp_security`, `queue_job`
`spp_hxl`, `spp_area`, `spp_cel_domain`, `spp_hazard`, `spp_security`, `job_worker`
4 changes: 2 additions & 2 deletions spp_hxl_area/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ <h1>Key Capabilities</h1>
processing → done)</li>
<li>Auto-sync indicators to <tt class="docutils literal">spp.data.value</tt> for CEL expression access</li>
<li>Link imports to hazard incidents for disaster response tracking</li>
<li>Process imports asynchronously via queue_job</li>
<li>Process imports asynchronously via job_worker</li>
</ul>
</div>
<div class="section" id="key-models">
Expand Down Expand Up @@ -493,7 +493,7 @@ <h1>Extension Points</h1>
<div class="section" id="dependencies">
<h1>Dependencies</h1>
<p><tt class="docutils literal">spp_hxl</tt>, <tt class="docutils literal">spp_area</tt>, <tt class="docutils literal">spp_cel_domain</tt>, <tt class="docutils literal">spp_hazard</tt>,
<tt class="docutils literal">spp_security</tt>, <tt class="docutils literal">queue_job</tt></p>
<tt class="docutils literal">spp_security</tt>, <tt class="docutils literal">job_worker</tt></p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand Down
30 changes: 13 additions & 17 deletions spp_import_match/README.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

====================
OpenSPP Import Match
====================

..
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
Expand Down Expand Up @@ -44,22 +40,22 @@ Key Capabilities
- Skip duplicate creation or update existing records when matches are
found
- Process imports with more than 100 records asynchronously using
``queue_job``
``job_worker``
- Clear one2many/many2many associations before update to prevent
duplicate entries

Key Models
~~~~~~~~~~

+-----------------------------+---------------------------------------+
| Model | Description |
+=============================+=======================================+
| ``spp.import.match`` | Matching rule configuration for a |
| | specific model |
+-----------------------------+---------------------------------------+
| ``spp.import.match.fields`` | Individual fields used in a rule, |
| | supports sub-fields |
+-----------------------------+---------------------------------------+
+-----------------------------+----------------------------------------+
| Model | Description |
+=============================+========================================+
| ``spp.import.match`` | Matching rule configuration for a |
| | specific model |
+-----------------------------+----------------------------------------+
| ``spp.import.match.fields`` | Individual fields used in a rule, |
| | supports sub-fields |
+-----------------------------+----------------------------------------+

Configuration
~~~~~~~~~~~~~
Expand Down Expand Up @@ -107,7 +103,7 @@ Extension Points
Dependencies
~~~~~~~~~~~~

``base``, ``spp_base_common``, ``base_import``, ``queue_job``,
``base``, ``spp_base_common``, ``base_import``, ``job_worker``,
``spp_security``

**Table of contents**
Expand Down Expand Up @@ -149,4 +145,4 @@ Current maintainers:

This module is part of the `OpenSPP/OpenSPP2 <https://github.com/OpenSPP/OpenSPP2/tree/19.0/spp_import_match>`_ project on GitHub.

You are welcome to contribute.
You are welcome to contribute.

Choose a reason for hiding this comment

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

medium

It is a common convention to end text files with a newline character. This helps prevent issues with file concatenation and some version control tools. Please add a newline at the end of this file.

Suggested change
You are welcome to contribute.
You are welcome to contribute.

3 changes: 1 addition & 2 deletions spp_import_match/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
"license": "LGPL-3",
"development_status": "Beta",
"maintainers": ["jeremi", "gonzalesedwin1123"],
"depends": ["base", "spp_base_common", "base_import", "queue_job", "spp_security"],
"depends": ["base", "spp_base_common", "base_import", "job_worker", "spp_security"],
"data": [
"data/queue_job_data.xml",
"security/ir.model.access.csv",
"views/import_match_view.xml",
],
Expand Down
21 changes: 0 additions & 21 deletions spp_import_match/data/queue_job_data.xml

This file was deleted.

1 change: 0 additions & 1 deletion spp_import_match/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
from . import base
from . import base_import
from . import import_match
from . import queue_job
5 changes: 2 additions & 3 deletions spp_import_match/models/base_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
from os.path import splitext

from odoo import _, models
from odoo.exceptions import UserError
from odoo.models import fix_import_export_id_paths

from odoo.addons.queue_job.exception import FailedJobError

from .base import _import_match_local

_logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -202,5 +201,5 @@ def _import_one_chunk(self, model_name, attachment, options, context):
result = model_obj.load(fields, data)
error_message = [message["message"] for message in result["messages"] if message["type"] == "error"]
if error_message:
raise FailedJobError("\n".join(error_message))
raise UserError("\n".join(error_message))
return result
19 changes: 0 additions & 19 deletions spp_import_match/models/queue_job.py

This file was deleted.

4 changes: 2 additions & 2 deletions spp_import_match/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Extends Odoo's base import functionality to match incoming records against exist
- Match on sub-fields within related records (e.g., household ID within individual)
- Apply conditional matching rules only when specific imported values are present
- Skip duplicate creation or update existing records when matches are found
- Process imports with more than 100 records asynchronously using `queue_job`
- Process imports with more than 100 records asynchronously using `job_worker`
- Clear one2many/many2many associations before update to prevent duplicate entries

### Key Models
Expand Down Expand Up @@ -46,4 +46,4 @@ After installing:

### Dependencies

`base`, `spp_base_common`, `base_import`, `queue_job`, `spp_security`
`base`, `spp_base_common`, `base_import`, `job_worker`, `spp_security`
42 changes: 18 additions & 24 deletions spp_import_match/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<title>OpenSPP Import Match</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,14 +360,9 @@
</style>
</head>
<body>
<div class="document">
<div class="document" id="openspp-import-match">
<h1 class="title">OpenSPP Import Match</h1>


<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="openspp-import-match">
<h1>OpenSPP Import Match</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
Expand All @@ -381,7 +376,7 @@ <h1>OpenSPP Import Match</h1>
combinations. Supports overwriting matched records and asynchronous
processing for large datasets.</p>
<div class="section" id="key-capabilities">
<h2>Key Capabilities</h2>
<h1>Key Capabilities</h1>
<ul class="simple">
<li>Define matching rules per model using field combinations to identify
existing records</li>
Expand All @@ -392,17 +387,17 @@ <h2>Key Capabilities</h2>
<li>Skip duplicate creation or update existing records when matches are
found</li>
<li>Process imports with more than 100 records asynchronously using
<tt class="docutils literal">queue_job</tt></li>
<tt class="docutils literal">job_worker</tt></li>
<li>Clear one2many/many2many associations before update to prevent
duplicate entries</li>
</ul>
</div>
<div class="section" id="key-models">
<h2>Key Models</h2>
<h1>Key Models</h1>
<table border="1" class="docutils">
<colgroup>
<col width="43%" />
<col width="57%" />
<col width="42%" />
<col width="58%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">Model</th>
Expand All @@ -422,7 +417,7 @@ <h2>Key Models</h2>
</table>
</div>
<div class="section" id="configuration">
<h2>Configuration</h2>
<h1>Configuration</h1>
<p>After installing:</p>
<ol class="arabic simple">
<li>Navigate to <strong>Registry &gt; Configuration &gt; Import Match</strong></li>
Expand All @@ -437,7 +432,7 @@ <h2>Configuration</h2>
</ol>
</div>
<div class="section" id="ui-location">
<h2>UI Location</h2>
<h1>UI Location</h1>
<ul class="simple">
<li><strong>Menu</strong>: Registry &gt; Configuration &gt; Import Match</li>
<li><strong>Import Dialog</strong>: Matching applies automatically during CSV import
Expand All @@ -447,7 +442,7 @@ <h2>UI Location</h2>
</ul>
</div>
<div class="section" id="security">
<h2>Security</h2>
<h1>Security</h1>
<table border="1" class="docutils">
<colgroup>
<col width="78%" />
Expand All @@ -466,7 +461,7 @@ <h2>Security</h2>
</table>
</div>
<div class="section" id="extension-points">
<h2>Extension Points</h2>
<h1>Extension Points</h1>
<ul class="simple">
<li>Override <tt class="docutils literal">spp.import.match._match_find()</tt> to customize matching
logic for specific use cases</li>
Expand All @@ -477,8 +472,8 @@ <h2>Extension Points</h2>
</ul>
</div>
<div class="section" id="dependencies">
<h2>Dependencies</h2>
<p><tt class="docutils literal">base</tt>, <tt class="docutils literal">spp_base_common</tt>, <tt class="docutils literal">base_import</tt>, <tt class="docutils literal">queue_job</tt>,
<h1>Dependencies</h1>
<p><tt class="docutils literal">base</tt>, <tt class="docutils literal">spp_base_common</tt>, <tt class="docutils literal">base_import</tt>, <tt class="docutils literal">job_worker</tt>,
<tt class="docutils literal">spp_security</tt></p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand All @@ -492,23 +487,23 @@ <h2>Dependencies</h2>
</ul>
</div>
<div class="section" id="bug-tracker">
<h3><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h3>
<h2><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OpenSPP/OpenSPP2/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OpenSPP/OpenSPP2/issues/new?body=module:%20spp_import_match%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h3><a class="toc-backref" href="#toc-entry-2">Credits</a></h3>
<h2><a class="toc-backref" href="#toc-entry-2">Credits</a></h2>
<div class="section" id="authors">
<h4><a class="toc-backref" href="#toc-entry-3">Authors</a></h4>
<h3><a class="toc-backref" href="#toc-entry-3">Authors</a></h3>
<ul class="simple">
<li>OpenSPP.org</li>
</ul>
</div>
<div class="section" id="maintainers">
<h4><a class="toc-backref" href="#toc-entry-4">Maintainers</a></h4>
<h3><a class="toc-backref" href="#toc-entry-4">Maintainers</a></h3>
<p>Current maintainers:</p>
<p><a class="reference external image-reference" href="https://github.com/jeremi"><img alt="jeremi" src="https://github.com/jeremi.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/gonzalesedwin1123"><img alt="gonzalesedwin1123" src="https://github.com/gonzalesedwin1123.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OpenSPP/OpenSPP2/tree/19.0/spp_import_match">OpenSPP/OpenSPP2</a> project on GitHub.</p>
Expand All @@ -517,6 +512,5 @@ <h4><a class="toc-backref" href="#toc-entry-4">Maintainers</a></h4>
</div>
</div>
</div>
</div>
</body>
</html>
Loading
Loading