odoo-agent-cli 0.2.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/PKG-INFO +1 -1
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/pyproject.toml +1 -1
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/_version.py +1 -1
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/domain.py +14 -3
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/.gitignore +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/LICENSE +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/README.md +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/SKILL.md +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/AGENT_GUIDE.md +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/__init__.py +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/__main__.py +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/cli/__init__.py +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/cli/app.py +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/cli/guide_cmd.py +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/cli/output.py +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/cli/profile_cmds.py +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/cli/read_cmds.py +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/cli/values.py +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/cli/write_cmds.py +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/client.py +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/config.py +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/errors.py +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/lenient.py +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/py.typed +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/security.py +0 -0
- {odoo_agent_cli-0.2.0 → odoo_agent_cli-0.3.0}/src/odoocli/sync.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: odoo-agent-cli
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Odoo JSON-RPC CLI and Python client built for AI agents and scripts.
|
|
5
5
|
Project-URL: Homepage, https://github.com/Organize-IT/odoo-cli
|
|
6
6
|
Project-URL: Issues, https://github.com/Organize-IT/odoo-cli/issues
|
|
@@ -48,15 +48,26 @@ def normalize_domain(domain: Any) -> list[Any]:
|
|
|
48
48
|
return []
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
def
|
|
51
|
+
def dehumanize_operand(value: Any) -> Any:
|
|
52
|
+
"""Turn a humanised many2one display value back into its integer id.
|
|
53
|
+
|
|
54
|
+
LLM-facing layers often render relational fields as ``"Name (#42)"``.
|
|
55
|
+
When such a string is fed back as a domain operand, recover the trailing
|
|
56
|
+
``(#42)`` as ``42``. Recurses into lists and tuples; anything else (plain
|
|
57
|
+
ints, ``False``, free text) is returned unchanged.
|
|
58
|
+
"""
|
|
52
59
|
if isinstance(value, str):
|
|
53
60
|
m = _HUMANIZED_M2O_RE.search(value)
|
|
54
61
|
return int(m.group(1)) if m else value
|
|
55
62
|
if isinstance(value, list | tuple):
|
|
56
|
-
return [
|
|
63
|
+
return [dehumanize_operand(v) for v in value]
|
|
57
64
|
return value
|
|
58
65
|
|
|
59
66
|
|
|
67
|
+
# Backwards-compatible alias (0.2.x imported the private name). Remove in 1.0.
|
|
68
|
+
_dehumanize = dehumanize_operand
|
|
69
|
+
|
|
70
|
+
|
|
60
71
|
def sanitize_domain(domain: list[Any]) -> list[Any]:
|
|
61
72
|
"""Turn ``"Name (#42)"`` operands on ``id``/``*_id``/``*_ids`` fields back into ints."""
|
|
62
73
|
out: list[Any] = []
|
|
@@ -64,7 +75,7 @@ def sanitize_domain(domain: list[Any]) -> list[Any]:
|
|
|
64
75
|
if isinstance(item, list | tuple) and len(item) == 3:
|
|
65
76
|
field, op, value = item
|
|
66
77
|
if isinstance(field, str) and (field == "id" or field.endswith(("_id", "_ids"))):
|
|
67
|
-
value =
|
|
78
|
+
value = dehumanize_operand(value)
|
|
68
79
|
out.append([field, op, value])
|
|
69
80
|
else:
|
|
70
81
|
out.append(item)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|