bitclick-odoo-mcp 1.6.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.
Files changed (111) hide show
  1. bitclick_odoo_mcp-1.6.0/CHANGELOG.md +593 -0
  2. bitclick_odoo_mcp-1.6.0/CODE_OF_CONDUCT.md +23 -0
  3. bitclick_odoo_mcp-1.6.0/CONTRIBUTING.md +67 -0
  4. bitclick_odoo_mcp-1.6.0/LICENSE +22 -0
  5. bitclick_odoo_mcp-1.6.0/MANIFEST.in +18 -0
  6. bitclick_odoo_mcp-1.6.0/PKG-INFO +627 -0
  7. bitclick_odoo_mcp-1.6.0/README.md +595 -0
  8. bitclick_odoo_mcp-1.6.0/SECURITY.md +53 -0
  9. bitclick_odoo_mcp-1.6.0/SUPPORT.md +35 -0
  10. bitclick_odoo_mcp-1.6.0/docker-compose.integration.yml +26 -0
  11. bitclick_odoo_mcp-1.6.0/docs/adding-a-tool.md +88 -0
  12. bitclick_odoo_mcp-1.6.0/docs/architecture.md +121 -0
  13. bitclick_odoo_mcp-1.6.0/docs/benchmarks.md +306 -0
  14. bitclick_odoo_mcp-1.6.0/docs/catalog-submission.md +262 -0
  15. bitclick_odoo_mcp-1.6.0/docs/claude-desktop-connector.md +405 -0
  16. bitclick_odoo_mcp-1.6.0/docs/client-configs.md +379 -0
  17. bitclick_odoo_mcp-1.6.0/docs/comparison.md +98 -0
  18. bitclick_odoo_mcp-1.6.0/docs/data-quality.md +64 -0
  19. bitclick_odoo_mcp-1.6.0/docs/field-acl.md +114 -0
  20. bitclick_odoo_mcp-1.6.0/docs/multi-instance.md +96 -0
  21. bitclick_odoo_mcp-1.6.0/docs/partner-playbook.md +108 -0
  22. bitclick_odoo_mcp-1.6.0/docs/performance.md +77 -0
  23. bitclick_odoo_mcp-1.6.0/docs/plugins.md +90 -0
  24. bitclick_odoo_mcp-1.6.0/docs/testing.md +111 -0
  25. bitclick_odoo_mcp-1.6.0/docs/troubleshooting.md +70 -0
  26. bitclick_odoo_mcp-1.6.0/pyproject.toml +86 -0
  27. bitclick_odoo_mcp-1.6.0/scripts/benchmark_head_to_head.py +311 -0
  28. bitclick_odoo_mcp-1.6.0/scripts/benchmark_tools.py +266 -0
  29. bitclick_odoo_mcp-1.6.0/scripts/build_mcpb.py +57 -0
  30. bitclick_odoo_mcp-1.6.0/scripts/odoo_compose_smoke.py +1904 -0
  31. bitclick_odoo_mcp-1.6.0/scripts/odoo_multi_instance_smoke.py +600 -0
  32. bitclick_odoo_mcp-1.6.0/setup.cfg +4 -0
  33. bitclick_odoo_mcp-1.6.0/src/bitclick_odoo_mcp.egg-info/PKG-INFO +627 -0
  34. bitclick_odoo_mcp-1.6.0/src/bitclick_odoo_mcp.egg-info/SOURCES.txt +109 -0
  35. bitclick_odoo_mcp-1.6.0/src/bitclick_odoo_mcp.egg-info/dependency_links.txt +1 -0
  36. bitclick_odoo_mcp-1.6.0/src/bitclick_odoo_mcp.egg-info/entry_points.txt +3 -0
  37. bitclick_odoo_mcp-1.6.0/src/bitclick_odoo_mcp.egg-info/requires.txt +11 -0
  38. bitclick_odoo_mcp-1.6.0/src/bitclick_odoo_mcp.egg-info/top_level.txt +1 -0
  39. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/__init__.py +7 -0
  40. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/__main__.py +366 -0
  41. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/access_helpers.py +168 -0
  42. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/accounting_tools.py +160 -0
  43. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/agent_tools.py +1099 -0
  44. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/audit.py +96 -0
  45. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/auth.py +258 -0
  46. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/cross_instance.py +179 -0
  47. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/data/odoo_renames.json +244 -0
  48. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/data_quality.py +349 -0
  49. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/diagnostics.py +1185 -0
  50. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/field_policy.py +253 -0
  51. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/field_ranking.py +277 -0
  52. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/knowledge_index.py +266 -0
  53. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/odoo_client.py +1127 -0
  54. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/plugin_api.py +70 -0
  55. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/prompts.py +89 -0
  56. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/prompts_workflows.py +207 -0
  57. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/rate_limit.py +182 -0
  58. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/schema_cache.py +90 -0
  59. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/schemas.py +259 -0
  60. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/server.py +435 -0
  61. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/server_core.py +845 -0
  62. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/setup_wizard.py +165 -0
  63. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/task_queue.py +241 -0
  64. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/tool_helpers.py +388 -0
  65. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/tools_accounting.py +122 -0
  66. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/tools_async.py +238 -0
  67. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/tools_cross_instance.py +357 -0
  68. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/tools_data_quality.py +75 -0
  69. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/tools_diagnostics.py +727 -0
  70. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/tools_knowledge.py +145 -0
  71. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/tools_read.py +848 -0
  72. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/tools_write.py +970 -0
  73. bitclick_odoo_mcp-1.6.0/src/odoo_mcp/write_policy.py +78 -0
  74. bitclick_odoo_mcp-1.6.0/tests/fixtures/odoo_addons/mcp_smoke_access/__init__.py +1 -0
  75. bitclick_odoo_mcp-1.6.0/tests/fixtures/odoo_addons/mcp_smoke_access/__manifest__.py +14 -0
  76. bitclick_odoo_mcp-1.6.0/tests/fixtures/odoo_addons/mcp_smoke_access/data/mcp_smoke_partners.xml +26 -0
  77. bitclick_odoo_mcp-1.6.0/tests/fixtures/odoo_addons/mcp_smoke_access/security/mcp_smoke_access_security.xml +26 -0
  78. bitclick_odoo_mcp-1.6.0/tests/test_access_helpers.py +423 -0
  79. bitclick_odoo_mcp-1.6.0/tests/test_accounting_tools.py +132 -0
  80. bitclick_odoo_mcp-1.6.0/tests/test_agent_tools.py +1196 -0
  81. bitclick_odoo_mcp-1.6.0/tests/test_attachment.py +107 -0
  82. bitclick_odoo_mcp-1.6.0/tests/test_attachment_upload.py +293 -0
  83. bitclick_odoo_mcp-1.6.0/tests/test_audit.py +253 -0
  84. bitclick_odoo_mcp-1.6.0/tests/test_auth.py +309 -0
  85. bitclick_odoo_mcp-1.6.0/tests/test_batch_write.py +137 -0
  86. bitclick_odoo_mcp-1.6.0/tests/test_chatter_body.py +130 -0
  87. bitclick_odoo_mcp-1.6.0/tests/test_chatter_subject.py +164 -0
  88. bitclick_odoo_mcp-1.6.0/tests/test_cli.py +376 -0
  89. bitclick_odoo_mcp-1.6.0/tests/test_company_scope.py +206 -0
  90. bitclick_odoo_mcp-1.6.0/tests/test_config.py +596 -0
  91. bitclick_odoo_mcp-1.6.0/tests/test_cross_instance.py +214 -0
  92. bitclick_odoo_mcp-1.6.0/tests/test_data_quality.py +134 -0
  93. bitclick_odoo_mcp-1.6.0/tests/test_diagnostics.py +481 -0
  94. bitclick_odoo_mcp-1.6.0/tests/test_field_acl_enforcement.py +215 -0
  95. bitclick_odoo_mcp-1.6.0/tests/test_field_policy.py +183 -0
  96. bitclick_odoo_mcp-1.6.0/tests/test_knowledge_index.py +164 -0
  97. bitclick_odoo_mcp-1.6.0/tests/test_migration_workbench.py +100 -0
  98. bitclick_odoo_mcp-1.6.0/tests/test_odoo_client.py +1320 -0
  99. bitclick_odoo_mcp-1.6.0/tests/test_plugins.py +115 -0
  100. bitclick_odoo_mcp-1.6.0/tests/test_rate_limit.py +135 -0
  101. bitclick_odoo_mcp-1.6.0/tests/test_reliability.py +141 -0
  102. bitclick_odoo_mcp-1.6.0/tests/test_schema_cache.py +392 -0
  103. bitclick_odoo_mcp-1.6.0/tests/test_schemas.py +231 -0
  104. bitclick_odoo_mcp-1.6.0/tests/test_server.py +4507 -0
  105. bitclick_odoo_mcp-1.6.0/tests/test_setup_wizard.py +169 -0
  106. bitclick_odoo_mcp-1.6.0/tests/test_task_queue.py +166 -0
  107. bitclick_odoo_mcp-1.6.0/tests/test_tool_helpers.py +561 -0
  108. bitclick_odoo_mcp-1.6.0/tests/test_tools_async_knowledge_accounting.py +227 -0
  109. bitclick_odoo_mcp-1.6.0/tests/test_workflow_prompts.py +91 -0
  110. bitclick_odoo_mcp-1.6.0/tests/test_write_policy.py +525 -0
  111. bitclick_odoo_mcp-1.6.0/tests/test_write_principal_binding.py +301 -0
