Skip to content

Commit d44adb3

Browse files
committed
chore(spp_import_match): apply CI formatter + regenerate README (#991)
1 parent 0c2bcd2 commit d44adb3

4 files changed

Lines changed: 44 additions & 8 deletions

File tree

spp_import_match/README.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,26 @@ Test 12: Security — Non-Admin Access
393393
Changelog
394394
=========
395395

396+
19.0.2.0.2
397+
~~~~~~~~~~
398+
399+
- chore(views): hide the conditional-gate columns (``Is Conditional``,
400+
``Condition Field``, ``Condition Value``) from the match-rule fields
401+
list — the schema and matching-engine wiring stay in place, but no
402+
current import flow uses the gate, so the columns are kept out of the
403+
UI until a real use case lands.
404+
405+
19.0.2.0.1
406+
~~~~~~~~~~
407+
408+
- fix(matching): add a ``condition_field_id`` Many2one column to
409+
``spp.import.match.fields`` and rewrite the matching loop so
410+
conditional rows act as pure gates — never added to the DB search
411+
domain. Renames the IMPORTED VALUE column heading to **Condition
412+
Value**. Fixes the case where a CSV-only metadata column (e.g.
413+
``data_source``) was being injected into the search domain and causing
414+
zero matches.
415+
396416
19.0.2.0.0
397417
~~~~~~~~~~
398418

spp_import_match/models/import_match.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,7 @@ def _match_find(self, model, converted_row, imported_row):
7777
# to the DB search domain — the gate column may be a
7878
# CSV-only metadata field (e.g. `data_source`) that
7979
# doesn't exist on the registrant model.
80-
gate_field_name = (
81-
field.condition_field_id.name
82-
if field.condition_field_id
83-
else field.field_id.name
84-
)
80+
gate_field_name = field.condition_field_id.name if field.condition_field_id else field.field_id.name
8581
if imported_row.get(gate_field_name) != field.imported_value:
8682
combination_valid = False
8783
break

spp_import_match/static/description/index.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,28 @@ <h2><a class="toc-backref" href="#toc-entry-15">Changelog</a></h2>
804804
</div>
805805
</div>
806806
<div class="section" id="section-1">
807+
<h1>19.0.2.0.2</h1>
808+
<ul class="simple">
809+
<li>chore(views): hide the conditional-gate columns (<tt class="docutils literal">Is Conditional</tt>,
810+
<tt class="docutils literal">Condition Field</tt>, <tt class="docutils literal">Condition Value</tt>) from the match-rule fields
811+
list — the schema and matching-engine wiring stay in place, but no
812+
current import flow uses the gate, so the columns are kept out of the
813+
UI until a real use case lands.</li>
814+
</ul>
815+
</div>
816+
<div class="section" id="section-2">
817+
<h1>19.0.2.0.1</h1>
818+
<ul class="simple">
819+
<li>fix(matching): add a <tt class="docutils literal">condition_field_id</tt> Many2one column to
820+
<tt class="docutils literal">spp.import.match.fields</tt> and rewrite the matching loop so
821+
conditional rows act as pure gates — never added to the DB search
822+
domain. Renames the IMPORTED VALUE column heading to <strong>Condition
823+
Value</strong>. Fixes the case where a CSV-only metadata column (e.g.
824+
<tt class="docutils literal">data_source</tt>) was being injected into the search domain and causing
825+
zero matches.</li>
826+
</ul>
827+
</div>
828+
<div class="section" id="section-3">
807829
<h1>19.0.2.0.0</h1>
808830
<ul class="simple">
809831
<li>Initial migration to OpenSPP2</li>

spp_import_match/tests/test_import_match_model.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ def test_match_find_conditional_match(self):
130130
provide the actual search predicate. Here `name` is the gate and
131131
`email` is the search predicate.
132132
"""
133-
partner = self.env["res.partner"].create(
134-
{"name": "ConditionalMatchTest", "email": "conditional@example.com"}
135-
)
133+
partner = self.env["res.partner"].create({"name": "ConditionalMatchTest", "email": "conditional@example.com"})
136134
match = self._create_match_rule(
137135
[
138136
{

0 commit comments

Comments
 (0)