Skip to content

Commit

Permalink
fixup! [ADD] test-requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiMForgeFlow committed Oct 26, 2024
1 parent 96992da commit c40ffb3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions edi_oca/models/edi_exchange_consumer_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ def _edi_get_exchange_type_config(self):
eval_ctx = dict(
self._get_eval_context(), record=self, exchange_type=exchange_type
)
domain = safe_eval.safe_eval(rule.enable_domain or "[]", eval_ctx)
domain = safe_eval.safe_eval(
rule.enable_domain or "[]", eval_ctx, nocopy=True
)
if not self.filtered_domain(domain):
continue
if rule.enable_snippet:
Expand Down Expand Up @@ -252,7 +254,7 @@ def action_view_edi_records(self):
# Purge default search filters from ctx to avoid hiding records
ctx = action.get("context", {})
if isinstance(ctx, str):
ctx = safe_eval.safe_eval(ctx, self.env.context, nocopy=True)
ctx = safe_eval.safe_eval(ctx, self.env.context)
action["context"] = {
k: v for k, v in ctx.items() if not k.startswith("search_default_")
}
Expand Down
2 changes: 1 addition & 1 deletion edi_oca/models/edi_exchange_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ def _search(self, domain, offset=0, limit=None, order=None):
recs = self.env[model].browse(list(targets))
missing = recs - recs.exists()
if missing:
if config["test_enable"]:
if not config["test_enable"]:
# Not log warning in tests to prevent CI failing
for res_id in missing.ids:
_logger.warning(
Expand Down

0 comments on commit c40ffb3

Please sign in to comment.