@@ -0,0 +1,593 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [1.6.0] - 2026-12-02
8
+
9
+ ### Changed
10
+
11
+ - Published on PyPI as `bitclick-odoo-mcp` (the `odoo-mcp` name belongs to the original
12
+ project). Run it with `uvx bitclick-odoo-mcp`; the `odoo-mcp` command and the `odoo_mcp`
13
+ module keep their names, so existing configs that call `odoo-mcp` after a `pip install`
14
+ still work. There is no public 1.5.0: this edition goes from 1.4.3 to 1.5.1.
15
+
16
+ ### Added
17
+
18
+ - Per-request company: a client sends `_meta["odoo-mcp/company_ids"]` (res.company ids,
19
+ the first one active) on `tools/call`, and every Odoo call of that request runs with
20
+ `context.allowed_company_ids` set to it, ahead of `company_scope`. A caller-supplied
21
+ `allowed_company_ids` still wins, Odoo refuses a company the user is not in, and a bad
22
+ value fails the call. The choice lives in a ContextVar, set on every client resolve, so a
23
+ request without the key never inherits another's. Lets one worker serve conversations on
24
+ different companies without a restart, and keeps the choice out of the model's arguments.
25
+ - A validated write remembers the companies it was validated with (server side only: the
26
+ approval payload and token are unchanged) and `execute_approved_write` applies them, so it
27
+ lands in the same company whatever the executing request names.
28
+
29
+ ### Fixed
30
+
31
+ - mypy: the cached default company of `company_scope="default"`.
32
+
33
+ ## [1.5.1] - 2026-12-02
34
+
35
+ ### Fixed
36
+
37
+ - Multi-company users got records of all their companies mixed. A call that
38
+ sends no company context sees every company in `res.users.company_ids`
39
+ (Odoo 17+); the company picked in the web client is only a browser cookie.
40
+ New per-instance `company_scope` (or `ODOO_COMPANY_SCOPE`): `"default"`
41
+ pins `context.allowed_company_ids` to the user's default company
42
+ (`res.users.company_id`, read once per client) on every call, through the
43
+ same choke point as `lang`. A caller-supplied `allowed_company_ids` wins. A
44
+ user without a default company fails closed. The default stays `"all"`
45
+ (Odoo's behaviour), so nothing changes unless you opt in.
46
+
47
+ ## [1.4.3] - 2026-11-30
48
+
49
+ ### Security
50
+
51
+ - `execute_method` now honours the field ACL. Before, a read-only method
52
+ (`read`, `search_read`, `get_*`) ran without it, so a denied field could be
53
+ read through a raw call. When a rule covers the model, `read` and
54
+ `search_read` results are redacted like `search_records` and `read_record`
55
+ (with `redacted_fields`); `search`, `search_count`, `fields_get`,
56
+ `name_get`, `name_search` and `context_get` pass as before; any other
57
+ read-only method is refused before it reaches Odoo, and so is a result shape
58
+ that cannot be redacted. Models without a rule are unchanged.
59
+
60
+ ## [1.4.2] - 2026-10-22
61
+
62
+ ### Added
63
+
64
+ - `chatter_post` accepts an optional `subject`. Without one, Odoo titles the
65
+ notification email with the record name (for example `INV/2026/00036`).
66
+ The subject is plain text on one line, at most 200 characters: line breaks
67
+ and control characters become spaces, which also prevents email header
68
+ injection. It is not HTML-escaped, because `mail.message.subject` is a
69
+ plain-text field that Odoo escapes when displaying it. The subject is part
70
+ of the approval payload, so changing or dropping it invalidates the token.
71
+
72
+ ## [1.4.1] - 2026-10-22
73
+
74
+ ### Fixed
75
+
76
+ - On Odoo 19, `aggregate_records` with an `order` on a summed field (for
77
+ example `amount_untaxed desc`) no longer fails with `Order term ... is not
78
+ a valid aggregate`. A bare measure in `order` is now sent as `field:agg`,
79
+ as `formatted_read_group` requires; group-by fields and explicit
80
+ `field:agg` terms are kept as written. Older Odoo versions are unchanged.
81
+
82
+ ## [1.4.0] - 2026-10-22
83
+
84
+ ### Security
85
+
86
+ - With the OAuth resource server enabled on an HTTP transport, write approvals
87
+ are now bound to the authenticated caller. `execute_approved_write` refuses
88
+ an approval that `validate_write` stored for a different principal (token
89
+ `client_id`, issuer, and subject) or a different MCP session, so one client
90
+ can no longer execute a write that another client validated by replaying the
91
+ same payload. A refused attempt does not consume the other caller's
92
+ approval. `chatter_post` approval tokens are bound the same way. stdio and
93
+ unauthenticated HTTP keep the previous per-process behavior.
94
+ - The token verifier now passes the introspected `sub` and `iss` to the MCP
95
+ SDK, so users who share one OAuth client are distinct principals.
96
+
97
+ ### Added
98
+
99
+ - `ODOO_MCP_AUDIT_LOG` entries include a `principal` object (`client_id`,
100
+ `issuer`, `subject`, `session_sha256`) on authenticated transports, and
101
+ `null` otherwise.
102
+
103
+ ### Fixed
104
+
105
+ - `chatter_post` keeps the line breaks of a plain-text `body`. Odoo 17+
106
+ escapes a plain string sent over RPC and puts it in a single paragraph, so
107
+ every line break was lost, and `<br>` showed up as literal text. The server now
108
+ escapes the caller's text, turns line breaks into `<br/>`, and posts it with
109
+ `body_is_html=True` (Odoo 17+; Odoo 16 stores the string as HTML). HTML,
110
+ links, and scripts in the text are still escaped. The approval token and
111
+ preview keep the original text. On Odoo 17+, `body_is_html` applies only to
112
+ internal users; a portal API user's post shows the escaped text.
113
+
114
+ ## [1.3.2] - 2026-08-19
115
+
116
+ ### Changed
117
+
118
+ - Metadata-only release: refreshed PyPI project URLs.
119
+ Do not retag `v1.3.1` (GitHub tag exists; PyPI never received that build).
120
+
121
+ ## [1.3.1] - 2026-08-14
122
+
123
+ ### Fixed
124
+
125
+ - A search filter that the server cannot understand is now rejected instead of
126
+ matching every record. Agents that write the usual Odoo tuple form (for
127
+ example looking up records by tag) get the intended subset back, and a
128
+ malformed filter no longer silently searches the whole model. The same rule
129
+ applies when a search is sent as a keyword argument, not only as the first
130
+ positional argument.
131
+ - If Odoo cannot complete a search or a single-record read, the agent now
132
+ sees an error instead of an empty result that looks like “no matching
133
+ records.”
134
+
135
+ ## [1.3.0] - 2026-07-29
136
+
137
+ ### Changed
138
+
139
+ - Upgraded to the stable MCP Python SDK 2.x and MCP `2026-07-28`.
140
+ `MCPServer` now serves the stateless `server/discover` lifecycle and legacy
141
+ `2025-11-25` clients from the same stdio or Streamable HTTP endpoint.
142
+ - Write confirmation uses the SDK's era-portable resolver: MRTR on modern
143
+ clients, legacy elicitation on older clients, and the existing approval-token
144
+ fallback when form elicitation is unavailable.
145
+ - Streamable HTTP settings now pass through `MCPServer.run()` as required by
146
+ SDK v2; DNS-rebinding host/origin defaults and OAuth introspection remain in
147
+ place. OAuth HTTP calls use the SDK-provided `httpx2` dependency.
148
+
149
+ ## [1.2.3] - 2026-07-22
150
+
151
+ Metadata-only ownership refresh. This republishes the package so the PyPI
152
+ README carries the MCP Registry ownership marker; runtime behavior is unchanged.
153
+
154
+ ## [1.2.2] - 2026-07-21
155
+
156
+ Metadata and packaging release: publish a clearer PyPI/registry short
157
+ description, plus typed discovery contracts that
158
+ landed on `main` after 1.2.1.
159
+
160
+ ### Added
161
+ - **Typed output schemas for domain tools** — knowledge, accounting, async,
162
+ and cross-instance tools advertise Pydantic-backed `outputSchema` contracts
163
+ through `tools/list` (additive; runtime envelopes unchanged). Thanks
164
+ @barry166. (#50)
165
+ - **Typed `build_domain` success/error contracts** for agent consumers.
166
+
167
+ ### Changed
168
+ - **Package / catalog short descriptions** clarified while keeping this package
169
+ the local/self-host 41-tool server. README, site, MCP Desktop Extension
170
+ manifest, and comparison docs aligned.
171
+ - PyPI `summary` keywords include `chatgpt`, `claude`, and
172
+ `model-context-protocol`.
173
+
174
+ ## [1.2.1] - 2026-07-14
175
+
176
+ Community patch: the write-approval gate no longer drops valid tokens on
177
+ int/float transport drift, the 10 highest-traffic tools describe their
178
+ parameters to MCP clients, and the suite is hermetic on developer machines
179
+ that carry a real Odoo config. All three code changes came from community
180
+ PRs. 909 tests.
181
+
182
+ ### Added
183
+ - **Per-parameter input descriptions (first 10 tools)** — the highest-traffic
184
+ tools (`search_records`, `read_record`, `execute_method`, the gated-write
185
+ trio, accounting/diagnostics/cross-instance entry points) now wrap every
186
+ non-context parameter in `Annotated[..., Field(description=...)]`, so MCP
187
+ clients and inspectors render real `inputSchema` property descriptions.
188
+ Coverage is pinned by `DESCRIBED_INPUT_TOOLS` in `tests/test_schemas.py`;
189
+ remaining tool groups tracked in #35. (#41)
190
+
191
+ ### Changed
192
+ - Field ranking / smart field selection helpers moved from `agent_tools.py`
193
+ into a dedicated `field_ranking.py` core module (compatibility re-exports
194
+ kept, import-linter contract updated). No behavior change. (#42)
195
+
196
+ ### Fixed
197
+ - **Write-approval token instability across int/float JSON transports** —
198
+ `canonical_json` (`agent_tools.py`) now normalizes integral floats (`1.0`)
199
+ to `int` (`1`) before hashing, recursively across dicts/lists. Previously,
200
+ a numeric value that round-tripped through a JSON transport layer where
201
+ `1` and `1.0` are the same value (common in JS/TS clients and gateways)
202
+ could change the SHA-256 approval token between `preview_write`/
203
+ `validate_write` and `execute_approved_write`, causing intermittent
204
+ `"approval token does not match the canonical payload"` failures on
205
+ otherwise-valid, unchanged payloads — most visible with "round" numeric
206
+ field values (e.g. `unit_amount: 1.0` on `account.analytic.line`).
207
+ Booleans are left untouched. No change to already-issued tokens for
208
+ payloads that only ever contained plain ints. (#48)
209
+
210
+ ## [1.2.0] - 2026-07-14
211
+
212
+ Field-ops release: context-safe attachment uploads, an Agent Skills pack,
213
+ typo-tolerant model-history lookups, and kinder failure modes around Odoo's
214
+ XML-RPC `None`-marshalling quirks — hardened by a real production
215
+ misattributed-freight correction run end-to-end through the write gate.
216
+ 901 tests.
217
+
218
+ ### Added
219
+ - **Local-file attachment uploads** — `validate_write` accepts `<field>_from_path`
220
+ (e.g. `datas_from_path`) as an alternative to inlining base64 for binary
221
+ fields such as `ir.attachment.datas`. The server reads the file, and the
222
+ approval only ever carries a `sha256:<hex>:<size>` fingerprint for that
223
+ field — the real bytes never appear in a tool response, in the stored
224
+ approval token payload, or in anything the caller echoes back to
225
+ `execute_approved_write`, which substitutes the real content server-side at
226
+ execution time. Fixes the case where a large attachment (a resume, an
227
+ invoice PDF, ...) can't be inlined into a single tool call without blowing
228
+ past an agent's context budget. Fails closed: requires
229
+ `ODOO_MCP_ATTACHMENT_UPLOAD_ROOTS` (colon-separated allowed local
230
+ directories, mirrors `ODOO_ADDONS_PATHS`) and enforces
231
+ `ODOO_MCP_MAX_ATTACHMENT_UPLOAD_BYTES` (default 10 MiB, hard cap 16 MiB).
232
+ No new tool — routes through the existing `preview_write` → `validate_write`
233
+ → `execute_approved_write` gate, same live-metadata and confirm requirements
234
+ as every other write.
235
+ - **Agent Skills pack** — `skills/` ships 4 business-workflow skills in the
236
+ open Agent Skills format (`odoo-data-quality-gate`,
237
+ `odoo-migration-copilot`, `odoo-month-end-close`,
238
+ `odoo-agency-fleet-review`): judgment playbooks (evidence rules, pacing,
239
+ human checkpoints) on top of the MCP tool layer, for Claude Code and other
240
+ skills-compatible agents. Install by copying into `~/.claude/skills/`.
241
+ - **Model-history lookups suggest close names** — `lookup_model_history` now
242
+ offers nearest-match suggestions when a model name misses, and the
243
+ cross-version rename map covers additional Odoo model renames.
244
+
245
+ ### Fixed
246
+ - `get_model_fields` now requests a bounded, marshal-safe `attributes` list
247
+ instead of a full `fields_get`. On Odoo 19, a full `fields_get` faults
248
+ **server-side** for models whose `domain` attribute is `None` (e.g.
249
+ `product.pricelist`) — Odoo's own XML-RPC layer refuses to marshal its
250
+ response, which no client flag can fix (complements the client-side
251
+ `allow_none` fix shipped in 1.1.0). The bounded list covers every attribute
252
+ the server consumes (`string`, `help`, `type`, `required`, `readonly`,
253
+ `relation`, `selection`, `store`, `searchable`); an absent attribute reads
254
+ as `None` via `.get()`, exactly as before. Unblocks `validate_write` on such
255
+ models (e.g. creating an IQD `product.pricelist`).
256
+ - `execute_method` no longer reports a **phantom failure** when a
257
+ side-effect method returns `None` (`button_draft`, `action_post`,
258
+ `account.move.line.reconcile`, ...). Odoo executes and commits the call,
259
+ then its XML-RPC layer faults while serializing the `None` return value
260
+ ("cannot marshal None unless allow_none is enabled") — the state change is
261
+ already persisted, so surfacing an error invites a dangerous retry. The
262
+ tool now returns `success: true, result: null` plus an explicit warning to
263
+ verify with a read.
264
+ - The blocked-side-effect error on `execute_method` now points at the policy
265
+ file (`ODOO_MCP_POLICY_FILE`, default `./odoo_mcp_policy.json`, re-read on
266
+ every request — no server restart) as the primary allowlist mechanism;
267
+ previously it only mentioned the env vars, and the better, reviewable path
268
+ was discoverable only by reading source.
269
+ - The test suite is now hermetic on a developer machine that carries a real
270
+ Odoo config: an autouse fixture points `ODOO_CONFIG_FILE` at a missing file
271
+ so instance resolution behaves like a bare CI runner (previously a
272
+ `~/.config/odoo/config.json` flipped resolution semantics and failed four
273
+ instance/knowledge tests locally while CI stayed green).
274
+
275
+ ## [1.1.0] - 2026-07-02
276
+
277
+ Community-roadmap release: the server becomes a platform (plugins), the
278
+ migration wave gets real tooling (data quality + upgrade-log analysis), and
279
+ the MCP surface gets typed. Tool count 39 → 41; prompts 10 → 11; 885 tests.
280
+
281
+ ### Added
282
+ - **Tool plugins** — third parties can ship odoo-mcp tools as normal pip
283
+ packages exposing an `odoo_mcp.tools` entry point with a `register(api)`
284
+ callable; `odoo_mcp.plugin_api` (v1) provides the stable surface (tool
285
+ decorator, instance resolution, field-ACL redaction, envelopes).
286
+ **Opt-in only**: nothing loads unless the name is listed in
287
+ `ODOO_MCP_PLUGINS`; a raising plugin is isolated and reported under
288
+ `health_check.plugins`. Runnable example in `examples/plugin-example/`;
289
+ authoring guide + threat model in [docs/plugins.md](docs/plugins.md).
290
+ - **Per-deployment tool filtering** — `ODOO_MCP_TOOLS_INCLUDE` /
291
+ `ODOO_MCP_TOOLS_EXCLUDE` (CSV fnmatch globs) trim the registered tool
292
+ surface for token-constrained clients; removed names surface in
293
+ `health_check.plugins.tools_filtered`.
294
+ - **Data-quality pack (read-only)** — new tool `data_quality_report` runs
295
+ evidence-first checks on one model: `duplicates` (server-side read_group on
296
+ identifier fields), `missing_required`, `orphaned_references` (honest about
297
+ ACL-hidden targets), `format_anomalies` (email/phone/vat heuristics). Field
298
+ ACL is the ceiling (denied fields skipped + listed); every issue carries
299
+ record ids/values; remediation stays behind the gated write workflow.
300
+ Registered on the async allowlist for large models. New core module
301
+ `data_quality.py` + surface `tools_data_quality.py`; docs in
302
+ [docs/data-quality.md](docs/data-quality.md). Tool count 39 → 41.
303
+ - **Migration workbench v1** — new tool `analyze_upgrade_log` classifies Odoo
304
+ install/update log failures (xpath breaks, missing fields/models/external
305
+ ids, NOT NULL violations, dependency errors, Odoo 17 attrs removal, ORM
306
+ signature changes) into an OpenUpgrade-style worklist with per-finding
307
+ suggestions; input-driven, never contacts Odoo. `scan_addons_source`
308
+ findings and `upgrade_risk_report` risks now carry the same `action`
309
+ taxonomy (`no_action` / `needs_review` / `needs_script`) plus an `actions`
310
+ summary.
311
+ - **Workflow prompt #11** — `pre_migration_data_quality` chains the
312
+ data-quality pack, `diagnose_access` confirmation, and `analyze_upgrade_log`
313
+ into a migration gate with human-approved, write-gated remediation batches
314
+ (prompt count 10 → 11).
315
+ - **Typed per-tool output schemas (read surface)** — the 10 dict-returning
316
+ read tools (`get_odoo_profile`, `schema_catalog`, `health_check`,
317
+ `list_instances`, `list_models`, `get_model_fields`, `search_records`,
318
+ `read_record`, `read_attachment`, `aggregate_records`) now declare Pydantic
319
+ response models (new core module `schemas.py`), so `tools/list` advertises
320
+ real `outputSchema` fields instead of a generic object wrapper. Runtime
321
+ behavior is unchanged (same envelope, extra keys allowed); MCP responses now
322
+ include explicit `null`s for unset optional fields. Remaining tool groups
323
+ are tracked as `good first issue`s.
324
+ - **OAuth hardening (SEP alignment)** — introspection responses carrying an
325
+ `iss` must match the configured issuer (mix-up attack defense);
326
+ `ODOO_MCP_AUTH_REQUIRE_ISS=1` rejects responses without `iss`;
327
+ `ODOO_MCP_AUTH_REQUIRE_AUD=1` rejects tokens without an `aud` claim;
328
+ introspection verdicts (including rejections) are cached for
329
+ `ODOO_MCP_AUTH_CACHE_TTL` seconds (default 60, `0` disables) so hot agent
330
+ loops no longer hammer the authorization server. `health_check` auth
331
+ posture reports the new flags.
332
+ - **Server-level instructions** — `ODOO_MCP_INSTRUCTIONS_FILE` appends a
333
+ deployment-specific plain-text briefing to the MCP `instructions` field
334
+ every client receives (idea: #19, thanks @oadiazp). Unreadable path fails
335
+ at startup; content capped at 16k chars.
336
+
337
+ ### Changed
338
+ - The deprecated SSE transport now prints a startup warning suggesting
339
+ `streamable-http`.
340
+ - python-sdk 2.0 (MCP spec 2026-07-28) migration spiked against `mcp==2.0.0b1`
341
+ and mapped (FastMCP→MCPServer rename, `run()` kwargs, ctor-level
342
+ `token_verifier`, reshaped elicitation); the dependency pin stays
343
+ `mcp>=1.27,<2` until the port ships as its own release.
344
+
345
+ ### Fixed
346
+ - XML-RPC transport: create the `ServerProxy` clients with `allow_none=True` so a
347
+ call whose payload or `fields_get` metadata contains `None` no longer raises
348
+ `TypeError: cannot marshal None unless allow_none is enabled` (seen when creating
349
+ a `product.pricelist` through `validate_write`). Odoo's XML-RPC server already
350
+ emits `<nil/>`, so the client must accept it too.
351
+
352
+ ## [1.0.0] - 2026-06-11
353
+
354
+ The v1.0 milestone: four roadmap phases close the highest-value gaps no
355
+ open-source Odoo MCP server covered. Tool count 36 → 39; 854 tests.
356
+
357
+ ### Added
358
+ - **Field-level ACL (read-path)** — opt-in, per-instance, per-model field
359
+ allow/deny enforced at a single choke point on every path that returns
360
+ record data: `search_records`, `read_record`, `aggregate_records` (denied
361
+ groupby/measure rejected), `get_model_fields` (denied fields marked
362
+ `"access": "restricted"`, not hidden), `index_knowledge` (denied fields
363
+ excluded before BM25 indexing), and the `odoo://` resources. Responses gain
364
+ a `redacted_fields` note. Configure via a `field_acl` key in the policy
365
+ file or `ODOO_MCP_FIELD_POLICY_FILE`; malformed policy fails closed at
366
+ startup. No policy → byte-identical v0.9.0 behavior. First open-source Odoo
367
+ MCP server with field ACL. New module `field_policy.py`; see
368
+ [docs/field-acl.md](docs/field-acl.md).
369
+ - **Cross-instance fan-out (read-only)** — `search_across_instances`,
370
+ `aggregate_across_instances`, and `accounting_health_across_instances` ask
371
+ one question across many configured instances and return merged,
372
+ `_instance`-attributed results with a partial-failure `errors` map. Instance
373
+ selection by list, `"all"`, or `{"tags": [...]}`; opt out per instance with
374
+ `"cross_instance": false`. Each instance is queried under its own field ACL
375
+ (applied before merge), bounded concurrency
376
+ (`ODOO_MCP_CROSS_INSTANCE_WORKERS`, default 4), and its own rate-limit
377
+ budget; large fleets can run via `submit_async_task`. No warehouse, no sync.
378
+ New modules `cross_instance.py` + `tools_cross_instance.py`; see
379
+ [docs/partner-playbook.md](docs/partner-playbook.md).
380
+ - **5 operational workflow prompts** (prompt count 5 → 10) —
381
+ `invoice_approval_chain`, `po_to_receipt`, `customer_onboarding`,
382
+ `expense_claim_review`, `accounting_close_checklist`. Each names its
383
+ required modules, the exact tools per step, and human checkpoints; every
384
+ write-bearing step routes through the gated workflow (no ungated writes).
385
+ New module `prompts_workflows.py`.
386
+ - **Head-to-head benchmark** — `scripts/benchmark_head_to_head.py` measures
387
+ mcp-odoo against another Odoo MCP server on the same Odoo stack;
388
+ [docs/benchmarks.md](docs/benchmarks.md) publishes a reproducible
389
+ methodology and measured numbers (mcp-odoo p50 ~10 ms for common reads on a
390
+ local Odoo 19 stack).
391
+ - Config: optional per-instance `tags` and `cross_instance` keys;
392
+ `list_instances` now reports them.
393
+
394
+ ### Changed
395
+ - `health_check` runtime posture adds a `field_acl` section (active flag +
396
+ instance count, never policy contents).
397
+ - `.importlinter` extended to cover the new core (`field_policy`,
398
+ `cross_instance`) and surface (`tools_cross_instance`, `prompts_workflows`)
399
+ modules; contracts still 2 kept.
400
+
401
+ ## [0.9.0] - 2026-06-11
402
+
403
+ ### Added
404
+ - Background task tools (tool count 27 → 36 together with the knowledge and accounting tools) — `submit_async_task` runs allowlisted long read operations (`scan_addons_source`, `index_knowledge`, `receivable_payable_aging`) on a bounded thread pool (`ODOO_MCP_ASYNC_MAX_WORKERS`, default 2); poll with `get_async_task`, cancel with `cancel_async_task`, list with `list_async_tasks`. Results are retained in memory with a TTL (`ODOO_MCP_ASYNC_RESULT_TTL`, default 1h) and entry cap (`ODOO_MCP_ASYNC_MAX_TASKS`, default 50). Writes are never accepted on the async path.
405
+ - Local-first knowledge search — `index_knowledge` fetches a bounded record slice (smart business-field selection by default) and builds an in-process BM25 index; `search_knowledge` runs accent-insensitive relevance-ranked queries with zero further RPC calls; `knowledge_stats` reports index sizes. Document budget via `ODOO_MCP_KNOWLEDGE_MAX_DOCS` (default 5000). No embeddings service, no new dependencies, no data leaving the machine.
406
+ - Accounting domain pack (read-only) — `receivable_payable_aging` buckets open posted items by days overdue (not due / 1-30 / 31-60 / 61-90 / 90+) with per-partner totals and a sign-flip for payables; `accounting_health_summary` reports open AR/AP item counts and the draft invoice backlog. Works on Odoo 16+ via `account_type` selections.
407
+ - Opt-in tool rate limiting — `ODOO_MCP_RATE_LIMIT_MODE=warn|block` tracks calls per `instance:tool` in a sliding window (`ODOO_MCP_RATE_LIMIT_WINDOW`, default 60s; `ODOO_MCP_RATE_LIMIT_MAX_CALLS`, default 120). `warn` only surfaces counters in `health_check.rate_limits`; `block` refuses over-budget calls on `search_records`, `read_record`, `aggregate_records`, and `execute_method` with a structured error. Default `off` preserves existing behaviour.
408
+ - Benchmark harness — `scripts/benchmark_tools.py` measures per-tool latency (p50/p95/mean) over MCP stdio against any Odoo instance; methodology and reference numbers in `docs/benchmarks.md`.
409
+ - `docs/claude-desktop-connector.md` — expose the server as a Claude Desktop / claude.ai Custom Connector using the existing Streamable HTTP transport and OAuth 2.1 resource server.
410
+ - Dedicated unit tests for `tool_helpers`, `access_helpers`, `schema_cache`, and `write_policy` (245 tests), plus suites for the new task queue, rate limiter, knowledge index, and accounting builders. Full suite: 802 tests.
411
+
412
+ ### Changed
413
+ - Internal refactor: `server.py` (2,553 lines) split into domain modules — `server_core.py` (FastMCP instance, lifespan, shared infra, resources), `tools_read.py`, `tools_write.py`, `tools_diagnostics.py`, `tools_knowledge.py`, `tools_accounting.py`, `tools_async.py`, and `prompts.py`. `odoo_mcp.server` remains the full public re-export surface; no behavior change and all existing imports/monkeypatch targets keep working.
414
+ - `.importlinter` now enforces two real contracts for `odoo_mcp` (core helpers must not import the MCP surface; server → tool modules → core layering) instead of referencing a non-existent package.
415
+ - `docs/catalog-submission.md` expanded with Official MCP Registry and Docker MCP Catalog submission checklists plus outreach drafts.
416
+ - README setup restructured into a single `Setup` section with two explicit paths: **For humans** (interactive wizard, Claude Desktop, pip/Docker/dev installs) and **For AI agents** (a paste-able self-install prompt, `claude mcp add` one-liners, framework SDK examples). The long environment-variable table moved to a new `Configuration reference` section.
417
+ - Added `llms-install.md` — a self-contained, machine-readable installation guide (Cline convention) for AI agents installing the server on a user's behalf, including the configuration contract, per-client steps, verification sequence, and agent security rules (never echo credentials, never enable writes without explicit consent).
418
+
419
+ ## [0.8.0] - 2026-06-11
420
+
421
+ ### Added
422
+ - Free-text `query` parameter on `search_records` — the server builds an OR `ilike` domain over the model's searchable text fields (identifier columns like `name`, `ref`, `email` first; capped at 5) and ANDs it with any explicit `domain`. Falls back to `name` when field metadata is unavailable. The response reports `query_fields_used`.
423
+ - Interactive setup wizard — `odoo-mcp --setup` prompts for connection details, tests the connection, writes an owner-only config file (default `~/.config/odoo/config.json`, auto-discovered by the server), and prints ready-to-paste client snippets (Claude Code, Cursor, Claude Desktop).
424
+ - `docs/comparison.md` — an honest feature comparison of Odoo MCP bridges (setup, write safety, transports, multi-instance, diagnostics, testing), linked from the README.
425
+
426
+ ### Changed
427
+ - Internal refactor: extracted pure helpers from `server.py` (3,053 → ~2,550 lines) into `tool_helpers.py` (validation, domain normalization, request models, version parsing), `schema_cache.py` (BoundedTTLCache), `access_helpers.py` (ACL/record-rule analysis), and `write_policy.py` (write flags + side-effect policy). All names remain importable from `odoo_mcp.server`; no behavior change.
428
+
429
+ ## [0.7.0] - 2026-06-11
430
+
431
+ ### Added
432
+ - OAuth 2.1 resource server for HTTP transports — set `ODOO_MCP_AUTH_ISSUER_URL`, `ODOO_MCP_AUTH_INTROSPECTION_URL`, and `ODOO_MCP_AUTH_RESOURCE_URL` to require bearer tokens on Streamable HTTP. Tokens are validated via RFC 7662 introspection (optional client credentials), with an RFC 8707 audience check when the authorization server binds tokens to resources; RFC 9728 protected-resource metadata is served by the MCP SDK. stdio is unaffected; posture appears in `health_check` as `runtime.oauth`.
433
+ - Batch create in the gated write workflow — `preview_write`/`validate_write` accept `values_list` (one dict per record, max 100); execution maps to a single atomic Odoo `create(vals_list)` call and the approval token covers the whole batch. Per-record differing `write` values are deliberately rejected (`values_list_unsupported_operation`) because they would require non-atomic per-record RPC calls.
434
+ - Added `read_attachment` tool (tool count 26 → 27) — reads `ir.attachment` metadata plus size-capped base64 content (`ODOO_MCP_MAX_ATTACHMENT_BYTES`, default 1 MiB, hard cap 16 MiB), with a defensive re-check of the actually fetched payload size and URL-type attachment handling.
435
+
436
+ ### Compatibility
437
+ - Approval tokens for single-record writes are unchanged; the canonical payload only gains a `values_list` key when batching is used.
438
+ - OAuth is opt-in; without `ODOO_MCP_AUTH_*` env vars the HTTP transport behaves exactly as before.
439
+
440
+ ## [0.6.0] - 2026-06-10
441
+
442
+ ### Added
443
+ - Framework adapter examples in `examples/` — copy-paste integrations for Cursor (`.cursor/mcp.json` + rules), Claude Code, Codex CLI, OpenAI Agents SDK (local `MCPServerStreamableHttp` + `HostedMCPTool`), LangGraph (`langchain-mcp-adapters>=0.2.2`), CrewAI (native `mcps=[...]`), and an importable n8n workflow using the official MCP Client Tool node. Index with a transport matrix at `examples/README.md`. Python adapters support any OpenAI-compatible provider via `OPENAI_BASE_URL`/`OPENAI_MODEL` and were verified end-to-end against a live Odoo 19 stack (openai-agents 0.17.4, langchain 1.3.6, crewai 1.14.6, n8n 2.25.7 import).
444
+ - Audit logging trail — `ODOO_MCP_AUDIT_LOG=<path>` appends one JSONL line per write-path event (`preview`, `validate`, `execute`, `elicit`, `chatter_post`) with model, operation, record IDs, instance, outcome, and a token digest (never the token itself). Fail-open with a warning; posture surfaced in `health_check`.
445
+ - Elicitation-based write approval — `ODOO_MCP_ELICIT_WRITES=1` makes `execute_approved_write` ask the human through MCP elicitation (native confirm form showing a diff summary) before executing; clients without elicitation support fall back to the unchanged token flow. Declines are audited.
446
+ - Side-effect policy file — reviewed `execute_method` side-effect methods can now live in a version-controllable JSON file (`ODOO_MCP_POLICY_FILE`, default `./odoo_mcp_policy.json` when present; see `odoo_mcp_policy.json.example`) with reviewer metadata, merged with the `ODOO_MCP_ALLOWED_SIDE_EFFECT_METHODS` env allowlist. Broken policy files fail closed and surface their error in `health_check`.
447
+ - Reliability hardening — read-only Odoo calls retry connection-level failures with exponential backoff (`ODOO_MCP_RETRY_ATTEMPTS`, `ODOO_MCP_RETRY_BACKOFF`; writes never retry); the schema cache is now TTL- and LRU-bounded (`ODOO_MCP_SCHEMA_CACHE_TTL`, `ODOO_MCP_SCHEMA_CACHE_MAX`); `health_check` reports models hit by N+1 `read_record` loops (`runtime.n_plus_one`).
448
+ - New guides: `docs/troubleshooting.md` (error-classifier categories → fixes), `docs/multi-instance.md`, `docs/performance.md`.
449
+
450
+ ### Compatibility
451
+ - No breaking changes. Tool count stays 26; elicitation, audit logging, and the policy file are all opt-in; retry/caching defaults preserve existing behavior envelopes.
452
+
453
+ ## [0.5.0] - 2026-06-10
454
+
455
+ ### Added
456
+ - Added `lookup_model_history` tool — resolves outdated model names against a curated rename catalog (`account.invoice` → `account.move`, `mail.channel` → `discuss.channel`, payment acquirers, analytic tags, chart templates, and more) so agents stop hallucinating pre-rename names. Static catalog shipped at `odoo_mcp/data/odoo_renames.json`; never contacts Odoo.
457
+ - Added access-error root-cause classification — `diagnose_access` accepts an `observed_error` argument and `diagnose_odoo_call` reports `error_classification`, mapping Odoo error text to `acl`, `record_rule`, `multi_company`, `authentication`, `db_routing`, or `missing_or_filtered` with a recommended next action.
458
+ - Added field-relevance ranking — `get_model_fields` accepts `relevance="top"` and `max_fields` to return only the most business-relevant fields (required/searchable boosted) on wide models like `res.partner`.
459
+ - Added a `server.json` registry manifest and a `mcp-registry-publish` release job — the server publishes to the official MCP registry (registry.modelcontextprotocol.io) via GitHub OIDC after each PyPI release.
460
+
461
+ ### Changed
462
+ - Updated the XML-RPC/JSON-RPC removal timeline to Odoo 22 (fall 2028) following Odoo's postponement from Odoo 20. `diagnose_odoo_call` with `transport="xmlrpc"` now warns (instead of blocking) for Odoo 19–21 targets and errors only for Odoo 22+; `upgrade_risk_report` marks `json2_required` from Odoo 22. The `ODOO20_RPC_REMOVAL` constant is deprecated in favor of `ODOO_RPC_REMOVAL`.
463
+ - README repositioned around version fluency (16 → 22) instead of the obsolete "survives Odoo 20" framing.
464
+
465
+ ### Compatibility
466
+ - Tool count surfaced by `health_check` is now 26 (was 25 in v0.4.0).
467
+ - `upgrade_risk_report` with `target_version="20.0"`/`"21.0"` now returns `blocked: false` with a `json2_migration` warning instead of a blocking `xmlrpc_jsonrpc_removal` error.
468
+
469
+ ## [0.4.0] - 2026-06-10
470
+
471
+ ### Added
472
+ - Multi-instance support — configure several named Odoo instances in one config file via an `instances` map plus a `default` key. Every Odoo-facing tool accepts an optional `instance` parameter (omitted → default instance). Clients connect lazily per instance.
473
+ - Added `list_instances` tool — reports configured instance names, URLs, databases, and transports without ever exposing credentials.
474
+ - Added `ODOO_CONFIG_FILE` env var — explicit config file path checked before `./odoo_config.json`, `~/.config/odoo/config.json`, and `~/.odoo_config.json`.
475
+ - Per-instance `timeout` and `verify_ssl` config keys; global env vars now act as fallback defaults for entries that omit a key.
476
+ - `health_check` / `runtime_security_report` now include `odoo_instances` posture (`instance_count`, `default_instance`).
477
+ - Added `scripts/odoo_multi_instance_smoke.py` — live Docker Compose smoke for multi-instance: three databases at once, two accounts on one instance, per-instance writes, cross-instance isolation, and token-replay rejection.
478
+
479
+ ### Security
480
+ - Write-approval tokens (`preview_write` → `validate_write` → `execute_approved_write`) and `chatter_post` tokens now encode the target instance name. A token validated against one instance can never verify or execute against another. `execute_approved_write` executes on the instance recorded in the approval — there is no instance override at execution time.
481
+ - Schema caches (smart-field metadata and `schema_catalog`) are partitioned per instance, so field metadata from one Odoo database is never served for another.
482
+ - `execute_approved_write` no longer echoes `expected_token` on a token mismatch — returning the correct token for an arbitrary payload was a token-minting oracle. Re-run `preview_write`/`validate_write` instead.
483
+ - Instance config entries never inherit `ODOO_API_KEY` (or any credential) from the environment; a warning is printed when `ODOO_CONFIG_FILE` is set but ignored because all four legacy `ODOO_*` connection env vars are present.
484
+
485
+ ### Compatibility
486
+ - No breaking changes. Legacy environment variables (`ODOO_URL`/`ODOO_DB`/`ODOO_USERNAME`/`ODOO_PASSWORD`) and flat `odoo_config.json` files keep working unchanged and still take precedence; they define a single instance named `default`.
487
+ - Approval tokens are session-scoped and in-memory, so the token format change requires no migration.
488
+ - Tool count surfaced by `health_check` is now 25 (was 24 in v0.3.x).
489
+ - MCP resources (`odoo://…`) use the default instance in this release; multi-instance resource URIs are future work.
490
+
491
+ ### Schema Compatibility
492
+ - No schema compatibility changes.
493
+
494
+ ## [0.3.1] - 2026-05-21
495
+
496
+ ### Fixed
497
+ - Fixed `aggregate_records` on Odoo Online SaaS 19.x by detecting SaaS version metadata such as `saas~19` and routing Odoo 19+ aggregation calls to `formatted_read_group` instead of legacy `read_group`.
498
+
499
+ ## [0.3.0] - 2026-05-04
500
+
501
+ ### Added
502
+ - Added `aggregate_records` tool — server-side groupby/aggregation that uses `formatted_read_group` on Odoo 19+ and falls back to `read_group` on earlier versions. Supports `sum`, `avg`, `min`, `max`, `count`, `count_distinct`, `array_agg`, `bool_and`, `bool_or`.
503
+ - Added `chatter_post` tool — post messages on `mail.thread` records with two safety modes: default approval-token preview/execute flow, or direct mode via `MCP_CHATTER_DIRECT=1`. Supports `message_type` (`comment`/`notification`), `subtype_xmlid`, `partner_ids`, `attachment_ids`.
504
+ - Added smart field selection for `search_records` and `read_record` — when the caller omits `fields`, the server picks a curated subset (business identifiers + state + key relations) and excludes audit, message, activity, binary, and unstored-compute columns. Pass `fields=["*"]` to opt out and fetch every field. Cap configured via `ODOO_MCP_MAX_SMART_FIELDS` (default 15).
505
+ - Added `ODOO_LOCALE` plumbing — when set, every Odoo call gets `context.lang` injected automatically. Caller-supplied `context.lang` always wins.
506
+ - Added structured logging — `setup_logging()` reads `ODOO_MCP_LOG_LEVEL`, `ODOO_MCP_LOG_JSON`, and `ODOO_MCP_LOG_FILE`. JSON formatter and rotating file handler use the standard library only (no new runtime dependencies).
507
+ - Surfaced `chatter_direct_enabled` posture in `runtime_security_report` and `health_check`.
508
+ - Extended JSON-2 positional argument mappings for `read_group`, `formatted_read_group`, and `message_post`.
509
+
510
+ ### Changed
511
+ - `search_records` and `read_record` responses now include `smart_fields_applied` and `fields_used`.
512
+ - Tool count surfaced by `health_check` is now 24 (was 22 in v0.2.0).
513
+ - `OdooClient.__init__` accepts an optional `lang` argument that drives the locale-injection pipeline.
514
+
515
+ ### Compatibility
516
+ - No breaking changes for existing callers. Default behaviour for `search_records` / `read_record` shifts from "all fields" to "smart subset" — pass `fields=["*"]` to restore the prior behaviour.
517
+ - New env vars: `ODOO_LOCALE`, `ODOO_MCP_MAX_SMART_FIELDS`, `ODOO_MCP_LOG_LEVEL`, `ODOO_MCP_LOG_JSON`, `ODOO_MCP_LOG_FILE`, `MCP_CHATTER_DIRECT`.
518
+
519
+ ## [0.2.0] - 2026-04-28
520
+
521
+ ### Added
522
+ - Added `diagnose_access` to inspect readable ACL, record-rule, current-user, and count evidence for the current Odoo credential without sudo or impersonation.
523
+ - Added exact side-effect method allowlisting with `ODOO_MCP_ALLOWED_SIDE_EFFECT_METHODS`.
524
+ - Added static addon scanner findings for computed-field `@api.depends` coverage and CRUD override `super()` return contracts.
525
+ - Added Docker Compose smoke coverage for a packaged custom addon XML install/update lifecycle and its XML-defined record rule.
526
+
527
+ ### Changed
528
+ - Classified common Odoo side-effect methods such as `message_post`, `action_*`, `button_*`, `*_send*`, `*_post*`, and `*_validate*` separately from unknown methods.
529
+ - Updated smoke expectations from 21 to 22 MCP tools.
530
+
531
+ ## [0.1.0] - 2026-04-28
532
+
533
+ ### Added
534
+ - Added MCP safety annotations and structured output schemas across the tool surface.
535
+ - Added Odoo profile and schema catalog tools for bounded live environment discovery.
536
+ - Added safe write workflow tools: `preview_write`, `validate_write`, and fail-closed `execute_approved_write`.
537
+ - Hardened safe writes so execution requires a same-process `validate_write` approval record, `confirm=true`, and `ODOO_MCP_ENABLE_WRITES=1`.
538
+ - Blocked direct `create`/`write`/`unlink` through `execute_method` and blocked unknown side-effect methods unless explicitly trusted with `ODOO_MCP_ALLOW_UNKNOWN_METHODS=1`.
539
+ - Restricted explicit addon source scans to configured `ODOO_ADDONS_PATHS` roots.
540
+ - Added local addon source scanning, structured domain building, business pack reporting, runtime health, and 5 MCP prompts for agent workflows.
541
+
542
+ ### Changed
543
+ - Reworked project documentation for a polished open-source GitHub presentation, including a concise README, client configuration guide, architecture notes, testing guide, contributing guide, security policy, support guide, code of conduct, package metadata URLs, and sdist documentation inclusion.
544
+ - Hardened HTTP runtime startup so non-local binds require `--allow-remote-http` or `MCP_ALLOW_REMOTE_HTTP=1`.
545
+ - Expanded the Docker Compose smoke harness to require 21 tools, 5 prompts, and live checks for the new agent workflow tools.
546
+
547
+ ## [0.0.4] - 2026-04-28
548
+
549
+ ### Added
550
+ - Added a Docker Compose integration smoke harness that boots disposable Odoo 16.0, 17.0, 18.0, and 19.0 stacks and validates live HTTP, XML-RPC, and MCP stdio behavior.
551
+ - Added Odoo 19 External JSON-2 transport support behind `ODOO_TRANSPORT=json2`, with bearer API-key authentication through `ODOO_API_KEY`.
552
+ - Added Odoo 19 JSON-2 smoke validation that generates a disposable API key and verifies both direct `/json/2` calls and MCP stdio calls.
553
+ - Added opt-in MCP Streamable HTTP and SSE runtime support through `--transport`, `--host`, `--port`, and `--path`.
554
+ - Added read-only typed tools: `list_models`, `get_model_fields`, `search_records`, and `read_record`.
555
+ - Added diagnostic/report tools for agent workflows: `diagnose_odoo_call`, `inspect_model_relationships`, `generate_json2_payload`, `upgrade_risk_report`, and `fit_gap_report`.
556
+ - Added `ODOO_JSON2_DATABASE_HEADER` support so JSON-2 calls send `X-Odoo-Database` by default and can opt out for host/dbfilter-routed deployments.
557
+ - Added MCP Inspector smoke validation for `tools/list` over stdio and Streamable HTTP.
558
+ - Added generic client configuration examples for stdio, Docker stdio, and Streamable HTTP.
559
+
560
+ ### Changed
561
+ - Documented the current compatibility posture for the planned 0.0.4 release: XML-RPC remains the default transport, while Odoo's External JSON-2 API is available for Odoo 19.
562
+ - Documented JSON-2 named argument mapping, per-call transaction behavior, Odoo-shaped error preservation, and debug redaction defaults.
563
+ - Updated README setup guidance for Claude Desktop on macOS, including the expected config file location and the recommendation to use an absolute Python path.
564
+ - Updated Docker usage guidance to build and run the local `mcp/odoo:latest` image with the current Odoo environment variables.
565
+ - Clarified the current MCP surface as 12 tools and 4 resource URI patterns, matching the implemented server.
566
+ - Updated release workflow intent so PyPI publishing stays behind tests, build, and MCP Inspector runtime smoke validation.
567
+
568
+ ### Notes
569
+ - Odoo's current 19.0 documentation source says XML-RPC and JSON-RPC endpoints are deprecated and scheduled for removal in Odoo 20 (fall 2026), with External JSON-2 as the replacement.
570
+ - JSON-2 is explicit opt-in. XML-RPC carries the database name per request; JSON-2 uses bearer auth and this server sends `X-Odoo-Database` by default for multi-database deployments.
571
+
572
+ ## [0.0.3] - 2025-03-18
573
+
574
+ ### Fixed
575
+ - Fixed `OdooClient` class by adding missing methods: `get_models()`, `get_model_info()`, `get_model_fields()`, `search_read()`, and `read_records()`
576
+ - Ensured compatibility with different Odoo versions by using only basic fields when retrieving model information
577
+
578
+ ### Added
579
+ - Support for retrieving all models from an Odoo instance
580
+ - Support for retrieving detailed information about specific models
581
+ - Support for searching and reading records with various filtering options
582
+
583
+ ## [0.0.2] - 2025-03-18
584
+
585
+ ### Fixed
586
+ - Added missing dependencies in pyproject.toml: `mcp>=0.1.1`, `requests>=2.31.0`, `xmlrpc>=0.4.1`
587
+
588
+ ## [0.0.1] - 2025-03-18
589
+
590
+ ### Added
591
+ - Initial release with basic Odoo XML-RPC client support
592
+ - MCP Server integration for Odoo
593
+ - Command-line interface for quick setup and testing
@@ -0,0 +1,23 @@
1
+ # Code of Conduct
2
+
3
+ This project follows a simple standard: be precise, respectful, and useful.
4
+
5
+ ## Expected behavior
6
+
7
+ - Be direct without being hostile.
8
+ - Assume good intent, but correct mistakes with evidence.
9
+ - Keep discussions focused on the project and the user impact.
10
+ - Respect privacy. Do not post credentials, private logs, customer data, or employee data.
11
+
12
+ ## Unacceptable behavior
13
+
14
+ - Harassment, threats, or personal attacks.
15
+ - Publishing private information without consent.
16
+ - Repeated off-topic comments that derail project work.
17
+ - Abusive language toward contributors or users.
18
+
19
+ ## Enforcement
20
+
21
+ Maintainers may edit, hide, or remove comments and issues that violate this code. Repeated or severe violations may result in being blocked from participating in the project.
22
+
23
+ Report conduct concerns privately to the maintainer listed in `pyproject.toml`.