From 5503812de7c93538501b5b16f5f7e954e4c98099 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Jul 2026 15:33:46 +0000 Subject: [PATCH 1/7] NO-PIN policy: OGAR as sibling path deps + plug-and-play contract arming Operator ruling: never a rev pin -- "wenn's knallt, dann einmal, nicht 200 Pins monitoren". All OGAR deps (symbiont, lance-graph-ogar, cognitive-stack) switch from git+branch=main (which always writes a rev into Cargo.lock) to PATH deps on the local sibling /home/user/OGAR; the fuse then always checks the sibling's CURRENT state and drift is a single compile-time bang. Plug-and-play arming: lance-graph-contract gains the optional `ogar` feature -- the ONE sanctioned optional dep (ogar-vocab, path, no pin). Arming activates `ogar_codebook::armed`: contract-side COUNT_FUSE compile assert + per-entry parity test + `armed::vocab` re-export so a consumer pulls the live codebook through the contract instead of its own dep line. Default build stays zero-dep. lance-graph-ogar arms it. Verified: contract default + --features ogar green (840 lib tests incl. entry-for-entry mirror parity); symbiont / lance-graph-ogar (77 tests) / cognitive-stack all build against the sibling at OGAR main 68d85f02. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1 --- .claude/board/LATEST_STATE.md | 12 ++ Cargo.lock | 5 +- crates/cognitive-stack/Cargo.lock | 143 +++++++++++++++++- crates/cognitive-stack/Cargo.toml | 6 +- crates/lance-graph-contract/Cargo.toml | 13 +- .../lance-graph-contract/src/ogar_codebook.rs | 40 +++++ crates/lance-graph-ogar/Cargo.toml | 26 ++-- crates/symbiont/Cargo.toml | 6 +- 8 files changed, 222 insertions(+), 29 deletions(-) diff --git a/.claude/board/LATEST_STATE.md b/.claude/board/LATEST_STATE.md index 464ec803..0a6008bb 100644 --- a/.claude/board/LATEST_STATE.md +++ b/.claude/board/LATEST_STATE.md @@ -1,5 +1,17 @@ # LATEST_STATE — What Just Shipped (read this FIRST) + +> **2026-07-07 — NO-PIN + plug-and-play OGAR arming:** all OGAR deps +> (symbiont / lance-graph-ogar / cognitive-stack) switched from +> `git+branch=main` (which always pins a rev in Cargo.lock) to PATH deps on +> the local sibling `/home/user/OGAR` — operator policy: "wenn's knallt, +> dann einmal — nicht 200 Pins monitoren". `lance-graph-contract` gained the +> optional `ogar` feature (`ogar_codebook::armed`): arming pulls `ogar-vocab` +> transitively and activates a contract-side compile-time `COUNT_FUSE` +> (+ per-entry parity test). lance-graph-ogar arms it; the contract stays +> zero-dep by default. Fuse verified green vs OGAR main `68d85f02` (84==84, +> entry-for-entry). + > **Auto-injected at session start via SessionStart hook.** > Updated after every merged PR. > **Last updated:** 2026-05-14 (PR #372 merged: sprint-10 spec sprint, 12-worker CCA2A fleet + Opus meta-review + 8 knowledge docs, governance-only (zero .rs changes), mirrors PR #365 pattern. Sprint-11 implementation wave gated on 5 spec patches + 4 user ratifications: CSI-1 CausalEdge64 bit-reclaim Option, OQ-1 Σ4-Σ5 banding, OQ-3 plasticity granularity, OQ-5 rayon vendor. **Major findings:** (1) dual `CausalEdge64` types in workspace — `causal_edge::CausalEdge64` SPO-palette layout ≠ `thinking_engine::layered::CausalEdge64` 8-channel cascade, same name different semantics, surfaced as duplication entry #13 in TYPE_DUPLICATION_MAP and E-META-7 in EPIPHANIES; (2) p64 drift origin pinpointed at `crates/lance-graph-planner/src/cache/convergence.rs:18-22 #[allow(unused_imports)]` annotation — wiring intended for hot-path convergence never finished; (3) three-zone hot-path mental model corrects prior framing — Zone-1 thinking-engine MatVec 200-500ns + AriGraph entity_index O(1) ~20-200ns is the actual cycle-speed path, not DataFusion. Prior: 2026-05-13 (PR #366 merged: sprint-7 7-worker implementation wave for the sprint-5/6 specs + AuditSink trait unification, ~5 KLOC across 5 crates +2 new (`lance-graph-supervisor`, `lance-graph-consumer-conformance`), ~70 new tests, workspace clippy --tests --no-deps -D warnings exits 0; Opus meta verdict 4A/2B/1B-minus; OQ-7-1/2/3 all locked pre-merge; `UnifiedAuditSink` D-SDR-4 placeholder dropped, all sinks unified on `AuditSink` trait; `UnifiedBridge::with_jsonl_audit()` ergonomic constructor added for MedCare-rs sprint-2 item 5. **Adjacent landings (same day):** MedCare-rs sprint-1 10-PR sweep (#113-#122) including E1-1 OQ-3 direct migration (6 RoleGroups) consuming our `0d725d4` decision. MedCare-rs sprint-2 (5 PRs) is queued on user "go" — item 5 consumes this PR's new constructor. Prior same-day: PR #365 (13 sprint-5/6 specs + meta). Prior: PR #364 (D-SDR-3/4/5 + sprint-log-4 governance + sprint-5-9 roadmap + codex P1/P2 fixes). lance-graph #364 ships D-SDR-3/4/5 + sprint-log-4 governance + sprint-5-9 roadmap + codex P1/P2 surgical fixes (OwlIdentity 3-byte canonical, UnifiedAuditEvent 26 bytes, OgitFamilyTable sparse `HashMap`, audit super_domain via AuditChain). MedCare-rs#112 (PR-B) wires `UnifiedBridge` + medcare-rbac + medcare-realtime substrate (+2963 LOC, 17 files, §73 SGB V + BMV-Ä §57 + BtM regulatory tests). smb-office-rs#31 (PR-C) wires `UnifiedBridge` (+111 LOC). ndarray#142 ships VBMI gate for `permute_bytes` (P0 SIGILL fix on Skylake-X / Cascade Lake / Ice Lake-SP) + Inf clamp for `simd_exp_f32`. D-SDR-5 `UnifiedBridge` surface is now consumed end-to-end across MedCare + smb-office. Prior: 2026-05-07 (PR #354). Prior: 2026-05-07 (PR #353). Prior: 2026-05-07 (PR #352). Prior: 2026-05-06 (splat-osint-ingestion-v1 PR 1+2 of 6 in flight). Prior: 2026-04-21 post PR #243. diff --git a/Cargo.lock b/Cargo.lock index d649d546..61cce5a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4925,6 +4925,7 @@ version = "0.1.0" dependencies = [ "criterion", "glob", + "ogar-vocab", "serde", "serde_yaml", ] @@ -6043,7 +6044,6 @@ dependencies = [ [[package]] name = "ogar-adapter-surrealql" version = "0.1.0" -source = "git+https://github.com/AdaWorldAPI/OGAR?branch=main#46d2d2ef0144c3a7e86dbad688893d611cd1171c" dependencies = [ "ogar-vocab", ] @@ -6051,7 +6051,6 @@ dependencies = [ [[package]] name = "ogar-class-view" version = "0.1.0" -source = "git+https://github.com/AdaWorldAPI/OGAR?branch=main#46d2d2ef0144c3a7e86dbad688893d611cd1171c" dependencies = [ "lance-graph-contract 0.1.0 (git+https://github.com/AdaWorldAPI/lance-graph?branch=main)", "ogar-vocab", @@ -6060,12 +6059,10 @@ dependencies = [ [[package]] name = "ogar-ontology" version = "0.1.0" -source = "git+https://github.com/AdaWorldAPI/OGAR?branch=main#46d2d2ef0144c3a7e86dbad688893d611cd1171c" [[package]] name = "ogar-vocab" version = "0.1.0" -source = "git+https://github.com/AdaWorldAPI/OGAR?branch=main#46d2d2ef0144c3a7e86dbad688893d611cd1171c" [[package]] name = "once_cell" diff --git a/crates/cognitive-stack/Cargo.lock b/crates/cognitive-stack/Cargo.lock index 7910243c..adb44aba 100644 --- a/crates/cognitive-stack/Cargo.lock +++ b/crates/cognitive-stack/Cargo.lock @@ -4869,6 +4869,7 @@ name = "lance-graph-contract" version = "0.1.0" dependencies = [ "glob", + "ogar-vocab", "serde", "serde_yaml", ] @@ -4878,12 +4879,28 @@ name = "lance-graph-ogar" version = "0.1.0" dependencies = [ "lance-graph-contract", + "lance-graph-ontology", "ogar-adapter-surrealql", "ogar-class-view", "ogar-ontology", "ogar-vocab", ] +[[package]] +name = "lance-graph-ontology" +version = "0.1.0" +dependencies = [ + "lance-graph-contract", + "once_cell", + "oxrdf", + "oxrdfxml", + "oxttl", + "quick-xml 0.37.5", + "sha2 0.10.9", + "thiserror 2.0.18", + "toml", +] + [[package]] name = "lance-graph-planner" version = "0.1.0" @@ -5983,7 +6000,6 @@ dependencies = [ [[package]] name = "ogar-adapter-surrealql" version = "0.1.0" -source = "git+https://github.com/AdaWorldAPI/OGAR?branch=main#f4323c094c4535b6127b0da89440974749df585e" dependencies = [ "ogar-vocab", "surrealdb-ast", @@ -5993,7 +6009,6 @@ dependencies = [ [[package]] name = "ogar-class-view" version = "0.1.0" -source = "git+https://github.com/AdaWorldAPI/OGAR?branch=main#f4323c094c4535b6127b0da89440974749df585e" dependencies = [ "lance-graph-contract", "ogar-vocab", @@ -6002,12 +6017,10 @@ dependencies = [ [[package]] name = "ogar-ontology" version = "0.1.0" -source = "git+https://github.com/AdaWorldAPI/OGAR?branch=main#f4323c094c4535b6127b0da89440974749df585e" [[package]] name = "ogar-vocab" version = "0.1.0" -source = "git+https://github.com/AdaWorldAPI/OGAR?branch=main#f4323c094c4535b6127b0da89440974749df585e" [[package]] name = "once_cell" @@ -6354,6 +6367,59 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" +[[package]] +name = "oxilangtag" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d3b4eb570abd4a1dcb062c31fd37b832264d9dc7292c3e69acfe926c87b063f" +dependencies = [ + "serde", +] + +[[package]] +name = "oxiri" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54b4ed3a7192fa19f5f48f99871f2755047fabefd7f222f12a1df1773796a102" + +[[package]] +name = "oxrdf" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0afd5c28e4a399c57ee2bc3accd40c7b671fdc7b6537499f14e95b265af7d7e0" +dependencies = [ + "oxilangtag", + "oxiri", + "rand 0.9.4", + "thiserror 2.0.18", +] + +[[package]] +name = "oxrdfxml" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd5516ae083d09bc57ec65ed5ee97701481725de6ffaa83d968ab42a96157ba1" +dependencies = [ + "oxilangtag", + "oxiri", + "oxrdf", + "quick-xml 0.37.5", + "thiserror 2.0.18", +] + +[[package]] +name = "oxttl" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f03fd471bd54c23d76631c0a2677aa4bb308d905f6e491ee35dcb0732b7c5c6c" +dependencies = [ + "memchr", + "oxilangtag", + "oxiri", + "oxrdf", + "thiserror 2.0.18", +] + [[package]] name = "p256" version = "0.13.2" @@ -6843,7 +6909,7 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ - "toml_edit", + "toml_edit 0.25.12+spec-1.1.0", ] [[package]] @@ -6974,6 +7040,15 @@ dependencies = [ "syn 2.0.118", ] +[[package]] +name = "quick-xml" +version = "0.37.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" +dependencies = [ + "memchr", +] + [[package]] name = "quick-xml" version = "0.38.4" @@ -8218,6 +8293,15 @@ dependencies = [ "syn 2.0.118", ] +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -9285,6 +9369,27 @@ dependencies = [ "syn 2.0.118", ] +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime 0.6.11", + "toml_edit 0.22.27", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + [[package]] name = "toml_datetime" version = "1.1.1+spec-1.1.0" @@ -9294,6 +9399,19 @@ dependencies = [ "serde_core", ] +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap 2.14.0", + "serde", + "serde_spanned", + "toml_datetime 0.6.11", + "winnow 0.7.15", +] + [[package]] name = "toml_edit" version = "0.25.12+spec-1.1.0" @@ -9301,9 +9419,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2153edc6955a6c354fad8f5efd38b6a8769bdccf9fe50f8e1329f81b0baa5d7" dependencies = [ "indexmap 2.14.0", - "toml_datetime", + "toml_datetime 1.1.1+spec-1.1.0", "toml_parser", - "winnow", + "winnow 1.0.3", ] [[package]] @@ -9312,7 +9430,7 @@ version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ - "winnow", + "winnow 1.0.3", ] [[package]] @@ -10284,6 +10402,15 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + [[package]] name = "winnow" version = "1.0.3" diff --git a/crates/cognitive-stack/Cargo.toml b/crates/cognitive-stack/Cargo.toml index 84703f38..bc2ab7f0 100644 --- a/crates/cognitive-stack/Cargo.toml +++ b/crates/cognitive-stack/Cargo.toml @@ -52,9 +52,9 @@ ndarray = { path = "../../../ndarray" } # surrealdb to main matches OGAR's own surrealdb pin so they resolve to ONE source. ractor = { git = "https://github.com/AdaWorldAPI/ractor", branch = "claude/jirak-math-theorems-harvest-rfii13" } surrealdb-core = { git = "https://github.com/AdaWorldAPI/surrealdb", branch = "main", default-features = false, features = ["kv-lance"] } -ogar-vocab = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" } -ogar-ontology = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" } -ogar-adapter-surrealql = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main", features = ["surrealdb-parser"] } +ogar-vocab = { path = "../../../OGAR/crates/ogar-vocab" } +ogar-ontology = { path = "../../../OGAR/crates/ogar-ontology" } +ogar-adapter-surrealql = { path = "../../../OGAR/crates/ogar-adapter-surrealql", features = ["surrealdb-parser"] } # The OGAR activation crate (in-repo, path) — links the full Active-Record surface # (ogar-class-view's `impl lance_graph_contract::ClassView` + codebook parity-guard). diff --git a/crates/lance-graph-contract/Cargo.toml b/crates/lance-graph-contract/Cargo.toml index ff0283ef..f295b9b8 100644 --- a/crates/lance-graph-contract/Cargo.toml +++ b/crates/lance-graph-contract/Cargo.toml @@ -8,8 +8,15 @@ keywords = ["lance", "graph", "contract", "orchestration", "thinking"] build = "build.rs" [dependencies] -# Zero dependencies by design — this is a trait-only crate. +# Zero dependencies by DEFAULT — this is a trait-only crate. # Consumers depend on this; implementations depend on lance-graph-planner. +# +# The ONE sanctioned optional dep: arming the `ogar` feature pulls the live +# OGAR codebook (ogar-vocab, PATH dep to the local sibling — NO PINS, operator +# policy 2026-07-07) into the same binary, which activates the compile-time +# COUNT_FUSE in `ogar_codebook::armed`. Plug-and-play: a consumer that arms +# `ogar` gets mirror-vs-vocab drift as a BUILD FAILURE, once, at compile time. +ogar-vocab = { path = "../../../OGAR/crates/ogar-vocab", optional = true } [build-dependencies] # serde_yaml: used ONLY in build.rs to parse modules/*/manifest.yaml. @@ -31,6 +38,10 @@ name = "i4_batch" harness = false [features] +# Arm the live OGAR codebook: pulls ogar-vocab (local sibling path dep) and +# activates the compile-time mirror↔vocab fuse in `ogar_codebook::armed`. +ogar = ["dep:ogar-vocab"] + # A-unlock-stepdomain — `step_trajectory_hash` forward stub for the E4 # cross-PR bridge between PR #278 audit log + PR #279 grammar trajectory. # No-op alias today; concrete impl lands once the bridge PR ships. diff --git a/crates/lance-graph-contract/src/ogar_codebook.rs b/crates/lance-graph-contract/src/ogar_codebook.rs index 10faf406..a04143cc 100644 --- a/crates/lance-graph-contract/src/ogar_codebook.rs +++ b/crates/lance-graph-contract/src/ogar_codebook.rs @@ -952,3 +952,43 @@ mod tests { ); } } + +/// **Armed mode** (`feature = "ogar"`) — the live OGAR codebook in the same +/// binary, with the mirror↔vocab drift fuse at compile time. +/// +/// Arming this feature pulls `ogar-vocab` (a PATH dep to the local OGAR +/// sibling checkout — no git pin, no rev to monitor) and makes any +/// count drift between [`CODEBOOK`] (the zero-dep wire mirror) and +/// `ogar_vocab::class_ids::ALL` (the canonical codebook) a **build +/// failure** — it bangs once, at compile time, instead of requiring +/// pin monitoring. Per-entry (name, id) parity is asserted by the +/// `armed` tests; consumers can also call [`armed::vocab`] re-exports +/// directly instead of carrying their own `ogar-vocab` dep line. +#[cfg(feature = "ogar")] +pub mod armed { + /// Re-export of the live codebook crate — a consumer arming `ogar` on + /// the contract pulls vocab through HERE, plug-and-play, instead of + /// declaring its own dependency line. + pub use ogar_vocab as vocab; + + /// Compile-time drift fuse: the wire mirror and the live codebook must + /// carry the same number of concepts. Fails ANY armed build on drift. + pub const COUNT_FUSE: () = assert!( + super::CODEBOOK.len() == ogar_vocab::class_ids::ALL.len(), + "ogar_codebook mirror drifted from ogar_vocab::class_ids::ALL \ + (concept count mismatch) — update the mirror PAIRED with the OGAR change" + ); + + #[cfg(test)] + mod tests { + /// Per-entry parity: every (concept, id) row identical, both orders. + #[test] + fn mirror_matches_live_vocab_entry_for_entry() { + let mirror: std::collections::BTreeMap<&str, u16> = + super::super::CODEBOOK.iter().copied().collect(); + let live: std::collections::BTreeMap<&str, u16> = + ogar_vocab::class_ids::ALL.iter().copied().collect(); + assert_eq!(mirror, live, "mirror and live codebook disagree"); + } + } +} diff --git a/crates/lance-graph-ogar/Cargo.toml b/crates/lance-graph-ogar/Cargo.toml index d01912d0..8365a9ec 100644 --- a/crates/lance-graph-ogar/Cargo.toml +++ b/crates/lance-graph-ogar/Cargo.toml @@ -70,7 +70,10 @@ serde = ["ogar-vocab/serde", "ogar-adapter-surrealql/serde"] # ogar_codebook wire-compat mirror the parity-guard checks. PATH copy = the # canonical in-repo source (same as lance-graph / symbiont); the [patch] below # folds ogar-class-view's transitive git contract onto it = ONE source. -lance-graph-contract = { path = "../lance-graph-contract" } +# `features = ["ogar"]` ARMS the contract: it pulls ogar-vocab (sibling path, +# no pin) transitively and activates the contract-side compile-time COUNT_FUSE +# — plug-and-play drift detection in every binary that links this crate. +lance-graph-contract = { path = "../lance-graph-contract", features = ["ogar"] } # OGIT spine (the NamespaceBridge trait + registry + namespace/error types the # OGAR-driven port bridges build on). The OGIT/OGAR seam: the bridges live HERE @@ -82,17 +85,20 @@ lance-graph-ontology = { path = "../lance-graph-ontology" } # symbiont's + cognitive-stack's pins so ALL golden-image roots resolve to # ONE OGAR source) ── # -# Back to branch = "main" now that OGAR #152 (Geo/OSM + network_layer, ALL=79) -# has merged: main == the temp-pinned rev, so the contract mirror (79) and -# ogar_vocab::class_ids::ALL (84 since the 0x0805..0x0809 OCR plan mints, OGAR #172) agree via COUNT_FUSE, and symbiont / -# cognitive-stack (which also `branch = "main"` these crates) resolve the SAME -# single OGAR copy instead of a second one at a rev (codex P2 on #648). -ogar-vocab = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" } -ogar-class-view = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" } -ogar-ontology = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" } +# NO PINS — operator policy (2026-07-07): OGAR resolves as a PATH dep to the +# local sibling checkout /home/user/OGAR (clone of AdaWorldAPI/OGAR main), the +# same pattern as the ndarray path dep. A git dep always writes a rev pin into +# Cargo.lock; a path dep never does — the fuse (COUNT_FUSE) then always checks +# against the sibling's CURRENT state. symbiont / cognitive-stack use the same +# sibling paths, so all three resolve ONE OGAR copy (codex P2 on #648 intent +# preserved). CI that builds these excluded crates must sibling-check-out OGAR +# (tesseract-rs CI precedent for lance-graph/ndarray). +ogar-vocab = { path = "../../../OGAR/crates/ogar-vocab" } +ogar-class-view = { path = "../../../OGAR/crates/ogar-class-view" } +ogar-ontology = { path = "../../../OGAR/crates/ogar-ontology" } # default features only = the light emit() DDL formatter (no surrealdb tree); # the parser half is opt-in via this crate's `surrealql-parser` feature. -ogar-adapter-surrealql = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" } +ogar-adapter-surrealql = { path = "../../../OGAR/crates/ogar-adapter-surrealql" } # Fold ogar-class-view's transitive `lance-graph-contract` (git # AdaWorldAPI/lance-graph#main) onto the SAME path copy this crate uses, so there diff --git a/crates/symbiont/Cargo.toml b/crates/symbiont/Cargo.toml index 1d642bee..6b1fb95c 100644 --- a/crates/symbiont/Cargo.toml +++ b/crates/symbiont/Cargo.toml @@ -52,9 +52,9 @@ ractor = { git = "https://github.com/AdaWorldAPI/ractor", branch = "claude/jirak surrealdb-core = { git = "https://github.com/AdaWorldAPI/surrealdb", branch = "main", default-features = false, features = ["kv-lance"] } # OGAR tracks `main` (its jirak commit 3016c78 is an ancestor of main — main is a # strict superset; there is no separate OGAR jirak branch on github). -ogar-vocab = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" } -ogar-ontology = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" } -ogar-adapter-surrealql = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main", features = ["surrealdb-parser"] } +ogar-vocab = { path = "../../../OGAR/crates/ogar-vocab" } +ogar-ontology = { path = "../../../OGAR/crates/ogar-ontology" } +ogar-adapter-surrealql = { path = "../../../OGAR/crates/ogar-adapter-surrealql", features = ["surrealdb-parser"] } # The OGAR activation crate (in-repo, path) — the golden image's whole point is to # prove the FULL AR surface links: ogar-class-view's `impl lance_graph_contract:: From f9e528d26c394c48c86f5b4276c6bb2b4fcef330 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Jul 2026 15:46:24 +0000 Subject: [PATCH 2/7] lance-graph-ogar: authoritative-table roundtrip green light (ID-level only) Operator design: lance-graph does NOT carry ontologies -- it flips one fuse. For the OCR capability table the test asserts (a) the authority named an expected executor, (b) every subject classid exists in the wire mirror this crate already guards, (c) the table is internally consistent. The consumer half (registration + coverage + classid activation) is verified in the consumer binary via OGAR's new capability_registry::verify_registration -- authority checks stay in OGAR, mirror checks stay here, nothing serializes. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1 --- crates/lance-graph-ogar/src/lib.rs | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/crates/lance-graph-ogar/src/lib.rs b/crates/lance-graph-ogar/src/lib.rs index ee4b75d9..83bdf590 100644 --- a/crates/lance-graph-ogar/src/lib.rs +++ b/crates/lance-graph-ogar/src/lib.rs @@ -206,6 +206,41 @@ pub mod parity { mod tests { use super::*; + /// The ROUNDTRIP GREEN LIGHT (operator, 2026-07-07): lance-graph does NOT + /// carry ontologies — it only flips this fuse. For every authoritative + /// OGAR capability table (OCR today), assert at ID level that (a) the + /// authority named at least one expected executor ("die Ontologie wurde + /// nicht vergessen"), (b) every subject classid the table binds exists in + /// the wire mirror this crate already guards, (c) the table itself is + /// internally consistent (names unique, non-empty). The consumer-side + /// half of the loop (registration + coverage + classid activation) is + /// asserted in the consumer's own binary via + /// `ogar_vocab::capability_registry::verify_registration`. + #[test] + fn authoritative_ocr_table_roundtrip_is_green() { + use ogar_vocab::ocr_actions; + + assert!( + !ocr_actions::OCR_EXPECTED_EXECUTORS.is_empty(), + "authority declared no expected executor for the OCR table" + ); + let mirror: std::collections::BTreeMap<&str, u16> = + lance_graph_contract::ogar_codebook::CODEBOOK + .iter() + .copied() + .collect(); + for &id in ocr_actions::OCR_SUBJECT_CLASSIDS { + assert!( + mirror.values().any(|&v| v == id), + "OCR table subject 0x{id:04X} missing from the wire mirror" + ); + } + let names = ocr_actions::OCR_ACTION_NAMES; + assert!(!names.is_empty()); + let set: std::collections::BTreeSet<&str> = names.iter().copied().collect(); + assert_eq!(set.len(), names.len(), "duplicate capability names"); + } + #[test] fn ogar_class_view_implements_contract_class_view() { // The activation in one line: an OgarClassView IS a contract ClassView, From 9608151349293e8da2a07d4486e80406aea25c75 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Jul 2026 16:18:35 +0000 Subject: [PATCH 3/7] Fix CI workspace load: contract back to zero-dep; OGAR sibling in CI The optional ogar-vocab path dep on lance-graph-contract (a workspace MEMBER) broke every cargo invocation in CI at workspace-load time -- the runner has no OGAR sibling, so even fmt/build jobs died with "failed to read .../OGAR/crates/ogar-vocab/Cargo.toml". Reverted: the contract is strictly zero-dep again (doc comment states the lesson); the armed tier is the workspace-EXCLUDED lance-graph-ogar crate, which already owns COUNT_FUSE + per-entry parity + the roundtrip green light, and now deps the contract without a feature. Second root: lance-graph-consumer-conformance (member) -> lance-graph- ogar -> ogar-* path deps are in the root graph, so CI still needs the sibling. Added the OGAR sibling checkout to every workflow: `path: OGAR` in the sibling-layout workflows (build/rust-test/style, next to the existing ndarray step) and a parent-level `git clone ../OGAR` step in the root-layout ones (jc-proof/release). Verified: contract 839 lib tests green (zero-dep), fmt clean, consumer-conformance compiles through the ogar chain against the local sibling. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1 --- .github/workflows/build.yml | 4 + .github/workflows/jc-proof.yml | 2 + .github/workflows/release.yml | 2 + .github/workflows/rust-test.yml | 10 + .github/workflows/style.yml | 10 + Cargo.lock | 1 - crates/bgz-tensor/src/matryoshka.rs | 4 +- .../src/graph_gremlin.rs | 5 +- .../lance-graph-callcenter/src/graph_table.rs | 20 +- .../src/odoo_alignment.rs | 10 +- .../src/savant_reasoners.rs | 157 +- crates/lance-graph-contract/Cargo.toml | 20 +- .../lance-graph-contract/src/ogar_codebook.rs | 40 - crates/lance-graph-ogar/Cargo.toml | 9 +- .../src/hydrators/dolce.rs | 11 +- .../src/hydrators/fibo.rs | 10 +- .../lance-graph-ontology/src/hydrators/mod.rs | 4 +- .../src/hydrators/odoo.rs | 17 +- .../lance-graph-ontology/src/hydrators/owl.rs | 22 +- .../src/hydrators/provo.rs | 5 +- .../src/hydrators/schematron.rs | 42 +- .../lance-graph-ontology/src/hydrators/skr.rs | 6 +- .../src/hydrators/skr_datev.rs | 10 +- .../lance-graph-ontology/src/hydrators/xsd.rs | 45 +- .../src/hydrators/zugferd.rs | 5 +- .../lance-graph-ontology/src/lance_cache.rs | 93 +- crates/lance-graph-ontology/src/lib.rs | 10 +- .../src/namespace_registry.rs | 3 +- .../src/odoo_blueprint/extracted/account.rs | 1149 ++++----- .../extracted/account_edi_ubl_cii.rs | 243 +- .../extracted/account_payment.rs | 120 +- .../extracted/account_peppol.rs | 181 +- .../src/odoo_blueprint/extracted/analytic.rs | 178 +- .../src/odoo_blueprint/extracted/base.rs | 2147 ++++++++--------- .../src/odoo_blueprint/extracted/coverage.rs | 41 +- .../src/odoo_blueprint/extracted/l10n_de.rs | 225 +- .../odoo_blueprint/extracted/l10n_de_chart.rs | 186 +- .../extracted/l10n_de_kennzahlen.rs | 75 +- .../src/odoo_blueprint/extracted/pairing.rs | 9 +- .../src/odoo_blueprint/extracted/product.rs | 487 ++-- .../src/odoo_blueprint/extracted/purchase.rs | 361 +-- .../src/odoo_blueprint/extracted/sale.rs | 473 ++-- .../src/odoo_blueprint/extracted/stock.rs | 854 ++++--- .../src/odoo_blueprint/extracted/uom.rs | 12 +- .../src/odoo_blueprint/l1.rs | 1017 ++++++-- .../src/odoo_blueprint/l10.rs | 30 +- .../src/odoo_blueprint/l11.rs | 43 +- .../src/odoo_blueprint/l12.rs | 32 +- .../src/odoo_blueprint/l13.rs | 48 +- .../src/odoo_blueprint/l14.rs | 40 +- .../src/odoo_blueprint/l15.rs | 18 +- .../src/odoo_blueprint/l2.rs | 51 +- .../src/odoo_blueprint/l3.rs | 29 +- .../src/odoo_blueprint/l4.rs | 33 +- .../src/odoo_blueprint/l5.rs | 46 +- .../src/odoo_blueprint/l6.rs | 1478 +++++++++--- .../src/odoo_blueprint/l7.rs | 1056 ++++++-- .../src/odoo_blueprint/l8.rs | 1015 ++++++-- .../src/odoo_blueprint/l9.rs | 841 +++++-- .../src/odoo_blueprint/mod.rs | 27 +- .../src/odoo_blueprint/op_emitter.rs | 54 +- .../src/odoo_blueprint/structural.rs | 11 +- .../src/odoo_blueprint/style_recipe.rs | 50 +- .../tests/dolce_edge_whitelist_registered.rs | 4 +- .../tests/odoo_dolce_classifier.rs | 45 +- .../tests/odoo_hydrator_smoke.rs | 4 +- .../tests/skos_hydrator_smoke.rs | 7 +- .../tests/skr_hydrator_smoke.rs | 30 +- .../tests/zugferd_hydrator_smoke.rs | 3 +- .../tests/zugferd_rules_hydrator_smoke.rs | 14 +- .../src/cache/nars_engine.rs | 14 +- .../lance-graph-planner/src/mul/escalation.rs | 6 +- crates/lance-graph-planner/src/temporal.rs | 90 +- crates/lance-graph-planner/tests/w1_probes.rs | 15 +- .../tests/w2b_real_owner_probe.rs | 4 +- crates/sigma-tier-router/src/lib.rs | 88 +- .../surreal_container/tests/scheduler_seam.rs | 47 +- crates/thinking-engine/src/layered.rs | 75 +- 78 files changed, 8802 insertions(+), 4881 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b5b10f84..cb628d31 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,6 +52,10 @@ jobs: with: repository: AdaWorldAPI/ndarray path: ndarray + - uses: actions/checkout@v4 + with: + repository: AdaWorldAPI/OGAR + path: OGAR - name: Setup rust toolchain run: | rustup toolchain install ${{ matrix.toolchain }} diff --git a/.github/workflows/jc-proof.yml b/.github/workflows/jc-proof.yml index 4491f96f..b0f4bee8 100644 --- a/.github/workflows/jc-proof.yml +++ b/.github/workflows/jc-proof.yml @@ -23,6 +23,8 @@ jobs: timeout-minutes: 5 steps: - uses: actions/checkout@v4 + - name: Clone AdaWorldAPI/OGAR as parent-level sibling (NO-PIN path deps) + run: git clone --depth 1 https://github.com/AdaWorldAPI/OGAR ../OGAR - name: Setup Rust run: | rustup toolchain install stable diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ac9b2c28..ba17c88d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,6 +36,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Clone AdaWorldAPI/OGAR as parent-level sibling (NO-PIN path deps) + run: git clone --depth 1 https://github.com/AdaWorldAPI/OGAR ../OGAR with: ref: main token: ${{ secrets.LANCE_RELEASE_TOKEN }} diff --git a/.github/workflows/rust-test.yml b/.github/workflows/rust-test.yml index bf9e68be..f8c0c8db 100644 --- a/.github/workflows/rust-test.yml +++ b/.github/workflows/rust-test.yml @@ -64,6 +64,11 @@ jobs: # dequantize_i8_to_f32, quantize_f32_to_i2, dequantize_i2_to_f32 # publicly (ndarray PR #115, merged 2026-04-30). Pin retired. path: ndarray + - name: Checkout AdaWorldAPI/OGAR (sibling dependency, NO-PIN path deps) + uses: actions/checkout@v4 + with: + repository: AdaWorldAPI/OGAR + path: OGAR - name: Setup rust toolchain run: | rustup toolchain install ${{ matrix.toolchain }} @@ -155,6 +160,11 @@ jobs: # dequantize_i8_to_f32, quantize_f32_to_i2, dequantize_i2_to_f32 # publicly (ndarray PR #115, merged 2026-04-30). Pin retired. path: ndarray + - name: Checkout AdaWorldAPI/OGAR (sibling dependency, NO-PIN path deps) + uses: actions/checkout@v4 + with: + repository: AdaWorldAPI/OGAR + path: OGAR - name: Setup rust toolchain run: | rustup toolchain install stable diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 9ff65515..3392ebf5 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -49,6 +49,11 @@ jobs: # dequantize_i8_to_f32, quantize_f32_to_i2, dequantize_i2_to_f32 # publicly (ndarray PR #115, merged 2026-04-30). Pin retired. path: ndarray + - name: Checkout AdaWorldAPI/OGAR (sibling dependency, NO-PIN path deps) + uses: actions/checkout@v4 + with: + repository: AdaWorldAPI/OGAR + path: OGAR - name: Setup rust toolchain run: | rustup toolchain install stable @@ -101,6 +106,11 @@ jobs: # dequantize_i8_to_f32, quantize_f32_to_i2, dequantize_i2_to_f32 # publicly (ndarray PR #115, merged 2026-04-30). Pin retired. path: ndarray + - name: Checkout AdaWorldAPI/OGAR (sibling dependency, NO-PIN path deps) + uses: actions/checkout@v4 + with: + repository: AdaWorldAPI/OGAR + path: OGAR - uses: actions-rust-lang/setup-rust-toolchain@v1 with: components: rustfmt diff --git a/Cargo.lock b/Cargo.lock index 61cce5a5..f7cabd2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4925,7 +4925,6 @@ version = "0.1.0" dependencies = [ "criterion", "glob", - "ogar-vocab", "serde", "serde_yaml", ] diff --git a/crates/bgz-tensor/src/matryoshka.rs b/crates/bgz-tensor/src/matryoshka.rs index 1eea28a0..c7e5515f 100644 --- a/crates/bgz-tensor/src/matryoshka.rs +++ b/crates/bgz-tensor/src/matryoshka.rs @@ -555,7 +555,9 @@ pub fn decode_row(encoded: &MatryoshkaRow, basis: &SvdBasis, profile: &BandProfi // Cap to the coeff buffer: the basis rank can be lower than the // profile's nominal max (e.g. fewer sample rows than requested // components), so a band may extend past the available coeffs. - let n = band.n_components().min(coeffs.len().saturating_sub(band.start)); + let n = band + .n_components() + .min(coeffs.len().saturating_sub(band.start)); match band.precision { BandPrecision::I16 => { diff --git a/crates/lance-graph-callcenter/src/graph_gremlin.rs b/crates/lance-graph-callcenter/src/graph_gremlin.rs index c314becb..ed876bc7 100644 --- a/crates/lance-graph-callcenter/src/graph_gremlin.rs +++ b/crates/lance-graph-callcenter/src/graph_gremlin.rs @@ -229,7 +229,10 @@ mod tests { fn values_kind_projects_node_property() { let s = sample(); // A's "member-of" neighbour is the family hub → kind "Family". - assert_eq!(g(&s).v(&["A"]).out_e("member-of").values_kind(), vec!["Family"]); + assert_eq!( + g(&s).v(&["A"]).out_e("member-of").values_kind(), + vec!["Family"] + ); } #[test] diff --git a/crates/lance-graph-callcenter/src/graph_table.rs b/crates/lance-graph-callcenter/src/graph_table.rs index cabf0499..81285fc5 100644 --- a/crates/lance-graph-callcenter/src/graph_table.rs +++ b/crates/lance-graph-callcenter/src/graph_table.rs @@ -96,10 +96,7 @@ pub fn edges_table(snap: &GraphSnapshot) -> DfResult { pub fn graph_tables( snap: &GraphSnapshot, ) -> DfResult<(Arc, Arc)> { - Ok(( - Arc::new(nodes_table(snap)?), - Arc::new(edges_table(snap)?), - )) + Ok((Arc::new(nodes_table(snap)?), Arc::new(edges_table(snap)?))) } /// Register `nodes` + `edges` into a DataFusion `SessionContext`, so a consumer @@ -180,7 +177,10 @@ mod tests { let member_a = snap .nodes .iter() - .find(|n| n.kind == "OSINT/Gotham" && n.props.iter().any(|(k, v)| k == "family" && v == "00000a")) + .find(|n| { + n.kind == "OSINT/Gotham" + && n.props.iter().any(|(k, v)| k == "family" && v == "00000a") + }) .unwrap() .id .clone(); @@ -192,13 +192,13 @@ mod tests { .unwrap(); let batches = df.collect().await.unwrap(); let rows: usize = batches.iter().map(|b| b.num_rows()).sum(); - assert_eq!(rows, 1, "the out-of-family adapter edge is queryable via SQL"); + assert_eq!( + rows, 1, + "the out-of-family adapter edge is queryable via SQL" + ); // GROUP BY over node kinds: 2 OSINT members + 2 family nodes. - let df = ctx - .sql("SELECT count(*) AS n FROM nodes") - .await - .unwrap(); + let df = ctx.sql("SELECT count(*) AS n FROM nodes").await.unwrap(); let batches = df.collect().await.unwrap(); assert_eq!(batches[0].num_rows(), 1); } diff --git a/crates/lance-graph-callcenter/src/odoo_alignment.rs b/crates/lance-graph-callcenter/src/odoo_alignment.rs index effd34ab..630c5617 100644 --- a/crates/lance-graph-callcenter/src/odoo_alignment.rs +++ b/crates/lance-graph-callcenter/src/odoo_alignment.rs @@ -684,14 +684,20 @@ mod tests { #[test] fn resolve_odoo_style_chains_class_to_cluster() { // res.partner → SmbFoundryCustomer (0x80) → Empathic. - assert_eq!(resolve_odoo_style("res.partner"), Some(StyleCluster::Empathic)); + assert_eq!( + resolve_odoo_style("res.partner"), + Some(StyleCluster::Empathic) + ); // product.pricelist → ProductCatalog (0x64) → Analytical. assert_eq!( resolve_odoo_style("product.pricelist"), Some(StyleCluster::Analytical) ); // hr.employee → HRFoundation (0x90) → Empathic. - assert_eq!(resolve_odoo_style("hr.employee"), Some(StyleCluster::Empathic)); + assert_eq!( + resolve_odoo_style("hr.employee"), + Some(StyleCluster::Empathic) + ); // unmapped class → None. assert_eq!(resolve_odoo_style("stock.move"), None); } diff --git a/crates/lance-graph-callcenter/src/savant_reasoners.rs b/crates/lance-graph-callcenter/src/savant_reasoners.rs index f007e5e6..c8ba9e0f 100644 --- a/crates/lance-graph-callcenter/src/savant_reasoners.rs +++ b/crates/lance-graph-callcenter/src/savant_reasoners.rs @@ -20,8 +20,8 @@ //! No serialization anywhere in this module. JSON exists only at the //! callcenter ↔ MedCareV2 FFI boundary, never on these types. -use std::borrow::Cow; use core::future::Future; +use std::borrow::Cow; use lance_graph_contract::exploration::NarsTruth; use lance_graph_contract::nars::QueryStrategy; @@ -91,30 +91,56 @@ pub enum SavantSuggestion { fn suggestion_for(savant: &Savant) -> SavantSuggestion { use SavantSuggestion::*; match savant.id { - 1 => SelectFromTable { candidate_table: Cow::Borrowed("account_fiscal_position") }, + 1 => SelectFromTable { + candidate_table: Cow::Borrowed("account_fiscal_position"), + }, 2 => PolicyChoice, - 3 => SelectFromTable { candidate_table: Cow::Borrowed("product.pricelist") }, - 4 => Distribution { over_table: Cow::Borrowed("account.analytic.distribution.model") }, - 5 => SelectFromTable { candidate_table: Cow::Borrowed("account.analytic.distribution.model") }, + 3 => SelectFromTable { + candidate_table: Cow::Borrowed("product.pricelist"), + }, + 4 => Distribution { + over_table: Cow::Borrowed("account.analytic.distribution.model"), + }, + 5 => SelectFromTable { + candidate_table: Cow::Borrowed("account.analytic.distribution.model"), + }, 6 => Anomaly, - 7 => SelectFromTable { candidate_table: Cow::Borrowed("account.account") }, + 7 => SelectFromTable { + candidate_table: Cow::Borrowed("account.account"), + }, 8 => PolicyChoice, - 9 => RankedSet { from_table: Cow::Borrowed("res.currency") }, + 9 => RankedSet { + from_table: Cow::Borrowed("res.currency"), + }, 10 => PolicyChoice, - 11 => SelectFromTable { candidate_table: Cow::Borrowed("stock.rule") }, + 11 => SelectFromTable { + candidate_table: Cow::Borrowed("stock.rule"), + }, 12 => AdvancePeriod, - 13 => Distribution { over_table: Cow::Borrowed("stock.warehouse.orderpoint") }, - 14 => SelectFromTable { candidate_table: Cow::Borrowed("stock.route") }, + 13 => Distribution { + over_table: Cow::Borrowed("stock.warehouse.orderpoint"), + }, + 14 => SelectFromTable { + candidate_table: Cow::Borrowed("stock.route"), + }, 15 => PolicyChoice, 17 => Gate, 18 => AdvancePeriod, - 19 => RankedSet { from_table: Cow::Borrowed("account.move.line") }, - 20 => SelectFromTable { candidate_table: Cow::Borrowed("account.reconcile.model") }, + 19 => RankedSet { + from_table: Cow::Borrowed("account.move.line"), + }, + 20 => SelectFromTable { + candidate_table: Cow::Borrowed("account.reconcile.model"), + }, 21 => Gate, 22 => Gate, - 23 => SelectFromTable { candidate_table: Cow::Borrowed("product.pricelist.item") }, + 23 => SelectFromTable { + candidate_table: Cow::Borrowed("product.pricelist.item"), + }, 24 => PolicyChoice, - 25 => RankedSet { from_table: Cow::Borrowed("stock.move") }, + 25 => RankedSet { + from_table: Cow::Borrowed("stock.move"), + }, 26 => Gate, _ => PolicyChoice, } @@ -174,8 +200,10 @@ fn kind_matches(a: ReasoningKind, b: ReasoningKind) -> bool { /// A kind with a single roster savant ignores the namespace; a kind with /// several resolves via [`DISPATCH_NS`] first, then by `namespace == savant.name`. pub fn resolve_savant(kind: ReasoningKind, namespace: &str) -> Option<&'static Savant> { - let candidates: Vec<&'static Savant> = - SAVANTS.iter().filter(|s| kind_matches(s.kind, kind)).collect(); + let candidates: Vec<&'static Savant> = SAVANTS + .iter() + .filter(|s| kind_matches(s.kind, kind)) + .collect(); match candidates.len() { 0 => None, 1 => Some(candidates[0]), @@ -339,19 +367,37 @@ mod tests { } fn budget() -> Budget { - Budget { max_tokens: 1000, max_ms: 100, max_evidence_rows: 100 } + Budget { + max_tokens: 1000, + max_ms: 100, + max_evidence_rows: 100, + } } fn ev(table: &'static str, rows: u64) -> EvidenceRef<'static> { - EvidenceRef { table, schema_fingerprint: 0, rows } + EvidenceRef { + table, + schema_fingerprint: 0, + rows, + } } - fn ctx<'a>(kind: ReasoningKind, ns: &'a str, evidence: &'a [EvidenceRef<'a>]) -> ReasoningContext<'a> { - ReasoningContext { namespace: ns, kind, evidence, budget: budget() } + fn ctx<'a>( + kind: ReasoningKind, + ns: &'a str, + evidence: &'a [EvidenceRef<'a>], + ) -> ReasoningContext<'a> { + ReasoningContext { + namespace: ns, + kind, + evidence, + budget: budget(), + } } #[test] fn resolves_ambiguous_kind_by_savant_name() { // PostingAnomaly has 3 savants → namespace=name disambiguates. - let s = resolve_savant(ReasoningKind::PostingAnomaly, "SequenceGapAnomalyDetector").unwrap(); + let s = + resolve_savant(ReasoningKind::PostingAnomaly, "SequenceGapAnomalyDetector").unwrap(); assert_eq!(s.id, 6); let s2 = resolve_savant(ReasoningKind::PostingAnomaly, "LockDateAdvancer").unwrap(); assert_eq!(s2.id, 18); @@ -359,8 +405,16 @@ mod tests { #[test] fn other_reconcile_match_splits_by_namespace() { - let a = resolve_savant(ReasoningKind::Other(other_kind::RECONCILE_MATCH), "erp.k3.reconcile_match").unwrap(); - let b = resolve_savant(ReasoningKind::Other(other_kind::RECONCILE_MATCH), "erp.k3.payment_reconcile").unwrap(); + let a = resolve_savant( + ReasoningKind::Other(other_kind::RECONCILE_MATCH), + "erp.k3.reconcile_match", + ) + .unwrap(); + let b = resolve_savant( + ReasoningKind::Other(other_kind::RECONCILE_MATCH), + "erp.k3.payment_reconcile", + ) + .unwrap(); assert_eq!(a.id, 19, "ReconcileMatchSelector"); assert_eq!(b.id, 21, "PaymentToInvoiceMatcher"); } @@ -368,14 +422,25 @@ mod tests { #[test] fn other_single_candidate_ignores_namespace() { // PRICELIST_ASSIGNMENT (code 1) has one savant — namespace irrelevant. - let s = resolve_savant(ReasoningKind::Other(other_kind::PRICELIST_ASSIGNMENT), "whatever").unwrap(); + let s = resolve_savant( + ReasoningKind::Other(other_kind::PRICELIST_ASSIGNMENT), + "whatever", + ) + .unwrap(); assert_eq!(s.id, 3, "PricelistAssignmentAgent"); } #[test] fn conclusion_strategy_follows_inference_type() { let fiscal = savant_by_name("FiscalPositionResolver").unwrap(); - let c = build_conclusion(fiscal, &ctx(ReasoningKind::CustomerCategory, "FiscalPositionResolver", &[ev("account_fiscal_position", 3)])); + let c = build_conclusion( + fiscal, + &ctx( + ReasoningKind::CustomerCategory, + "FiscalPositionResolver", + &[ev("account_fiscal_position", 3)], + ), + ); assert_eq!(c.savant_id, 1); // Deduction → CamExact. assert_eq!(c.query_strategy, QueryStrategy::CamExact); @@ -384,11 +449,28 @@ mod tests { #[test] fn confidence_is_monotone_in_evidence() { let s = savant_by_name("AutopostRecommender").unwrap(); - let low = build_conclusion(s, &ctx(ReasoningKind::PostingAnomaly, "AutopostRecommender", &[ev("account_move", 1)])); - let hi = build_conclusion(s, &ctx(ReasoningKind::PostingAnomaly, "AutopostRecommender", &[ev("account_move", 50)])); + let low = build_conclusion( + s, + &ctx( + ReasoningKind::PostingAnomaly, + "AutopostRecommender", + &[ev("account_move", 1)], + ), + ); + let hi = build_conclusion( + s, + &ctx( + ReasoningKind::PostingAnomaly, + "AutopostRecommender", + &[ev("account_move", 50)], + ), + ); assert!(hi.confidence.frequency >= low.confidence.frequency); assert!(hi.confidence.confidence > low.confidence.confidence); - assert!(hi.confidence.confidence <= 0.99, "NarsTruth caps confidence"); + assert!( + hi.confidence.confidence <= 0.99, + "NarsTruth caps confidence" + ); } #[test] @@ -406,13 +488,16 @@ mod tests { #[test] fn other_reasoner_rejects_non_other_kind() { - let err = block_on(OtherReasoner.reason(ctx(ReasoningKind::CustomerCategory, "x", &[]))).unwrap_err(); + let err = block_on(OtherReasoner.reason(ctx(ReasoningKind::CustomerCategory, "x", &[]))) + .unwrap_err(); assert_eq!(err, SavantError::KindMismatch); } #[test] fn wrong_reasoner_for_kind_is_mismatch() { - let err = block_on(PostingAnomalyReasoner.reason(ctx(ReasoningKind::NextBestAction, "x", &[]))).unwrap_err(); + let err = + block_on(PostingAnomalyReasoner.reason(ctx(ReasoningKind::NextBestAction, "x", &[]))) + .unwrap_err(); assert_eq!(err, SavantError::KindMismatch); } @@ -422,7 +507,11 @@ mod tests { // named in slot 1 of its spec (`account_fiscal_position`). let fiscal = build_conclusion( savant_by_name("FiscalPositionResolver").unwrap(), - &ctx(ReasoningKind::CustomerCategory, "FiscalPositionResolver", &[]), + &ctx( + ReasoningKind::CustomerCategory, + "FiscalPositionResolver", + &[], + ), ); assert!(matches!( &fiscal.suggestion, @@ -431,7 +520,11 @@ mod tests { // SequenceGapAnomalyDetector → Anomaly. let gap = build_conclusion( savant_by_name("SequenceGapAnomalyDetector").unwrap(), - &ctx(ReasoningKind::PostingAnomaly, "SequenceGapAnomalyDetector", &[]), + &ctx( + ReasoningKind::PostingAnomaly, + "SequenceGapAnomalyDetector", + &[], + ), ); assert_eq!(gap.suggestion, SavantSuggestion::Anomaly); // AutopostRecommender / PaymentToInvoiceMatcher → Gate. diff --git a/crates/lance-graph-contract/Cargo.toml b/crates/lance-graph-contract/Cargo.toml index f295b9b8..4172f79a 100644 --- a/crates/lance-graph-contract/Cargo.toml +++ b/crates/lance-graph-contract/Cargo.toml @@ -8,15 +8,13 @@ keywords = ["lance", "graph", "contract", "orchestration", "thinking"] build = "build.rs" [dependencies] -# Zero dependencies by DEFAULT — this is a trait-only crate. -# Consumers depend on this; implementations depend on lance-graph-planner. -# -# The ONE sanctioned optional dep: arming the `ogar` feature pulls the live -# OGAR codebook (ogar-vocab, PATH dep to the local sibling — NO PINS, operator -# policy 2026-07-07) into the same binary, which activates the compile-time -# COUNT_FUSE in `ogar_codebook::armed`. Plug-and-play: a consumer that arms -# `ogar` gets mirror-vs-vocab drift as a BUILD FAILURE, once, at compile time. -ogar-vocab = { path = "../../../OGAR/crates/ogar-vocab", optional = true } +# Zero dependencies by design — this is a trait-only crate, and it MUST stay +# dependency-free even of optional path deps: as a WORKSPACE MEMBER, any path +# dep here (optional or not) is resolved at workspace-load time, so a missing +# sibling checkout breaks EVERY cargo invocation in CI (learned 2026-07-07: +# an optional ../../../OGAR dep killed the whole PR pipeline). The armed +# mirror↔vocab fuse + live-vocab re-export live in the workspace-EXCLUDED +# `lance-graph-ogar` crate instead, which already path-deps ogar-vocab. [build-dependencies] # serde_yaml: used ONLY in build.rs to parse modules/*/manifest.yaml. @@ -38,10 +36,6 @@ name = "i4_batch" harness = false [features] -# Arm the live OGAR codebook: pulls ogar-vocab (local sibling path dep) and -# activates the compile-time mirror↔vocab fuse in `ogar_codebook::armed`. -ogar = ["dep:ogar-vocab"] - # A-unlock-stepdomain — `step_trajectory_hash` forward stub for the E4 # cross-PR bridge between PR #278 audit log + PR #279 grammar trajectory. # No-op alias today; concrete impl lands once the bridge PR ships. diff --git a/crates/lance-graph-contract/src/ogar_codebook.rs b/crates/lance-graph-contract/src/ogar_codebook.rs index a04143cc..10faf406 100644 --- a/crates/lance-graph-contract/src/ogar_codebook.rs +++ b/crates/lance-graph-contract/src/ogar_codebook.rs @@ -952,43 +952,3 @@ mod tests { ); } } - -/// **Armed mode** (`feature = "ogar"`) — the live OGAR codebook in the same -/// binary, with the mirror↔vocab drift fuse at compile time. -/// -/// Arming this feature pulls `ogar-vocab` (a PATH dep to the local OGAR -/// sibling checkout — no git pin, no rev to monitor) and makes any -/// count drift between [`CODEBOOK`] (the zero-dep wire mirror) and -/// `ogar_vocab::class_ids::ALL` (the canonical codebook) a **build -/// failure** — it bangs once, at compile time, instead of requiring -/// pin monitoring. Per-entry (name, id) parity is asserted by the -/// `armed` tests; consumers can also call [`armed::vocab`] re-exports -/// directly instead of carrying their own `ogar-vocab` dep line. -#[cfg(feature = "ogar")] -pub mod armed { - /// Re-export of the live codebook crate — a consumer arming `ogar` on - /// the contract pulls vocab through HERE, plug-and-play, instead of - /// declaring its own dependency line. - pub use ogar_vocab as vocab; - - /// Compile-time drift fuse: the wire mirror and the live codebook must - /// carry the same number of concepts. Fails ANY armed build on drift. - pub const COUNT_FUSE: () = assert!( - super::CODEBOOK.len() == ogar_vocab::class_ids::ALL.len(), - "ogar_codebook mirror drifted from ogar_vocab::class_ids::ALL \ - (concept count mismatch) — update the mirror PAIRED with the OGAR change" - ); - - #[cfg(test)] - mod tests { - /// Per-entry parity: every (concept, id) row identical, both orders. - #[test] - fn mirror_matches_live_vocab_entry_for_entry() { - let mirror: std::collections::BTreeMap<&str, u16> = - super::super::CODEBOOK.iter().copied().collect(); - let live: std::collections::BTreeMap<&str, u16> = - ogar_vocab::class_ids::ALL.iter().copied().collect(); - assert_eq!(mirror, live, "mirror and live codebook disagree"); - } - } -} diff --git a/crates/lance-graph-ogar/Cargo.toml b/crates/lance-graph-ogar/Cargo.toml index 8365a9ec..75a75110 100644 --- a/crates/lance-graph-ogar/Cargo.toml +++ b/crates/lance-graph-ogar/Cargo.toml @@ -70,10 +70,11 @@ serde = ["ogar-vocab/serde", "ogar-adapter-surrealql/serde"] # ogar_codebook wire-compat mirror the parity-guard checks. PATH copy = the # canonical in-repo source (same as lance-graph / symbiont); the [patch] below # folds ogar-class-view's transitive git contract onto it = ONE source. -# `features = ["ogar"]` ARMS the contract: it pulls ogar-vocab (sibling path, -# no pin) transitively and activates the contract-side compile-time COUNT_FUSE -# — plug-and-play drift detection in every binary that links this crate. -lance-graph-contract = { path = "../lance-graph-contract", features = ["ogar"] } +# THIS crate is the armed tier (workspace-EXCLUDED, so its ogar-vocab path +# dep cannot break workspace load in CI): it owns the COUNT_FUSE + per-entry +# mirror parity + the authoritative-table roundtrip green light. The contract +# stays strictly zero-dep. +lance-graph-contract = { path = "../lance-graph-contract" } # OGIT spine (the NamespaceBridge trait + registry + namespace/error types the # OGAR-driven port bridges build on). The OGIT/OGAR seam: the bridges live HERE diff --git a/crates/lance-graph-ontology/src/hydrators/dolce.rs b/crates/lance-graph-ontology/src/hydrators/dolce.rs index 181f2364..a0b5f6d8 100644 --- a/crates/lance-graph-ontology/src/hydrators/dolce.rs +++ b/crates/lance-graph-ontology/src/hydrators/dolce.rs @@ -87,8 +87,10 @@ const DOLCE_EDGE_WHITELIST: &[&str] = &[ /// [`OntologyRegistry::register_edge_types`]. pub fn hydrate_dolce(registry: &OntologyRegistry) -> Result { let dul = dul_ttl_path(); - let extensions: Vec = - DUL_EXTENSION_RELATIVE_PATHS.iter().map(extension_path).collect(); + let extensions: Vec = DUL_EXTENSION_RELATIVE_PATHS + .iter() + .map(extension_path) + .collect(); let mut paths: Vec<&Path> = Vec::with_capacity(1 + extensions.len()); paths.push(&dul); for ext in &extensions { @@ -102,10 +104,7 @@ pub fn hydrate_dolce(registry: &OntologyRegistry) -> Result { /// Test-friendly variant: hydrate DOLCE from an explicit single path /// (typically a test fixture). Use [`hydrate_dolce_from_many`] when you want /// to mix the canonical DUL.ttl with extension modules. -pub fn hydrate_dolce_from( - ttl_path: &Path, - registry: &OntologyRegistry, -) -> Result { +pub fn hydrate_dolce_from(ttl_path: &Path, registry: &OntologyRegistry) -> Result { hydrate_dolce_from_many(&[ttl_path], registry) } diff --git a/crates/lance-graph-ontology/src/hydrators/fibo.rs b/crates/lance-graph-ontology/src/hydrators/fibo.rs index ee223f2f..dad808c7 100644 --- a/crates/lance-graph-ontology/src/hydrators/fibo.rs +++ b/crates/lance-graph-ontology/src/hydrators/fibo.rs @@ -91,10 +91,7 @@ pub fn hydrate_fibo_fnd(registry: &OntologyRegistry) -> Result } /// Test-friendly variant: hydrate FIBO-FND from an explicit directory. -pub fn hydrate_fibo_fnd_from( - dir: &Path, - registry: &OntologyRegistry, -) -> Result { +pub fn hydrate_fibo_fnd_from(dir: &Path, registry: &OntologyRegistry) -> Result { let files = collect_rdf_files(dir)?; let path_refs: Vec<&Path> = files.iter().map(|p| p.as_path()).collect(); let hydrator = OwlHydrator { @@ -120,10 +117,7 @@ pub fn hydrate_fibo_be(registry: &OntologyRegistry) -> Result { } /// Test-friendly variant: hydrate FIBO-BE from an explicit directory. -pub fn hydrate_fibo_be_from( - dir: &Path, - registry: &OntologyRegistry, -) -> Result { +pub fn hydrate_fibo_be_from(dir: &Path, registry: &OntologyRegistry) -> Result { let files = collect_rdf_files(dir)?; let path_refs: Vec<&Path> = files.iter().map(|p| p.as_path()).collect(); let hydrator = OwlHydrator { diff --git a/crates/lance-graph-ontology/src/hydrators/mod.rs b/crates/lance-graph-ontology/src/hydrators/mod.rs index 8d82b338..0e97a776 100644 --- a/crates/lance-graph-ontology/src/hydrators/mod.rs +++ b/crates/lance-graph-ontology/src/hydrators/mod.rs @@ -38,7 +38,9 @@ pub use dolce::{hydrate_dolce, hydrate_dolce_from, hydrate_dolce_from_many}; pub use dolce_odoo::{classify_odoo, DolceCategory}; pub use fibo::{hydrate_fibo_be, hydrate_fibo_be_from, hydrate_fibo_fnd, hydrate_fibo_fnd_from}; pub use odoo::{hydrate_odoo, hydrate_odoo_from}; -pub use owl::{ContextBundle, EntityId, HydrateErr, MetaStructureHydrator, OntologySlot, OwlHydrator}; +pub use owl::{ + ContextBundle, EntityId, HydrateErr, MetaStructureHydrator, OntologySlot, OwlHydrator, +}; pub use owltime::{hydrate_owltime, hydrate_owltime_from}; pub use provo::{hydrate_provo, hydrate_provo_from}; pub use qudt::{hydrate_qudt, hydrate_qudt_from}; diff --git a/crates/lance-graph-ontology/src/hydrators/odoo.rs b/crates/lance-graph-ontology/src/hydrators/odoo.rs index f0833e35..604b3113 100644 --- a/crates/lance-graph-ontology/src/hydrators/odoo.rs +++ b/crates/lance-graph-ontology/src/hydrators/odoo.rs @@ -77,8 +77,10 @@ const ODOO_EDGE_WHITELIST: &[&str] = &[ /// cascade edge whitelist. pub fn hydrate_odoo(registry: &OntologyRegistry) -> Result { let core = odoo_core_path(); - let alignments: Vec = - ODOO_ALIGNMENT_RELATIVE_PATHS.iter().map(alignment_path).collect(); + let alignments: Vec = ODOO_ALIGNMENT_RELATIVE_PATHS + .iter() + .map(alignment_path) + .collect(); let mut paths: Vec<&Path> = Vec::with_capacity(1 + alignments.len()); paths.push(&core); for a in &alignments { @@ -95,10 +97,7 @@ pub fn hydrate_odoo(registry: &OntologyRegistry) -> Result { /// [`super::owl::ContextBundle`] keyed by `OGIT::ODOO_V1.0`, then registers the /// cascade edge whitelist. Used by [`hydrate_odoo`] to merge the core seed with /// the alignment overlays, and by tests that compose a custom bundle. -pub fn hydrate_odoo_from( - paths: &[&Path], - registry: &OntologyRegistry, -) -> Result { +pub fn hydrate_odoo_from(paths: &[&Path], registry: &OntologyRegistry) -> Result { let hydrator = OwlHydrator { g: OGIT::ODOO_V1.0, version: OGIT::ODOO_V1.1, @@ -149,13 +148,11 @@ mod tests { #[test] fn odoo_edge_whitelist_has_the_two_load_bearing_iris() { assert!( - ODOO_EDGE_WHITELIST - .contains(&"http://www.w3.org/2000/01/rdf-schema#subClassOf"), + ODOO_EDGE_WHITELIST.contains(&"http://www.w3.org/2000/01/rdf-schema#subClassOf"), "rdfs:subClassOf is load-bearing" ); assert!( - ODOO_EDGE_WHITELIST - .contains(&"http://www.w3.org/2002/07/owl#equivalentClass"), + ODOO_EDGE_WHITELIST.contains(&"http://www.w3.org/2002/07/owl#equivalentClass"), "owl:equivalentClass is load-bearing" ); } diff --git a/crates/lance-graph-ontology/src/hydrators/owl.rs b/crates/lance-graph-ontology/src/hydrators/owl.rs index b952d355..30f68099 100644 --- a/crates/lance-graph-ontology/src/hydrators/owl.rs +++ b/crates/lance-graph-ontology/src/hydrators/owl.rs @@ -192,18 +192,16 @@ impl OwlHydrator { let mut iri_to_id: HashMap = HashMap::new(); let mut next_id: EntityId = self.starting_entity_id; - let intern = |iri: &str, - map: &mut HashMap, - n: &mut EntityId| - -> EntityId { - if let Some(&id) = map.get(iri) { - return id; - } - let id = *n; - *n += 1; - map.insert(iri.to_string(), id); - id - }; + let intern = + |iri: &str, map: &mut HashMap, n: &mut EntityId| -> EntityId { + if let Some(&id) = map.get(iri) { + return id; + } + let id = *n; + *n += 1; + map.insert(iri.to_string(), id); + id + }; for ttl_path in ttl_paths { let bytes = fs::read(ttl_path).map_err(|e| HydrateErr::Io { diff --git a/crates/lance-graph-ontology/src/hydrators/provo.rs b/crates/lance-graph-ontology/src/hydrators/provo.rs index ca895421..28405b86 100644 --- a/crates/lance-graph-ontology/src/hydrators/provo.rs +++ b/crates/lance-graph-ontology/src/hydrators/provo.rs @@ -54,10 +54,7 @@ pub fn hydrate_provo(registry: &OntologyRegistry) -> Result { } /// Test-friendly variant: hydrate PROV-O from an explicit path. -pub fn hydrate_provo_from( - ttl_path: &Path, - registry: &OntologyRegistry, -) -> Result { +pub fn hydrate_provo_from(ttl_path: &Path, registry: &OntologyRegistry) -> Result { let hydrator = OwlHydrator { g: OGIT::PROVO_V1.0, version: OGIT::PROVO_V1.1, diff --git a/crates/lance-graph-ontology/src/hydrators/schematron.rs b/crates/lance-graph-ontology/src/hydrators/schematron.rs index cabb8799..cee04554 100644 --- a/crates/lance-graph-ontology/src/hydrators/schematron.rs +++ b/crates/lance-graph-ontology/src/hydrators/schematron.rs @@ -76,13 +76,7 @@ impl SchematronHydrator { path: path.to_path_buf(), source: e, })?; - walk_sch( - path, - &bytes, - &self.base_iri, - &mut iri_to_id, - &mut next_id, - )?; + walk_sch(path, &bytes, &self.base_iri, &mut iri_to_id, &mut next_id)?; } let entity_count = iri_to_id.len() as u32; @@ -365,13 +359,13 @@ mod tests { assert!(looks_like_business_rule_id("PEPPOL-EN16931-R008")); assert!(looks_like_business_rule_id("BR-DEC-19")); // Negatives. - assert!(!looks_like_business_rule_id("br-52")); // lowercase - assert!(!looks_like_business_rule_id("BR")); // no dash - assert!(!looks_like_business_rule_id("-BR")); // leading dash - assert!(!looks_like_business_rule_id("BR-")); // trailing dash - assert!(!looks_like_business_rule_id("BR--52")); // double dash - assert!(!looks_like_business_rule_id("BR 52")); // space - assert!(!looks_like_business_rule_id("1BR-2")); // leading digit + assert!(!looks_like_business_rule_id("br-52")); // lowercase + assert!(!looks_like_business_rule_id("BR")); // no dash + assert!(!looks_like_business_rule_id("-BR")); // leading dash + assert!(!looks_like_business_rule_id("BR-")); // trailing dash + assert!(!looks_like_business_rule_id("BR--52")); // double dash + assert!(!looks_like_business_rule_id("BR 52")); // space + assert!(!looks_like_business_rule_id("1BR-2")); // leading digit } #[test] @@ -425,19 +419,29 @@ mod tests { let bundle = reg.bundle_for(6666).expect("bundle"); // Assert IDs from both the empty and the normal assert resolve. - assert!(bundle.resolve_iri("urn:schematron:test/assert/A-EMPTY-001").is_some()); - assert!(bundle.resolve_iri("urn:schematron:test/assert/A-NORMAL-001").is_some()); - assert!(bundle.resolve_iri("urn:schematron:test/pattern/P-empty").is_some()); + assert!(bundle + .resolve_iri("urn:schematron:test/assert/A-EMPTY-001") + .is_some()); + assert!(bundle + .resolve_iri("urn:schematron:test/assert/A-NORMAL-001") + .is_some()); + assert!(bundle + .resolve_iri("urn:schematron:test/pattern/P-empty") + .is_some()); // BR-42 from the NORMAL assert's body must resolve (positive control). assert!( - bundle.resolve_iri("urn:schematron:test/rule/BR-42").is_some(), + bundle + .resolve_iri("urn:schematron:test/rule/BR-42") + .is_some(), "BR-42 from the normal assert's message body must resolve" ); // BR-99 from text OUTSIDE any assert/report must NOT resolve. assert!( - bundle.resolve_iri("urn:schematron:test/rule/BR-99").is_none(), + bundle + .resolve_iri("urn:schematron:test/rule/BR-99") + .is_none(), "BR-99 was in stray text outside an assert; must NOT have been \ interned as a rule IRI (this was the P2 corruption case)" ); diff --git a/crates/lance-graph-ontology/src/hydrators/skr.rs b/crates/lance-graph-ontology/src/hydrators/skr.rs index 0fb98e5d..2fc4c9a0 100644 --- a/crates/lance-graph-ontology/src/hydrators/skr.rs +++ b/crates/lance-graph-ontology/src/hydrators/skr.rs @@ -56,11 +56,7 @@ pub struct SkrHydrator { impl SkrHydrator { /// Read the CSV at `csv_path` and intern each row's account number as /// `{iri_prefix}/{account_number}`. - pub fn hydrate( - &self, - csv_path: &Path, - registry: &OntologyRegistry, - ) -> Result { + pub fn hydrate(&self, csv_path: &Path, registry: &OntologyRegistry) -> Result { let bytes = fs::read(csv_path).map_err(|e| HydrateErr::Io { path: csv_path.to_path_buf(), source: e, diff --git a/crates/lance-graph-ontology/src/hydrators/skr_datev.rs b/crates/lance-graph-ontology/src/hydrators/skr_datev.rs index e02f5ac5..c1aeaa65 100644 --- a/crates/lance-graph-ontology/src/hydrators/skr_datev.rs +++ b/crates/lance-graph-ontology/src/hydrators/skr_datev.rs @@ -38,10 +38,7 @@ pub fn hydrate_skr03(registry: &OntologyRegistry) -> Result { hydrate_skr03_from(&skr03_csv_path(), registry) } -pub fn hydrate_skr03_from( - csv_path: &Path, - registry: &OntologyRegistry, -) -> Result { +pub fn hydrate_skr03_from(csv_path: &Path, registry: &OntologyRegistry) -> Result { let h = SkrHydrator { g: OGIT::SKR03_V1.0, version: OGIT::SKR03_V1.1, @@ -84,10 +81,7 @@ pub fn hydrate_skr04(registry: &OntologyRegistry) -> Result { hydrate_skr04_from(&skr04_csv_path(), registry) } -pub fn hydrate_skr04_from( - csv_path: &Path, - registry: &OntologyRegistry, -) -> Result { +pub fn hydrate_skr04_from(csv_path: &Path, registry: &OntologyRegistry) -> Result { let h = SkrHydrator { g: OGIT::SKR04_V1.0, version: OGIT::SKR04_V1.1, diff --git a/crates/lance-graph-ontology/src/hydrators/xsd.rs b/crates/lance-graph-ontology/src/hydrators/xsd.rs index 16d99f2c..4a1c9f88 100644 --- a/crates/lance-graph-ontology/src/hydrators/xsd.rs +++ b/crates/lance-graph-ontology/src/hydrators/xsd.rs @@ -39,11 +39,8 @@ use crate::registry::OntologyRegistry; /// Closure type for the IRI interning callback. Factored out to keep /// `walk_xsd`'s signature inside clippy's `type_complexity` budget. -type InternFn<'a> = &'a mut dyn FnMut( - String, - &mut HashMap, - &mut EntityId, -) -> EntityId; +type InternFn<'a> = + &'a mut dyn FnMut(String, &mut HashMap, &mut EntityId) -> EntityId; /// XSD hydrator. Reusable for every XSD-shaped business-document schema. pub struct XsdHydrator { @@ -67,18 +64,16 @@ impl XsdHydrator { let mut iri_to_id: HashMap = HashMap::new(); let mut next_id: EntityId = self.starting_entity_id; - let mut intern = |iri: String, - map: &mut HashMap, - n: &mut EntityId| - -> EntityId { - if let Some(&id) = map.get(&iri) { - return id; - } - let id = *n; - *n += 1; - map.insert(iri, id); - id - }; + let mut intern = + |iri: String, map: &mut HashMap, n: &mut EntityId| -> EntityId { + if let Some(&id) = map.get(&iri) { + return id; + } + let id = *n; + *n += 1; + map.insert(iri, id); + id + }; for path in xsd_paths { let bytes = fs::read(path).map_err(|e| HydrateErr::Io { @@ -260,17 +255,9 @@ mod tests { // Foo (element) + BarType (complexType) + baz (nested element) + // Quux (simpleType) + anAttr (attribute) = 5 names. assert!(bundle.entity_count() >= 5); - assert!(bundle - .resolve_iri("urn:example:test#Foo") - .is_some()); - assert!(bundle - .resolve_iri("urn:example:test#BarType") - .is_some()); - assert!(bundle - .resolve_iri("urn:example:test#baz") - .is_some()); - assert!(bundle - .resolve_iri("urn:example:test#anAttr") - .is_some()); + assert!(bundle.resolve_iri("urn:example:test#Foo").is_some()); + assert!(bundle.resolve_iri("urn:example:test#BarType").is_some()); + assert!(bundle.resolve_iri("urn:example:test#baz").is_some()); + assert!(bundle.resolve_iri("urn:example:test#anAttr").is_some()); } } diff --git a/crates/lance-graph-ontology/src/hydrators/zugferd.rs b/crates/lance-graph-ontology/src/hydrators/zugferd.rs index b8b6df9b..cd81a301 100644 --- a/crates/lance-graph-ontology/src/hydrators/zugferd.rs +++ b/crates/lance-graph-ontology/src/hydrators/zugferd.rs @@ -73,10 +73,7 @@ pub fn hydrate_zugferd(registry: &OntologyRegistry) -> Result { } /// Test-friendly variant: hydrate ZUGFeRD from an explicit directory. -pub fn hydrate_zugferd_from( - dir: &Path, - registry: &OntologyRegistry, -) -> Result { +pub fn hydrate_zugferd_from(dir: &Path, registry: &OntologyRegistry) -> Result { let files = collect_xsd_files(dir)?; let path_refs: Vec<&Path> = files.iter().map(|p| p.as_path()).collect(); let hydrator = XsdHydrator { diff --git a/crates/lance-graph-ontology/src/lance_cache.rs b/crates/lance-graph-ontology/src/lance_cache.rs index 5cc52b66..7ae5a37c 100644 --- a/crates/lance-graph-ontology/src/lance_cache.rs +++ b/crates/lance-graph-ontology/src/lance_cache.rs @@ -19,9 +19,9 @@ use crate::error::{Error, Result}; use crate::namespace::{NamespaceId, OgitUri, SchemaKind, SchemaPtr}; use crate::proposal::{AttributeProvenance, IdentityCodec, MappingRow, QualiaMeta}; use arrow::array::{ - Array, ArrayRef, BooleanArray, FixedSizeBinaryArray, FixedSizeBinaryBuilder, FixedSizeListArray, - FixedSizeListBuilder, Float32Array, Float32Builder, RecordBatch, StringArray, - TimestampMicrosecondArray, UInt32Array, UInt64Array, UInt8Array, + Array, ArrayRef, BooleanArray, FixedSizeBinaryArray, FixedSizeBinaryBuilder, + FixedSizeListArray, FixedSizeListBuilder, Float32Array, Float32Builder, RecordBatch, + StringArray, TimestampMicrosecondArray, UInt32Array, UInt64Array, UInt8Array, }; use arrow_schema::{DataType, Field, Schema as ArrowSchema, TimeUnit}; use lance::dataset::{Dataset, WriteMode, WriteParams}; @@ -289,10 +289,7 @@ fn dictionary_schema() -> Arc { // to accept the column. The outer list field stays non-null. Field::new( "qualia", - DataType::FixedSizeList( - Arc::new(Field::new("item", DataType::Float32, true)), - 18, - ), + DataType::FixedSizeList(Arc::new(Field::new("item", DataType::Float32, true)), 18), false, ), Field::new("codec_meta", DataType::UInt32, false), @@ -334,10 +331,7 @@ fn rows_to_record_batch(rows: &[MappingRow]) -> Result { // ── D-CASCADE-V1-7: IdentityCodec ────────────────────────────────────── let mut cam_pq_code_builder = FixedSizeBinaryBuilder::new(6); let mut base17_head_builder = FixedSizeBinaryBuilder::new(8); - let palette_key: Vec = rows - .iter() - .map(|r| r.identity_codec.palette_key) - .collect(); + let palette_key: Vec = rows.iter().map(|r| r.identity_codec.palette_key).collect(); let scent: Vec = rows.iter().map(|r| r.identity_codec.scent).collect(); for r in rows { cam_pq_code_builder @@ -471,14 +465,13 @@ fn record_batch_to_rows(batch: &RecordBatch) -> Result> { meta: codec_meta_arr.map(|a| a.value(i)).unwrap_or(0), edge: codec_edge_arr.map(|a| a.value(i)).unwrap_or(0), }; - let thinking_style = thinking_style_arr - .and_then(|a| { - if a.is_null(i) || a.value(i).is_empty() { - None - } else { - parse_thinking_style_label(a.value(i)) - } - }); + let thinking_style = thinking_style_arr.and_then(|a| { + if a.is_null(i) || a.value(i).is_empty() { + None + } else { + parse_thinking_style_label(a.value(i)) + } + }); let attribute_sources = attr_src_enc_arr .map(|a| decode_attribute_sources(a.value(i))) .unwrap_or_default(); @@ -823,8 +816,8 @@ mod tests { }, qualia_meta: QualiaMeta { qualia: [ - 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, - 1.6, 1.7, 1.8, + 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, + 1.7, 1.8, ], meta: 0xDEAD_BEEF, edge: 0x0102_0304_0506_0708, @@ -858,46 +851,45 @@ mod tests { // IdentityCodec assert_eq!( - r.identity_codec.cam_pq_code, - row.identity_codec.cam_pq_code, + r.identity_codec.cam_pq_code, row.identity_codec.cam_pq_code, "cam_pq_code mismatch" ); assert_eq!( - r.identity_codec.base17_head, - row.identity_codec.base17_head, + r.identity_codec.base17_head, row.identity_codec.base17_head, "base17_head mismatch" ); assert_eq!( - r.identity_codec.palette_key, - row.identity_codec.palette_key, + r.identity_codec.palette_key, row.identity_codec.palette_key, "palette_key mismatch" ); assert_eq!( - r.identity_codec.scent, - row.identity_codec.scent, + r.identity_codec.scent, row.identity_codec.scent, "scent mismatch" ); // QualiaMeta assert_eq!( - r.qualia_meta.qualia, - row.qualia_meta.qualia, + r.qualia_meta.qualia, row.qualia_meta.qualia, "qualia mismatch" ); - assert_eq!(r.qualia_meta.meta, row.qualia_meta.meta, "codec_meta mismatch"); - assert_eq!(r.qualia_meta.edge, row.qualia_meta.edge, "codec_edge mismatch"); + assert_eq!( + r.qualia_meta.meta, row.qualia_meta.meta, + "codec_meta mismatch" + ); + assert_eq!( + r.qualia_meta.edge, row.qualia_meta.edge, + "codec_edge mismatch" + ); // ThinkingStyle assert_eq!( - r.thinking_style, - row.thinking_style, + r.thinking_style, row.thinking_style, "thinking_style mismatch" ); // AttributeProvenance assert_eq!( - r.attribute_sources, - row.attribute_sources, + r.attribute_sources, row.attribute_sources, "attribute_sources mismatch" ); @@ -905,8 +897,7 @@ mod tests { assert_eq!(r.subject_type, row.subject_type, "subject_type mismatch"); assert_eq!(r.object_type, row.object_type, "object_type mismatch"); assert_eq!( - r.entity_type_ref, - row.entity_type_ref, + r.entity_type_ref, row.entity_type_ref, "entity_type_ref mismatch" ); } @@ -944,8 +935,14 @@ mod tests { .expect("rows_to_record_batch must not fail"); let mut back = record_batch_to_rows(&batch).expect("record_batch_to_rows must not fail"); let r = back.remove(0); - assert_eq!(r.thinking_style, None, "None thinking_style must survive round-trip"); - assert!(r.attribute_sources.is_empty(), "empty attribute_sources must survive round-trip"); + assert_eq!( + r.thinking_style, None, + "None thinking_style must survive round-trip" + ); + assert!( + r.attribute_sources.is_empty(), + "empty attribute_sources must survive round-trip" + ); } // Pins the schema field-set against `SCHEMA_VERSION`. If you change @@ -959,7 +956,13 @@ mod tests { let actual: Vec<(String, String, bool)> = schema .fields() .iter() - .map(|f| (f.name().clone(), format!("{:?}", f.data_type()), f.is_nullable())) + .map(|f| { + ( + f.name().clone(), + format!("{:?}", f.data_type()), + f.is_nullable(), + ) + }) .collect(); // Pinned to SCHEMA_VERSION = 2. let expected: Vec<(&str, &str, bool)> = vec![ @@ -1022,10 +1025,8 @@ mod tests { // from TTL. Same path covers "future v3 wrote columns we don't know". #[tokio::test] async fn stale_meta_invalidates_cache_dir() { - let tmp = std::env::temp_dir().join(format!( - "lance_cache_invalidate_{}", - std::process::id() - )); + let tmp = + std::env::temp_dir().join(format!("lance_cache_invalidate_{}", std::process::id())); let _ = std::fs::remove_dir_all(&tmp); std::fs::create_dir_all(&tmp).unwrap(); let writer = LanceWriter::open_or_create(&tmp).await.unwrap(); diff --git a/crates/lance-graph-ontology/src/lib.rs b/crates/lance-graph-ontology/src/lib.rs index 21407fe3..c04e8f4d 100644 --- a/crates/lance-graph-ontology/src/lib.rs +++ b/crates/lance-graph-ontology/src/lib.rs @@ -62,11 +62,11 @@ pub use hydrators::{ hydrate_fibo_be, hydrate_fibo_be_from, hydrate_fibo_fnd, hydrate_fibo_fnd_from, hydrate_odoo, hydrate_odoo_from, hydrate_owltime, hydrate_owltime_from, hydrate_provo, hydrate_provo_from, hydrate_qudt, hydrate_qudt_from, hydrate_schemaorg, hydrate_schemaorg_from, hydrate_skos, - hydrate_skos_from, hydrate_skr03, hydrate_skr03_bau, hydrate_skr03_bau_from, hydrate_skr03_from, - hydrate_skr04, hydrate_skr04_from, hydrate_zugferd, hydrate_zugferd_from, hydrate_zugferd_rules, - hydrate_zugferd_rules_from, ContextBundle, DolceCategory, EntityId, HydrateErr, - MetaStructureHydrator, OntologySlot, OwlHydrator, SchematronHydrator, SkrHydrator, XsdHydrator, - SKR03_BAU_IRI_PREFIX, SKR03_IRI_PREFIX, SKR04_IRI_PREFIX, + hydrate_skos_from, hydrate_skr03, hydrate_skr03_bau, hydrate_skr03_bau_from, + hydrate_skr03_from, hydrate_skr04, hydrate_skr04_from, hydrate_zugferd, hydrate_zugferd_from, + hydrate_zugferd_rules, hydrate_zugferd_rules_from, ContextBundle, DolceCategory, EntityId, + HydrateErr, MetaStructureHydrator, OntologySlot, OwlHydrator, SchematronHydrator, SkrHydrator, + XsdHydrator, SKR03_BAU_IRI_PREFIX, SKR03_IRI_PREFIX, SKR04_IRI_PREFIX, }; pub use namespace::{NamespaceId, OgitUri, SchemaPtr}; pub use proposal::{ diff --git a/crates/lance-graph-ontology/src/namespace_registry.rs b/crates/lance-graph-ontology/src/namespace_registry.rs index 953c1e98..821da3bd 100644 --- a/crates/lance-graph-ontology/src/namespace_registry.rs +++ b/crates/lance-graph-ontology/src/namespace_registry.rs @@ -187,8 +187,7 @@ impl NamespaceRegistry { /// dynamically-allocated ones; only the seed table is consulted. pub fn seed_context_id(namespace_iri: &str) -> Option { use std::sync::LazyLock; - static SEED: LazyLock = - LazyLock::new(NamespaceRegistry::seed_defaults); + static SEED: LazyLock = LazyLock::new(NamespaceRegistry::seed_defaults); SEED.get(namespace_iri) } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account.rs index 2ef49b36..a3d0207a 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account.rs @@ -855,7 +855,10 @@ pub const EXT_ACCOUNT_ACCOUNT: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_account.py", line_range: (19, 1494) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_account.py", + line_range: (19, 1494), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1031,7 +1034,10 @@ pub const EXT_ACCOUNT_GROUP: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_account.py", line_range: (1497, 1641) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_account.py", + line_range: (1497, 1641), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1185,17 +1191,18 @@ pub const EXT_ACCOUNT_ACCOUNT_TAG: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "A tag with the same name and applicability already exists in this country.", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "A tag with the same name and applicability already exists in this country.", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_account_tag.py", line_range: (7, 140) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_account_tag.py", + line_range: (7, 140), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1262,13 +1269,14 @@ pub const EXT_ACCOUNT_ANALYTIC_ACCOUNT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_analytic_account.py", line_range: (6, 78) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_analytic_account.py", + line_range: (6, 78), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1342,20 +1350,19 @@ pub const EXT_ACCOUNT_ANALYTIC_DISTRIBUTION_MODEL: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["analytic_precision"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["analytic_precision"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_analytic_distribution_model.py", line_range: (6, 70) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_analytic_distribution_model.py", + line_range: (6, 70), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1516,17 +1523,18 @@ pub const EXT_ACCOUNT_ANALYTIC_LINE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on move_line_id, general_account_id", - source_method: Some("_check_general_account_id"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on move_line_id, general_account_id", + source_method: Some("_check_general_account_id"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_analytic_line.py", line_range: (7, 110) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_analytic_line.py", + line_range: (7, 110), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1614,13 +1622,14 @@ pub const EXT_ACCOUNT_ANALYTIC_APPLICABILITY: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_analytic_plan.py", line_range: (6, 81) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_analytic_plan.py", + line_range: (6, 81), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1921,7 +1930,12 @@ pub const EXT_ACCOUNT_BANK_STATEMENT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["balance_end", "balance_end_real", "line_ids.amount", "line_ids.state"], + targets: &[ + "balance_end", + "balance_end_real", + "line_ids.amount", + "line_ids.state", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -1941,13 +1955,14 @@ pub const EXT_ACCOUNT_BANK_STATEMENT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_bank_statement.py", line_range: (10, 373) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_bank_statement.py", + line_range: (10, 373), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6385,24 +6400,23 @@ pub const EXT_ACCOUNT_CASH_ROUNDING: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["rounding"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["rounding"], + }], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on rounding", - source_method: Some("validate_rounding"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on rounding", + source_method: Some("validate_rounding"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_cash_rounding.py", line_range: (8, 69) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_cash_rounding.py", + line_range: (8, 69), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6490,13 +6504,14 @@ pub const EXT_ACCOUNT_CODE_MAPPING: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_code_mapping.py", line_range: (9, 86) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_code_mapping.py", + line_range: (9, 86), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6506,9 +6521,7 @@ pub const EXT_ACCOUNT_DOCUMENT_IMPORT_MIXIN: OdooEntity = OdooEntity { model_name: "account.document.import.mixin", kind: OdooEntityKind::Abstract, description: "Business document import mixin", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_create_records_from_attachments", @@ -6660,13 +6673,14 @@ pub const EXT_ACCOUNT_DOCUMENT_IMPORT_MIXIN: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_document_import_mixin.py", line_range: (126, 568) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_document_import_mixin.py", + line_range: (126, 568), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6696,28 +6710,25 @@ pub const EXT_ACCOUNT_FULL_RECONCILE: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - OdooMethod { - name: "create", - kind: OdooMethodKind::ApiModelCreateMulti, - return_kind: OdooReturnKind::Record, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModelCreateMulti, - targets: &[], - }, - ], + methods: &[OdooMethod { + name: "create", + kind: OdooMethodKind::ApiModelCreateMulti, + return_kind: OdooReturnKind::Record, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModelCreateMulti, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_full_reconcile.py", line_range: (5, 45) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_full_reconcile.py", + line_range: (5, 45), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6756,28 +6767,25 @@ pub const EXT_ACCOUNT_INCOTERMS: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - OdooMethod { - name: "_compute_display_name", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["code"], - }, - ], + methods: &[OdooMethod { + name: "_compute_display_name", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["code"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_incoterms.py", line_range: (7, 24) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_incoterms.py", + line_range: (7, 24), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6825,24 +6833,21 @@ pub const EXT_ACCOUNT_JOURNAL_GROUP: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "A Ledger group name must be unique per company.", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "A Ledger group name must be unique per company.", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_journal.py", line_range: (16, 39) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_journal.py", + line_range: (16, 39), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -8030,13 +8035,14 @@ pub const EXT_ACCOUNT_LOCK_EXCEPTION: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_lock_exception.py", line_range: (11, 306) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_lock_exception.py", + line_range: (11, 306), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10016,9 +10022,7 @@ pub const EXT_ACCOUNT_MOVE_SEND: OdooEntity = OdooEntity { model_name: "account.move.send", kind: OdooEntityKind::Abstract, description: "Account Move Send", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_get_default_sending_methods", @@ -10500,13 +10504,14 @@ pub const EXT_ACCOUNT_MOVE_SEND: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_move_send.py", line_range: (13, 863) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_move_send.py", + line_range: (13, 863), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10806,17 +10811,18 @@ pub const EXT_ACCOUNT_PARTIAL_RECONCILE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on debit_currency_id, credit_currency_id", - source_method: Some("_check_required_computed_currencies"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on debit_currency_id, credit_currency_id", + source_method: Some("_check_required_computed_currencies"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_partial_reconcile.py", line_range: (9, 705) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_partial_reconcile.py", + line_range: (9, 705), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11632,11 +11638,20 @@ pub const EXT_ACCOUNT_PAYMENT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["reconciled_invoice_ids.payment_state", "reconciled_bill_ids.payment_state", "move_id.line_ids.amount_residual"], + targets: &[ + "reconciled_invoice_ids.payment_state", + "reconciled_bill_ids.payment_state", + "move_id.line_ids.amount_residual", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["move_id.line_ids.amount_residual", "move_id.line_ids.amount_residual_currency", "move_id.line_ids.account_id", "state"], + targets: &[ + "move_id.line_ids.amount_residual", + "move_id.line_ids.amount_residual_currency", + "move_id.line_ids.account_id", + "state", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiModel, @@ -11652,7 +11667,15 @@ pub const EXT_ACCOUNT_PAYMENT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["move_id.amount_total_signed", "amount", "payment_type", "currency_id", "date", "company_id", "company_currency_id"], + targets: &[ + "move_id.amount_total_signed", + "amount", + "payment_type", + "currency_id", + "date", + "company_id", + "company_currency_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -11692,11 +11715,23 @@ pub const EXT_ACCOUNT_PAYMENT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["partner_bank_id", "amount", "memo", "currency_id", "journal_id", "move_id.state", "payment_method_line_id", "payment_type"], + targets: &[ + "partner_bank_id", + "amount", + "memo", + "currency_id", + "journal_id", + "move_id.state", + "payment_method_line_id", + "payment_type", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["move_id.line_ids.matched_debit_ids", "move_id.line_ids.matched_credit_ids"], + targets: &[ + "move_id.line_ids.matched_debit_ids", + "move_id.line_ids.matched_credit_ids", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -11744,7 +11779,10 @@ pub const EXT_ACCOUNT_PAYMENT: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_payment.py", line_range: (7, 1236) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_payment.py", + line_range: (7, 1236), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11840,17 +11878,18 @@ pub const EXT_ACCOUNT_PAYMENT_METHOD: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "The combination code/payment type already exists!", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "The combination code/payment type already exists!", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_payment_method.py", line_range: (7, 92) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_payment_method.py", + line_range: (7, 92), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12003,17 +12042,18 @@ pub const EXT_ACCOUNT_PAYMENT_METHOD_LINE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on name", - source_method: Some("_ensure_unique_name_for_journal"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on name", + source_method: Some("_ensure_unique_name_for_journal"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_payment_method.py", line_range: (95, 174) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_payment_method.py", + line_range: (95, 174), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12298,7 +12338,17 @@ pub const EXT_ACCOUNT_PAYMENT_TERM: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["currency_id", "example_amount", "example_date", "line_ids.value", "line_ids.value_amount", "line_ids.nb_days", "early_discount", "discount_percentage", "discount_days"], + targets: &[ + "currency_id", + "example_amount", + "example_date", + "line_ids.value", + "line_ids.value_amount", + "line_ids.nb_days", + "early_discount", + "discount_percentage", + "discount_days", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiModel, @@ -12310,17 +12360,18 @@ pub const EXT_ACCOUNT_PAYMENT_TERM: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on line_ids, early_discount", - source_method: Some("_check_lines"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on line_ids, early_discount", + source_method: Some("_check_lines"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_payment_term.py", line_range: (11, 278) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_payment_term.py", + line_range: (11, 278), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12471,7 +12522,10 @@ pub const EXT_ACCOUNT_PAYMENT_TERM_LINE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_payment_term.py", line_range: (281, 367) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_payment_term.py", + line_range: (281, 367), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12608,17 +12662,18 @@ pub const EXT_ACCOUNT_RECONCILE_MODEL_LINE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on amount_string", - source_method: Some("_validate_amount"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on amount_string", + source_method: Some("_validate_amount"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_reconcile_model.py", line_range: (8, 88) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_reconcile_model.py", + line_range: (8, 88), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12825,7 +12880,13 @@ pub const EXT_ACCOUNT_RECONCILE_MODEL: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["mapped_partner_id", "match_label", "match_amount", "match_partner_ids", "trigger"], + targets: &[ + "mapped_partner_id", + "match_label", + "match_amount", + "match_partner_ids", + "trigger", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -12833,17 +12894,18 @@ pub const EXT_ACCOUNT_RECONCILE_MODEL: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on match_label, match_label_param", - source_method: Some("_check_match_label_param"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on match_label, match_label_param", + source_method: Some("_check_match_label_param"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_reconcile_model.py", line_range: (91, 200) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_reconcile_model.py", + line_range: (91, 200), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -13325,7 +13387,10 @@ pub const EXT_ACCOUNT_REPORT: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_report.py", line_range: (44, 346) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_report.py", + line_range: (44, 346), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -13671,7 +13736,10 @@ pub const EXT_ACCOUNT_REPORT_LINE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_report.py", line_range: (349, 576) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_report.py", + line_range: (349, 576), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/eu/en16931"], }, @@ -13950,7 +14018,10 @@ pub const EXT_ACCOUNT_REPORT_EXPRESSION: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_report.py", line_range: (579, 929) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_report.py", + line_range: (579, 929), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14034,20 +14105,17 @@ pub const EXT_ACCOUNT_REPORT_COLUMN: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_report.py", line_range: (932, 944) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_report.py", + line_range: (932, 944), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14158,20 +14226,17 @@ pub const EXT_ACCOUNT_REPORT_EXTERNAL_VALUE: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_report.py", line_range: (947, 967) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_report.py", + line_range: (947, 967), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14227,20 +14292,19 @@ pub const EXT_ACCOUNT_ROOT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_root.py", line_range: (9, 39) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_root.py", + line_range: (9, 39), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14342,28 +14406,25 @@ pub const EXT_ACCOUNT_TAX_GROUP: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - OdooMethod { - name: "_compute_country_id", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["company_id"], - }, - ], + methods: &[OdooMethod { + name: "_compute_country_id", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["company_id"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_tax.py", line_range: (25, 68) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_tax.py", + line_range: (25, 68), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -15899,7 +15960,10 @@ pub const EXT_ACCOUNT_TAX_REPARTITION_LINE: OdooEntity = OdooEntity { decorators: &[ OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["company_id.multi_vat_foreign_country_ids", "company_id.account_fiscal_country_id"], + targets: &[ + "company_id.multi_vat_foreign_country_ids", + "company_id.account_fiscal_country_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -15915,13 +15979,14 @@ pub const EXT_ACCOUNT_TAX_REPARTITION_LINE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_tax.py", line_range: (5141, 5209) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/account_tax.py", + line_range: (5141, 5209), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -15931,9 +15996,7 @@ pub const EXT_ACCOUNT_CHART_TEMPLATE: OdooEntity = OdooEntity { model_name: "account.chart.template", kind: OdooEntityKind::Abstract, description: "Account Chart Template", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_template_register", @@ -16181,13 +16244,14 @@ pub const EXT_ACCOUNT_CHART_TEMPLATE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/chart_template.py", line_range: (73, 1544) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/chart_template.py", + line_range: (73, 1544), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17300,31 +17364,26 @@ pub const EXT_DECIMAL_PRECISION: OdooEntity = OdooEntity { model_name: "decimal.precision", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "precision_get", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + fields: &[], + methods: &[OdooMethod { + name: "precision_get", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/decimal_precision.py", line_range: (4, 12) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/decimal_precision.py", + line_range: (4, 12), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17368,17 +17427,16 @@ pub const EXT_DIGEST_DIGEST: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/digest.py", line_range: (8, 39) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/digest.py", + line_range: (8, 39), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17388,17 +17446,15 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { model_name: "ir.actions.report", kind: OdooEntityKind::Model, description: "", - fields: &[ - OdooField { - name: "is_invoice_report", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], + fields: &[OdooField { + name: "is_invoice_report", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], methods: &[ OdooMethod { name: "_render_qweb_pdf_prepare_streams", @@ -17437,17 +17493,16 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/ir_actions_report.py", line_range: (10, 96) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/ir_actions_report.py", + line_range: (10, 96), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17457,9 +17512,7 @@ pub const EXT_IR_ATTACHMENT: OdooEntity = OdooEntity { model_name: "ir.attachment", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_build_zip_from_attachments", @@ -17492,17 +17545,16 @@ pub const EXT_IR_ATTACHMENT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/ir_attachment.py", line_range: (10, 90) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/ir_attachment.py", + line_range: (10, 90), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17512,31 +17564,26 @@ pub const EXT_IR_HTTP: OdooEntity = OdooEntity { model_name: "ir.http", kind: OdooEntityKind::Abstract, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "lazy_session_info", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + fields: &[], + methods: &[OdooMethod { + name: "lazy_session_info", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/ir_http.py", line_range: (4, 11) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/ir_http.py", + line_range: (4, 11), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17546,17 +17593,15 @@ pub const EXT_IR_MODULE_MODULE: OdooEntity = OdooEntity { model_name: "ir.module.module", kind: OdooEntityKind::Model, description: "", - fields: &[ - OdooField { - name: "account_templates", - kind: OdooFieldKind::Computed, - target: None, - required: false, - computed: Some("_compute_account_templates"), - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], + fields: &[OdooField { + name: "account_templates", + kind: OdooFieldKind::Computed, + target: None, + required: false, + computed: Some("_compute_account_templates"), + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], methods: &[ OdooMethod { name: "_compute_account_templates", @@ -17589,20 +17634,19 @@ pub const EXT_IR_MODULE_MODULE: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["state"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["state"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/ir_module.py", line_range: (24, 115) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/ir_module.py", + line_range: (24, 115), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17612,9 +17656,7 @@ pub const EXT_KPI_PROVIDER: OdooEntity = OdooEntity { model_name: "kpi.provider", kind: OdooEntityKind::Abstract, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "get_account_kpi_summary", @@ -17640,13 +17682,14 @@ pub const EXT_KPI_PROVIDER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/kpi_provider.py", line_range: (4, 41) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/kpi_provider.py", + line_range: (4, 41), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17831,20 +17874,19 @@ pub const EXT_MAIL_MESSAGE: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["tracking_value_ids"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["tracking_value_ids"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/mail_message.py", line_range: (33, 199) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/mail_message.py", + line_range: (33, 199), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17854,28 +17896,23 @@ pub const EXT_MAIL_TEMPLATE: OdooEntity = OdooEntity { model_name: "mail.template", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "_unlink_except_master_mail_template", - kind: OdooMethodKind::Override, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + fields: &[], + methods: &[OdooMethod { + name: "_unlink_except_master_mail_template", + kind: OdooMethodKind::Override, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/mail_template.py", line_range: (5, 16) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/mail_template.py", + line_range: (5, 16), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17885,9 +17922,7 @@ pub const EXT_MAIL_TRACKING_VALUE: OdooEntity = OdooEntity { model_name: "mail.tracking.value", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_except_audit_log", @@ -17902,17 +17937,16 @@ pub const EXT_MAIL_TRACKING_VALUE: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/mail_tracking_value.py", line_range: (6, 15) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/mail_tracking_value.py", + line_range: (6, 15), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17922,28 +17956,23 @@ pub const EXT_BASE_PARTNER_MERGE_AUTOMATIC_WIZARD: OdooEntity = OdooEntity { model_name: "base.partner.merge.automatic.wizard", kind: OdooEntityKind::Transient, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "_update_reference_fields", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + fields: &[], + methods: &[OdooMethod { + name: "_update_reference_fields", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/merge_partner_automatic.py", line_range: (5, 9) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/merge_partner_automatic.py", + line_range: (5, 9), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17953,9 +17982,7 @@ pub const EXT_ONBOARDING_ONBOARDING: OdooEntity = OdooEntity { model_name: "onboarding.onboarding", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "action_close_panel_account_invoice", @@ -17987,13 +18014,14 @@ pub const EXT_ONBOARDING_ONBOARDING: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/onboarding_onboarding.py", line_range: (6, 29) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/onboarding_onboarding.py", + line_range: (6, 29), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -18003,9 +18031,7 @@ pub const EXT_ONBOARDING_ONBOARDING_STEP: OdooEntity = OdooEntity { model_name: "onboarding.onboarding.step", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "action_open_step_company_data", @@ -18091,13 +18117,14 @@ pub const EXT_ONBOARDING_ONBOARDING_STEP: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/onboarding_onboarding_step.py", line_range: (6, 120) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/onboarding_onboarding_step.py", + line_range: (6, 120), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -18501,7 +18528,10 @@ pub const EXT_ACCOUNT_FISCAL_POSITION: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/partner.py", line_range: (26, 300) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/partner.py", + line_range: (26, 300), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -18549,24 +18579,21 @@ pub const EXT_ACCOUNT_FISCAL_POSITION_ACCOUNT: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "An account fiscal position could be defined only one time on same accounts.", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "An account fiscal position could be defined only one time on same accounts.", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/partner.py", line_range: (303, 323) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/partner.py", + line_range: (303, 323), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19360,13 +19387,14 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/partner.py", line_range: (326, 1161) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/partner.py", + line_range: (326, 1161), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -19396,20 +19424,17 @@ pub const EXT_PRODUCT_CATEGORY: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/product.py", line_range: (13, 29) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/product.py", + line_range: (13, 29), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19593,17 +19618,18 @@ pub const EXT_PRODUCT_TEMPLATE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on uom_id", - source_method: Some("_check_uom_not_in_invoice"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on uom_id", + source_method: Some("_check_uom_not_in_invoice"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/product.py", line_range: (36, 211) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/product.py", + line_range: (36, 211), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19613,17 +19639,15 @@ pub const EXT_PRODUCT_PRODUCT: OdooEntity = OdooEntity { model_name: "product.product", kind: OdooEntityKind::Model, description: "", - fields: &[ - OdooField { - name: "tax_string", - kind: OdooFieldKind::Computed, - target: None, - required: false, - computed: Some("_compute_tax_string"), - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], + fields: &[OdooField { + name: "tax_string", + kind: OdooFieldKind::Computed, + target: None, + required: false, + computed: Some("_compute_tax_string"), + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], methods: &[ OdooMethod { name: "_get_product_accounts", @@ -19719,13 +19743,14 @@ pub const EXT_PRODUCT_PRODUCT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/product.py", line_range: (214, 522) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/product.py", + line_range: (214, 522), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19735,9 +19760,7 @@ pub const EXT_PRODUCT_CATALOG_MIXIN: OdooEntity = OdooEntity { model_name: "product.catalog.mixin", kind: OdooEntityKind::Abstract, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_create_section", @@ -19782,17 +19805,16 @@ pub const EXT_PRODUCT_CATALOG_MIXIN: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/product_catalog_mixin.py", line_range: (6, 192) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/product_catalog_mixin.py", + line_range: (6, 192), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -20496,13 +20518,14 @@ pub const EXT_RES_CONFIG_SETTINGS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/res_config_settings.py", line_range: (8, 311) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/res_config_settings.py", + line_range: (8, 311), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -20512,31 +20535,26 @@ pub const EXT_RES_COUNTRY_GROUP: OdooEntity = OdooEntity { model_name: "res.country.group", kind: OdooEntityKind::Model, description: "", - fields: &[ - OdooField { - name: "exclude_state_ids", - kind: OdooFieldKind::Many2many, - target: Some("res.country.state"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], - methods: &[ - - ], - decorators: &[ - - ], + fields: &[OdooField { + name: "exclude_state_ids", + kind: OdooFieldKind::Many2many, + target: Some("res.country.state"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/res_country_group.py", line_range: (6, 12) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/res_country_group.py", + line_range: (6, 12), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -20640,20 +20658,19 @@ pub const EXT_RES_CURRENCY: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["rounding"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["rounding"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/res_currency.py", line_range: (9, 285) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/res_currency.py", + line_range: (9, 285), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -21005,7 +21022,12 @@ pub const EXT_RES_PARTNER_BANK: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["partner_id.country_id", "sanitized_acc_number", "allow_out_payment", "acc_type"], + targets: &[ + "partner_id.country_id", + "sanitized_acc_number", + "allow_out_payment", + "acc_type", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -21041,17 +21063,18 @@ pub const EXT_RES_PARTNER_BANK: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on journal_id", - source_method: Some("_check_journal_id"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on journal_id", + source_method: Some("_check_journal_id"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/res_partner_bank.py", line_range: (13, 397) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/res_partner_bank.py", + line_range: (13, 397), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -21061,9 +21084,7 @@ pub const EXT_RES_GROUPS: OdooEntity = OdooEntity { model_name: "res.groups", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "get_application_groups", @@ -21089,13 +21110,14 @@ pub const EXT_RES_GROUPS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/res_users.py", line_range: (8, 38) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/res_users.py", + line_range: (8, 38), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -21268,17 +21290,18 @@ pub const EXT_SEQUENCE_MIXIN: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint", - source_method: Some("_constrains_date_sequence"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint", + source_method: Some("_constrains_date_sequence"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/sequence_mixin.py", line_range: (17, 511) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/sequence_mixin.py", + line_range: (17, 511), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -21288,17 +21311,15 @@ pub const EXT_UOM_UOM: OdooEntity = OdooEntity { model_name: "uom.uom", kind: OdooEntityKind::Model, description: "", - fields: &[ - OdooField { - name: "fiscal_country_codes", - kind: OdooFieldKind::Computed, - target: None, - required: false, - computed: Some("_compute_fiscal_country_codes"), - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], + fields: &[OdooField { + name: "fiscal_country_codes", + kind: OdooFieldKind::Computed, + target: None, + required: false, + computed: Some("_compute_fiscal_country_codes"), + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], methods: &[ OdooMethod { name: "_compute_fiscal_country_codes", @@ -21319,22 +21340,20 @@ pub const EXT_UOM_UOM: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/uom_uom.py", line_range: (38, 59) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account/models/uom_uom.py", + line_range: (38, 59), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; - diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_edi_ubl_cii.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_edi_ubl_cii.rs index 5e9b1e12..a2d18155 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_edi_ubl_cii.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_edi_ubl_cii.rs @@ -8,9 +8,7 @@ pub const EXT_ACCOUNT_EDI_COMMON: OdooEntity = OdooEntity { model_name: "account.edi.common", kind: OdooEntityKind::Abstract, description: "Common functions for EDI documents: generate the data, the constraints, etc", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "module_installed", @@ -228,13 +226,14 @@ pub const EXT_ACCOUNT_EDI_COMMON: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_common.py", line_range: (282, 1100) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_edi_ubl_cii/models/account_edi_common.py", + line_range: (282, 1100), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1481,9 +1480,7 @@ pub const EXT_ACCOUNT_EDI_XML_CII: OdooEntity = OdooEntity { model_name: "account.edi.xml.cii", kind: OdooEntityKind::Abstract, description: "Factur-x/XRechnung CII 2.2.0", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_find_value", @@ -1600,17 +1597,16 @@ pub const EXT_ACCOUNT_EDI_XML_CII: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py", line_range: (25, 414) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py", + line_range: (25, 414), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/eu/en16931"], }, @@ -1620,9 +1616,7 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_20: OdooEntity = OdooEntity { model_name: "account.edi.xml.ubl_20", kind: OdooEntityKind::Abstract, description: "UBL 2.0", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_find_value", @@ -2153,17 +2147,16 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_20: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py", line_range: (18, 1314) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py", + line_range: (18, 1314), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/eu/en16931"], }, @@ -2173,9 +2166,7 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_21: OdooEntity = OdooEntity { model_name: "account.edi.xml.ubl_21", kind: OdooEntityKind::Abstract, description: "UBL 2.1", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_export_invoice_filename", @@ -2214,17 +2205,16 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_21: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_21.py", line_range: (4, 75) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_21.py", + line_range: (4, 75), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/eu/en16931"], }, @@ -2234,9 +2224,7 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_A_NZ: OdooEntity = OdooEntity { model_name: "account.edi.xml.ubl_a_nz", kind: OdooEntityKind::Abstract, description: "A-NZ BIS Billing 3.0", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_export_invoice_filename", @@ -2293,17 +2281,16 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_A_NZ: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_a_nz.py", line_range: (6, 114) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_a_nz.py", + line_range: (6, 114), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2785,28 +2772,23 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_EFFF: OdooEntity = OdooEntity { model_name: "account.edi.xml.ubl_efff", kind: OdooEntityKind::Abstract, description: "E-FFF (BE)", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "_export_invoice_filename", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + fields: &[], + methods: &[OdooMethod { + name: "_export_invoice_filename", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_efff.py", line_range: (8, 20) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_efff.py", + line_range: (8, 20), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2816,9 +2798,7 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_NL: OdooEntity = OdooEntity { model_name: "account.edi.xml.ubl_nl", kind: OdooEntityKind::Abstract, description: "SI-UBL 2.0 (NLCIUS)", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_export_invoice_filename", @@ -2881,17 +2861,16 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_NL: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_nlcius.py", line_range: (6, 121) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_nlcius.py", + line_range: (6, 121), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/eu/en16931"], }, @@ -2901,9 +2880,7 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_SG: OdooEntity = OdooEntity { model_name: "account.edi.xml.ubl_sg", kind: OdooEntityKind::Abstract, description: "SG BIS Billing 3.0", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_export_invoice_filename", @@ -2954,17 +2931,16 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_SG: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_sg.py", line_range: (5, 84) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_sg.py", + line_range: (5, 84), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2974,9 +2950,7 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_DE: OdooEntity = OdooEntity { model_name: "account.edi.xml.ubl_de", kind: OdooEntityKind::Abstract, description: "BIS3 DE (XRechnung)", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_export_invoice_filename", @@ -3045,17 +3019,16 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_DE: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_xrechnung.py", line_range: (5, 121) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_xrechnung.py", + line_range: (5, 121), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/eu/en16931"], }, @@ -3235,13 +3208,14 @@ pub const EXT_ACCOUNT_MOVE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_move.py", line_range: (14, 402) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_edi_ubl_cii/models/account_move.py", + line_range: (14, 402), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3251,9 +3225,7 @@ pub const EXT_ACCOUNT_MOVE_SEND: OdooEntity = OdooEntity { model_name: "account.move.send", kind: OdooEntityKind::Abstract, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_get_move_constraints", @@ -3345,13 +3317,14 @@ pub const EXT_ACCOUNT_MOVE_SEND: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_move_send.py", line_range: (16, 316) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_edi_ubl_cii/models/account_move_send.py", + line_range: (16, 316), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3415,13 +3388,14 @@ pub const EXT_ACCOUNT_TAX: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_tax.py", line_range: (4, 128) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_edi_ubl_cii/models/account_tax.py", + line_range: (4, 128), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -3431,28 +3405,23 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { model_name: "ir.actions.report", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "_render_qweb_pdf_prepare_streams", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + fields: &[], + methods: &[OdooMethod { + name: "_render_qweb_pdf_prepare_streams", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/ir_actions_report.py", line_range: (6, 30) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_edi_ubl_cii/models/ir_actions_report.py", + line_range: (6, 30), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3685,19 +3654,19 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on peppol_endpoint", - source_method: Some("_check_peppol_fields"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on peppol_endpoint", + source_method: Some("_check_peppol_fields"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/res_partner.py", line_range: (25, 340) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_edi_ubl_cii/models/res_partner.py", + line_range: (25, 340), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13", "ogit:regulation/eu/en16931"], }, }; - diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_payment.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_payment.rs index 52bc3d6d..018333e1 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_payment.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_payment.rs @@ -8,9 +8,7 @@ pub const EXT_ACCOUNT_JOURNAL: OdooEntity = OdooEntity { model_name: "account.journal", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_get_available_payment_method_lines", @@ -25,17 +23,16 @@ pub const EXT_ACCOUNT_JOURNAL: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_payment/models/account_journal.py", line_range: (8, 25) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_payment/models/account_journal.py", + line_range: (8, 25), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -172,13 +169,14 @@ pub const EXT_ACCOUNT_MOVE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_payment/models/account_move.py", line_range: (13, 182) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_payment/models/account_move.py", + line_range: (13, 182), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -336,13 +334,14 @@ pub const EXT_ACCOUNT_PAYMENT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_payment/models/account_payment.py", line_range: (7, 230) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_payment/models/account_payment.py", + line_range: (7, 230), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -352,31 +351,26 @@ pub const EXT_ACCOUNT_PAYMENT_METHOD: OdooEntity = OdooEntity { model_name: "account.payment.method", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "_get_payment_method_information", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + fields: &[], + methods: &[OdooMethod { + name: "_get_payment_method_information", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_payment/models/account_payment_method.py", line_range: (7, 20) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_payment/models/account_payment_method.py", + line_range: (7, 20), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -443,13 +437,14 @@ pub const EXT_ACCOUNT_PAYMENT_METHOD_LINE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_payment/models/account_payment_method_line.py", line_range: (7, 85) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_payment/models/account_payment_method_line.py", + line_range: (7, 85), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -459,17 +454,15 @@ pub const EXT_PAYMENT_PROVIDER: OdooEntity = OdooEntity { model_name: "payment.provider", kind: OdooEntityKind::Model, description: "", - fields: &[ - OdooField { - name: "journal_id", - kind: OdooFieldKind::Computed, - target: Some("account.journal"), - required: false, - computed: Some("_compute_journal_id"), - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], + fields: &[OdooField { + name: "journal_id", + kind: OdooFieldKind::Computed, + target: Some("account.journal"), + required: false, + computed: Some("_compute_journal_id"), + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], methods: &[ OdooMethod { name: "_ensure_payment_method_line", @@ -549,13 +542,14 @@ pub const EXT_PAYMENT_PROVIDER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_payment/models/payment_provider.py", line_range: (7, 147) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_payment/models/payment_provider.py", + line_range: (7, 147), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -649,15 +643,15 @@ pub const EXT_PAYMENT_TRANSACTION: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_payment/models/payment_transaction.py", line_range: (6, 242) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_payment/models/payment_transaction.py", + line_range: (6, 242), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; - diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_peppol.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_peppol.rs index 1616fbdb..b7484bb4 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_peppol.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_peppol.rs @@ -8,9 +8,7 @@ pub const EXT_ACCOUNT_EDI_COMMON: OdooEntity = OdooEntity { model_name: "account.edi.common", kind: OdooEntityKind::Abstract, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_add_logs_import_invoice_ubl_cii", @@ -25,17 +23,16 @@ pub const EXT_ACCOUNT_EDI_COMMON: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/account_edi_common.py", line_range: (4, 18) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_peppol/models/account_edi_common.py", + line_range: (4, 18), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -45,17 +42,15 @@ pub const EXT_ACCOUNT_EDI_PROXY_CLIENT_USER: OdooEntity = OdooEntity { model_name: "account_edi_proxy_client.user", kind: OdooEntityKind::Model, description: "", - fields: &[ - OdooField { - name: "proxy_type", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], + fields: &[OdooField { + name: "proxy_type", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], methods: &[ OdooMethod { name: "_get_proxy_urls", @@ -271,13 +266,14 @@ pub const EXT_ACCOUNT_EDI_PROXY_CLIENT_USER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/account_edi_proxy_user.py", line_range: (18, 586) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_peppol/models/account_edi_proxy_user.py", + line_range: (18, 586), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -287,28 +283,23 @@ pub const EXT_ACCOUNT_EDI_UBL: OdooEntity = OdooEntity { model_name: "account.edi.ubl", kind: OdooEntityKind::Abstract, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "_ubl_add_values_company", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + fields: &[], + methods: &[OdooMethod { + name: "_ubl_add_values_company", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/account_edi_ubl_xml.py", line_range: (4, 15) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_peppol/models/account_edi_ubl_xml.py", + line_range: (4, 15), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -318,28 +309,23 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_BIS3: OdooEntity = OdooEntity { model_name: "account.edi.xml.ubl_bis3", kind: OdooEntityKind::Abstract, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "_invoice_constraints_peppol_en16931_ubl", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + fields: &[], + methods: &[OdooMethod { + name: "_invoice_constraints_peppol_en16931_ubl", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/account_edi_xml_ubl_bis3.py", line_range: (4, 29) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_peppol/models/account_edi_xml_ubl_bis3.py", + line_range: (4, 29), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -416,17 +402,18 @@ pub const EXT_ACCOUNT_JOURNAL: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on type", - source_method: Some("_check_type_for_peppol_journal"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on type", + source_method: Some("_check_type_for_peppol_journal"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/account_journal.py", line_range: (5, 67) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_peppol/models/account_journal.py", + line_range: (5, 67), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -514,13 +501,14 @@ pub const EXT_ACCOUNT_MOVE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/account_move.py", line_range: (8, 91) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_peppol/models/account_move.py", + line_range: (8, 91), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -530,9 +518,7 @@ pub const EXT_ACCOUNT_MOVE_SEND: OdooEntity = OdooEntity { model_name: "account.move.send", kind: OdooEntityKind::Abstract, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_get_default_sending_methods", @@ -595,20 +581,19 @@ pub const EXT_ACCOUNT_MOVE_SEND: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/account_move_send.py", line_range: (15, 296) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_peppol/models/account_move_send.py", + line_range: (15, 296), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -994,7 +979,10 @@ pub const EXT_RES_COMPANY: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/res_company.py", line_range: (54, 448) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_peppol/models/res_company.py", + line_range: (54, 448), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13", "ogit:regulation/eu/en16931"], }, @@ -1230,13 +1218,14 @@ pub const EXT_RES_CONFIG_SETTINGS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/res_config_settings.py", line_range: (4, 165) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_peppol/models/res_config_settings.py", + line_range: (4, 165), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1432,15 +1421,15 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/res_partner.py", line_range: (19, 303) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/account_peppol/models/res_partner.py", + line_range: (19, 303), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; - diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/analytic.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/analytic.rs index b283fc48..3639e700 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/analytic.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/analytic.rs @@ -198,17 +198,18 @@ pub const EXT_ACCOUNT_ANALYTIC_ACCOUNT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on company_id", - source_method: Some("_check_company_consistency"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on company_id", + source_method: Some("_check_company_consistency"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/analytic_account.py", line_range: (11, 243) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/analytic/models/analytic_account.py", + line_range: (11, 243), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -307,17 +308,18 @@ pub const EXT_ACCOUNT_ANALYTIC_DISTRIBUTION_MODEL: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on company_id", - source_method: Some("_check_company_accounts"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on company_id", + source_method: Some("_check_company_accounts"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/analytic_distribution_model.py", line_range: (9, 96) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/analytic/models/analytic_distribution_model.py", + line_range: (9, 96), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -460,17 +462,18 @@ pub const EXT_ANALYTIC_PLAN_FIELDS_MIXIN: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint", - source_method: Some("_check_account_id"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint", + source_method: Some("_check_account_id"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/analytic_line.py", line_range: (11, 160) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/analytic/models/analytic_line.py", + line_range: (11, 160), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -625,17 +628,16 @@ pub const EXT_ACCOUNT_ANALYTIC_LINE: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/analytic_line.py", line_range: (163, 274) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/analytic/models/analytic_line.py", + line_range: (163, 274), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -793,13 +795,14 @@ pub const EXT_ANALYTIC_MIXIN: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/analytic_mixin.py", line_range: (12, 275) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/analytic/models/analytic_mixin.py", + line_range: (12, 275), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1141,13 +1144,14 @@ pub const EXT_ACCOUNT_ANALYTIC_PLAN: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/analytic_plan.py", line_range: (14, 390) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/analytic/models/analytic_plan.py", + line_range: (14, 390), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1195,25 +1199,22 @@ pub const EXT_ACCOUNT_ANALYTIC_APPLICABILITY: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - OdooMethod { - name: "_get_score", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + methods: &[OdooMethod { + name: "_get_score", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/analytic_plan.py", line_range: (393, 430) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/analytic/models/analytic_plan.py", + line_range: (393, 430), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1223,28 +1224,23 @@ pub const EXT_IR_CONFIG_PARAMETER: OdooEntity = OdooEntity { model_name: "ir.config_parameter", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "write", - kind: OdooMethodKind::Override, - return_kind: OdooReturnKind::Boolean, - triggers: &[], - }, - ], - decorators: &[ - - ], + fields: &[], + methods: &[OdooMethod { + name: "write", + kind: OdooMethodKind::Override, + return_kind: OdooReturnKind::Boolean, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/ir_config_parameter.py", line_range: (7, 28) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/analytic/models/ir_config_parameter.py", + line_range: (7, 28), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1254,33 +1250,27 @@ pub const EXT_RES_CONFIG_SETTINGS: OdooEntity = OdooEntity { model_name: "res.config.settings", kind: OdooEntityKind::Transient, description: "", - fields: &[ - OdooField { - name: "group_analytic_accounting", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], - methods: &[ - - ], - decorators: &[ - - ], + fields: &[OdooField { + name: "group_analytic_accounting", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/res_config_settings.py", line_range: (7, 10) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/analytic/models/res_config_settings.py", + line_range: (7, 10), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; - diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/base.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/base.rs index bb5ffbc2..7b51cec5 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/base.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/base.rs @@ -142,13 +142,14 @@ pub const EXT_AVATAR_MIXIN: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/avatar_mixin.py", line_range: (22, 90) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/avatar_mixin.py", + line_range: (22, 90), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -225,17 +226,18 @@ pub const EXT_DECIMAL_PRECISION: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Only one value can be defined for each given usage!", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Only one value can be defined for each given usage!", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/decimal_precision.py", line_range: (9, 60) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/decimal_precision.py", + line_range: (9, 60), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -292,20 +294,17 @@ pub const EXT_IMAGE_MIXIN: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/image_mixin.py", line_range: (7, 19) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/image_mixin.py", + line_range: (7, 19), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -501,7 +500,10 @@ pub const EXT_IR_ACTIONS_ACTIONS: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (54, 257) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_actions.py", + line_range: (54, 257), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -781,7 +783,10 @@ pub const EXT_IR_ACTIONS_ACT_WINDOW: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (260, 397) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_actions.py", + line_range: (260, 397), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -838,20 +843,17 @@ pub const EXT_IR_ACTIONS_ACT_WINDOW_VIEW: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (410, 424) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_actions.py", + line_range: (410, 424), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -861,36 +863,31 @@ pub const EXT_IR_ACTIONS_ACT_WINDOW_CLOSE: OdooEntity = OdooEntity { model_name: "ir.actions.act_window_close", kind: OdooEntityKind::Model, description: "Action Window Close", - fields: &[ - OdooField { - name: "type", - kind: OdooFieldKind::Char, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], - methods: &[ - OdooMethod { - name: "_get_readable_fields", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + fields: &[OdooField { + name: "type", + kind: OdooFieldKind::Char, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], + methods: &[OdooMethod { + name: "_get_readable_fields", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (427, 441) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_actions.py", + line_range: (427, 441), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -929,25 +926,22 @@ pub const EXT_IR_ACTIONS_ACT_URL: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - OdooMethod { - name: "_get_readable_fields", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + methods: &[OdooMethod { + name: "_get_readable_fields", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (444, 460) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_actions.py", + line_range: (444, 460), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1026,13 +1020,14 @@ pub const EXT_SERVER_ACTION_HISTORY_WIZARD: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (463, 499) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_actions.py", + line_range: (463, 499), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1076,20 +1071,19 @@ pub const EXT_IR_ACTIONS_SERVER_HISTORY: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiAutovacuum, - targets: &[], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiAutovacuum, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (502, 538) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_actions.py", + line_range: (502, 538), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1766,18 +1760,35 @@ pub const EXT_IR_ACTIONS_SERVER: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { name: "object_write", semantic: OdooStateSemantic::Active }, - OdooState { name: "object_create", semantic: OdooStateSemantic::Active }, - OdooState { name: "object_copy", semantic: OdooStateSemantic::Active }, - OdooState { name: "code", semantic: OdooStateSemantic::Active }, - OdooState { name: "webhook", semantic: OdooStateSemantic::Active }, - OdooState { name: "multi", semantic: OdooStateSemantic::Active }, - ], - transitions: &[ - ], - }), + state_field: "state", + states: &[ + OdooState { + name: "object_write", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "object_create", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "object_copy", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "code", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "webhook", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "multi", + semantic: OdooStateSemantic::Active, + }, + ], + transitions: &[], + }), constraints: &[ OdooConstraint { kind: OdooConstraintKind::Python, @@ -1793,7 +1804,10 @@ pub const EXT_IR_ACTIONS_SERVER: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (566, 1341) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_actions.py", + line_range: (566, 1341), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1890,33 +1904,40 @@ pub const EXT_IR_ACTIONS_TODO: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { name: "open", semantic: OdooStateSemantic::Active }, - OdooState { name: "done", semantic: OdooStateSemantic::Completed }, - ], - transitions: &[ - OdooTransition { - from: "open", - to: "done", - trigger: "action_launch", - guards: &[], - }, - OdooTransition { - from: "open", - to: "open", - trigger: "action_open", - guards: &[], - }, - ], - }), - constraints: &[ - - ], + state_field: "state", + states: &[ + OdooState { + name: "open", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "done", + semantic: OdooStateSemantic::Completed, + }, + ], + transitions: &[ + OdooTransition { + from: "open", + to: "done", + trigger: "action_launch", + guards: &[], + }, + OdooTransition { + from: "open", + to: "open", + trigger: "action_open", + guards: &[], + }, + ], + }), + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (1344, 1420) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_actions.py", + line_range: (1344, 1420), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2011,20 +2032,19 @@ pub const EXT_IR_ACTIONS_CLIENT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["params_store"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["params_store"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (1423, 1460) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_actions.py", + line_range: (1423, 1460), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2435,13 +2455,14 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions_report.py", line_range: (157, 1217) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_actions_report.py", + line_range: (157, 1217), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2629,13 +2650,14 @@ pub const EXT_IR_ASSET: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_asset.py", line_range: (51, 387) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_asset.py", + line_range: (51, 387), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3221,17 +3243,18 @@ pub const EXT_IR_ATTACHMENT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on res_model, res_id", - source_method: Some("_check_circular_attachment"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on res_model, res_id", + source_method: Some("_check_circular_attachment"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_attachment.py", line_range: (61, 984) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_attachment.py", + line_range: (61, 984), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3241,9 +3264,7 @@ pub const EXT_IR_AUTOVACUUM: OdooEntity = OdooEntity { model_name: "ir.autovacuum", kind: OdooEntityKind::Abstract, description: "Automatic Vacuum", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_run_vacuum_cleaner", @@ -3258,20 +3279,19 @@ pub const EXT_IR_AUTOVACUUM: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiAutovacuum, - targets: &[], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiAutovacuum, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_autovacuum.py", line_range: (22, 75) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_autovacuum.py", + line_range: (22, 75), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3281,9 +3301,7 @@ pub const EXT_IR_BINARY: OdooEntity = OdooEntity { model_name: "ir.binary", kind: OdooEntityKind::Abstract, description: "File streaming helper model for controllers", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_find_record", @@ -3322,17 +3340,16 @@ pub const EXT_IR_BINARY: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_binary.py", line_range: (19, 259) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_binary.py", + line_range: (19, 259), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3431,17 +3448,18 @@ pub const EXT_IR_CONFIG_PARAMETER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Key must be unique.", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Key must be unique.", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_config_parameter.py", line_range: (28, 125) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_config_parameter.py", + line_range: (28, 125), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3777,17 +3795,18 @@ pub const EXT_IR_CRON: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "The interval number must be a strictly positive number.", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "The interval number must be a strictly positive number.", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_cron.py", line_range: (91, 894) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_cron.py", + line_range: (91, 894), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3817,28 +3836,25 @@ pub const EXT_IR_CRON_TRIGGER: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - OdooMethod { - name: "_gc_cron_triggers", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiAutovacuum, - targets: &[], - }, - ], + methods: &[OdooMethod { + name: "_gc_cron_triggers", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiAutovacuum, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_cron.py", line_range: (897, 915) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_cron.py", + line_range: (897, 915), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3895,28 +3911,25 @@ pub const EXT_IR_CRON_PROGRESS: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - OdooMethod { - name: "_gc_cron_progress", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiAutovacuum, - targets: &[], - }, - ], + methods: &[OdooMethod { + name: "_gc_cron_progress", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiAutovacuum, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_cron.py", line_range: (918, 933) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_cron.py", + line_range: (918, 933), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4072,17 +4085,18 @@ pub const EXT_IR_DEFAULT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on json_value, field_id", - source_method: Some("_check_json_format"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on json_value, field_id", + source_method: Some("_check_json_format"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_default.py", line_range: (13, 239) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_default.py", + line_range: (13, 239), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4092,28 +4106,23 @@ pub const EXT_IR_DEMO: OdooEntity = OdooEntity { model_name: "ir.demo", kind: OdooEntityKind::Transient, description: "Demo", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "install_demo", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + fields: &[], + methods: &[OdooMethod { + name: "install_demo", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_demo.py", line_range: (7, 19) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_demo.py", + line_range: (7, 19), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4152,20 +4161,17 @@ pub const EXT_IR_DEMO_FAILURE: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_demo_failure.py", line_range: (4, 12) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_demo_failure.py", + line_range: (4, 12), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4209,20 +4215,19 @@ pub const EXT_IR_DEMO_FAILURE_WIZARD: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["failure_ids"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["failure_ids"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_demo_failure.py", line_range: (15, 32) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_demo_failure.py", + line_range: (15, 32), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4462,20 +4467,17 @@ pub const EXT_IR_EXPORTS: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_exports.py", line_range: (7, 14) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_exports.py", + line_range: (7, 14), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4505,20 +4507,17 @@ pub const EXT_IR_EXPORTS_LINE: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_exports.py", line_range: (17, 23) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_exports.py", + line_range: (17, 23), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4528,9 +4527,7 @@ pub const EXT_IR_FIELDS_CONVERTER: OdooEntity = OdooEntity { model_name: "ir.fields.converter", kind: OdooEntityKind::Abstract, description: "Fields Converter", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_format_import_error", @@ -4746,13 +4743,14 @@ pub const EXT_IR_FIELDS_CONVERTER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_fields.py", line_range: (44, 740) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_fields.py", + line_range: (44, 740), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4951,9 +4949,7 @@ pub const EXT_IR_HTTP: OdooEntity = OdooEntity { model_name: "ir.http", kind: OdooEntityKind::Abstract, description: "HTTP Routing", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_slugify_one", @@ -5149,13 +5145,14 @@ pub const EXT_IR_HTTP: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_http.py", line_range: (138, 458) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_http.py", + line_range: (138, 458), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -5275,25 +5272,22 @@ pub const EXT_IR_LOGGING: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - OdooMethod { - name: "init", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + methods: &[OdooMethod { + name: "init", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_logging.py", line_range: (5, 45) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_logging.py", + line_range: (5, 45), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -5680,9 +5674,7 @@ pub const EXT_BASE: OdooEntity = OdooEntity { model_name: "base", kind: OdooEntityKind::Abstract, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_get_access_action", @@ -5898,13 +5890,14 @@ pub const EXT_BASE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_ui_view.py", line_range: (2725, 3325) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_ui_view.py", + line_range: (2725, 3325), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -5914,23 +5907,18 @@ pub const EXT__UNKNOWN: OdooEntity = OdooEntity { model_name: "_unknown", kind: OdooEntityKind::Abstract, description: "Unknown", - fields: &[ - - ], - methods: &[ - - ], - decorators: &[ - - ], + fields: &[], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (198, 204) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_model.py", + line_range: (198, 204), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6256,14 +6244,19 @@ pub const EXT_IR_MODEL: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { name: "manual", semantic: OdooStateSemantic::Active }, - OdooState { name: "base", semantic: OdooStateSemantic::Active }, - ], - transitions: &[ - ], - }), + state_field: "state", + states: &[ + OdooState { + name: "manual", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "base", + semantic: OdooStateSemantic::Active, + }, + ], + transitions: &[], + }), constraints: &[ OdooConstraint { kind: OdooConstraintKind::Sql, @@ -6289,7 +6282,10 @@ pub const EXT_IR_MODEL: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (207, 501) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_model.py", + line_range: (207, 501), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7022,14 +7018,19 @@ pub const EXT_IR_MODEL_FIELDS: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { name: "manual", semantic: OdooStateSemantic::Active }, - OdooState { name: "base", semantic: OdooStateSemantic::Active }, - ], - transitions: &[ - ], - }), + state_field: "state", + states: &[ + OdooState { + name: "manual", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "base", + semantic: OdooStateSemantic::Active, + }, + ], + transitions: &[], + }), constraints: &[ OdooConstraint { kind: OdooConstraintKind::Sql, @@ -7090,7 +7091,10 @@ pub const EXT_IR_MODEL_FIELDS: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (508, 1419) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_model.py", + line_range: (508, 1419), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7129,29 +7133,26 @@ pub const EXT_IR_MODEL_INHERIT: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - OdooMethod { - name: "_reflect_inherits", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + methods: &[OdooMethod { + name: "_reflect_inherits", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Models inherits from another only once", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Models inherits from another only once", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (1422, 1504) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_model.py", + line_range: (1422, 1504), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7267,24 +7268,23 @@ pub const EXT_IR_MODEL_FIELDS_SELECTION: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModelCreateMulti, - targets: &[], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModelCreateMulti, + targets: &[], + }], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Selections values must be unique per field", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Selections values must be unique per field", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (1507, 1847) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_model.py", + line_range: (1507, 1847), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7382,21 +7382,20 @@ pub const EXT_IR_MODEL_CONSTRAINT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Constraints with the same name are unique per module.", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Constraints with the same name are unique per module.", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (1850, 2003) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_model.py", + line_range: (1850, 2003), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7467,17 +7466,16 @@ pub const EXT_IR_MODEL_RELATION: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (2006, 2069) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_model.py", + line_range: (2006, 2069), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7640,13 +7638,14 @@ pub const EXT_IR_MODEL_ACCESS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (2072, 2215) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_model.py", + line_range: (2072, 2215), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7902,17 +7901,18 @@ pub const EXT_IR_MODEL_DATA: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "External IDs cannot contain spaces", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "External IDs cannot contain spaces", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (2218, 2717) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_model.py", + line_range: (2218, 2717), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -8028,24 +8028,23 @@ pub const EXT_IR_MODULE_CATEGORY: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["parent_id"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["parent_id"], + }], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on parent_id", - source_method: Some("_check_parent_not_circular"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on parent_id", + source_method: Some("_check_parent_not_circular"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_module.py", line_range: (76, 104) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_module.py", + line_range: (76, 104), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -8641,17 +8640,18 @@ pub const EXT_IR_MODULE_MODULE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "The name of the module must be unique!", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "The name of the module must be unique!", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_module.py", line_range: (157, 988) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_module.py", + line_range: (157, 988), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -8749,13 +8749,14 @@ pub const EXT_IR_MODULE_MODULE_DEPENDENCY: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_module.py", line_range: (994, 1057) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_module.py", + line_range: (994, 1057), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -8834,13 +8835,14 @@ pub const EXT_IR_MODULE_MODULE_EXCLUSION: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_module.py", line_range: (1060, 1096) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_module.py", + line_range: (1060, 1096), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9095,13 +9097,14 @@ pub const EXT_IR_PROFILE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_profile.py", line_range: (21, 217) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_profile.py", + line_range: (21, 217), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9145,20 +9148,19 @@ pub const EXT_BASE_ENABLE_PROFILING_WIZARD: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["duration"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["duration"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_profile.py", line_range: (219, 239) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_profile.py", + line_range: (219, 239), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9168,9 +9170,7 @@ pub const EXT_IR_QWEB: OdooEntity = OdooEntity { model_name: "ir.qweb", kind: OdooEntityKind::Abstract, description: "Qweb", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_render", @@ -9598,13 +9598,14 @@ pub const EXT_IR_QWEB: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb.py", line_range: (673, 2960) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb.py", + line_range: (673, 2960), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9614,9 +9615,7 @@ pub const EXT_IR_QWEB_FIELD: OdooEntity = OdooEntity { model_name: "ir.qweb.field", kind: OdooEntityKind::Abstract, description: "Qweb Field", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "get_available_options", @@ -9672,13 +9671,14 @@ pub const EXT_IR_QWEB_FIELD: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (48, 182) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (48, 182), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9688,9 +9688,7 @@ pub const EXT_IR_QWEB_FIELD_INTEGER: OdooEntity = OdooEntity { model_name: "ir.qweb.field.integer", kind: OdooEntityKind::Abstract, description: "Qweb Field Integer", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "get_available_options", @@ -9716,13 +9714,14 @@ pub const EXT_IR_QWEB_FIELD_INTEGER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (185, 203) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (185, 203), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9732,9 +9731,7 @@ pub const EXT_IR_QWEB_FIELD_FLOAT: OdooEntity = OdooEntity { model_name: "ir.qweb.field.float", kind: OdooEntityKind::Abstract, description: "Qweb Field Float", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "get_available_options", @@ -9770,13 +9767,14 @@ pub const EXT_IR_QWEB_FIELD_FLOAT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (206, 254) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (206, 254), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9786,9 +9784,7 @@ pub const EXT_IR_QWEB_FIELD_DATE: OdooEntity = OdooEntity { model_name: "ir.qweb.field.date", kind: OdooEntityKind::Abstract, description: "Qweb Field Date", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "get_available_options", @@ -9814,13 +9810,14 @@ pub const EXT_IR_QWEB_FIELD_DATE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (257, 272) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (257, 272), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9830,9 +9827,7 @@ pub const EXT_IR_QWEB_FIELD_DATETIME: OdooEntity = OdooEntity { model_name: "ir.qweb.field.datetime", kind: OdooEntityKind::Abstract, description: "Qweb Field Datetime", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "get_available_options", @@ -9858,13 +9853,14 @@ pub const EXT_IR_QWEB_FIELD_DATETIME: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (275, 330) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (275, 330), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9874,31 +9870,26 @@ pub const EXT_IR_QWEB_FIELD_TEXT: OdooEntity = OdooEntity { model_name: "ir.qweb.field.text", kind: OdooEntityKind::Abstract, description: "Qweb Field Text", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "value_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + fields: &[], + methods: &[OdooMethod { + name: "value_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (333, 343) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (333, 343), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9908,9 +9899,7 @@ pub const EXT_IR_QWEB_FIELD_SELECTION: OdooEntity = OdooEntity { model_name: "ir.qweb.field.selection", kind: OdooEntityKind::Abstract, description: "Qweb Field Selection", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "get_available_options", @@ -9946,13 +9935,14 @@ pub const EXT_IR_QWEB_FIELD_SELECTION: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (346, 372) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (346, 372), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9962,31 +9952,26 @@ pub const EXT_IR_QWEB_FIELD_MANY2ONE: OdooEntity = OdooEntity { model_name: "ir.qweb.field.many2one", kind: OdooEntityKind::Abstract, description: "Qweb Field Many to One", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "value_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + fields: &[], + methods: &[OdooMethod { + name: "value_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (375, 387) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (375, 387), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9996,31 +9981,26 @@ pub const EXT_IR_QWEB_FIELD_MANY2MANY: OdooEntity = OdooEntity { model_name: "ir.qweb.field.many2many", kind: OdooEntityKind::Abstract, description: "Qweb field many2many", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "value_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + fields: &[], + methods: &[OdooMethod { + name: "value_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (390, 400) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (390, 400), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10030,31 +10010,26 @@ pub const EXT_IR_QWEB_FIELD_ONE2MANY: OdooEntity = OdooEntity { model_name: "ir.qweb.field.one2many", kind: OdooEntityKind::Abstract, description: "Qweb field one2many", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "value_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + fields: &[], + methods: &[OdooMethod { + name: "value_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (403, 413) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (403, 413), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10064,31 +10039,26 @@ pub const EXT_IR_QWEB_FIELD_HTML: OdooEntity = OdooEntity { model_name: "ir.qweb.field.html", kind: OdooEntityKind::Abstract, description: "Qweb Field HTML", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "value_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + fields: &[], + methods: &[OdooMethod { + name: "value_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (416, 433) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (416, 433), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10098,9 +10068,7 @@ pub const EXT_IR_QWEB_FIELD_IMAGE: OdooEntity = OdooEntity { model_name: "ir.qweb.field.image", kind: OdooEntityKind::Abstract, description: "Qweb Field Image", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_get_src_data_b64", @@ -10126,13 +10094,14 @@ pub const EXT_IR_QWEB_FIELD_IMAGE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (436, 473) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (436, 473), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10142,31 +10111,26 @@ pub const EXT_IR_QWEB_FIELD_IMAGE_URL: OdooEntity = OdooEntity { model_name: "ir.qweb.field.image_url", kind: OdooEntityKind::Abstract, description: "Qweb Field Image", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "value_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + fields: &[], + methods: &[OdooMethod { + name: "value_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (476, 486) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (476, 486), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10176,9 +10140,7 @@ pub const EXT_IR_QWEB_FIELD_MONETARY: OdooEntity = OdooEntity { model_name: "ir.qweb.field.monetary", kind: OdooEntityKind::Abstract, description: "Qweb Field Monetary", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "get_available_options", @@ -10214,13 +10176,14 @@ pub const EXT_IR_QWEB_FIELD_MONETARY: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (489, 581) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (489, 581), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10230,31 +10193,26 @@ pub const EXT_IR_QWEB_FIELD_FLOAT_TIME: OdooEntity = OdooEntity { model_name: "ir.qweb.field.float_time", kind: OdooEntityKind::Abstract, description: "Qweb Field Float Time", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "value_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + fields: &[], + methods: &[OdooMethod { + name: "value_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (595, 607) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (595, 607), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10264,31 +10222,26 @@ pub const EXT_IR_QWEB_FIELD_TIME: OdooEntity = OdooEntity { model_name: "ir.qweb.field.time", kind: OdooEntityKind::Abstract, description: "QWeb Field Time", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "value_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + fields: &[], + methods: &[OdooMethod { + name: "value_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (610, 633) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (610, 633), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10298,9 +10251,7 @@ pub const EXT_IR_QWEB_FIELD_DURATION: OdooEntity = OdooEntity { model_name: "ir.qweb.field.duration", kind: OdooEntityKind::Abstract, description: "Qweb Field Duration", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "get_available_options", @@ -10326,13 +10277,14 @@ pub const EXT_IR_QWEB_FIELD_DURATION: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (636, 740) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (636, 740), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10342,9 +10294,7 @@ pub const EXT_IR_QWEB_FIELD_RELATIVE: OdooEntity = OdooEntity { model_name: "ir.qweb.field.relative", kind: OdooEntityKind::Abstract, description: "Qweb Field Relative", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "get_available_options", @@ -10380,13 +10330,14 @@ pub const EXT_IR_QWEB_FIELD_RELATIVE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (743, 772) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (743, 772), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10396,9 +10347,7 @@ pub const EXT_IR_QWEB_FIELD_BARCODE: OdooEntity = OdooEntity { model_name: "ir.qweb.field.barcode", kind: OdooEntityKind::Abstract, description: "Qweb Field Barcode", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "get_available_options", @@ -10424,13 +10373,14 @@ pub const EXT_IR_QWEB_FIELD_BARCODE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (775, 816) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (775, 816), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10440,9 +10390,7 @@ pub const EXT_IR_QWEB_FIELD_CONTACT: OdooEntity = OdooEntity { model_name: "ir.qweb.field.contact", kind: OdooEntityKind::Abstract, description: "Qweb Field Contact", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "get_available_options", @@ -10468,13 +10416,14 @@ pub const EXT_IR_QWEB_FIELD_CONTACT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (819, 893) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (819, 893), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10484,31 +10433,26 @@ pub const EXT_IR_QWEB_FIELD_QWEB: OdooEntity = OdooEntity { model_name: "ir.qweb.field.qweb", kind: OdooEntityKind::Abstract, description: "Qweb Field qweb", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "record_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + fields: &[], + methods: &[OdooMethod { + name: "record_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (896, 911) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", + line_range: (896, 911), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10728,7 +10672,10 @@ pub const EXT_IR_RULE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_rule.py", line_range: (15, 268) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_rule.py", + line_range: (15, 268), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10952,13 +10899,14 @@ pub const EXT_IR_SEQUENCE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_sequence.py", line_range: (85, 292) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_sequence.py", + line_range: (85, 292), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11076,17 +11024,19 @@ pub const EXT_IR_SEQUENCE_DATE_RANGE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "You cannot create two date ranges for the same sequence with the same date range.", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: + "You cannot create two date ranges for the same sequence with the same date range.", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_sequence.py", line_range: (295, 376) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_sequence.py", + line_range: (295, 376), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11336,17 +11286,18 @@ pub const EXT_IR_UI_MENU: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on parent_id", - source_method: Some("_check_parent_id"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on parent_id", + source_method: Some("_check_parent_id"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_ui_menu.py", line_range: (16, 324) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_ui_menu.py", + line_range: (16, 324), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11379,26 +11330,23 @@ pub const EXT_IR_UI_VIEW_CUSTOM: OdooEntity = OdooEntity { name: "arch", kind: OdooFieldKind::Text, target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], - methods: &[ - - ], - decorators: &[ - + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_ui_view.py", line_range: (66, 77) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_ui_view.py", + line_range: (66, 77), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12523,13 +12471,14 @@ pub const EXT_RESET_VIEW_ARCH_WIZARD: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_ui_view.py", line_range: (2643, 2722) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/ir_ui_view.py", + line_range: (2643, 2722), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12617,7 +12566,10 @@ pub const EXT_PROPERTIES_BASE_DEFINITION: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/properties_base_definition.py", line_range: (6, 67) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/properties_base_definition.py", + line_range: (6, 67), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12673,20 +12625,19 @@ pub const EXT_PROPERTIES_BASE_DEFINITION_MIXIN: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModelCreateMulti, - targets: &[], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModelCreateMulti, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/properties_base_definition_mixin.py", line_range: (8, 56) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/properties_base_definition_mixin.py", + line_range: (8, 56), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12743,20 +12694,17 @@ pub const EXT_REPORT_LAYOUT: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/report_layout.py", line_range: (7, 17) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/report_layout.py", + line_range: (7, 17), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12944,24 +12892,23 @@ pub const EXT_REPORT_PAPERFORMAT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["format"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["format"], + }], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on format", - source_method: Some("_check_format_or_page"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on format", + source_method: Some("_check_format_or_page"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/report_paperformat.py", line_range: (165, 213) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/report_paperformat.py", + line_range: (165, 213), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -13142,13 +13089,14 @@ pub const EXT_RES_BANK: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_bank.py", line_range: (16, 70) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_bank.py", + line_range: (16, 70), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -13450,17 +13398,18 @@ pub const EXT_RES_PARTNER_BANK: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "The combination Account Number/Partner must be unique.", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "The combination Account Number/Partner must be unique.", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_bank.py", line_range: (73, 223) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_bank.py", + line_range: (73, 223), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14179,7 +14128,10 @@ pub const EXT_RES_COMPANY: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_company.py", line_range: (16, 493) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_company.py", + line_range: (16, 493), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14189,9 +14141,7 @@ pub const EXT_RES_CONFIG: OdooEntity = OdooEntity { model_name: "res.config", kind: OdooEntityKind::Transient, description: "Config", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "start", @@ -14236,17 +14186,16 @@ pub const EXT_RES_CONFIG: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_config.py", line_range: (13, 96) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_config.py", + line_range: (13, 96), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14256,9 +14205,7 @@ pub const EXT_RES_CONFIG_SETTINGS: OdooEntity = OdooEntity { model_name: "res.config.settings", kind: OdooEntityKind::Transient, description: "Config Settings", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_valid_field_parameter", @@ -14386,13 +14333,14 @@ pub const EXT_RES_CONFIG_SETTINGS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_config.py", line_range: (99, 567) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_config.py", + line_range: (99, 567), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14633,7 +14581,10 @@ pub const EXT_RES_COUNTRY: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_country.py", line_range: (32, 168) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_country.py", + line_range: (32, 168), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -14692,24 +14643,23 @@ pub const EXT_RES_COUNTRY_GROUP: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModelCreateMulti, - targets: &[], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModelCreateMulti, + targets: &[], + }], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "The country group code must be unique!", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "The country group code must be unique!", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_country.py", line_range: (171, 195) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_country.py", + line_range: (171, 195), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14789,17 +14739,18 @@ pub const EXT_RES_COUNTRY_STATE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "The code of the state must be unique by country!", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "The code of the state must be unique by country!", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_country.py", line_range: (198, 271) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_country.py", + line_range: (198, 271), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -15166,7 +15117,10 @@ pub const EXT_RES_CURRENCY: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_currency.py", line_range: (20, 339) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_currency.py", + line_range: (20, 339), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -15335,7 +15289,13 @@ pub const EXT_RES_CURRENCY_RATE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["rate", "name", "currency_id", "company_id", "currency_id.rate_ids.rate"], + targets: &[ + "rate", + "name", + "currency_id", + "company_id", + "currency_id.rate_ids.rate", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiOnchange, @@ -15391,7 +15351,10 @@ pub const EXT_RES_CURRENCY_RATE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_currency.py", line_range: (342, 503) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_currency.py", + line_range: (342, 503), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -15585,13 +15548,14 @@ pub const EXT_RES_DEVICE_LOG: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_device.py", line_range: (16, 171) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_device.py", + line_range: (16, 171), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -15601,9 +15565,7 @@ pub const EXT_RES_DEVICE: OdooEntity = OdooEntity { model_name: "res.device", kind: OdooEntityKind::Model, description: "Devices", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "revoke", @@ -15663,13 +15625,14 @@ pub const EXT_RES_DEVICE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_device.py", line_range: (174, 237) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_device.py", + line_range: (174, 237), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -16122,7 +16085,10 @@ pub const EXT_RES_GROUPS: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_groups.py", line_range: (9, 397) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_groups.py", + line_range: (9, 397), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -16188,20 +16154,17 @@ pub const EXT_RES_GROUPS_PRIVILEGE: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_groups_privilege.py", line_range: (4, 14) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_groups_privilege.py", + line_range: (4, 14), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -16546,7 +16509,10 @@ pub const EXT_RES_LANG: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_lang.py", line_range: (49, 455) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_lang.py", + line_range: (49, 455), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -16556,31 +16522,26 @@ pub const EXT_FORMAT_VAT_LABEL_MIXIN: OdooEntity = OdooEntity { model_name: "format.vat.label.mixin", kind: OdooEntityKind::Abstract, description: "Country Specific VAT Label", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "_get_view", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + fields: &[], + methods: &[OdooMethod { + name: "_get_view", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_partner.py", line_range: (45, 58) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_partner.py", + line_range: (45, 58), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -16590,9 +16551,7 @@ pub const EXT_FORMAT_ADDRESS_MIXIN: OdooEntity = OdooEntity { model_name: "format.address.mixin", kind: OdooEntityKind::Abstract, description: "Address Format", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_extract_fields_from_address", @@ -16630,13 +16589,14 @@ pub const EXT_FORMAT_ADDRESS_MIXIN: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_partner.py", line_range: (61, 136) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_partner.py", + line_range: (61, 136), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -16725,17 +16685,18 @@ pub const EXT_RES_PARTNER_CATEGORY: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on parent_id", - source_method: Some("_check_parent_id"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on parent_id", + source_method: Some("_check_parent_id"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_partner.py", line_range: (139, 181) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_partner.py", + line_range: (139, 181), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17634,7 +17595,14 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["is_company", "name", "parent_id.name", "type", "company_name", "commercial_company_name"], + targets: &[ + "is_company", + "name", + "parent_id.name", + "type", + "company_name", + "commercial_company_name", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -17678,7 +17646,11 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["company_name", "parent_id.is_company", "commercial_partner_id.name"], + targets: &[ + "company_name", + "parent_id.is_company", + "commercial_partner_id.name", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -17750,7 +17722,14 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["complete_name", "email", "vat", "state_id", "country_id", "commercial_company_name"], + targets: &[ + "complete_name", + "email", + "vat", + "state_id", + "country_id", + "commercial_company_name", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiModel, @@ -17811,7 +17790,10 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_partner.py", line_range: (184, 1242) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_partner.py", + line_range: (184, 1242), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17850,20 +17832,17 @@ pub const EXT_RES_PARTNER_INDUSTRY: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_partner.py", line_range: (1245, 1252) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_partner.py", + line_range: (1245, 1252), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17873,39 +17852,34 @@ pub const EXT_RES_USERS_LOG: OdooEntity = OdooEntity { model_name: "res.users.log", kind: OdooEntityKind::Model, description: "Users Log", - fields: &[ - OdooField { - name: "create_uid", - kind: OdooFieldKind::Many2one, - target: Some("res.users"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], - methods: &[ - OdooMethod { - name: "_gc_user_logs", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiAutovacuum, - targets: &[], - }, - ], + fields: &[OdooField { + name: "create_uid", + kind: OdooFieldKind::Many2one, + target: Some("res.users"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], + methods: &[OdooMethod { + name: "_gc_user_logs", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiAutovacuum, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (134, 152) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_users.py", + line_range: (134, 152), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -18880,7 +18854,10 @@ pub const EXT_RES_USERS: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (155, 1346) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_users.py", + line_range: (155, 1346), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -18939,17 +18916,16 @@ pub const EXT_RES_USERS_IDENTITYCHECK: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (1400, 1439) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_users.py", + line_range: (1400, 1439), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -18959,17 +18935,15 @@ pub const EXT_CHANGE_PASSWORD_WIZARD: OdooEntity = OdooEntity { model_name: "change.password.wizard", kind: OdooEntityKind::Transient, description: "Change Password Wizard", - fields: &[ - OdooField { - name: "user_ids", - kind: OdooFieldKind::One2many, - target: Some("change.password.user"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], + fields: &[OdooField { + name: "user_ids", + kind: OdooFieldKind::One2many, + target: Some("change.password.user"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], methods: &[ OdooMethod { name: "_default_user_ids", @@ -18984,17 +18958,16 @@ pub const EXT_CHANGE_PASSWORD_WIZARD: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (1446, 1466) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_users.py", + line_range: (1446, 1466), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19042,25 +19015,22 @@ pub const EXT_CHANGE_PASSWORD_USER: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - OdooMethod { - name: "change_password_button", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + methods: &[OdooMethod { + name: "change_password_button", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (1469, 1483) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_users.py", + line_range: (1469, 1483), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19104,24 +19074,23 @@ pub const EXT_CHANGE_PASSWORD_OWN: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["new_password", "confirm_password"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["new_password", "confirm_password"], + }], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on new_password, confirm_password", - source_method: Some("_check_password_confirmation"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on new_password, confirm_password", + source_method: Some("_check_password_confirmation"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (1486, 1505) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_users.py", + line_range: (1486, 1505), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19255,13 +19224,14 @@ pub const EXT_RES_USERS_APIKEYS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (1519, 1724) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_users.py", + line_range: (1519, 1724), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19353,13 +19323,14 @@ pub const EXT_RES_USERS_APIKEYS_DESCRIPTION: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (1727, 1808) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_users.py", + line_range: (1727, 1808), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19389,20 +19360,17 @@ pub const EXT_RES_USERS_APIKEYS_SHOW: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (1811, 1817) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_users.py", + line_range: (1811, 1817), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19466,22 +19434,31 @@ pub const EXT_RES_USERS_DELETION: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { name: "todo", semantic: OdooStateSemantic::Active }, - OdooState { name: "done", semantic: OdooStateSemantic::Completed }, - OdooState { name: "fail", semantic: OdooStateSemantic::Active }, - ], - transitions: &[ - ], - }), - constraints: &[ - - ], + state_field: "state", + states: &[ + OdooState { + name: "todo", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "done", + semantic: OdooStateSemantic::Completed, + }, + OdooState { + name: "fail", + semantic: OdooStateSemantic::Active, + }, + ], + transitions: &[], + }), + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users_deletion.py", line_range: (11, 100) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_users_deletion.py", + line_range: (11, 100), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19491,17 +19468,15 @@ pub const EXT_RES_USERS_SETTINGS: OdooEntity = OdooEntity { model_name: "res.users.settings", kind: OdooEntityKind::Model, description: "User Settings", - fields: &[ - OdooField { - name: "user_id", - kind: OdooFieldKind::Many2one, - target: Some("res.users"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], + fields: &[OdooField { + name: "user_id", + kind: OdooFieldKind::Many2one, + target: Some("res.users"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], methods: &[ OdooMethod { name: "_get_fields_blacklist", @@ -19545,19 +19520,19 @@ pub const EXT_RES_USERS_SETTINGS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "One user should only have one user settings.", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "One user should only have one user settings.", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users_settings.py", line_range: (7, 55) }], + odoo_source: &[OdooSourceRef { + path: "odoo/odoo/addons/base/models/res_users_settings.py", + line_range: (7, 55), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; - diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/coverage.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/coverage.rs index 9bd694be..b78d2e58 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/coverage.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/coverage.rs @@ -16,10 +16,10 @@ /// When Stage 2 lands (extracts `hr` + `stock_account` + …), remove /// the corresponding entries from this list. pub const COVERAGE_EXEMPTIONS: &[(&str, &str)] = &[ - ("hr.contract.type", "hr (Stage 2)"), - ("hr.department", "hr (Stage 2)"), - ("hr.employee", "hr (Stage 2)"), - ("hr.job", "hr (Stage 2)"), + ("hr.contract.type", "hr (Stage 2)"), + ("hr.department", "hr (Stage 2)"), + ("hr.employee", "hr (Stage 2)"), + ("hr.job", "hr (Stage 2)"), ("stock.valuation.layer", "stock_account (Stage 2)"), ]; @@ -59,7 +59,10 @@ mod tests { fn lane_of(l_doc: &str) -> u8 { // Strip the leading 'L', collect ASCII digits until the first '-' let stripped = l_doc.trim_start_matches('L'); - let digits: String = stripped.chars().take_while(|c| c.is_ascii_digit()).collect(); + let digits: String = stripped + .chars() + .take_while(|c| c.is_ascii_digit()) + .collect(); digits.parse().expect("l_doc must follow 'L{N}-...' format") } @@ -74,7 +77,7 @@ mod tests { /// different lane. fn lane_of_exempt(model_name: &str) -> u8 { match model_name { - "stock.valuation.layer" => 13, + "stock.valuation.layer" => 13, "hr.contract.type" | "hr.department" | "hr.employee" | "hr.job" => 14, _ => panic!("unknown exemption model_name: {}", model_name), } @@ -91,8 +94,10 @@ mod tests { let exempt_names: std::collections::HashSet<&str> = COVERAGE_EXEMPTIONS.iter().map(|(n, _)| *n).collect(); let curated = curated_entities(); - let backed_names: std::collections::HashSet<&str> = - CURATED_EXTRACTED_PAIRS.iter().map(|p| p.model_name).collect(); + let backed_names: std::collections::HashSet<&str> = CURATED_EXTRACTED_PAIRS + .iter() + .map(|p| p.model_name) + .collect(); for lane in 1u8..=15 { let lane_entities: Vec<&str> = curated @@ -112,7 +117,10 @@ mod tests { continue; } - let backed = eligible.iter().filter(|n| backed_names.contains(*n)).count(); + let backed = eligible + .iter() + .filter(|n| backed_names.contains(*n)) + .count(); let coverage = backed as f32 / eligible.len() as f32; assert!( @@ -137,11 +145,20 @@ mod tests { let exempt_names: std::collections::HashSet<&str> = COVERAGE_EXEMPTIONS.iter().map(|(n, _)| *n).collect(); let curated = curated_entities(); - let eligible_total = curated.iter().filter(|(n, _)| !exempt_names.contains(n)).count(); + let eligible_total = curated + .iter() + .filter(|(n, _)| !exempt_names.contains(n)) + .count(); let backed_total = CURATED_EXTRACTED_PAIRS.len(); assert_eq!(curated.len(), 53, "Expected 53 curated entities total"); - assert_eq!(eligible_total, 48, "Expected 48 eligible after 5 TIER-2 exemptions"); - assert_eq!(backed_total, 48, "All 48 eligible should be backed for Stage 1"); + assert_eq!( + eligible_total, 48, + "Expected 48 eligible after 5 TIER-2 exemptions" + ); + assert_eq!( + backed_total, 48, + "All 48 eligible should be backed for Stage 1" + ); } } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de.rs index c5c188a2..410c3e4d 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de.rs @@ -10,28 +10,23 @@ pub const EXT_ACCOUNT_ACCOUNT: OdooEntity = OdooEntity { model_name: "account.account", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "write", - kind: OdooMethodKind::Override, - return_kind: OdooReturnKind::Boolean, - triggers: &[], - }, - ], - decorators: &[ - - ], + fields: &[], + methods: &[OdooMethod { + name: "write", + kind: OdooMethodKind::Override, + return_kind: OdooReturnKind::Boolean, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/l10n_de/models/account_account.py", line_range: (5, 19) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/l10n_de/models/account_account.py", + line_range: (5, 19), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -41,31 +36,26 @@ pub const EXT_ACCOUNT_JOURNAL: OdooEntity = OdooEntity { model_name: "account.journal", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "_prepare_liquidity_account_vals", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + fields: &[], + methods: &[OdooMethod { + name: "_prepare_liquidity_account_vals", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/l10n_de/models/account_journal.py", line_range: (6, 18) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/l10n_de/models/account_journal.py", + line_range: (6, 18), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -75,9 +65,7 @@ pub const EXT_ACCOUNT_MOVE: OdooEntity = OdooEntity { model_name: "account.move", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_compute_show_delivery_date", @@ -92,20 +80,19 @@ pub const EXT_ACCOUNT_MOVE: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["country_code", "move_type"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["country_code", "move_type"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/l10n_de/models/account_move.py", line_range: (4, 19) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/l10n_de/models/account_move.py", + line_range: (4, 19), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -115,9 +102,7 @@ pub const EXT_ACCOUNT_CHART_TEMPLATE: OdooEntity = OdooEntity { model_name: "account.chart.template", kind: OdooEntityKind::Abstract, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_get_de_skr03_template_data", @@ -144,17 +129,16 @@ pub const EXT_ACCOUNT_CHART_TEMPLATE: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/l10n_de/models/template_de_skr03.py", line_range: (6, 149) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/l10n_de/models/template_de_skr03.py", + line_range: (6, 149), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -164,31 +148,26 @@ pub const EXT_ACCOUNT_TAX: OdooEntity = OdooEntity { model_name: "account.tax", kind: OdooEntityKind::Model, description: "", - fields: &[ - OdooField { - name: "l10n_de_datev_code", - kind: OdooFieldKind::Char, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], - methods: &[ - - ], - decorators: &[ - - ], + fields: &[OdooField { + name: "l10n_de_datev_code", + kind: OdooFieldKind::Char, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/l10n_de/models/datev.py", line_range: (4, 7) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/l10n_de/models/datev.py", + line_range: (4, 7), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -198,28 +177,23 @@ pub const EXT_PRODUCT_TEMPLATE: OdooEntity = OdooEntity { model_name: "product.template", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "_get_product_accounts", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + fields: &[], + methods: &[OdooMethod { + name: "_get_product_accounts", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/l10n_de/models/datev.py", line_range: (10, 37) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/l10n_de/models/datev.py", + line_range: (10, 37), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -229,28 +203,23 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { model_name: "ir.actions.report", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "_get_rendering_context", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + fields: &[], + methods: &[OdooMethod { + name: "_get_rendering_context", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/l10n_de/models/ir_actions_report.py", line_range: (4, 10) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/l10n_de/models/ir_actions_report.py", + line_range: (4, 10), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -317,19 +286,19 @@ pub const EXT_RES_COMPANY: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on state_id, l10n_de_stnr", - source_method: Some("_validate_l10n_de_stnr"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on state_id, l10n_de_stnr", + source_method: Some("_validate_l10n_de_stnr"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/l10n_de/models/res_company.py", line_range: (10, 60) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/l10n_de/models/res_company.py", + line_range: (10, 60), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; - diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de_chart.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de_chart.rs index 3fbab519..f8844713 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de_chart.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de_chart.rs @@ -795,7 +795,8 @@ pub const EXT_SKR03_0502: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_0503: OdooAccountTemplate = OdooAccountTemplate { code: "0503", - name: "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Kapitalgesellschaften", + name: + "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Kapitalgesellschaften", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_A_III_1"], chart: OdooSkrChart::Skr03, @@ -849,7 +850,8 @@ pub const EXT_SKR03_0508: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_0509: OdooAccountTemplate = OdooAccountTemplate { code: "0509", - name: "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Personengesellschaften", + name: + "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Personengesellschaften", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_A_III_1"], chart: OdooSkrChart::Skr03, @@ -948,7 +950,8 @@ pub const EXT_SKR03_0525: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_0530: OdooAccountTemplate = OdooAccountTemplate { code: "0530", - name: "Wertpapiere mit Gewinnbeteiligungsansprüchen, die dem Teileinkünfteverfahren unterliegen", + name: + "Wertpapiere mit Gewinnbeteiligungsansprüchen, die dem Teileinkünfteverfahren unterliegen", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_A_III_5"], chart: OdooSkrChart::Skr03, @@ -1335,7 +1338,8 @@ pub const EXT_SKR03_0761: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_0764: OdooAccountTemplate = OdooAccountTemplate { code: "0764", - name: "Verbindlichkeiten gegenüber typisch stillen Gesellschaftern - Restlaufzeit 1 bis 5 Jahre", + name: + "Verbindlichkeiten gegenüber typisch stillen Gesellschaftern - Restlaufzeit 1 bis 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr03, @@ -1344,7 +1348,8 @@ pub const EXT_SKR03_0764: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_0767: OdooAccountTemplate = OdooAccountTemplate { code: "0767", - name: "Verbindlichkeiten gegenüber typisch stillen Gesellschaftern - Restlaufzeit größer 5 Jahre", + name: + "Verbindlichkeiten gegenüber typisch stillen Gesellschaftern - Restlaufzeit größer 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr03, @@ -1371,7 +1376,8 @@ pub const EXT_SKR03_0771: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_0774: OdooAccountTemplate = OdooAccountTemplate { code: "0774", - name: "Verbindlichkeiten gegenüber atypisch stillen Gesellschaftern - Restlaufzeit 1 bis 5 Jahre", + name: + "Verbindlichkeiten gegenüber atypisch stillen Gesellschaftern - Restlaufzeit 1 bis 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr03, @@ -1380,7 +1386,8 @@ pub const EXT_SKR03_0774: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_0777: OdooAccountTemplate = OdooAccountTemplate { code: "0777", - name: "Verbindlichkeiten gegenüber atypisch stillen Gesellschaftern - Restlaufzeit größer 5 Jahre", + name: + "Verbindlichkeiten gegenüber atypisch stillen Gesellschaftern - Restlaufzeit größer 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr03, @@ -1560,7 +1567,8 @@ pub const EXT_SKR03_0854: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_0857: OdooAccountTemplate = OdooAccountTemplate { code: "0857", - name: "Gewinnrücklagen aus den Übergangsvorschriften BilMoG (Zuschreibung Finanzanlagevermögen)", + name: + "Gewinnrücklagen aus den Übergangsvorschriften BilMoG (Zuschreibung Finanzanlagevermögen)", account_type: "equity", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_A_III_4"], chart: OdooSkrChart::Skr03, @@ -2226,7 +2234,8 @@ pub const EXT_SKR03_1321: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1322: OdooAccountTemplate = OdooAccountTemplate { code: "1322", - name: "Bills receivable from other long-term investees and investors - Restlaufzeit größer 1 Jahr", + name: + "Bills receivable from other long-term investees and investors - Restlaufzeit größer 1 Jahr", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_2"], chart: OdooSkrChart::Skr03, @@ -2595,7 +2604,8 @@ pub const EXT_SKR03_1447: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1448: OdooAccountTemplate = OdooAccountTemplate { code: "1448", - name: "Forderungen aus Lieferungen und Leistungen nach Durchschnittssätzen nach § 24 UStG (EÜR)", + name: + "Forderungen aus Lieferungen und Leistungen nach Durchschnittssätzen nach § 24 UStG (EÜR)", account_type: "asset_receivable", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_1"], chart: OdooSkrChart::Skr03, @@ -2631,7 +2641,8 @@ pub const EXT_SKR03_1451: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1455: OdooAccountTemplate = OdooAccountTemplate { code: "1455", - name: "Forderungen aus Lieferungen und Leistungen ohne Kontokorrent - Restlaufzeit größer 1 Jahr", + name: + "Forderungen aus Lieferungen und Leistungen ohne Kontokorrent - Restlaufzeit größer 1 Jahr", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_1"], chart: OdooSkrChart::Skr03, @@ -2694,7 +2705,8 @@ pub const EXT_SKR03_1475: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1478: OdooAccountTemplate = OdooAccountTemplate { code: "1478", - name: "Wertberichtigungen auf Forderungen gegen verbundene Unternehmen - Restlaufzeit bis 1 Jahr", + name: + "Wertberichtigungen auf Forderungen gegen verbundene Unternehmen - Restlaufzeit bis 1 Jahr", account_type: "asset_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_2"], chart: OdooSkrChart::Skr03, @@ -2766,7 +2778,8 @@ pub const EXT_SKR03_1490: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1491: OdooAccountTemplate = OdooAccountTemplate { code: "1491", - name: "Forderungen aus Lieferungen und Leistungen gegen Gesellschafter - Restlaufzeit bis 1 Jahr", + name: + "Forderungen aus Lieferungen und Leistungen gegen Gesellschafter - Restlaufzeit bis 1 Jahr", account_type: "asset_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_1"], chart: OdooSkrChart::Skr03, @@ -3540,7 +3553,8 @@ pub const EXT_SKR03_1625: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1626: OdooAccountTemplate = OdooAccountTemplate { code: "1626", - name: "Trade payables, no separate receivables/payables accounting - Restlaufzeit 1 bis 5 Jahre", + name: + "Trade payables, no separate receivables/payables accounting - Restlaufzeit 1 bis 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_4"], chart: OdooSkrChart::Skr03, @@ -3549,7 +3563,8 @@ pub const EXT_SKR03_1626: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1628: OdooAccountTemplate = OdooAccountTemplate { code: "1628", - name: "Trade payables, no separate receivables/payables accounting - Restlaufzeit größer 5 Jahre", + name: + "Trade payables, no separate receivables/payables accounting - Restlaufzeit größer 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_4"], chart: OdooSkrChart::Skr03, @@ -3756,7 +3771,8 @@ pub const EXT_SKR03_1670: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1671: OdooAccountTemplate = OdooAccountTemplate { code: "1671", - name: "Verbindlichkeiten gegenüber persönlich haftenden Gesellschaftern - Restlaufzeit bis 1 Jahr", + name: + "Verbindlichkeiten gegenüber persönlich haftenden Gesellschaftern - Restlaufzeit bis 1 Jahr", account_type: "liability_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr03, @@ -4368,7 +4384,8 @@ pub const EXT_SKR03_1767: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1768: OdooAccountTemplate = OdooAccountTemplate { code: "1768", - name: "Umsatzsteuer aus im anderen EULand steuerpflichtigen sonstigen Leistungen/Werklieferungen", + name: + "Umsatzsteuer aus im anderen EULand steuerpflichtigen sonstigen Leistungen/Werklieferungen", account_type: "liability_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_4"], chart: OdooSkrChart::Skr03, @@ -5871,7 +5888,8 @@ pub const EXT_SKR03_2402: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_2403: OdooAccountTemplate = OdooAccountTemplate { code: "2403", - name: "Forderungsverluste aus im Inland steuerpflichtigen EU-Lieferungen 7 % USt (übliche Höhe)", + name: + "Forderungsverluste aus im Inland steuerpflichtigen EU-Lieferungen 7 % USt (übliche Höhe)", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_7"], chart: OdooSkrChart::Skr03, @@ -5889,7 +5907,8 @@ pub const EXT_SKR03_2406: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_2408: OdooAccountTemplate = OdooAccountTemplate { code: "2408", - name: "Forderungsverluste aus im Inland steuerpflichtigen EU-Lieferungen 19 % USt (übliche Höhe)", + name: + "Forderungsverluste aus im Inland steuerpflichtigen EU-Lieferungen 19 % USt (übliche Höhe)", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_7"], chart: OdooSkrChart::Skr03, @@ -7230,7 +7249,8 @@ pub const EXT_SKR03_3109: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_3110: OdooAccountTemplate = OdooAccountTemplate { code: "3110", - name: "Bauleistungen eines im Inland ansässigen Unternehmers 7 % Vorsteuer und 7 % Umsatzsteuer", + name: + "Bauleistungen eines im Inland ansässigen Unternehmers 7 % Vorsteuer und 7 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr03, @@ -7257,7 +7277,8 @@ pub const EXT_SKR03_3115: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_3120: OdooAccountTemplate = OdooAccountTemplate { code: "3120", - name: "Bauleistungen eines im Inland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer", + name: + "Bauleistungen eines im Inland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr03, @@ -7275,7 +7296,8 @@ pub const EXT_SKR03_3123: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_3125: OdooAccountTemplate = OdooAccountTemplate { code: "3125", - name: "Leistungen eines im Ausland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer", + name: + "Leistungen eines im Ausland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr03, @@ -7284,7 +7306,8 @@ pub const EXT_SKR03_3125: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_3130: OdooAccountTemplate = OdooAccountTemplate { code: "3130", - name: "Bauleistungen eines im Inland ansässigen Unternehmers ohne Vorsteuer und 7 % Umsatzsteuer", + name: + "Bauleistungen eines im Inland ansässigen Unternehmers ohne Vorsteuer und 7 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr03, @@ -7311,7 +7334,8 @@ pub const EXT_SKR03_3135: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_3140: OdooAccountTemplate = OdooAccountTemplate { code: "3140", - name: "Bauleistungen eines im Inland ansässigen Unternehmers ohne Vorsteuer und 19 % Umsatzsteuer", + name: + "Bauleistungen eines im Inland ansässigen Unternehmers ohne Vorsteuer und 19 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr03, @@ -7329,7 +7353,8 @@ pub const EXT_SKR03_3143: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_3145: OdooAccountTemplate = OdooAccountTemplate { code: "3145", - name: "Leistungen eines im Ausland ansässigen Unternehmers ohne Vorsteuer und 19 % Umsatzsteuer", + name: + "Leistungen eines im Ausland ansässigen Unternehmers ohne Vorsteuer und 19 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr03, @@ -9138,7 +9163,8 @@ pub const EXT_SKR03_4676: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_4678: OdooAccountTemplate = OdooAccountTemplate { code: "4678", - name: "Fahrten zwischen Wohnung und Betriebsstätte und Familienheimfahrten (abziehbarer Anteil)", + name: + "Fahrten zwischen Wohnung und Betriebsstätte und Familienheimfahrten (abziehbarer Anteil)", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_5"], chart: OdooSkrChart::Skr03, @@ -9255,7 +9281,8 @@ pub const EXT_SKR03_4801: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_4805: OdooAccountTemplate = OdooAccountTemplate { code: "4805", - name: "Reparaturen und Instandhaltungen von anderen Anlagen und Betriebsund Geschäftsausstattung", + name: + "Reparaturen und Instandhaltungen von anderen Anlagen und Betriebsund Geschäftsausstattung", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_3"], chart: OdooSkrChart::Skr03, @@ -9588,7 +9615,8 @@ pub const EXT_SKR03_4875: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_4876: OdooAccountTemplate = OdooAccountTemplate { code: "4876", - name: "Abschreibungen auf Wertpapiere des Umlaufvermögens § 3 Nr. 40 EStG bzw. § 8b Abs. 3 KStG", + name: + "Abschreibungen auf Wertpapiere des Umlaufvermögens § 3 Nr. 40 EStG bzw. § 8b Abs. 3 KStG", account_type: "expense_depreciation", tag_xmlids: &["l10n_de.tag_de_pl_12"], chart: OdooSkrChart::Skr03, @@ -9858,7 +9886,8 @@ pub const EXT_SKR03_4963: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_4964: OdooAccountTemplate = OdooAccountTemplate { code: "4964", - name: "Aufwendungen für die zeitlich befristete Überlassung von Rechten (Lizenzen, Konzessionen)", + name: + "Aufwendungen für die zeitlich befristete Überlassung von Rechten (Lizenzen, Konzessionen)", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_7"], chart: OdooSkrChart::Skr03, @@ -11037,7 +11066,8 @@ pub const EXT_SKR03_8818: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_8819: OdooAccountTemplate = OdooAccountTemplate { code: "8819", - name: "Erlöse aus Verkäufen Finanzanlagen § 3 Nr. 40 EStG bzw. § 8b Abs. 3 KStG (bei Buchverlust)", + name: + "Erlöse aus Verkäufen Finanzanlagen § 3 Nr. 40 EStG bzw. § 8b Abs. 3 KStG (bei Buchverlust)", account_type: "income_other", tag_xmlids: &["l10n_de.tag_de_pl_08_7"], chart: OdooSkrChart::Skr03, @@ -11100,7 +11130,8 @@ pub const EXT_SKR03_8838: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_8839: OdooAccountTemplate = OdooAccountTemplate { code: "8839", - name: "Erlöse aus Verkäufen Finanzanlagen § 3 Nr. 40 EStG bzw. § 8b Abs. 2 KStG (bei Buchgewinn)", + name: + "Erlöse aus Verkäufen Finanzanlagen § 3 Nr. 40 EStG bzw. § 8b Abs. 2 KStG (bei Buchgewinn)", account_type: "income_other", tag_xmlids: &["l10n_de.tag_de_pl_04"], chart: OdooSkrChart::Skr03, @@ -11136,7 +11167,8 @@ pub const EXT_SKR03_8852: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_8853: OdooAccountTemplate = OdooAccountTemplate { code: "8853", - name: "Erlöse aus Verkäufen von Wirtschaftsgütern des Umlaufvermögens nach § 4 Abs 3 Satz 4 EStG", + name: + "Erlöse aus Verkäufen von Wirtschaftsgütern des Umlaufvermögens nach § 4 Abs 3 Satz 4 EStG", account_type: "income_other", tag_xmlids: &["l10n_de.tag_de_pl_04"], chart: OdooSkrChart::Skr03, @@ -11217,7 +11249,8 @@ pub const EXT_SKR03_8920: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_8921: OdooAccountTemplate = OdooAccountTemplate { code: "8921", - name: "Verwendung von Gegenständen für Zwecke außerhalb des Unternehmens 19 % USt (Kfz-Nutzung)", + name: + "Verwendung von Gegenständen für Zwecke außerhalb des Unternehmens 19 % USt (Kfz-Nutzung)", account_type: "income_other", tag_xmlids: &["l10n_de.tag_de_pl_04"], chart: OdooSkrChart::Skr03, @@ -11235,7 +11268,8 @@ pub const EXT_SKR03_8922: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_8924: OdooAccountTemplate = OdooAccountTemplate { code: "8924", - name: "Verwendung von Gegenständen für Zwecke außerhalb des Unternehmens ohne USt (Kfz-Nutzung)", + name: + "Verwendung von Gegenständen für Zwecke außerhalb des Unternehmens ohne USt (Kfz-Nutzung)", account_type: "income_other", tag_xmlids: &["l10n_de.tag_de_pl_04"], chart: OdooSkrChart::Skr03, @@ -12254,7 +12288,8 @@ pub const EXT_SKR04_0804: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_0805: OdooAccountTemplate = OdooAccountTemplate { code: "0805", - name: "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Personengesellschaften", + name: + "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Personengesellschaften", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_A_III_1"], chart: OdooSkrChart::Skr04, @@ -12263,7 +12298,8 @@ pub const EXT_SKR04_0805: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_0808: OdooAccountTemplate = OdooAccountTemplate { code: "0808", - name: "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Kapitalgesellschaften", + name: + "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Kapitalgesellschaften", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_A_III_1"], chart: OdooSkrChart::Skr04, @@ -12407,7 +12443,8 @@ pub const EXT_SKR04_0900: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_0910: OdooAccountTemplate = OdooAccountTemplate { code: "0910", - name: "Wertpapiere mit Gewinnbeteiligungsansprüchen, die dem Teileinkünfteverfahren unterliegen", + name: + "Wertpapiere mit Gewinnbeteiligungsansprüchen, die dem Teileinkünfteverfahren unterliegen", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_A_III_5"], chart: OdooSkrChart::Skr04, @@ -12722,7 +12759,8 @@ pub const EXT_SKR04_1221: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_1225: OdooAccountTemplate = OdooAccountTemplate { code: "1225", - name: "Forderungen aus Lieferungen und Leistungen ohne Kontokorrent - Restlaufzeit größer 1 Jahr", + name: + "Forderungen aus Lieferungen und Leistungen ohne Kontokorrent - Restlaufzeit größer 1 Jahr", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_1"], chart: OdooSkrChart::Skr04, @@ -12839,7 +12877,8 @@ pub const EXT_SKR04_1250: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_1251: OdooAccountTemplate = OdooAccountTemplate { code: "1251", - name: "Forderungen aus Lieferungen und Leistungen gegen Gesellschafter - Restlaufzeit bis 1 Jahr", + name: + "Forderungen aus Lieferungen und Leistungen gegen Gesellschafter - Restlaufzeit bis 1 Jahr", account_type: "asset_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_1"], chart: OdooSkrChart::Skr04, @@ -12947,7 +12986,8 @@ pub const EXT_SKR04_1275: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_1276: OdooAccountTemplate = OdooAccountTemplate { code: "1276", - name: "Wertberichtigungen auf Forderungen gegen verbundene Unternehmen – Restlaufzeit bis 1 Jahr", + name: + "Wertberichtigungen auf Forderungen gegen verbundene Unternehmen – Restlaufzeit bis 1 Jahr", account_type: "asset_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_2"], chart: OdooSkrChart::Skr04, @@ -14603,7 +14643,8 @@ pub const EXT_SKR04_2964: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_2965: OdooAccountTemplate = OdooAccountTemplate { code: "2965", - name: "Gewinnrücklagen aus den Übergangsvorschriften BilMoG (Zuschreibung Finanzanlagevermögen)", + name: + "Gewinnrücklagen aus den Übergangsvorschriften BilMoG (Zuschreibung Finanzanlagevermögen)", account_type: "equity", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_A_III_4"], chart: OdooSkrChart::Skr04, @@ -15530,7 +15571,8 @@ pub const EXT_SKR04_3521: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_3524: OdooAccountTemplate = OdooAccountTemplate { code: "3524", - name: "Verbindlichkeiten gegenüber typisch stillen Gesellschaftern - Restlaufzeit 1 bis 5 Jahre", + name: + "Verbindlichkeiten gegenüber typisch stillen Gesellschaftern - Restlaufzeit 1 bis 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr04, @@ -15539,7 +15581,8 @@ pub const EXT_SKR04_3524: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_3527: OdooAccountTemplate = OdooAccountTemplate { code: "3527", - name: "Verbindlichkeiten gegenüber typisch stillen Gesellschaftern - Restlaufzeit größer 5 Jahre", + name: + "Verbindlichkeiten gegenüber typisch stillen Gesellschaftern - Restlaufzeit größer 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr04, @@ -15566,7 +15609,8 @@ pub const EXT_SKR04_3531: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_3534: OdooAccountTemplate = OdooAccountTemplate { code: "3534", - name: "Verbindlichkeiten gegenüber atypisch stillen Gesellschaftern - Restlaufzeit 1 bis 5 Jahre", + name: + "Verbindlichkeiten gegenüber atypisch stillen Gesellschaftern - Restlaufzeit 1 bis 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr04, @@ -15575,7 +15619,8 @@ pub const EXT_SKR04_3534: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_3537: OdooAccountTemplate = OdooAccountTemplate { code: "3537", - name: "Verbindlichkeiten gegenüber atypisch stillen Gesellschaftern - Restlaufzeit größer 5 Jahre", + name: + "Verbindlichkeiten gegenüber atypisch stillen Gesellschaftern - Restlaufzeit größer 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr04, @@ -15791,7 +15836,8 @@ pub const EXT_SKR04_3645: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_3646: OdooAccountTemplate = OdooAccountTemplate { code: "3646", - name: "Verbindlichkeiten gegenüber persönlich haftenden Gesellschaftern - Restlaufzeit bis 1 Jahr", + name: + "Verbindlichkeiten gegenüber persönlich haftenden Gesellschaftern - Restlaufzeit bis 1 Jahr", account_type: "liability_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr04, @@ -16241,7 +16287,8 @@ pub const EXT_SKR04_3817: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_3818: OdooAccountTemplate = OdooAccountTemplate { code: "3818", - name: "Umsatzsteuer aus im anderen EU-Land steuerpflichtigen sonstigen Leistungen/Werklieferungen", + name: + "Umsatzsteuer aus im anderen EU-Land steuerpflichtigen sonstigen Leistungen/Werklieferungen", account_type: "liability_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_4"], chart: OdooSkrChart::Skr04, @@ -16592,7 +16639,8 @@ pub const EXT_SKR04_4315: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_4320: OdooAccountTemplate = OdooAccountTemplate { code: "4320", - name: "Erlöse aus im anderen EU-Land steuerbaren Leistungen, im Inland nicht steuerbare Umsätze", + name: + "Erlöse aus im anderen EU-Land steuerbaren Leistungen, im Inland nicht steuerbare Umsätze", account_type: "income", tag_xmlids: &["l10n_de.tag_de_pl_01"], chart: OdooSkrChart::Skr04, @@ -16646,7 +16694,8 @@ pub const EXT_SKR04_4338: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_4339: OdooAccountTemplate = OdooAccountTemplate { code: "4339", - name: "Erlöse aus im anderen EU-Land steuerbaren Leistungen, im Inland nicht steuerbare Umsätze", + name: + "Erlöse aus im anderen EU-Land steuerbaren Leistungen, im Inland nicht steuerbare Umsätze", account_type: "income", tag_xmlids: &["l10n_de.tag_de_pl_01"], chart: OdooSkrChart::Skr04, @@ -16835,7 +16884,8 @@ pub const EXT_SKR04_4630: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_4639: OdooAccountTemplate = OdooAccountTemplate { code: "4639", - name: "Verwendung von Gegenständen für Zwecke außerhalb des Unternehmens ohne USt (Kfz-Nutzung)", + name: + "Verwendung von Gegenständen für Zwecke außerhalb des Unternehmens ohne USt (Kfz-Nutzung)", account_type: "income", tag_xmlids: &["l10n_de.tag_de_pl_04"], chart: OdooSkrChart::Skr04, @@ -16853,7 +16903,8 @@ pub const EXT_SKR04_4640: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_4645: OdooAccountTemplate = OdooAccountTemplate { code: "4645", - name: "Verwendung von Gegenständen für Zwecke außerhalb des Unternehmens 19 % USt (Kfz-Nutzung)", + name: + "Verwendung von Gegenständen für Zwecke außerhalb des Unternehmens 19 % USt (Kfz-Nutzung)", account_type: "income", tag_xmlids: &["l10n_de.tag_de_pl_04"], chart: OdooSkrChart::Skr04, @@ -17456,7 +17507,8 @@ pub const EXT_SKR04_4851: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_4852: OdooAccountTemplate = OdooAccountTemplate { code: "4852", - name: "Erlöse aus Verkäufen Finanzanlagen § 3 Nr. 40 EStG bzw. § 8b Abs. 2 KStG (bei Buchgewinn)", + name: + "Erlöse aus Verkäufen Finanzanlagen § 3 Nr. 40 EStG bzw. § 8b Abs. 2 KStG (bei Buchgewinn)", account_type: "income", tag_xmlids: &["l10n_de.tag_de_pl_04"], chart: OdooSkrChart::Skr04, @@ -18581,7 +18633,8 @@ pub const EXT_SKR04_5909: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_5910: OdooAccountTemplate = OdooAccountTemplate { code: "5910", - name: "Bauleistungen eines im Inland ansässigen Unternehmers 7 % Vorsteuer und 7 % Umsatzsteuer", + name: + "Bauleistungen eines im Inland ansässigen Unternehmers 7 % Vorsteuer und 7 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr04, @@ -18608,7 +18661,8 @@ pub const EXT_SKR04_5915: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_5920: OdooAccountTemplate = OdooAccountTemplate { code: "5920", - name: "Bauleistungen eines im Inland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer", + name: + "Bauleistungen eines im Inland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr04, @@ -18626,7 +18680,8 @@ pub const EXT_SKR04_5923: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_5925: OdooAccountTemplate = OdooAccountTemplate { code: "5925", - name: "Leistungen eines im Ausland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer", + name: + "Leistungen eines im Ausland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr04, @@ -19787,7 +19842,8 @@ pub const EXT_SKR04_6460: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_6470: OdooAccountTemplate = OdooAccountTemplate { code: "6470", - name: "Reparaturen und Instandhaltung von anderen Anlagen und Betriebs- und Geschäftsausstattung", + name: + "Reparaturen und Instandhaltung von anderen Anlagen und Betriebs- und Geschäftsausstattung", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_3"], chart: OdooSkrChart::Skr04, @@ -20156,7 +20212,8 @@ pub const EXT_SKR04_6680: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_6688: OdooAccountTemplate = OdooAccountTemplate { code: "6688", - name: "Fahrten zwischen Wohnung und Betriebsstätte und Familienheimfahrten (abziehbarer Anteil)", + name: + "Fahrten zwischen Wohnung und Betriebsstätte und Familienheimfahrten (abziehbarer Anteil)", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_5"], chart: OdooSkrChart::Skr04, @@ -20390,7 +20447,8 @@ pub const EXT_SKR04_6835: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_6837: OdooAccountTemplate = OdooAccountTemplate { code: "6837", - name: "Aufwendungen für die zeitlich befristete Überlassung von Rechten (Lizenzen, Konzessionen)", + name: + "Aufwendungen für die zeitlich befristete Überlassung von Rechten (Lizenzen, Konzessionen)", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_7"], chart: OdooSkrChart::Skr04, @@ -20606,7 +20664,8 @@ pub const EXT_SKR04_6891: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_6892: OdooAccountTemplate = OdooAccountTemplate { code: "6892", - name: "Erlöse aus Verkäufen Finanzanlagen § 3 Nr. 40 EStG bzw. § 8b Abs. 3 KStG (bei Buchverlust)", + name: + "Erlöse aus Verkäufen Finanzanlagen § 3 Nr. 40 EStG bzw. § 8b Abs. 3 KStG (bei Buchverlust)", account_type: "income", tag_xmlids: &["l10n_de.tag_de_pl_08_7"], chart: OdooSkrChart::Skr04, @@ -20804,7 +20863,8 @@ pub const EXT_SKR04_6932: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_6933: OdooAccountTemplate = OdooAccountTemplate { code: "6933", - name: "Forderungsverluste aus im Inland steuerpflichtigen EU-Lieferungen 7 % USt (übliche Höhe)", + name: + "Forderungsverluste aus im Inland steuerpflichtigen EU-Lieferungen 7 % USt (übliche Höhe)", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_7"], chart: OdooSkrChart::Skr04, @@ -20822,7 +20882,8 @@ pub const EXT_SKR04_6936: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_6938: OdooAccountTemplate = OdooAccountTemplate { code: "6938", - name: "Forderungsverluste aus im Inland steuerpflichtigen EU-Lieferungen 19 % USt (übliche Höhe)", + name: + "Forderungsverluste aus im Inland steuerpflichtigen EU-Lieferungen 19 % USt (übliche Höhe)", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_7"], chart: OdooSkrChart::Skr04, @@ -21281,7 +21342,8 @@ pub const EXT_SKR04_7210: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_7214: OdooAccountTemplate = OdooAccountTemplate { code: "7214", - name: "Abschreibungen auf Wertpapiere des Umlaufvermögens § 3 Nr. 40 EStG bzw. § 8b Abs. 3 KStG", + name: + "Abschreibungen auf Wertpapiere des Umlaufvermögens § 3 Nr. 40 EStG bzw. § 8b Abs. 3 KStG", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_12"], chart: OdooSkrChart::Skr04, diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de_kennzahlen.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de_kennzahlen.rs index 6233f6f6..65c92f6f 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de_kennzahlen.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de_kennzahlen.rs @@ -308,43 +308,9 @@ pub const KZ_37: OdooUstvaKennzahl = OdooUstvaKennzahl { /// All UStVA Kennzahlen — canonical iteration handle. pub static USTVA_KENNZAHLEN: &[OdooUstvaKennzahl] = &[ - KZ_81, - KZ_86, - KZ_87, - KZ_35, - KZ_77, - KZ_76, - KZ_41, - KZ_44, - KZ_49, - KZ_43, - KZ_48, - KZ_91, - KZ_89, - KZ_93, - KZ_90, - KZ_95, - KZ_94, - KZ_46, - KZ_73, - KZ_84, - KZ_42, - KZ_60, - KZ_21, - KZ_45, - KZ_66, - KZ_61, - KZ_62, - KZ_67, - KZ_63, - KZ_59, - KZ_64, - KZ_65, - KZ_69, - KZ_39, - KZ_83, - KZ_50, - KZ_37, + KZ_81, KZ_86, KZ_87, KZ_35, KZ_77, KZ_76, KZ_41, KZ_44, KZ_49, KZ_43, KZ_48, KZ_91, KZ_89, + KZ_93, KZ_90, KZ_95, KZ_94, KZ_46, KZ_73, KZ_84, KZ_42, KZ_60, KZ_21, KZ_45, KZ_66, KZ_61, + KZ_62, KZ_67, KZ_63, KZ_59, KZ_64, KZ_65, KZ_69, KZ_39, KZ_83, KZ_50, KZ_37, ]; // ─── GoBD audit-trail wiring ───────────────────────────────────────────── @@ -371,13 +337,34 @@ mod tests { fn ustva_kennzahlen_cover_canonical_boxes() { let kz_codes: std::collections::HashSet<&str> = USTVA_KENNZAHLEN.iter().map(|k| k.kz).collect(); - assert!(kz_codes.contains("81"), "Missing canonical UStVA Kennzahl Kz.81"); - assert!(kz_codes.contains("86"), "Missing canonical UStVA Kennzahl Kz.86"); - assert!(kz_codes.contains("87"), "Missing canonical UStVA Kennzahl Kz.87"); - assert!(kz_codes.contains("35"), "Missing canonical UStVA Kennzahl Kz.35"); - assert!(kz_codes.contains("41"), "Missing canonical UStVA Kennzahl Kz.41"); - assert!(kz_codes.contains("44"), "Missing canonical UStVA Kennzahl Kz.44"); - assert!(kz_codes.contains("49"), "Missing canonical UStVA Kennzahl Kz.49"); + assert!( + kz_codes.contains("81"), + "Missing canonical UStVA Kennzahl Kz.81" + ); + assert!( + kz_codes.contains("86"), + "Missing canonical UStVA Kennzahl Kz.86" + ); + assert!( + kz_codes.contains("87"), + "Missing canonical UStVA Kennzahl Kz.87" + ); + assert!( + kz_codes.contains("35"), + "Missing canonical UStVA Kennzahl Kz.35" + ); + assert!( + kz_codes.contains("41"), + "Missing canonical UStVA Kennzahl Kz.41" + ); + assert!( + kz_codes.contains("44"), + "Missing canonical UStVA Kennzahl Kz.44" + ); + assert!( + kz_codes.contains("49"), + "Missing canonical UStVA Kennzahl Kz.49" + ); } #[test] diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/pairing.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/pairing.rs index 4d05da33..1561b6d6 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/pairing.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/pairing.rs @@ -57,7 +57,8 @@ pub static CURATED_EXTRACTED_PAIRS: &[OdooEntityPairing] = &[ OdooEntityPairing { model_name: "account.analytic.distribution.model", curated: &crate::odoo_blueprint::l10::ANALYTIC_DISTRIBUTION_MODEL, - extracted: &crate::odoo_blueprint::extracted::analytic::EXT_ACCOUNT_ANALYTIC_DISTRIBUTION_MODEL, + extracted: + &crate::odoo_blueprint::extracted::analytic::EXT_ACCOUNT_ANALYTIC_DISTRIBUTION_MODEL, }, // account.analytic.line (curated: ANALYTIC_LINE in l10.rs | extracted: EXT_ACCOUNT_ANALYTIC_LINE in analytic.rs) // delta: fields=+2, methods=-1 @@ -371,14 +372,12 @@ mod tests { fn pairing_table_is_well_formed() { for pair in CURATED_EXTRACTED_PAIRS { assert_eq!( - pair.model_name, - pair.curated.model_name, + pair.model_name, pair.curated.model_name, "Curated entity model_name mismatch for {}", pair.model_name, ); assert_eq!( - pair.model_name, - pair.extracted.model_name, + pair.model_name, pair.extracted.model_name, "Extracted entity model_name mismatch for {}", pair.model_name, ); diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/product.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/product.rs index d3339ccd..5c61cfdd 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/product.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/product.rs @@ -8,31 +8,26 @@ pub const EXT_IR_ATTACHMENT: OdooEntity = OdooEntity { model_name: "ir.attachment", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "create", - kind: OdooMethodKind::ApiModelCreateMulti, - return_kind: OdooReturnKind::Record, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModelCreateMulti, - targets: &[], - }, - ], + fields: &[], + methods: &[OdooMethod { + name: "create", + kind: OdooMethodKind::ApiModelCreateMulti, + return_kind: OdooReturnKind::Record, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModelCreateMulti, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/ir_attachment.py", line_range: (6, 26) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/ir_attachment.py", + line_range: (6, 26), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -191,7 +186,10 @@ pub const EXT_PRODUCT_ATTRIBUTE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["attribute_line_ids.active", "attribute_line_ids.product_tmpl_id"], + targets: &[ + "attribute_line_ids.active", + "attribute_line_ids.product_tmpl_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiOnchange, @@ -199,17 +197,18 @@ pub const EXT_PRODUCT_ATTRIBUTE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Multi-checkbox display type is not compatible with the creation of variants", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Multi-checkbox display type is not compatible with the creation of variants", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_attribute.py", line_range: (7, 168) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_attribute.py", + line_range: (7, 168), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -248,28 +247,28 @@ pub const EXT_PRODUCT_ATTRIBUTE_CUSTOM_VALUE: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - OdooMethod { - name: "_compute_name", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["custom_product_template_attribute_value_id.name", "custom_value"], - }, - ], + methods: &[OdooMethod { + name: "_compute_name", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &[ + "custom_product_template_attribute_value_id.name", + "custom_value", + ], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_attribute_custom_value.py", line_range: (6, 25) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_attribute_custom_value.py", + line_range: (6, 25), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -481,13 +480,14 @@ pub const EXT_PRODUCT_ATTRIBUTE_VALUE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_attribute_value.py", line_range: (9, 180) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_attribute_value.py", + line_range: (9, 180), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -497,9 +497,7 @@ pub const EXT_PRODUCT_CATALOG_MIXIN: OdooEntity = OdooEntity { model_name: "product.catalog.mixin", kind: OdooEntityKind::Abstract, description: "Product Catalog Mixin", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "action_add_from_catalog", @@ -556,17 +554,16 @@ pub const EXT_PRODUCT_CATALOG_MIXIN: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_catalog_mixin.py", line_range: (7, 151) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_catalog_mixin.py", + line_range: (7, 151), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -694,17 +691,18 @@ pub const EXT_PRODUCT_CATEGORY: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on parent_id", - source_method: Some("_check_category_recursion"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on parent_id", + source_method: Some("_check_category_recursion"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_category.py", line_range: (8, 69) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_category.py", + line_range: (8, 69), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -864,7 +862,10 @@ pub const EXT_PRODUCT_COMBO: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_combo.py", line_range: (7, 79) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_combo.py", + line_range: (7, 79), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -930,32 +931,29 @@ pub const EXT_PRODUCT_COMBO_ITEM: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - OdooMethod { - name: "_check_product_id_no_combo", - kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["product_id"], - }, - ], + methods: &[OdooMethod { + name: "_check_product_id_no_combo", + kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["product_id"], + }], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on product_id", - source_method: Some("_check_product_id_no_combo"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on product_id", + source_method: Some("_check_product_id_no_combo"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_combo_item.py", line_range: (7, 33) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_combo_item.py", + line_range: (7, 33), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1031,13 +1029,14 @@ pub const EXT_PRODUCT_DOCUMENT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_document.py", line_range: (8, 60) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_document.py", + line_range: (8, 60), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1261,13 +1260,14 @@ pub const EXT_PRODUCT_PRICELIST: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_pricelist.py", line_range: (9, 414) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_pricelist.py", + line_range: (9, 414), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1740,7 +1740,17 @@ pub const EXT_PRODUCT_PRICELIST_ITEM: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["compute_price", "fixed_price", "pricelist_id", "percent_price", "price_discount", "price_markup", "price_surcharge", "base", "base_pricelist_id"], + targets: &[ + "compute_price", + "fixed_price", + "pricelist_id", + "percent_price", + "price_discount", + "price_markup", + "price_surcharge", + "base", + "base_pricelist_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -1748,7 +1758,14 @@ pub const EXT_PRODUCT_PRICELIST_ITEM: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["base", "compute_price", "price_discount", "price_markup", "price_round", "price_surcharge"], + targets: &[ + "base", + "compute_price", + "price_discount", + "price_markup", + "price_round", + "price_surcharge", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, @@ -1842,7 +1859,10 @@ pub const EXT_PRODUCT_PRICELIST_ITEM: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_pricelist_item.py", line_range: (8, 684) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_pricelist_item.py", + line_range: (8, 684), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -2721,7 +2741,10 @@ pub const EXT_PRODUCT_PRODUCT: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_product.py", line_range: (16, 1197) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_product.py", + line_range: (16, 1197), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2989,13 +3012,14 @@ pub const EXT_PRODUCT_SUPPLIERINFO: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_supplierinfo.py", line_range: (7, 119) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_supplierinfo.py", + line_range: (7, 119), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3111,24 +3135,23 @@ pub const EXT_PRODUCT_TAG: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["product_template_ids", "product_product_ids"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["product_template_ids", "product_product_ids"], + }], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Tag name already exists!", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Tag name already exists!", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_tag.py", line_range: (7, 62) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_tag.py", + line_range: (7, 62), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4171,7 +4194,13 @@ pub const EXT_PRODUCT_TEMPLATE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["attribute_line_ids", "attribute_line_ids.value_ids", "attribute_line_ids.attribute_id.create_variant", "attribute_line_ids.attribute_id.display_type", "attribute_line_ids.value_ids.is_custom"], + targets: &[ + "attribute_line_ids", + "attribute_line_ids.value_ids", + "attribute_line_ids.attribute_id.create_variant", + "attribute_line_ids.attribute_id.display_type", + "attribute_line_ids.value_ids.is_custom", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -4343,7 +4372,10 @@ pub const EXT_PRODUCT_TEMPLATE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_template.py", line_range: (18, 1598) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_template.py", + line_range: (18, 1598), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4402,20 +4434,19 @@ pub const EXT_PRODUCT_TEMPLATE_ATTRIBUTE_EXCLUSION: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModelCreateMulti, - targets: &[], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModelCreateMulti, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_template_attribute_exclusion.py", line_range: (6, 47) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_template_attribute_exclusion.py", + line_range: (6, 47), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4571,17 +4602,18 @@ pub const EXT_PRODUCT_TEMPLATE_ATTRIBUTE_LINE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on active, value_ids, attribute_id", - source_method: Some("_check_valid_values"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on active, value_ids, attribute_id", + source_method: Some("_check_valid_values"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_template_attribute_line.py", line_range: (8, 284) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_template_attribute_line.py", + line_range: (8, 284), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4832,7 +4864,10 @@ pub const EXT_PRODUCT_TEMPLATE_ATTRIBUTE_VALUE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_template_attribute_value.py", line_range: (10, 198) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_template_attribute_value.py", + line_range: (10, 198), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4894,12 +4929,10 @@ pub const EXT_PRODUCT_UOM: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["barcode"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["barcode"], + }], state_machine: None, constraints: &[ OdooConstraint { @@ -4916,7 +4949,10 @@ pub const EXT_PRODUCT_UOM: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_uom.py", line_range: (8, 32) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/product_uom.py", + line_range: (8, 32), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4926,9 +4962,7 @@ pub const EXT_RES_COMPANY: OdooEntity = OdooEntity { model_name: "res.company", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "create", @@ -4955,20 +4989,19 @@ pub const EXT_RES_COMPANY: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModelCreateMulti, - targets: &[], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModelCreateMulti, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/res_company.py", line_range: (6, 69) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/res_company.py", + line_range: (6, 69), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -5048,20 +5081,19 @@ pub const EXT_RES_CONFIG_SETTINGS: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiOnchange, - targets: &["group_product_pricelist"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiOnchange, + targets: &["group_product_pricelist"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/res_config_settings.py", line_range: (6, 43) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/res_config_settings.py", + line_range: (6, 43), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -5071,31 +5103,26 @@ pub const EXT_RES_COUNTRY_GROUP: OdooEntity = OdooEntity { model_name: "res.country.group", kind: OdooEntityKind::Model, description: "", - fields: &[ - OdooField { - name: "pricelist_ids", - kind: OdooFieldKind::Many2many, - target: Some("product.pricelist"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], - methods: &[ - - ], - decorators: &[ - - ], + fields: &[OdooField { + name: "pricelist_ids", + kind: OdooFieldKind::Many2many, + target: Some("product.pricelist"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/res_country_group.py", line_range: (7, 15) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/res_country_group.py", + line_range: (7, 15), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -5105,9 +5132,7 @@ pub const EXT_RES_CURRENCY: OdooEntity = OdooEntity { model_name: "res.currency", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_activate_group_multi_currency", @@ -5122,17 +5147,16 @@ pub const EXT_RES_CURRENCY: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/res_currency.py", line_range: (7, 25) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/res_currency.py", + line_range: (7, 25), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -5182,20 +5206,19 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["country_id", "specific_property_product_pricelist"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["country_id", "specific_property_product_pricelist"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/res_partner.py", line_range: (6, 51) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/res_partner.py", + line_range: (6, 51), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -5205,17 +5228,15 @@ pub const EXT_UOM_UOM: OdooEntity = OdooEntity { model_name: "uom.uom", kind: OdooEntityKind::Model, description: "", - fields: &[ - OdooField { - name: "product_uom_ids", - kind: OdooFieldKind::One2many, - target: Some("product.uom"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], + fields: &[OdooField { + name: "product_uom_ids", + kind: OdooFieldKind::One2many, + target: Some("product.uom"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], methods: &[ OdooMethod { name: "_domain_product_uoms", @@ -5230,19 +5251,17 @@ pub const EXT_UOM_UOM: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/uom_uom.py", line_range: (8, 30) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/product/models/uom_uom.py", + line_range: (8, 30), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; - diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/purchase.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/purchase.rs index b35ceae8..846a0654 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/purchase.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/purchase.rs @@ -185,7 +185,12 @@ pub const EXT_ACCOUNT_MOVE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["partner_id.name", "partner_id.purchase_warn_msg", "invoice_line_ids.product_id.purchase_line_warn_msg", "invoice_line_ids.product_id.display_name"], + targets: &[ + "partner_id.name", + "partner_id.purchase_warn_msg", + "invoice_line_ids.product_id.purchase_line_warn_msg", + "invoice_line_ids.product_id.display_name", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiModelCreateMulti, @@ -193,13 +198,14 @@ pub const EXT_ACCOUNT_MOVE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/account_invoice.py", line_range: (16, 518) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/purchase/models/account_invoice.py", + line_range: (16, 518), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -273,20 +279,19 @@ pub const EXT_ACCOUNT_MOVE_LINE: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id.purchase_line_warn_msg"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["product_id.purchase_line_warn_msg"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/account_invoice.py", line_range: (521, 558) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/purchase/models/account_invoice.py", + line_range: (521, 558), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -296,28 +301,23 @@ pub const EXT_ACCOUNT_TAX: OdooEntity = OdooEntity { model_name: "account.tax", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "_hook_compute_is_used", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + fields: &[], + methods: &[OdooMethod { + name: "_hook_compute_is_used", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/account_tax.py", line_range: (6, 29) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/purchase/models/account_tax.py", + line_range: (6, 29), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -327,17 +327,15 @@ pub const EXT_ACCOUNT_ANALYTIC_ACCOUNT: OdooEntity = OdooEntity { model_name: "account.analytic.account", kind: OdooEntityKind::Model, description: "", - fields: &[ - OdooField { - name: "purchase_order_count", - kind: OdooFieldKind::Computed, - target: None, - required: false, - computed: Some("_compute_purchase_order_count"), - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], + fields: &[OdooField { + name: "purchase_order_count", + kind: OdooFieldKind::Computed, + target: None, + required: false, + computed: Some("_compute_purchase_order_count"), + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], methods: &[ OdooMethod { name: "_compute_purchase_order_count", @@ -352,20 +350,19 @@ pub const EXT_ACCOUNT_ANALYTIC_ACCOUNT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["line_ids"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["line_ids"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/analytic_account.py", line_range: (7, 34) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/purchase/models/analytic_account.py", + line_range: (7, 34), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -375,31 +372,26 @@ pub const EXT_ACCOUNT_ANALYTIC_APPLICABILITY: OdooEntity = OdooEntity { model_name: "account.analytic.applicability", kind: OdooEntityKind::Model, description: "Analytic Plan's Applicabilities", - fields: &[ - OdooField { - name: "business_domain", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], - methods: &[ - - ], - decorators: &[ - - ], + fields: &[OdooField { + name: "business_domain", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/analytic_applicability.py", line_range: (6, 15) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/purchase/models/analytic_applicability.py", + line_range: (6, 15), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -409,9 +401,7 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { model_name: "ir.actions.report", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_render_qweb_pdf_prepare_streams", @@ -426,17 +416,16 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/ir_actions_report.py", line_range: (7, 56) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/purchase/models/ir_actions_report.py", + line_range: (7, 56), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -518,13 +507,14 @@ pub const EXT_PRODUCT_TEMPLATE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/product.py", line_range: (10, 55) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/purchase/models/product.py", + line_range: (10, 55), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -598,17 +588,16 @@ pub const EXT_PRODUCT_PRODUCT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/product.py", line_range: (58, 141) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/purchase/models/product.py", + line_range: (58, 141), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -618,9 +607,7 @@ pub const EXT_PRODUCT_SUPPLIERINFO: OdooEntity = OdooEntity { model_name: "product.supplierinfo", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_onchange_partner_id", @@ -635,20 +622,19 @@ pub const EXT_PRODUCT_SUPPLIERINFO: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiOnchange, - targets: &["partner_id"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiOnchange, + targets: &["partner_id"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/product.py", line_range: (144, 154) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/purchase/models/product.py", + line_range: (144, 154), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -953,13 +939,14 @@ pub const EXT_PURCHASE_BILL_LINE_MATCH: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/purchase_bill_line_match.py", line_range: (9, 203) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/purchase/models/purchase_bill_line_match.py", + line_range: (9, 203), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1918,7 +1905,11 @@ pub const EXT_PURCHASE_ORDER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["company_id", "partner_id", "partner_id.reminder_date_before_receipt"], + targets: &[ + "company_id", + "partner_id", + "partner_id.reminder_date_before_receipt", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -1926,7 +1917,11 @@ pub const EXT_PURCHASE_ORDER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["company_id.account_fiscal_country_id", "fiscal_position_id.country_id", "fiscal_position_id.foreign_vat"], + targets: &[ + "company_id.account_fiscal_country_id", + "fiscal_position_id.country_id", + "fiscal_position_id.foreign_vat", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -1934,7 +1929,11 @@ pub const EXT_PURCHASE_ORDER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["partner_id.name", "partner_id.purchase_warn_msg", "order_line.purchase_line_warn_msg"], + targets: &[ + "partner_id.name", + "partner_id.purchase_warn_msg", + "order_line.purchase_line_warn_msg", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -1974,28 +1973,43 @@ pub const EXT_PURCHASE_ORDER: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, - OdooState { name: "sent", semantic: OdooStateSemantic::Active }, - OdooState { name: "to approve", semantic: OdooStateSemantic::Active }, - OdooState { name: "purchase", semantic: OdooStateSemantic::Active }, - OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, - ], - transitions: &[ - ], - }), - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on company_id, order_line", - source_method: Some("_check_order_line_company_id"), - }, - ], + state_field: "state", + states: &[ + OdooState { + name: "draft", + semantic: OdooStateSemantic::Draft, + }, + OdooState { + name: "sent", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "to approve", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "purchase", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "cancel", + semantic: OdooStateSemantic::Cancelled, + }, + ], + transitions: &[], + }), + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on company_id, order_line", + source_method: Some("_check_order_line_company_id"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/purchase_order.py", line_range: (21, 1418) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/purchase/models/purchase_order.py", + line_range: (21, 1418), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2687,7 +2701,13 @@ pub const EXT_PURCHASE_ORDER_LINE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["invoice_lines.move_id.state", "invoice_lines.quantity", "qty_received", "product_uom_qty", "order_id.state"], + targets: &[ + "invoice_lines.move_id.state", + "invoice_lines.quantity", + "qty_received", + "product_uom_qty", + "order_id.state", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -2715,7 +2735,14 @@ pub const EXT_PURCHASE_ORDER_LINE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id", "product_id.seller_ids", "partner_id", "product_qty", "order_id.date_order", "product_uom_id"], + targets: &[ + "product_id", + "product_id.seller_ids", + "partner_id", + "product_qty", + "order_id.date_order", + "product_uom_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -2739,11 +2766,22 @@ pub const EXT_PURCHASE_ORDER_LINE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id", "product_id.uom_id", "product_id.uom_ids", "product_id.seller_ids", "product_id.seller_ids.product_uom_id"], + targets: &[ + "product_id", + "product_id.uom_id", + "product_id.uom_ids", + "product_id.seller_ids", + "product_id.seller_ids.product_uom_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["product_qty", "product_uom_id", "company_id", "order_id.partner_id"], + targets: &[ + "product_qty", + "product_uom_id", + "company_id", + "order_id.partner_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -2782,7 +2820,10 @@ pub const EXT_PURCHASE_ORDER_LINE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/purchase_order_line.py", line_range: (13, 753) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/purchase/models/purchase_order_line.py", + line_range: (13, 753), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2821,20 +2862,17 @@ pub const EXT_RES_COMPANY: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/res_company.py", line_range: (7, 23) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/purchase/models/res_company.py", + line_range: (7, 23), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/eu/en16931"], }, @@ -2976,13 +3014,14 @@ pub const EXT_RES_CONFIG_SETTINGS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/res_config_settings.py", line_range: (7, 44) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/purchase/models/res_config_settings.py", + line_range: (7, 44), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3062,19 +3101,17 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/res_partner.py", line_range: (6, 54) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/purchase/models/res_partner.py", + line_range: (6, 54), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; - diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/sale.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/sale.rs index c5f7e9e7..c70ce93a 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/sale.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/sale.rs @@ -167,17 +167,23 @@ pub const EXT_ACCOUNT_MOVE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["partner_id.name", "partner_id.sale_warn_msg", "invoice_line_ids.product_id.sale_line_warn_msg", "invoice_line_ids.product_id.display_name"], + targets: &[ + "partner_id.name", + "partner_id.sale_warn_msg", + "invoice_line_ids.product_id.sale_line_warn_msg", + "invoice_line_ids.product_id.display_name", + ], }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/account_move.py", line_range: (6, 206) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/account_move.py", + line_range: (6, 206), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -301,13 +307,14 @@ pub const EXT_ACCOUNT_MOVE_LINE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/account_move_line.py", line_range: (8, 244) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/account_move_line.py", + line_range: (8, 244), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -317,31 +324,26 @@ pub const EXT_ACCOUNT_ANALYTIC_LINE: OdooEntity = OdooEntity { model_name: "account.analytic.line", kind: OdooEntityKind::Model, description: "", - fields: &[ - OdooField { - name: "so_line", - kind: OdooFieldKind::Many2one, - target: Some("sale.order.line"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], - methods: &[ - - ], - decorators: &[ - - ], + fields: &[OdooField { + name: "so_line", + kind: OdooFieldKind::Many2one, + target: Some("sale.order.line"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/analytic.py", line_range: (6, 9) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/analytic.py", + line_range: (6, 9), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -351,31 +353,26 @@ pub const EXT_ACCOUNT_ANALYTIC_APPLICABILITY: OdooEntity = OdooEntity { model_name: "account.analytic.applicability", kind: OdooEntityKind::Model, description: "Analytic Plan's Applicabilities", - fields: &[ - OdooField { - name: "business_domain", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], - methods: &[ - - ], - decorators: &[ - - ], + fields: &[OdooField { + name: "business_domain", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/analytic.py", line_range: (12, 21) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/analytic.py", + line_range: (12, 21), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -385,28 +382,23 @@ pub const EXT_ACCOUNT_CHART_TEMPLATE: OdooEntity = OdooEntity { model_name: "account.chart.template", kind: OdooEntityKind::Abstract, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "_get_property_accounts", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + fields: &[], + methods: &[OdooMethod { + name: "_get_property_accounts", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/chart_template.py", line_range: (4, 10) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/chart_template.py", + line_range: (4, 10), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -489,17 +481,16 @@ pub const EXT_CRM_TEAM: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/crm_team.py", line_range: (8, 84) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/crm_team.py", + line_range: (8, 84), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -509,9 +500,7 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { model_name: "ir.actions.report", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_render_qweb_pdf_prepare_streams", @@ -526,17 +515,16 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/ir_actions_report.py", line_range: (7, 56) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/ir_actions_report.py", + line_range: (7, 56), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -546,9 +534,7 @@ pub const EXT_IR_CONFIG_PARAMETER: OdooEntity = OdooEntity { model_name: "ir.config_parameter", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "create", @@ -581,20 +567,19 @@ pub const EXT_IR_CONFIG_PARAMETER: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModelCreateMulti, - targets: &[], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModelCreateMulti, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/ir_config_parameter.py", line_range: (9, 45) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/ir_config_parameter.py", + line_range: (9, 45), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -604,31 +589,26 @@ pub const EXT_PAYMENT_PROVIDER: OdooEntity = OdooEntity { model_name: "payment.provider", kind: OdooEntityKind::Model, description: "", - fields: &[ - OdooField { - name: "so_reference_type", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], - methods: &[ - - ], - decorators: &[ - - ], + fields: &[OdooField { + name: "so_reference_type", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/payment_provider.py", line_range: (6, 14) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/payment_provider.py", + line_range: (6, 14), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -731,13 +711,14 @@ pub const EXT_PAYMENT_TRANSACTION: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/payment_transaction.py", line_range: (11, 260) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/payment_transaction.py", + line_range: (11, 260), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -747,31 +728,26 @@ pub const EXT_PRODUCT_DOCUMENT: OdooEntity = OdooEntity { model_name: "product.document", kind: OdooEntityKind::Model, description: "", - fields: &[ - OdooField { - name: "attached_on_sale", - kind: OdooFieldKind::Selection, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], - methods: &[ - - ], - decorators: &[ - - ], + fields: &[OdooField { + name: "attached_on_sale", + kind: OdooFieldKind::Selection, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/product_document.py", line_range: (6, 25) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/product_document.py", + line_range: (6, 25), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -781,9 +757,7 @@ pub const EXT_PRODUCT_PRICELIST_ITEM: OdooEntity = OdooEntity { model_name: "product.pricelist.item", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_is_discount_feature_enabled", @@ -798,20 +772,19 @@ pub const EXT_PRODUCT_PRICELIST_ITEM: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/product_pricelist_item.py", line_range: (4, 16) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/product_pricelist_item.py", + line_range: (4, 16), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -903,20 +876,19 @@ pub const EXT_PRODUCT_PRODUCT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiOnchange, - targets: &["type"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiOnchange, + targets: &["type"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/product_product.py", line_range: (10, 123) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/product_product.py", + line_range: (10, 123), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -926,35 +898,30 @@ pub const EXT_PRODUCT_ATTRIBUTE_CUSTOM_VALUE: OdooEntity = OdooEntity { model_name: "product.attribute.custom.value", kind: OdooEntityKind::Model, description: "", - fields: &[ - OdooField { - name: "sale_order_line_id", - kind: OdooFieldKind::Many2one, - target: Some("sale.order.line"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], - methods: &[ - - ], - decorators: &[ - - ], + fields: &[OdooField { + name: "sale_order_line_id", + kind: OdooFieldKind::Many2one, + target: Some("sale.order.line"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Only one Custom Value is allowed per Attribute Value per Sales Order Line.", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Only one Custom Value is allowed per Attribute Value per Sales Order Line.", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/product_product.py", line_range: (126, 134) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/product_product.py", + line_range: (126, 134), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1245,7 +1212,10 @@ pub const EXT_PRODUCT_TEMPLATE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/product_template.py", line_range: (10, 311) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/product_template.py", + line_range: (10, 311), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1433,20 +1403,19 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/res_partner.py", line_range: (7, 110) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/res_partner.py", + line_range: (7, 110), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2970,7 +2939,12 @@ pub const EXT_SALE_ORDER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["order_line.price_subtotal", "currency_id", "company_id", "payment_term_id"], + targets: &[ + "order_line.price_subtotal", + "currency_id", + "company_id", + "payment_term_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -3014,7 +2988,12 @@ pub const EXT_SALE_ORDER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["order_line.price_subtotal", "currency_id", "company_id", "payment_term_id"], + targets: &[ + "order_line.price_subtotal", + "currency_id", + "company_id", + "payment_term_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -3022,7 +3001,11 @@ pub const EXT_SALE_ORDER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["partner_id.name", "partner_id.sale_warn_msg", "order_line.sale_line_warn_msg"], + targets: &[ + "partner_id.name", + "partner_id.sale_warn_msg", + "order_line.sale_line_warn_msg", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, @@ -3098,7 +3081,10 @@ pub const EXT_SALE_ORDER: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/sale_order.py", line_range: (34, 2301) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/sale_order.py", + line_range: (34, 2301), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4400,7 +4386,12 @@ pub const EXT_SALE_ORDER_LINE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["qty_delivered_method", "analytic_line_ids.so_line", "analytic_line_ids.unit_amount", "analytic_line_ids.product_uom_id"], + targets: &[ + "qty_delivered_method", + "analytic_line_ids.so_line", + "analytic_line_ids.unit_amount", + "analytic_line_ids.product_uom_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -4424,27 +4415,60 @@ pub const EXT_SALE_ORDER_LINE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["state", "product_uom_qty", "qty_delivered", "qty_to_invoice", "qty_invoiced"], + targets: &[ + "state", + "product_uom_qty", + "qty_delivered", + "qty_to_invoice", + "qty_invoiced", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["invoice_lines", "invoice_lines.price_total", "invoice_lines.move_id.state", "invoice_lines.move_id.move_type"], + targets: &[ + "invoice_lines", + "invoice_lines.price_total", + "invoice_lines.move_id.state", + "invoice_lines.move_id.move_type", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["invoice_lines", "invoice_lines.price_total", "invoice_lines.move_id.state"], + targets: &[ + "invoice_lines", + "invoice_lines.price_total", + "invoice_lines.move_id.state", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["state", "product_id", "untaxed_amount_invoiced", "qty_delivered", "product_uom_qty", "price_unit"], + targets: &[ + "state", + "product_id", + "untaxed_amount_invoiced", + "qty_delivered", + "product_uom_qty", + "price_unit", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["discount", "price_total", "product_uom_qty", "qty_delivered", "qty_invoiced_posted"], + targets: &[ + "discount", + "price_total", + "product_uom_qty", + "qty_delivered", + "qty_invoiced_posted", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["price_unit", "discount", "qty_invoiced_at_date", "qty_delivered_at_date"], + targets: &[ + "price_unit", + "discount", + "qty_invoiced_at_date", + "qty_delivered_at_date", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -4496,7 +4520,10 @@ pub const EXT_SALE_ORDER_LINE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/sale_order_line.py", line_range: (12, 1819) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/sale_order_line.py", + line_range: (12, 1819), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4570,19 +4597,17 @@ pub const EXT_UTM_CAMPAIGN: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/utm_campaign.py", line_range: (7, 72) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/sale/models/utm_campaign.py", + line_range: (7, 72), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; - diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/stock.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/stock.rs index 2673620b..fa46eb14 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/stock.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/stock.rs @@ -8,31 +8,26 @@ pub const EXT_BARCODE_RULE: OdooEntity = OdooEntity { model_name: "barcode.rule", kind: OdooEntityKind::Model, description: "", - fields: &[ - OdooField { - name: "type", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - ], - methods: &[ - - ], - decorators: &[ - - ], + fields: &[OdooField { + name: "type", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/barcode.py", line_range: (7, 20) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/barcode.py", + line_range: (7, 20), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -42,28 +37,23 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { model_name: "ir.actions.report", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "_get_rendering_context", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + fields: &[], + methods: &[OdooMethod { + name: "_get_rendering_context", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/ir_actions_report.py", line_range: (4, 16) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/ir_actions_report.py", + line_range: (4, 16), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -530,7 +520,11 @@ pub const EXT_PRODUCT_PRODUCT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["stock_move_ids.product_qty", "stock_move_ids.state", "stock_move_ids.quantity"], + targets: &[ + "stock_move_ids.product_qty", + "stock_move_ids.state", + "stock_move_ids.quantity", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiOnchange, @@ -554,13 +548,14 @@ pub const EXT_PRODUCT_PRODUCT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/product.py", line_range: (47, 810) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/product.py", + line_range: (47, 810), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1066,7 +1061,13 @@ pub const EXT_PRODUCT_TEMPLATE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["product_variant_ids.qty_available", "product_variant_ids.virtual_available", "product_variant_ids.incoming_qty", "product_variant_ids.outgoing_qty", "tracking"], + targets: &[ + "product_variant_ids.qty_available", + "product_variant_ids.virtual_available", + "product_variant_ids.incoming_qty", + "product_variant_ids.outgoing_qty", + "tracking", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiModel, @@ -1090,13 +1091,14 @@ pub const EXT_PRODUCT_TEMPLATE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/product.py", line_range: (813, 1271) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/product.py", + line_range: (813, 1271), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1208,13 +1210,14 @@ pub const EXT_PRODUCT_CATEGORY: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/product.py", line_range: (1274, 1335) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/product.py", + line_range: (1274, 1335), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1258,17 +1261,16 @@ pub const EXT_UOM_UOM: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/product.py", line_range: (1338, 1389) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/product.py", + line_range: (1338, 1389), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1278,9 +1280,7 @@ pub const EXT_PRODUCT_CATALOG_MIXIN: OdooEntity = OdooEntity { model_name: "product.catalog.mixin", kind: OdooEntityKind::Abstract, description: "", - fields: &[ - - ], + fields: &[], methods: &[ OdooMethod { name: "_get_action_add_from_catalog_extra_context", @@ -1295,17 +1295,16 @@ pub const EXT_PRODUCT_CATALOG_MIXIN: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/product_catalog_mixin.py", line_range: (6, 16) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/product_catalog_mixin.py", + line_range: (6, 16), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1335,20 +1334,17 @@ pub const EXT_PRODUCT_REMOVAL: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/product_strategy.py", line_range: (8, 13) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/product_strategy.py", + line_range: (8, 13), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1537,13 +1533,14 @@ pub const EXT_STOCK_PUTAWAY_RULE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/product_strategy.py", line_range: (16, 183) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/product_strategy.py", + line_range: (16, 183), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1774,13 +1771,14 @@ pub const EXT_RES_COMPANY: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/res_company.py", line_range: (6, 215) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/res_company.py", + line_range: (6, 215), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2197,13 +2195,14 @@ pub const EXT_RES_CONFIG_SETTINGS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/res_config_settings.py", line_range: (8, 139) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/res_config_settings.py", + line_range: (8, 139), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2242,25 +2241,22 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - OdooMethod { - name: "action_view_stock_serial", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Action, - triggers: &[], - }, - ], - decorators: &[ - - ], + methods: &[OdooMethod { + name: "action_view_stock_serial", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Action, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/res_partner.py", line_range: (7, 25) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/res_partner.py", + line_range: (7, 25), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2270,28 +2266,23 @@ pub const EXT_RES_USERS: OdooEntity = OdooEntity { model_name: "res.users", kind: OdooEntityKind::Model, description: "", - fields: &[ - - ], - methods: &[ - OdooMethod { - name: "_get_default_warehouse_id", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + fields: &[], + methods: &[OdooMethod { + name: "_get_default_warehouse_id", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/res_users.py", line_range: (6, 12) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/res_users.py", + line_range: (6, 12), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2697,7 +2688,16 @@ pub const EXT_STOCK_LOCATION: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["outgoing_move_line_ids.quantity_product_uom", "incoming_move_line_ids.quantity_product_uom", "outgoing_move_line_ids.state", "incoming_move_line_ids.state", "outgoing_move_line_ids.product_id.weight", "outgoing_move_line_ids.product_id.weight", "quant_ids.quantity", "quant_ids.product_id.weight"], + targets: &[ + "outgoing_move_line_ids.quantity_product_uom", + "incoming_move_line_ids.quantity_product_uom", + "outgoing_move_line_ids.state", + "incoming_move_line_ids.state", + "outgoing_move_line_ids.product_id.weight", + "outgoing_move_line_ids.product_id.weight", + "quant_ids.quantity", + "quant_ids.product_id.weight", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -2705,7 +2705,12 @@ pub const EXT_STOCK_LOCATION: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["cyclic_inventory_frequency", "last_inventory_date", "usage", "company_id"], + targets: &[ + "cyclic_inventory_frequency", + "last_inventory_date", + "usage", + "company_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -2762,7 +2767,10 @@ pub const EXT_STOCK_LOCATION: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_location.py", line_range: (13, 514) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_location.py", + line_range: (13, 514), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2972,17 +2980,18 @@ pub const EXT_STOCK_ROUTE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on company_id", - source_method: Some("_check_company_consistency"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on company_id", + source_method: Some("_check_company_consistency"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_location.py", line_range: (517, 595) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_location.py", + line_range: (517, 595), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3313,17 +3322,18 @@ pub const EXT_STOCK_LOT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on name, product_id, company_id", - source_method: Some("_check_unique_lot"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on name, product_id, company_id", + source_method: Some("_check_unique_lot"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_lot.py", line_range: (24, 431) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_lot.py", + line_range: (24, 431), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4786,7 +4796,13 @@ pub const EXT_STOCK_MOVE: OdooEntity = OdooEntity { decorators: &[ OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id", "product_id.uom_id", "product_id.uom_ids", "product_id.seller_ids", "product_id.seller_ids.product_uom_id"], + targets: &[ + "product_id", + "product_id.uom_id", + "product_id.uom_ids", + "product_id.seller_ids", + "product_id.seller_ids.product_uom_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -4802,7 +4818,12 @@ pub const EXT_STOCK_MOVE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["has_tracking", "picking_type_id.use_create_lots", "picking_type_id.use_existing_lots", "product_id"], + targets: &[ + "has_tracking", + "picking_type_id.use_create_lots", + "picking_type_id.use_existing_lots", + "product_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -4810,7 +4831,11 @@ pub const EXT_STOCK_MOVE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["move_line_ids", "move_line_ids.result_package_id", "move_line_ids.result_package_id.outermost_package_id"], + targets: &[ + "move_line_ids", + "move_line_ids.result_package_id", + "move_line_ids.result_package_id.outermost_package_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -4842,7 +4867,13 @@ pub const EXT_STOCK_MOVE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["picking_id.name", "scrap_id.name", "location_dest_usage", "is_inventory", "inventory_name"], + targets: &[ + "picking_id.name", + "scrap_id.name", + "location_dest_usage", + "is_inventory", + "inventory_name", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -4870,7 +4901,16 @@ pub const EXT_STOCK_MOVE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id", "product_qty", "picking_type_id", "quantity", "priority", "state", "product_uom_qty", "location_id"], + targets: &[ + "product_id", + "product_qty", + "picking_type_id", + "quantity", + "priority", + "state", + "product_uom_qty", + "location_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -4890,7 +4930,15 @@ pub const EXT_STOCK_MOVE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["has_tracking", "picking_type_id.use_create_lots", "picking_type_id.use_existing_lots", "state", "origin_returned_move_id", "product_id.type", "picking_code"], + targets: &[ + "has_tracking", + "picking_type_id.use_create_lots", + "picking_type_id.use_existing_lots", + "state", + "origin_returned_move_id", + "product_id.type", + "picking_code", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiModel, @@ -4898,11 +4946,20 @@ pub const EXT_STOCK_MOVE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["picking_id", "product_id", "location_id", "location_dest_id"], + targets: &[ + "picking_id", + "product_id", + "location_id", + "location_dest_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id", "picking_type_id", "description_picking_manual"], + targets: &[ + "product_id", + "picking_type_id", + "description_picking_manual", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiModelCreateMulti, @@ -4930,26 +4987,47 @@ pub const EXT_STOCK_MOVE: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, - OdooState { name: "waiting", semantic: OdooStateSemantic::Active }, - OdooState { name: "confirmed", semantic: OdooStateSemantic::Active }, - OdooState { name: "partially_available", semantic: OdooStateSemantic::Active }, - OdooState { name: "assigned", semantic: OdooStateSemantic::Active }, - OdooState { name: "done", semantic: OdooStateSemantic::Completed }, - OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, - ], - transitions: &[ - ], - }), - constraints: &[ - - ], + state_field: "state", + states: &[ + OdooState { + name: "draft", + semantic: OdooStateSemantic::Draft, + }, + OdooState { + name: "waiting", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "confirmed", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "partially_available", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "assigned", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "done", + semantic: OdooStateSemantic::Completed, + }, + OdooState { + name: "cancel", + semantic: OdooStateSemantic::Cancelled, + }, + ], + transitions: &[], + }), + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_move.py", line_range: (18, 2682) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_move.py", + line_range: (18, 2682), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -5662,7 +5740,13 @@ pub const EXT_STOCK_MOVE_LINE: OdooEntity = OdooEntity { decorators: &[ OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id", "product_id.uom_id", "product_id.uom_ids", "product_id.seller_ids", "product_id.seller_ids.product_uom_id"], + targets: &[ + "product_id", + "product_id.uom_id", + "product_id.uom_ids", + "product_id.seller_ids", + "product_id.seller_ids.product_uom_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -5682,7 +5766,12 @@ pub const EXT_STOCK_MOVE_LINE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["move_id", "move_id.location_id", "move_id.location_dest_id", "picking_id"], + targets: &[ + "move_id", + "move_id.location_id", + "move_id.location_dest_id", + "picking_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -5714,7 +5803,12 @@ pub const EXT_STOCK_MOVE_LINE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiOnchange, - targets: &["result_package_id", "product_id", "product_uom_id", "quantity"], + targets: &[ + "result_package_id", + "product_id", + "product_uom_id", + "quantity", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiModelCreateMulti, @@ -5741,7 +5835,10 @@ pub const EXT_STOCK_MOVE_LINE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_move_line.py", line_range: (15, 1239) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_move_line.py", + line_range: (15, 1239), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6359,15 +6456,37 @@ pub const EXT_STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["location_id", "product_min_qty", "route_id", "product_id.route_ids", "product_id.stock_move_ids.date", "product_id.stock_move_ids.state", "product_id.seller_ids", "product_id.seller_ids.delay", "company_id.horizon_days"], + targets: &[ + "location_id", + "product_min_qty", + "route_id", + "product_id.route_ids", + "product_id.stock_move_ids.date", + "product_id.stock_move_ids.state", + "product_id.seller_ids", + "product_id.seller_ids.delay", + "company_id.horizon_days", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["rule_ids", "product_id.seller_ids", "product_id.seller_ids.delay", "company_id.horizon_days"], + targets: &[ + "rule_ids", + "product_id.seller_ids", + "product_id.seller_ids.delay", + "company_id.horizon_days", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["route_id", "product_id", "location_id", "company_id", "warehouse_id", "product_id.route_ids"], + targets: &[ + "route_id", + "product_id", + "location_id", + "company_id", + "warehouse_id", + "product_id.route_ids", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -6375,7 +6494,12 @@ pub const EXT_STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["route_id", "product_id", "product_id.seller_ids", "product_id.seller_ids.product_uom_id"], + targets: &[ + "route_id", + "product_id", + "product_id.seller_ids", + "product_id.seller_ids.product_uom_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -6383,11 +6507,24 @@ pub const EXT_STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id", "product_id.categ_id", "product_id.route_ids", "product_id.categ_id.route_ids", "location_id"], + targets: &[ + "product_id", + "product_id.categ_id", + "product_id.route_ids", + "product_id.categ_id.route_ids", + "location_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["route_id", "product_id", "product_id.categ_id", "product_id.route_ids", "product_id.categ_id.route_ids", "location_id"], + targets: &[ + "route_id", + "product_id", + "product_id.categ_id", + "product_id.route_ids", + "product_id.categ_id.route_ids", + "location_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -6423,7 +6560,15 @@ pub const EXT_STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id", "location_id", "product_id.stock_move_ids", "product_id.stock_move_ids.state", "product_id.stock_move_ids.date", "product_id.stock_move_ids.product_uom_qty", "product_id.seller_ids.delay"], + targets: &[ + "product_id", + "location_id", + "product_id.stock_move_ids", + "product_id.stock_move_ids.state", + "product_id.stock_move_ids.date", + "product_id.stock_move_ids.product_uom_qty", + "product_id.seller_ids.delay", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -6431,7 +6576,15 @@ pub const EXT_STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["replenishment_uom_id", "product_min_qty", "product_max_qty", "product_id", "location_id", "product_id.seller_ids.delay", "company_id.horizon_days"], + targets: &[ + "replenishment_uom_id", + "product_min_qty", + "product_max_qty", + "product_id", + "location_id", + "product_id.seller_ids.delay", + "company_id.horizon_days", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiModel, @@ -6458,7 +6611,10 @@ pub const EXT_STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_orderpoint.py", line_range: (21, 817) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_orderpoint.py", + line_range: (21, 817), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6917,7 +7073,12 @@ pub const EXT_STOCK_PACKAGE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["complete_name", "package_type_id.packaging_length", "package_type_id.width", "package_type_id.height"], + targets: &[ + "complete_name", + "package_type_id.packaging_length", + "package_type_id.width", + "package_type_id.height", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -6945,7 +7106,11 @@ pub const EXT_STOCK_PACKAGE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["child_package_ids", "child_package_ids.location_id", "quant_ids"], + targets: &[ + "child_package_ids", + "child_package_ids.location_id", + "quant_ids", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -6969,13 +7134,14 @@ pub const EXT_STOCK_PACKAGE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_package.py", line_range: (16, 558) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_package.py", + line_range: (16, 558), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7118,17 +7284,16 @@ pub const EXT_STOCK_PACKAGE_HISTORY: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - - ], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_package_history.py", line_range: (6, 42) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_package_history.py", + line_range: (6, 42), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7396,7 +7561,10 @@ pub const EXT_STOCK_PACKAGE_TYPE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_package_type.py", line_range: (7, 131) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_package_type.py", + line_range: (7, 131), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -8118,13 +8286,14 @@ pub const EXT_STOCK_PICKING_TYPE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_picking.py", line_range: (20, 535) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_picking.py", + line_range: (20, 535), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9252,11 +9421,23 @@ pub const EXT_STOCK_PICKING: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["state", "picking_type_code", "scheduled_date", "move_ids", "move_ids.forecast_availability", "move_ids.forecast_expected_date"], + targets: &[ + "state", + "picking_type_code", + "scheduled_date", + "move_ids", + "move_ids.forecast_availability", + "move_ids.forecast_expected_date", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["move_line_ids", "picking_type_id.use_create_lots", "picking_type_id.use_existing_lots", "state"], + targets: &[ + "move_line_ids", + "picking_type_id.use_create_lots", + "picking_type_id.use_existing_lots", + "state", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -9268,11 +9449,24 @@ pub const EXT_STOCK_PICKING: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["move_line_ids", "move_line_ids.result_package_id", "move_line_ids.product_uom_id", "move_line_ids.quantity"], + targets: &[ + "move_line_ids", + "move_line_ids.result_package_id", + "move_line_ids.product_uom_id", + "move_line_ids.quantity", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["move_line_ids.result_package_id", "move_line_ids.result_package_id.package_type_id", "move_line_ids.result_package_id.shipping_weight", "move_line_ids.result_package_id.outermost_package_id", "move_line_ids.result_package_id.outermost_package_id.package_type_id", "move_line_ids.result_package_id.outermost_package_id.shipping_weight", "weight_bulk"], + targets: &[ + "move_line_ids.result_package_id", + "move_line_ids.result_package_id.package_type_id", + "move_line_ids.result_package_id.shipping_weight", + "move_line_ids.result_package_id.outermost_package_id", + "move_line_ids.result_package_id.outermost_package_id.package_type_id", + "move_line_ids.result_package_id.outermost_package_id.shipping_weight", + "weight_bulk", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -9348,29 +9542,47 @@ pub const EXT_STOCK_PICKING: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, - OdooState { name: "waiting", semantic: OdooStateSemantic::Active }, - OdooState { name: "confirmed", semantic: OdooStateSemantic::Active }, - OdooState { name: "assigned", semantic: OdooStateSemantic::Active }, - OdooState { name: "done", semantic: OdooStateSemantic::Completed }, - OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, - ], - transitions: &[ - ], - }), - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Reference must be unique per company!", - source_method: None, - }, - ], + state_field: "state", + states: &[ + OdooState { + name: "draft", + semantic: OdooStateSemantic::Draft, + }, + OdooState { + name: "waiting", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "confirmed", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "assigned", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "done", + semantic: OdooStateSemantic::Completed, + }, + OdooState { + name: "cancel", + semantic: OdooStateSemantic::Cancelled, + }, + ], + transitions: &[], + }), + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Reference must be unique per company!", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_picking.py", line_range: (538, 2148) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_picking.py", + line_range: (538, 2148), + }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -10156,7 +10368,13 @@ pub const EXT_STOCK_QUANT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiOnchange, - targets: &["location_id", "product_id", "lot_id", "package_id", "owner_id"], + targets: &[ + "location_id", + "product_id", + "lot_id", + "package_id", + "owner_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiOnchange, @@ -10236,7 +10454,10 @@ pub const EXT_STOCK_QUANT: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_quant.py", line_range: (19, 1563) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_quant.py", + line_range: (19, 1563), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10275,25 +10496,22 @@ pub const EXT_STOCK_REFERENCE: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - OdooMethod { - name: "_compute_picking_ids", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], - decorators: &[ - - ], + methods: &[OdooMethod { + name: "_compute_picking_ids", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], + decorators: &[], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_reference.py", line_range: (4, 15) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_reference.py", + line_range: (4, 15), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10337,20 +10555,19 @@ pub const EXT_STOCK_REPLENISH_MIXIN: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id", "product_tmpl_id"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["product_id", "product_tmpl_id"], + }], state_machine: None, - constraints: &[ - - ], + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_replenish_mixin.py", line_range: (7, 40) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_replenish_mixin.py", + line_range: (7, 40), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10767,7 +10984,14 @@ pub const EXT_STOCK_RULE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["action", "location_dest_id", "location_src_id", "picking_type_id", "procure_method", "location_dest_from_rule"], + targets: &[ + "action", + "location_dest_id", + "location_src_id", + "picking_type_id", + "procure_method", + "location_dest_from_rule", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -10827,17 +11051,18 @@ pub const EXT_STOCK_RULE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on company_id", - source_method: Some("_check_company_consistency"), - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on company_id", + source_method: Some("_check_company_consistency"), + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_rule.py", line_range: (42, 747) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_rule.py", + line_range: (42, 747), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11121,7 +11346,13 @@ pub const EXT_STOCK_SCRAP: OdooEntity = OdooEntity { decorators: &[ OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id", "product_id.uom_id", "product_id.uom_ids", "product_id.seller_ids", "product_id.seller_ids.product_uom_id"], + targets: &[ + "product_id", + "product_id.uom_id", + "product_id.uom_ids", + "product_id.seller_ids", + "product_id.seller_ids.product_uom_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -11145,21 +11376,27 @@ pub const EXT_STOCK_SCRAP: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, - OdooState { name: "done", semantic: OdooStateSemantic::Completed }, - ], - transitions: &[ - ], - }), - constraints: &[ - - ], + state_field: "state", + states: &[ + OdooState { + name: "draft", + semantic: OdooStateSemantic::Draft, + }, + OdooState { + name: "done", + semantic: OdooStateSemantic::Completed, + }, + ], + transitions: &[], + }), + constraints: &[], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_scrap.py", line_range: (10, 234) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_scrap.py", + line_range: (10, 234), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11198,24 +11435,21 @@ pub const EXT_STOCK_SCRAP_REASON_TAG: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Tag name already exists!", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Tag name already exists!", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_scrap.py", line_range: (237, 249) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_scrap.py", + line_range: (237, 249), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11334,24 +11568,23 @@ pub const EXT_STOCK_STORAGE_CATEGORY: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["capacity_ids"], - }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["capacity_ids"], + }], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Max weight should be a positive number.", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Max weight should be a positive number.", + source_method: None, + }], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_storage_category.py", line_range: (7, 45) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_storage_category.py", + line_range: (7, 45), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11417,12 +11650,8 @@ pub const EXT_STOCK_STORAGE_CATEGORY_CAPACITY: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[ - - ], - decorators: &[ - - ], + methods: &[], + decorators: &[], state_machine: None, constraints: &[ OdooConstraint { @@ -11444,7 +11673,10 @@ pub const EXT_STOCK_STORAGE_CATEGORY_CAPACITY: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_storage_category.py", line_range: (48, 75) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_storage_category.py", + line_range: (48, 75), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12012,9 +12244,11 @@ pub const EXT_STOCK_WAREHOUSE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_warehouse.py", line_range: (23, 1162) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/stock/models/stock_warehouse.py", + line_range: (23, 1162), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; - diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/uom.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/uom.rs index 709eca8f..3227d6d2 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/uom.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/uom.rs @@ -196,7 +196,11 @@ pub const EXT_UOM_UOM: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["relative_factor", "relative_uom_id", "relative_uom_id.factor"], + targets: &[ + "relative_factor", + "relative_uom_id", + "relative_uom_id.factor", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiOnchange, @@ -227,9 +231,11 @@ pub const EXT_UOM_UOM: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { path: "odoo/addons/uom/models/uom_uom.py", line_range: (17, 230) }], + odoo_source: &[OdooSourceRef { + path: "odoo/addons/uom/models/uom_uom.py", + line_range: (17, 230), + }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; - diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l1.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l1.rs index 6093d2a2..bb1643ea 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l1.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l1.rs @@ -17,30 +17,49 @@ use super::{ const MOVE_SM: OdooStateMachine = OdooStateMachine { state_field: "state", states: &[ - OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, - OdooState { name: "posted", semantic: OdooStateSemantic::Posted }, - OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, + OdooState { + name: "draft", + semantic: OdooStateSemantic::Draft, + }, + OdooState { + name: "posted", + semantic: OdooStateSemantic::Posted, + }, + OdooState { + name: "cancel", + semantic: OdooStateSemantic::Cancelled, + }, ], transitions: &[ OdooTransition { - from: "draft", to: "posted", trigger: "action_post", + from: "draft", + to: "posted", + trigger: "action_post", guards: &["_check_balanced", "_check_lock_date", "_check_draftable"], }, OdooTransition { - from: "posted", to: "draft", trigger: "button_draft", + from: "posted", + to: "draft", + trigger: "button_draft", guards: &["_check_draftable"], }, OdooTransition { - from: "posted", to: "cancel", trigger: "button_cancel", + from: "posted", + to: "cancel", + trigger: "button_cancel", guards: &["_check_draftable"], }, OdooTransition { - from: "draft", to: "cancel", trigger: "button_cancel", + from: "draft", + to: "cancel", + trigger: "button_cancel", guards: &[], }, // GoBD Storno: posted → new posted reversal; original row untouched. OdooTransition { - from: "posted", to: "posted", trigger: "_reverse_moves", + from: "posted", + to: "posted", + trigger: "_reverse_moves", guards: &["_can_be_unlinked"], }, ], @@ -54,169 +73,411 @@ pub const ACCOUNT_MOVE: OdooEntity = OdooEntity { description: "Double-entry journal entry / invoice; draft→posted→cancel state machine, \ Belegnummer sequence, GoBD K11 inalterability hash chain, storno logic.", fields: &[ - OdooField { name: "state", - kind: OdooFieldKind::Selection, target: None, required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, + OdooField { + name: "state", + kind: OdooFieldKind::Selection, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Status, + }, // Belegnummer; computed by _compute_name; frozen once posted_before=True. - OdooField { name: "name", - kind: OdooFieldKind::Char, target: None, required: false, + OdooField { + name: "name", + kind: OdooFieldKind::Char, + target: None, + required: false, computed: Some("_compute_name"), depends: &["state", "journal_id", "date", "posted_before"], - semantic_role: OdooSemanticRole::Identity }, + semantic_role: OdooSemanticRole::Identity, + }, // Set True by _post(); never reset — freezes Belegnummer permanently. - OdooField { name: "posted_before", - kind: OdooFieldKind::Boolean, target: None, required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Audit }, - OdooField { name: "move_type", - kind: OdooFieldKind::Selection, target: None, required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, - OdooField { name: "journal_id", - kind: OdooFieldKind::Many2one, target: Some("account.journal"), required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "company_id", - kind: OdooFieldKind::Many2one, target: Some("res.company"), required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "partner_id", - kind: OdooFieldKind::Many2one, target: Some("res.partner"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "posted_before", + kind: OdooFieldKind::Boolean, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Audit, + }, + OdooField { + name: "move_type", + kind: OdooFieldKind::Selection, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, + OdooField { + name: "journal_id", + kind: OdooFieldKind::Many2one, + target: Some("account.journal"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "company_id", + kind: OdooFieldKind::Many2one, + target: Some("res.company"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "partner_id", + kind: OdooFieldKind::Many2one, + target: Some("res.partner"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, // Auto-advanced by _post() when falling inside a locked period (lock-date heuristic). - OdooField { name: "date", - kind: OdooFieldKind::Date, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Date }, - OdooField { name: "invoice_date", - kind: OdooFieldKind::Date, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Date }, + OdooField { + name: "date", + kind: OdooFieldKind::Date, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Date, + }, + OdooField { + name: "invoice_date", + kind: OdooFieldKind::Date, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Date, + }, // Flipped to 'at_date' by _post(soft=True) for future-dated moves. // Values: no, at_date, monthly, quarterly, yearly. - OdooField { name: "auto_post", - kind: OdooFieldKind::Selection, target: None, required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, - OdooField { name: "auto_post_until", - kind: OdooFieldKind::Date, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, - OdooField { name: "auto_post_origin_id", - kind: OdooFieldKind::Many2one, target: Some("account.move"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "reversed_entry_id", - kind: OdooFieldKind::Many2one, target: Some("account.move"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "reversal_move_id", - kind: OdooFieldKind::One2many, target: Some("account.move"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "auto_post", + kind: OdooFieldKind::Selection, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, + OdooField { + name: "auto_post_until", + kind: OdooFieldKind::Date, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, + OdooField { + name: "auto_post_origin_id", + kind: OdooFieldKind::Many2one, + target: Some("account.move"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "reversed_entry_id", + kind: OdooFieldKind::Many2one, + target: Some("account.move"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "reversal_move_id", + kind: OdooFieldKind::One2many, + target: Some("account.move"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, // K11 Festschreibung: "$4$". Once set → immutable; must be reversed. - OdooField { name: "inalterable_hash", - kind: OdooFieldKind::Char, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Audit }, - OdooField { name: "sequence_prefix", - kind: OdooFieldKind::Char, target: None, required: false, - computed: Some("_compute_name"), depends: &["name"], - semantic_role: OdooSemanticRole::Identity }, - OdooField { name: "sequence_number", - kind: OdooFieldKind::Integer, target: None, required: false, - computed: Some("_compute_name"), depends: &["name"], - semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "line_ids", - kind: OdooFieldKind::One2many, target: Some("account.move.line"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Document }, - OdooField { name: "currency_id", - kind: OdooFieldKind::Many2one, target: Some("res.currency"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Money }, - OdooField { name: "invoice_currency_rate", - kind: OdooFieldKind::Float, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Money }, - OdooField { name: "amount_total", - kind: OdooFieldKind::Monetary, target: None, required: false, + OdooField { + name: "inalterable_hash", + kind: OdooFieldKind::Char, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Audit, + }, + OdooField { + name: "sequence_prefix", + kind: OdooFieldKind::Char, + target: None, + required: false, + computed: Some("_compute_name"), + depends: &["name"], + semantic_role: OdooSemanticRole::Identity, + }, + OdooField { + name: "sequence_number", + kind: OdooFieldKind::Integer, + target: None, + required: false, + computed: Some("_compute_name"), + depends: &["name"], + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "line_ids", + kind: OdooFieldKind::One2many, + target: Some("account.move.line"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Document, + }, + OdooField { + name: "currency_id", + kind: OdooFieldKind::Many2one, + target: Some("res.currency"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "invoice_currency_rate", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "amount_total", + kind: OdooFieldKind::Monetary, + target: None, + required: false, computed: Some("_compute_amount"), depends: &["line_ids.price_subtotal", "line_ids.tax_ids"], - semantic_role: OdooSemanticRole::Money }, + semantic_role: OdooSemanticRole::Money, + }, // l10n_de: auto-filled to invoice_date before _post() for German sale docs (§14 UStG). - OdooField { name: "delivery_date", - kind: OdooFieldKind::Date, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Date }, - OdooField { name: "fiscal_position_id", - kind: OdooFieldKind::Many2one, target: Some("account.fiscal.position"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Tax }, - OdooField { name: "partner_bank_id", - kind: OdooFieldKind::Many2one, target: Some("res.partner.bank"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "delivery_date", + kind: OdooFieldKind::Date, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Date, + }, + OdooField { + name: "fiscal_position_id", + kind: OdooFieldKind::Many2one, + target: Some("account.fiscal.position"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Tax, + }, + OdooField { + name: "partner_bank_id", + kind: OdooFieldKind::Many2one, + target: Some("res.partner.bank"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, ], methods: &[ // Core posting flow: validate, lock-date advance, sequence, state write, reconcile. - OdooMethod { name: "_post", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Recordset, triggers: &[] }, - OdooMethod { name: "action_post", - kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Action, - triggers: &["action_post"] }, - OdooMethod { name: "button_draft", - kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Unit, - triggers: &["button_draft"] }, - OdooMethod { name: "button_cancel", - kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Unit, - triggers: &["button_cancel"] }, + OdooMethod { + name: "_post", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Recordset, + triggers: &[], + }, + OdooMethod { + name: "action_post", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Action, + triggers: &["action_post"], + }, + OdooMethod { + name: "button_draft", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, + triggers: &["button_draft"], + }, + OdooMethod { + name: "button_cancel", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, + triggers: &["button_cancel"], + }, // K11 user lock button → _hash_moves(force_hash=True). - OdooMethod { name: "button_hash", - kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "button_hash", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, // GoBD Storno: copy + negate balance/amount_currency; two audit rows kept. - OdooMethod { name: "_reverse_moves", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Recordset, - triggers: &["_reverse_moves"] }, + OdooMethod { + name: "_reverse_moves", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Recordset, + triggers: &["_reverse_moves"], + }, // Context-manager; SQL HAVING ROUND(SUM(balance), decimal_places) != 0. - OdooMethod { name: "_check_balanced", - kind: OdooMethodKind::Constrain, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_get_unbalanced_moves", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Recordset, triggers: &[] }, + OdooMethod { + name: "_check_balanced", + kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_get_unbalanced_moves", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Recordset, + triggers: &[], + }, // posted_before=True freezes name; never resets previously-posted Belegnummer. - OdooMethod { name: "_compute_name", - kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_set_next_sequence", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "_compute_name", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_set_next_sequence", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, // Gap-prevention: SAVEPOINT loop + UPDATE + UniqueViolation retry. - OdooMethod { name: "_locked_increment", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "_locked_increment", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, // Detects periodicity: year_range_month→monthly→year_range→yearly→fixed. - OdooMethod { name: "_deduce_sequence_number_reset", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, - OdooMethod { name: "_get_last_sequence_domain", - kind: OdooMethodKind::Override, return_kind: OdooReturnKind::Dict, triggers: &[] }, - OdooMethod { name: "_get_last_sequence", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Record, triggers: &[] }, - OdooMethod { name: "_get_starting_sequence", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { + name: "_deduce_sequence_number_reset", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, + OdooMethod { + name: "_get_last_sequence_domain", + kind: OdooMethodKind::Override, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, + OdooMethod { + name: "_get_last_sequence", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Record, + triggers: &[], + }, + OdooMethod { + name: "_get_starting_sequence", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, // K11: SHA-256 chain per (journal_id, sequence_prefix). // Input includes name/date/journal_id/company_id + per-line fields. // Stored as "$4$"; raw hex used for chaining (version stripped). - OdooMethod { name: "_calculate_hashes", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, - OdooMethod { name: "_hash_moves", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "_calculate_hashes", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, + OdooMethod { + name: "_hash_moves", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, // Groups by (journal_id, sequence_prefix); raises on sequence gap. - OdooMethod { name: "_get_chains_to_hash", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { + name: "_get_chains_to_hash", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, // Returns ["name","date","journal_id","company_id"] for hash_version >= 2. - OdooMethod { name: "_get_integrity_hash_fields", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { + name: "_get_integrity_hash_fields", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, // False if inalterable_hash set, or date ≤ fiscal_lock_date, or CABA/FX entry. - OdooMethod { name: "_can_be_unlinked", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Boolean, triggers: &[] }, + OdooMethod { + name: "_can_be_unlinked", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Boolean, + triggers: &[], + }, // Guards button_draft: blocks exchange-diff, CABA, and hashed entries. - OdooMethod { name: "_check_draftable", - kind: OdooMethodKind::Constrain, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_get_violated_lock_dates", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { + name: "_check_draftable", + kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_get_violated_lock_dates", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, // Returns next open accounting date after a locked period. - OdooMethod { name: "_get_accounting_date", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Date, triggers: &[] }, + OdooMethod { + name: "_get_accounting_date", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Date, + triggers: &[], + }, // Axis-2 HEURISTIC: wizard after 3+ consecutive unmodified bills from same partner. - OdooMethod { name: "_show_autopost_bills_wizard", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Action, triggers: &[] }, + OdooMethod { + name: "_show_autopost_bills_wizard", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Action, + triggers: &[], + }, // auto_post=monthly/quarterly/yearly → copy for next period after posting. - OdooMethod { name: "_copy_recurring_entries", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Recordset, triggers: &[] }, - OdooMethod { name: "_affect_tax_report", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Boolean, triggers: &[] }, + OdooMethod { + name: "_copy_recurring_entries", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Recordset, + triggers: &[], + }, + OdooMethod { + name: "_affect_tax_report", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Boolean, + triggers: &[], + }, // Raises ValidationError if posted_before AND name set. - OdooMethod { name: "action_switch_move_type", - kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "action_switch_move_type", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, ], decorators: &[ OdooDecorator { @@ -243,7 +504,8 @@ pub const ACCOUNT_MOVE: OdooEntity = OdooEntity { }, OdooConstraint { kind: OdooConstraintKind::Sql, - condition: "UNIQUE(journal_id, sequence_prefix, sequence_number) — gap-free Belegnummer", + condition: + "UNIQUE(journal_id, sequence_prefix, sequence_number) — gap-free Belegnummer", source_method: None, }, OdooConstraint { @@ -270,120 +532,299 @@ pub const ACCOUNT_MOVE_LINE: OdooEntity = OdooEntity { amount_currency for FX; subject to off-balance, payable/receivable, \ CABA, matching-number, and deductibility constraints.", fields: &[ - OdooField { name: "move_id", - kind: OdooFieldKind::Many2one, target: Some("account.move"), required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "account_id", - kind: OdooFieldKind::Many2one, target: Some("account.account"), required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "move_id", + kind: OdooFieldKind::Many2one, + target: Some("account.move"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "account_id", + kind: OdooFieldKind::Many2one, + target: Some("account.account"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, // Company-currency balance; >0 = debit, <0 = credit (non-storno). // Journal entries: last line auto-balanced to negative sum of others. - OdooField { name: "balance", - kind: OdooFieldKind::Monetary, target: None, required: false, + OdooField { + name: "balance", + kind: OdooFieldKind::Monetary, + target: None, + required: false, computed: Some("_compute_balance"), - depends: &["price_unit", "quantity", "discount", "tax_ids", - "currency_id", "move_id.move_type"], - semantic_role: OdooSemanticRole::Money }, - OdooField { name: "debit", - kind: OdooFieldKind::Monetary, target: None, required: false, - computed: Some("_compute_debit_credit"), depends: &["balance", "is_storno"], - semantic_role: OdooSemanticRole::Money }, - OdooField { name: "credit", - kind: OdooFieldKind::Monetary, target: None, required: false, - computed: Some("_compute_debit_credit"), depends: &["balance", "is_storno"], - semantic_role: OdooSemanticRole::Money }, + depends: &[ + "price_unit", + "quantity", + "discount", + "tax_ids", + "currency_id", + "move_id.move_type", + ], + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "debit", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_compute_debit_credit"), + depends: &["balance", "is_storno"], + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "credit", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_compute_debit_credit"), + depends: &["balance", "is_storno"], + semantic_role: OdooSemanticRole::Money, + }, // FX balance: currency_id.round(balance * currency_rate); equals balance when same ccy. - OdooField { name: "amount_currency", - kind: OdooFieldKind::Monetary, target: None, required: false, - computed: Some("_compute_amount_currency"), depends: &["currency_rate", "balance"], - semantic_role: OdooSemanticRole::Money }, + OdooField { + name: "amount_currency", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_compute_amount_currency"), + depends: &["currency_rate", "balance"], + semantic_role: OdooSemanticRole::Money, + }, // Invoices: header invoice_currency_rate. Journal entries: live rate at move date. - OdooField { name: "currency_rate", - kind: OdooFieldKind::Float, target: None, required: false, + OdooField { + name: "currency_rate", + kind: OdooFieldKind::Float, + target: None, + required: false, computed: Some("_compute_currency_rate"), - depends: &["currency_id", "company_id", - "move_id.invoice_currency_rate", "move_id.date"], - semantic_role: OdooSemanticRole::Money }, - OdooField { name: "currency_id", - kind: OdooFieldKind::Many2one, target: Some("res.currency"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Money }, - OdooField { name: "company_id", - kind: OdooFieldKind::Many2one, target: Some("res.company"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "partner_id", - kind: OdooFieldKind::Many2one, target: Some("res.partner"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "tax_ids", - kind: OdooFieldKind::Many2many, target: Some("account.tax"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Tax }, + depends: &[ + "currency_id", + "company_id", + "move_id.invoice_currency_rate", + "move_id.date", + ], + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "currency_id", + kind: OdooFieldKind::Many2one, + target: Some("res.currency"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "company_id", + kind: OdooFieldKind::Many2one, + target: Some("res.company"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "partner_id", + kind: OdooFieldKind::Many2one, + target: Some("res.partner"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "tax_ids", + kind: OdooFieldKind::Many2many, + target: Some("account.tax"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Tax, + }, // Non-null on tax lines generated by _sync_tax_lines(); null on base lines. - OdooField { name: "tax_line_id", - kind: OdooFieldKind::Many2one, target: Some("account.tax"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Tax }, + OdooField { + name: "tax_line_id", + kind: OdooFieldKind::Many2one, + target: Some("account.tax"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Tax, + }, // Storno flag: flips debit/credit sign presentation (German accounting). - OdooField { name: "is_storno", - kind: OdooFieldKind::Boolean, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { + name: "is_storno", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, // Values: line_section, line_subsection, line_note, tax, non_deductible_tax, // payment_term, cogs, product, '' (normal). - OdooField { name: "display_type", - kind: OdooFieldKind::Selection, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, + OdooField { + name: "display_type", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Status, + }, // Format: ^((P?\d+)|(I.+))$. 'I'=import temp; 'P'=partial; numeric=full reconcile. - OdooField { name: "matching_number", - kind: OdooFieldKind::Char, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, - OdooField { name: "full_reconcile_id", - kind: OdooFieldKind::Many2one, target: Some("account.full.reconcile"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "matching_number", + kind: OdooFieldKind::Char, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Identity, + }, + OdooField { + name: "full_reconcile_id", + kind: OdooFieldKind::Many2one, + target: Some("account.full.reconcile"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, // [0, 100]; non-purchase docs must equal 100. - OdooField { name: "deductible_amount", - kind: OdooFieldKind::Float, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Tax }, + OdooField { + name: "deductible_amount", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Tax, + }, // K11 hash fields (version >= 2): name included in _get_integrity_hash_fields. - OdooField { name: "name", - kind: OdooFieldKind::Char, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Document }, - OdooField { name: "price_unit", - kind: OdooFieldKind::Monetary, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Money }, - OdooField { name: "quantity", - kind: OdooFieldKind::Float, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, + OdooField { + name: "name", + kind: OdooFieldKind::Char, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Document, + }, + OdooField { + name: "price_unit", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "quantity", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Quantity, + }, ], methods: &[ - OdooMethod { name: "_compute_balance", - kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_debit_credit", - kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_amount_currency", - kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_currency_rate", - kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "_compute_balance", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_debit_credit", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_amount_currency", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_currency_rate", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, // Called explicitly from _post(), not via decorator. Validates account active, // currency consistency, journal default/suspense account exemption. - OdooMethod { name: "_check_constrains_account_id_journal_id", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_check_off_balance", - kind: OdooMethodKind::Constrain, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_check_payable_receivable", - kind: OdooMethodKind::Constrain, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_check_caba_non_caba_shared_tags", - kind: OdooMethodKind::Constrain, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_constrains_matching_number", - kind: OdooMethodKind::Constrain, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_constrains_deductible_amount", - kind: OdooMethodKind::Constrain, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "_check_constrains_account_id_journal_id", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_check_off_balance", + kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_check_payable_receivable", + kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_check_caba_non_caba_shared_tags", + kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_constrains_matching_number", + kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_constrains_deductible_amount", + kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, // K11 hash fields: ["name","debit","credit","account_id","partner_id"] (version >= 2). - OdooMethod { name: "_get_integrity_hash_fields", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { + name: "_get_integrity_hash_fields", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, // Tax priority: product.taxes_id → account_id.tax_ids → fiscal_position.map_tax(). - OdooMethod { name: "_get_computed_taxes", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Recordset, triggers: &[] }, - OdooMethod { name: "_create_analytic_lines", - kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "remove_move_reconcile", - kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "_get_computed_taxes", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Recordset, + triggers: &[], + }, + OdooMethod { + name: "_create_analytic_lines", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "remove_move_reconcile", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, ], decorators: &[ OdooDecorator { @@ -396,8 +837,12 @@ pub const ACCOUNT_MOVE_LINE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["currency_id", "company_id", - "move_id.invoice_currency_rate", "move_id.date"], + targets: &[ + "currency_id", + "company_id", + "move_id.invoice_currency_rate", + "move_id.date", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, @@ -462,37 +907,85 @@ pub const ACCOUNT_JOURNAL: OdooEntity = OdooEntity { sequence_override_regex, and the (journal_id, sequence_prefix) \ K11 hash-chain anchor.", fields: &[ - OdooField { name: "name", - kind: OdooFieldKind::Char, target: None, required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, + OdooField { + name: "name", + kind: OdooFieldKind::Char, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Identity, + }, // Used as prefix in starting sequence (e.g. "INV/2024/00000"). - OdooField { name: "code", - kind: OdooFieldKind::Char, target: None, required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, + OdooField { + name: "code", + kind: OdooFieldKind::Char, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Identity, + }, // Values: sale, purchase, bank, cash, general. // Determines default sequence format: sale/bank/cash = annual; other = monthly. - OdooField { name: "type", - kind: OdooFieldKind::Selection, target: None, required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { + name: "type", + kind: OdooFieldKind::Selection, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, // Archived journal blocks _post() with "archived journal" validation error. - OdooField { name: "active", - kind: OdooFieldKind::Boolean, target: None, required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, - OdooField { name: "company_id", - kind: OdooFieldKind::Many2one, target: Some("res.company"), required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "active", + kind: OdooFieldKind::Boolean, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Status, + }, + OdooField { + name: "company_id", + kind: OdooFieldKind::Many2one, + target: Some("res.company"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, // Overrides sequence_mixin's default regex table; checked first in // _get_last_sequence_domain before built-in patterns. - OdooField { name: "sequence_override_regex", - kind: OdooFieldKind::Char, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { + name: "sequence_override_regex", + kind: OdooFieldKind::Char, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, // Lines on default_account_id or suspense_account_id bypass account constraint. - OdooField { name: "default_account_id", - kind: OdooFieldKind::Many2one, target: Some("account.account"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "suspense_account_id", - kind: OdooFieldKind::Many2one, target: Some("account.account"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "default_account_id", + kind: OdooFieldKind::Many2one, + target: Some("account.account"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "suspense_account_id", + kind: OdooFieldKind::Many2one, + target: Some("account.account"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, ], methods: &[], decorators: &[], diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l10.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l10.rs index 2e75fd00..185281e9 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l10.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l10.rs @@ -704,14 +704,26 @@ mod tests { let model = &ANALYTIC_DISTRIBUTION_MODEL; assert_eq!(model.model_name, "account.analytic.distribution.model"); // analytic_distribution is Char (nearest to fields.Json) with Policy role - let dist = model.fields.iter().find(|f| f.name == "analytic_distribution").unwrap(); + let dist = model + .fields + .iter() + .find(|f| f.name == "analytic_distribution") + .unwrap(); assert_eq!(dist.kind, OdooFieldKind::Char); assert_eq!(dist.semantic_role, OdooSemanticRole::Policy); // account_prefix is Policy (pattern-matching criterion) - let prefix = model.fields.iter().find(|f| f.name == "account_prefix").unwrap(); + let prefix = model + .fields + .iter() + .find(|f| f.name == "account_prefix") + .unwrap(); assert_eq!(prefix.semantic_role, OdooSemanticRole::Policy); // _get_distribution is the AXIS-B delegation point - let get_dist = model.methods.iter().find(|m| m.name == "_get_distribution").unwrap(); + let get_dist = model + .methods + .iter() + .find(|m| m.name == "_get_distribution") + .unwrap(); assert_eq!(get_dist.kind, OdooMethodKind::ApiModel); } @@ -741,7 +753,10 @@ mod tests { assert!(line.methods.iter().any(|m| m.name == "create")); assert!(line.methods.iter().any(|m| m.name == "write")); assert!(line.methods.iter().any(|m| m.name == "unlink")); - assert!(line.methods.iter().any(|m| m.name == "_get_distribution_key")); + assert!(line + .methods + .iter() + .any(|m| m.name == "_get_distribution_key")); } #[test] @@ -753,8 +768,11 @@ mod tests { "{} should be Curated", entity.model_name, ); - assert_eq!(entity.provenance.l_doc, "L10-ANALYTIC.md", - "{} must reference L10-ANALYTIC.md", entity.model_name); + assert_eq!( + entity.provenance.l_doc, "L10-ANALYTIC.md", + "{} must reference L10-ANALYTIC.md", + entity.model_name + ); } } } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l11.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l11.rs index 9e2929ce..0e7d1a7c 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l11.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l11.rs @@ -298,14 +298,12 @@ pub const ACCOUNT_ACCOUNT_TAG: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Status, }, ], - methods: &[ - OdooMethod { - name: "_compute_balance_negate", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - ], + methods: &[OdooMethod { + name: "_compute_balance_negate", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }], decorators: &[OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["name"], @@ -721,8 +719,7 @@ mod tests { fn all_entities_cite_l11_doc() { for entity in ENTITIES { assert_eq!( - entity.provenance.l_doc, - "L11-COA-JOURNALS-LOCKDATES.md", + entity.provenance.l_doc, "L11-COA-JOURNALS-LOCKDATES.md", "{} must reference L11-COA-JOURNALS-LOCKDATES.md", entity.model_name, ); @@ -739,7 +736,11 @@ mod tests { fn account_account_type_is_policy() { let acc = &ACCOUNT_ACCOUNT; assert_eq!(acc.model_name, "account.account"); - let t = acc.fields.iter().find(|f| f.name == "account_type").unwrap(); + let t = acc + .fields + .iter() + .find(|f| f.name == "account_type") + .unwrap(); assert_eq!(t.kind, OdooFieldKind::Selection); assert_eq!(t.semantic_role, OdooSemanticRole::Policy); } @@ -769,15 +770,14 @@ mod tests { "hard_lock_date", ]; for name in lock_fields { - let f = co.fields.iter().find(|f| f.name == name).unwrap_or_else(|| { - panic!("lock-date field '{}' missing on res.company entity", name) - }); - assert_eq!( - f.kind, - OdooFieldKind::Date, - "field '{}' must be Date", - name - ); + let f = co + .fields + .iter() + .find(|f| f.name == name) + .unwrap_or_else(|| { + panic!("lock-date field '{}' missing on res.company entity", name) + }); + assert_eq!(f.kind, OdooFieldKind::Date, "field '{}' must be Date", name); assert_eq!( f.semantic_role, OdooSemanticRole::Policy, @@ -820,7 +820,8 @@ mod tests { assert_eq!(f.semantic_role, OdooSemanticRole::Policy); assert!(tag.constraints.iter().any(|c| { c.kind == OdooConstraintKind::Sql - && c.condition.contains("UNIQUE(name, applicability, country_id)") + && c.condition + .contains("UNIQUE(name, applicability, country_id)") })); } } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l12.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l12.rs index e7e8ead9..8471fd74 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l12.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l12.rs @@ -338,7 +338,8 @@ pub const RES_CURRENCY: OdooEntity = OdooEntity { pub const RES_CURRENCY_RATE: OdooEntity = OdooEntity { model_name: "res.currency.rate", kind: OdooEntityKind::Model, - description: "One dated FX exchange rate: foreign units per 1 base currency (technical `rate`). \ + description: + "One dated FX exchange rate: foreign units per 1 base currency (technical `rate`). \ Lookup uses root_id, not company_id — branches inherit root rates. \ Only root companies may have dedicated rate records (no branch-level rates). \ Company-specific rates win over global (company_id=NULL) ones.", @@ -777,7 +778,10 @@ mod tests { fn res_currency_identity() { assert_eq!(RES_CURRENCY.model_name, "res.currency"); assert_eq!(RES_CURRENCY.provenance.confidence, OdooConfidence::Curated); - assert_eq!(RES_CURRENCY.provenance.l_doc, "L12-MULTICOMPANY-CURRENCY.md"); + assert_eq!( + RES_CURRENCY.provenance.l_doc, + "L12-MULTICOMPANY-CURRENCY.md" + ); assert!(RES_CURRENCY.state_machine.is_none()); } @@ -796,8 +800,14 @@ mod tests { fn res_currency_has_three_rate_fields() { let names: Vec<&str> = RES_CURRENCY.fields.iter().map(|f| f.name).collect(); assert!(names.contains(&"rate"), "rate field must be present"); - assert!(names.contains(&"company_rate"), "company_rate field must be present"); - assert!(names.contains(&"inverse_company_rate"), "inverse_company_rate must be present"); + assert!( + names.contains(&"company_rate"), + "company_rate field must be present" + ); + assert!( + names.contains(&"inverse_company_rate"), + "inverse_company_rate must be present" + ); } #[test] @@ -824,7 +834,10 @@ mod tests { #[test] fn res_currency_rate_identity() { assert_eq!(RES_CURRENCY_RATE.model_name, "res.currency.rate"); - assert_eq!(RES_CURRENCY_RATE.provenance.confidence, OdooConfidence::Curated); + assert_eq!( + RES_CURRENCY_RATE.provenance.confidence, + OdooConfidence::Curated + ); } #[test] @@ -862,7 +875,11 @@ mod tests { #[test] fn res_company_multicompany_has_exchange_account_fields() { - let names: Vec<&str> = RES_COMPANY_MULTICOMPANY.fields.iter().map(|f| f.name).collect(); + let names: Vec<&str> = RES_COMPANY_MULTICOMPANY + .fields + .iter() + .map(|f| f.name) + .collect(); assert!( names.contains(&"income_currency_exchange_account_id"), "income exchange account must be present" @@ -938,8 +955,7 @@ mod tests { fn all_entities_reference_l12_l_doc() { for e in ENTITIES { assert_eq!( - e.provenance.l_doc, - "L12-MULTICOMPANY-CURRENCY.md", + e.provenance.l_doc, "L12-MULTICOMPANY-CURRENCY.md", "entity {} must reference L12 l_doc", e.model_name ); diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l13.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l13.rs index 3aca4cc1..e30c0558 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l13.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l13.rs @@ -159,14 +159,12 @@ const STOCK_VALUATION_LAYER: OdooEntity = OdooEntity { ], decorators: &[], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - // value must equal quantity × unit_cost at currency rounding precision. - condition: "value = round(quantity × unit_cost, currency.decimal_places) — Decimal HALF_UP", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + // value must equal quantity × unit_cost at currency rounding precision. + condition: "value = round(quantity × unit_cost, currency.decimal_places) — Decimal HALF_UP", + source_method: None, + }], provenance: OdooProvenance { l_doc: "L13-STOCK-VALUATION-PROCUREMENT.md", // Specced from SVL interface contract block + R1/R2 (lines 33-36, 85-91). @@ -256,7 +254,12 @@ pub const STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { target: None, required: false, computed: Some("_compute_qty_to_order"), - depends: &["product_id", "location_id", "product_min_qty", "product_max_qty"], + depends: &[ + "product_id", + "location_id", + "product_min_qty", + "product_max_qty", + ], // Rounded UP to replenishment_uom multiple; overridden by qty_to_order_manual. semantic_role: OdooSemanticRole::Quantity, }, @@ -384,7 +387,12 @@ pub const STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { decorators: &[ OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id", "location_id", "product_min_qty", "product_max_qty"], + targets: &[ + "product_id", + "location_id", + "product_min_qty", + "product_max_qty", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -392,13 +400,11 @@ pub const STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "product_min_qty <= product_max_qty", - source_method: None, - }, - ], + constraints: &[OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "product_min_qty <= product_max_qty", + source_method: None, + }], provenance: OdooProvenance { l_doc: "L13-STOCK-VALUATION-PROCUREMENT.md", l_doc_lines: (55, 79), @@ -848,8 +854,7 @@ mod tests { fn all_entities_cite_l13_doc() { for entity in ENTITIES { assert_eq!( - entity.provenance.l_doc, - "L13-STOCK-VALUATION-PROCUREMENT.md", + entity.provenance.l_doc, "L13-STOCK-VALUATION-PROCUREMENT.md", "entity {} must cite L13 doc", entity.model_name ); @@ -946,7 +951,10 @@ mod tests { .constraints .iter() .find(|c| c.kind == OdooConstraintKind::Sql); - assert!(sql_c.is_some(), "stock.lot must have a SQL unique constraint"); + assert!( + sql_c.is_some(), + "stock.lot must have a SQL unique constraint" + ); } #[test] diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l14.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l14.rs index 6394b902..40d3778e 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l14.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l14.rs @@ -645,7 +645,11 @@ pub const HR_JOB: OdooEntity = OdooEntity { target: None, required: false, computed: Some("_compute_employees"), - depends: &["employee_ids.active", "employee_ids.job_id", "no_of_recruitment"], + depends: &[ + "employee_ids.active", + "employee_ids.job_id", + "no_of_recruitment", + ], // = no_of_employee + no_of_recruitment (R7). semantic_role: OdooSemanticRole::Quantity, }, @@ -781,19 +785,16 @@ pub const HR_CONTRACT_TYPE: OdooEntity = OdooEntity { /// [1] `hr.department` — org unit with recursive hierarchy /// [2] `hr.job` — role / position with headcount tracking /// [3] `hr.contract.type` — employment contract-type discriminant (community stub) -pub const ENTITIES: &[OdooEntity] = &[ - HR_EMPLOYEE, - HR_DEPARTMENT, - HR_JOB, - HR_CONTRACT_TYPE, -]; +pub const ENTITIES: &[OdooEntity] = &[HR_EMPLOYEE, HR_DEPARTMENT, HR_JOB, HR_CONTRACT_TYPE]; // ─── Tests ──────────────────────────────────────────────────────────────────── #[cfg(test)] mod tests { use super::*; - use crate::odoo_blueprint::{OdooConfidence, OdooConstraintKind, OdooFieldKind, OdooSemanticRole}; + use crate::odoo_blueprint::{ + OdooConfidence, OdooConstraintKind, OdooFieldKind, OdooSemanticRole, + }; #[test] fn entities_slice_has_four_entries() { @@ -816,8 +817,7 @@ mod tests { fn all_entities_reference_l14_l_doc() { for e in ENTITIES { assert_eq!( - e.provenance.l_doc, - "L14-HR-BASE.md", + e.provenance.l_doc, "L14-HR-BASE.md", "entity {} must reference L14 l_doc", e.model_name, ); @@ -834,7 +834,10 @@ mod tests { assert!(names.contains(&"department_id"), "department_id required"); assert!(names.contains(&"job_id"), "job_id required"); assert!(names.contains(&"work_email"), "work_email required"); - assert!(names.contains(&"identification_id"), "identification_id required"); + assert!( + names.contains(&"identification_id"), + "identification_id required" + ); } #[test] @@ -925,9 +928,18 @@ mod tests { #[test] fn hr_job_headcount_fields() { let field_names: Vec<&str> = HR_JOB.fields.iter().map(|f| f.name).collect(); - assert!(field_names.contains(&"no_of_employee"), "no_of_employee required"); - assert!(field_names.contains(&"no_of_recruitment"), "no_of_recruitment required"); - assert!(field_names.contains(&"expected_employees"), "expected_employees required"); + assert!( + field_names.contains(&"no_of_employee"), + "no_of_employee required" + ); + assert!( + field_names.contains(&"no_of_recruitment"), + "no_of_recruitment required" + ); + assert!( + field_names.contains(&"expected_employees"), + "expected_employees required" + ); let emp = HR_JOB .fields .iter() diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l15.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l15.rs index b24b631a..6ae988ec 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l15.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l15.rs @@ -288,7 +288,8 @@ const TAX_EXTENSION_DECORATORS: &[OdooDecorator] = &[ const TAX_EXTENSION_CONSTRAINTS: &[OdooConstraint] = &[ OdooConstraint { kind: OdooConstraintKind::Python, - condition: "If tax_exigibility == 'on_payment', cash_basis_transition_account_id.reconcile \ + condition: + "If tax_exigibility == 'on_payment', cash_basis_transition_account_id.reconcile \ must be True (CABA transition account must allow reconciliation). \ account_tax.py L247-255.", source_method: Some("_constrains_cash_basis_transition_account"), @@ -336,7 +337,7 @@ pub const ACCOUNT_TAX_L15: OdooEntity = OdooEntity { odoo_source: &[ OdooSourceRef { path: "addons/account/models/account_tax.py", - line_range: (163, 174), // hide_tax_exigibility + exigibility fields + line_range: (163, 174), // hide_tax_exigibility + exigibility fields }, OdooSourceRef { path: "addons/account/models/account_tax.py", @@ -396,15 +397,18 @@ mod tests { fn all_entities_reference_l15_doc() { for entity in ENTITIES { assert_eq!( - entity.provenance.l_doc, - "L15-TAX-REPARTITION.md", + entity.provenance.l_doc, "L15-TAX-REPARTITION.md", "{} references wrong L-doc", entity.model_name ); let (start, end) = entity.provenance.l_doc_lines; assert!(start > 0, "{} has zero start line", entity.model_name); assert!(end >= start, "{} has end < start", entity.model_name); - assert!(end <= 655, "{} references line beyond doc length", entity.model_name); + assert!( + end <= 655, + "{} references line beyond doc length", + entity.model_name + ); } } @@ -496,9 +500,7 @@ mod tests { .find(|e| e.model_name == "account.account.tag") .unwrap(); assert!( - tag.methods - .iter() - .any(|m| m.name == "_get_tax_tags_domain"), + tag.methods.iter().any(|m| m.name == "_get_tax_tags_domain"), "_get_tax_tags_domain must be declared (strips leading '-' from tag name)" ); } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l2.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l2.rs index 3c248f69..26163284 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l2.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l2.rs @@ -12,8 +12,8 @@ use super::{ OdooConfidence, OdooConstraint, OdooConstraintKind, OdooDecorator, OdooDecoratorKind, OdooEntity, OdooEntityKind, OdooField, OdooFieldKind, OdooMethod, OdooMethodKind, - OdooProvenance, OdooReturnKind, OdooSemanticRole, OdooSourceRef, OdooState, - OdooStateMachine, OdooStateSemantic, OdooTransition, + OdooProvenance, OdooReturnKind, OdooSemanticRole, OdooSourceRef, OdooState, OdooStateMachine, + OdooStateSemantic, OdooTransition, }; // ─── account.move.line (reconciliation fields) ─────────────────────────────── @@ -27,9 +27,18 @@ use super::{ const ACCOUNT_MOVE_LINE_SM: OdooStateMachine = OdooStateMachine { state_field: "parent_state", states: &[ - OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, - OdooState { name: "posted", semantic: OdooStateSemantic::Posted }, - OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, + OdooState { + name: "draft", + semantic: OdooStateSemantic::Draft, + }, + OdooState { + name: "posted", + semantic: OdooStateSemantic::Posted, + }, + OdooState { + name: "cancel", + semantic: OdooStateSemantic::Cancelled, + }, ], transitions: &[OdooTransition { from: "draft", @@ -518,8 +527,11 @@ pub const ACCOUNT_FULL_RECONCILE: OdooEntity = OdooEntity { /// (FLAG-4 in L2 doc, lines 871-873). /// - `account.bank.statement` / `account.bank.statement.line` — not documented /// in the L2 prose; belong in a dedicated bank-statement lane. -pub const ENTITIES: &[OdooEntity] = - &[ACCOUNT_MOVE_LINE, ACCOUNT_PARTIAL_RECONCILE, ACCOUNT_FULL_RECONCILE]; +pub const ENTITIES: &[OdooEntity] = &[ + ACCOUNT_MOVE_LINE, + ACCOUNT_PARTIAL_RECONCILE, + ACCOUNT_FULL_RECONCILE, +]; #[cfg(test)] mod tests { @@ -535,7 +547,11 @@ mod tests { fn account_move_line_residual_fields_are_computed() { let aml = &ACCOUNT_MOVE_LINE; assert_eq!(aml.model_name, "account.move.line"); - let residual = aml.fields.iter().find(|f| f.name == "amount_residual").unwrap(); + let residual = aml + .fields + .iter() + .find(|f| f.name == "amount_residual") + .unwrap(); assert_eq!(residual.computed, Some("_compute_amount_residual")); assert!(residual.depends.contains(&"matched_debit_ids")); assert_eq!(residual.kind, OdooFieldKind::Monetary); @@ -546,9 +562,17 @@ mod tests { fn account_partial_reconcile_required_fields() { let pr = &ACCOUNT_PARTIAL_RECONCILE; assert_eq!(pr.model_name, "account.partial.reconcile"); - let debit = pr.fields.iter().find(|f| f.name == "debit_move_id").unwrap(); + let debit = pr + .fields + .iter() + .find(|f| f.name == "debit_move_id") + .unwrap(); assert!(debit.required); - let credit = pr.fields.iter().find(|f| f.name == "credit_move_id").unwrap(); + let credit = pr + .fields + .iter() + .find(|f| f.name == "credit_move_id") + .unwrap(); assert!(credit.required); } @@ -570,8 +594,11 @@ mod tests { "{} should be Curated", entity.model_name ); - assert!(!entity.provenance.odoo_source.is_empty(), - "{} must have at least one odoo_source ref", entity.model_name); + assert!( + !entity.provenance.odoo_source.is_empty(), + "{} must have at least one odoo_source ref", + entity.model_name + ); } } } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l3.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l3.rs index 6428db9d..b20bb0e8 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l3.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l3.rs @@ -422,7 +422,13 @@ const ACCOUNT_TAX_METHODS: &[OdooMethod] = &[ const ACCOUNT_TAX_DECORATORS: &[OdooDecorator] = &[ OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, - targets: &["company_id", "name", "type_tax_use", "tax_scope", "country_id"], + targets: &[ + "company_id", + "name", + "type_tax_use", + "tax_scope", + "country_id", + ], }, OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, @@ -1121,13 +1127,20 @@ mod tests { let (start, end) = entity.provenance.l_doc_lines; assert!(start > 0, "{} has zero start line", entity.model_name); assert!(end >= start, "{} has end < start", entity.model_name); - assert!(end <= 1120, "{} references line beyond doc length", entity.model_name); + assert!( + end <= 1120, + "{} references line beyond doc length", + entity.model_name + ); } } #[test] fn tax_exigibility_field_is_selection_with_tax_role() { - let tax_entity = ENTITIES.iter().find(|e| e.model_name == "account.tax").unwrap(); + let tax_entity = ENTITIES + .iter() + .find(|e| e.model_name == "account.tax") + .unwrap(); let exig = tax_entity .fields .iter() @@ -1166,8 +1179,14 @@ mod tests { .find(|e| e.model_name == "account.tax.group") .unwrap(); assert!(tg.fields.iter().any(|f| f.name == "tax_payable_account_id")); - assert!(tg.fields.iter().any(|f| f.name == "tax_receivable_account_id")); - assert!(tg.fields.iter().any(|f| f.name == "advance_tax_payment_account_id")); + assert!(tg + .fields + .iter() + .any(|f| f.name == "tax_receivable_account_id")); + assert!(tg + .fields + .iter() + .any(|f| f.name == "advance_tax_payment_account_id")); } #[test] diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l4.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l4.rs index 9fceea5e..fe52a7a6 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l4.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l4.rs @@ -168,17 +168,15 @@ pub const ACCOUNT_ACCOUNT_DE: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Policy, }, ], - methods: &[ - OdooMethod { - // l10n_de override: raises UserError if any of the four conditions - // trigger (code in vals AND DE company AND code differs AND move - // lines exist). Application-layer only — no DB constraint. - name: "write", - kind: OdooMethodKind::Override, - return_kind: OdooReturnKind::Boolean, - triggers: &[], - }, - ], + methods: &[OdooMethod { + // l10n_de override: raises UserError if any of the four conditions + // trigger (code in vals AND DE company AND code differs AND move + // lines exist). Application-layer only — no DB constraint. + name: "write", + kind: OdooMethodKind::Override, + return_kind: OdooReturnKind::Boolean, + triggers: &[], + }], decorators: &[], state_machine: None, constraints: &[OdooConstraint { @@ -548,8 +546,14 @@ mod tests { #[test] fn account_account_tag_identity() { assert_eq!(ACCOUNT_ACCOUNT_TAG.model_name, "account.account.tag"); - assert_eq!(ACCOUNT_ACCOUNT_TAG.provenance.confidence, OdooConfidence::Curated); - assert_eq!(ACCOUNT_ACCOUNT_TAG.provenance.l_doc, "L4-K8K9-REPORTS-DATEV.md"); + assert_eq!( + ACCOUNT_ACCOUNT_TAG.provenance.confidence, + OdooConfidence::Curated + ); + assert_eq!( + ACCOUNT_ACCOUNT_TAG.provenance.l_doc, + "L4-K8K9-REPORTS-DATEV.md" + ); // applicability field governs report-line routing vs tax-label role let applicability = ACCOUNT_ACCOUNT_TAG .fields @@ -635,8 +639,7 @@ mod tests { fn all_entities_reference_l4_l_doc() { for e in ENTITIES { assert_eq!( - e.provenance.l_doc, - "L4-K8K9-REPORTS-DATEV.md", + e.provenance.l_doc, "L4-K8K9-REPORTS-DATEV.md", "entity {} must reference L4 l_doc", e.model_name ); diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l5.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l5.rs index 07ffbd0e..2ab8c3de 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l5.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l5.rs @@ -21,8 +21,8 @@ use super::{ OdooConfidence, OdooConstraint, OdooConstraintKind, OdooDecorator, OdooDecoratorKind, OdooEntity, OdooEntityKind, OdooField, OdooFieldKind, OdooMethod, OdooMethodKind, - OdooProvenance, OdooReturnKind, OdooSemanticRole, OdooSourceRef, OdooState, - OdooStateMachine, OdooStateSemantic, OdooTransition, + OdooProvenance, OdooReturnKind, OdooSemanticRole, OdooSourceRef, OdooState, OdooStateMachine, + OdooStateSemantic, OdooTransition, }; // ─── account.payment ───────────────────────────────────────────────────────── @@ -30,11 +30,26 @@ use super::{ const PAYMENT_STATE_MACHINE: OdooStateMachine = OdooStateMachine { state_field: "state", states: &[ - OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, - OdooState { name: "in_process", semantic: OdooStateSemantic::InProgress }, - OdooState { name: "paid", semantic: OdooStateSemantic::Completed }, - OdooState { name: "canceled", semantic: OdooStateSemantic::Cancelled }, - OdooState { name: "rejected", semantic: OdooStateSemantic::Terminal }, + OdooState { + name: "draft", + semantic: OdooStateSemantic::Draft, + }, + OdooState { + name: "in_process", + semantic: OdooStateSemantic::InProgress, + }, + OdooState { + name: "paid", + semantic: OdooStateSemantic::Completed, + }, + OdooState { + name: "canceled", + semantic: OdooStateSemantic::Cancelled, + }, + OdooState { + name: "rejected", + semantic: OdooStateSemantic::Terminal, + }, ], transitions: &[ OdooTransition { @@ -173,7 +188,10 @@ pub const PAYMENT: OdooEntity = OdooEntity { target: Some("res.currency"), required: false, computed: Some("_compute_currency_id"), - depends: &["journal_id.currency_id", "journal_id.company_id.currency_id"], + depends: &[ + "journal_id.currency_id", + "journal_id.company_id.currency_id", + ], semantic_role: OdooSemanticRole::Reference, }, OdooField { @@ -1057,7 +1075,9 @@ mod tests { #[test] fn payment_state_machine_is_populated() { - let sm = PAYMENT.state_machine.expect("account.payment must have a state machine"); + let sm = PAYMENT + .state_machine + .expect("account.payment must have a state machine"); assert_eq!(sm.state_field, "state"); assert_eq!(sm.states.len(), 5); assert!(!sm.transitions.is_empty()); @@ -1067,7 +1087,10 @@ mod tests { fn payment_has_both_reconciliation_flags() { let is_reconciled = PAYMENT.fields.iter().find(|f| f.name == "is_reconciled"); let is_matched = PAYMENT.fields.iter().find(|f| f.name == "is_matched"); - assert!(is_reconciled.is_some(), "is_reconciled field must be present"); + assert!( + is_reconciled.is_some(), + "is_reconciled field must be present" + ); assert!(is_matched.is_some(), "is_matched field must be present"); } @@ -1126,8 +1149,7 @@ mod tests { fn all_entities_cite_l5_doc() { for entity in ENTITIES { assert_eq!( - entity.provenance.l_doc, - "L5-PAY-TERMS-MATCH.md", + entity.provenance.l_doc, "L5-PAY-TERMS-MATCH.md", "entity {} must cite L5 doc", entity.model_name ); diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l6.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l6.rs index 18b0187f..15011028 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l6.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l6.rs @@ -32,42 +32,76 @@ use super::{ const SALE_ORDER_SM: OdooStateMachine = OdooStateMachine { state_field: "state", states: &[ - OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, - OdooState { name: "sent", semantic: OdooStateSemantic::Active }, - OdooState { name: "sale", semantic: OdooStateSemantic::InProgress }, - OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, + OdooState { + name: "draft", + semantic: OdooStateSemantic::Draft, + }, + OdooState { + name: "sent", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "sale", + semantic: OdooStateSemantic::InProgress, + }, + OdooState { + name: "cancel", + semantic: OdooStateSemantic::Cancelled, + }, ], transitions: &[ OdooTransition { - from: "draft", to: "sent", trigger: "action_quotation_sent", guards: &[], + from: "draft", + to: "sent", + trigger: "action_quotation_sent", + guards: &[], }, OdooTransition { - from: "draft", to: "sale", trigger: "action_confirm", + from: "draft", + to: "sale", + trigger: "action_confirm", guards: &["_confirmation_error_message"], // Full flow L1166-1196: analytics validate → write state+date_order → // _action_confirm hook → optional auto-lock → optional confirm email. }, OdooTransition { - from: "sent", to: "sale", trigger: "action_confirm", + from: "sent", + to: "sale", + trigger: "action_confirm", guards: &["_confirmation_error_message"], }, OdooTransition { - from: "cancel", to: "draft", trigger: "action_draft", guards: &[], + from: "cancel", + to: "draft", + trigger: "action_draft", + guards: &[], // Also clears signature/signed_by/signed_on (L1058-1065). }, OdooTransition { - from: "sent", to: "draft", trigger: "action_draft", guards: &[], + from: "sent", + to: "draft", + trigger: "action_draft", + guards: &[], }, OdooTransition { - from: "sale", to: "cancel", trigger: "action_cancel", guards: &[], + from: "sale", + to: "cancel", + trigger: "action_cancel", + guards: &[], // Guard: raises UserError if locked; _action_cancel cancels draft invoices // first, then writes state='cancel' (L1324-1333). }, OdooTransition { - from: "draft", to: "cancel", trigger: "action_cancel", guards: &[], + from: "draft", + to: "cancel", + trigger: "action_cancel", + guards: &[], }, OdooTransition { - from: "sent", to: "cancel", trigger: "action_cancel", guards: &[], + from: "sent", + to: "cancel", + trigger: "action_cancel", + guards: &[], }, ], }; @@ -79,110 +113,324 @@ pub const SALE_ORDER: OdooEntity = OdooEntity { generates account.move via _create_invoices. \ Proposed OWL pivot: ubl:Order → SmbFoundryInvoice (0x81) → DOLCE Perdurant.", fields: &[ - OdooField { name: "name", kind: OdooFieldKind::Char, target: None, required: false, - computed: Some("_compute_name"), depends: &[], semantic_role: OdooSemanticRole::Identity }, - OdooField { name: "state", kind: OdooFieldKind::Selection, target: None, required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, - OdooField { name: "locked", kind: OdooFieldKind::Boolean, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy, + OdooField { + name: "name", + kind: OdooFieldKind::Char, + target: None, + required: false, + computed: Some("_compute_name"), + depends: &[], + semantic_role: OdooSemanticRole::Identity, + }, + OdooField { + name: "state", + kind: OdooFieldKind::Selection, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Status, + }, + OdooField { + name: "locked", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, // Replaces old 'done' state; set by action_lock. }, - OdooField { name: "date_order", kind: OdooFieldKind::Datetime, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Date, + OdooField { + name: "date_order", + kind: OdooFieldKind::Datetime, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Date, // OVERWRITTEN to now() on action_confirm (L1166). DB CHECK: non-null when state='sale'. }, - OdooField { name: "partner_id", kind: OdooFieldKind::Many2one, target: Some("res.partner"), - required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "partner_invoice_id", kind: OdooFieldKind::Many2one, target: Some("res.partner"), - required: true, computed: Some("_compute_partner_invoice_id"), depends: &["partner_id"], - semantic_role: OdooSemanticRole::Address }, - OdooField { name: "partner_shipping_id", kind: OdooFieldKind::Many2one, target: Some("res.partner"), - required: true, computed: Some("_compute_partner_shipping_id"), depends: &["partner_id"], - semantic_role: OdooSemanticRole::Address }, - OdooField { name: "pricelist_id", kind: OdooFieldKind::Many2one, target: Some("product.pricelist"), - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy, + OdooField { + name: "partner_id", + kind: OdooFieldKind::Many2one, + target: Some("res.partner"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "partner_invoice_id", + kind: OdooFieldKind::Many2one, + target: Some("res.partner"), + required: true, + computed: Some("_compute_partner_invoice_id"), + depends: &["partner_id"], + semantic_role: OdooSemanticRole::Address, + }, + OdooField { + name: "partner_shipping_id", + kind: OdooFieldKind::Many2one, + target: Some("res.partner"), + required: true, + computed: Some("_compute_partner_shipping_id"), + depends: &["partner_id"], + semantic_role: OdooSemanticRole::Address, + }, + OdooField { + name: "pricelist_id", + kind: OdooFieldKind::Many2one, + target: Some("product.pricelist"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, // Cannot change on confirmed order (write() guard L1040-1043). // Primary model: L8-PRODUCT-UOM-PRICELIST. }, - OdooField { name: "currency_id", kind: OdooFieldKind::Many2one, target: Some("res.currency"), - required: false, computed: Some("_compute_currency_id"), + OdooField { + name: "currency_id", + kind: OdooFieldKind::Many2one, + target: Some("res.currency"), + required: false, + computed: Some("_compute_currency_id"), depends: &["pricelist_id.currency_id", "company_id.currency_id"], - semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "order_line", kind: OdooFieldKind::One2many, target: Some("sale.order.line"), - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "invoice_ids", kind: OdooFieldKind::Many2many, target: Some("account.move"), - required: false, computed: Some("_compute_invoice_ids"), + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "order_line", + kind: OdooFieldKind::One2many, + target: Some("sale.order.line"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "invoice_ids", + kind: OdooFieldKind::Many2many, + target: Some("account.move"), + required: false, + computed: Some("_compute_invoice_ids"), depends: &["order_line.invoice_lines.move_id"], - semantic_role: OdooSemanticRole::Document }, - OdooField { name: "invoice_status", kind: OdooFieldKind::Selection, target: None, - required: false, computed: Some("_compute_invoice_status"), + semantic_role: OdooSemanticRole::Document, + }, + OdooField { + name: "invoice_status", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: Some("_compute_invoice_status"), depends: &["state", "order_line.invoice_status"], // Values: 'upselling' | 'invoiced' | 'to invoice' | 'no'. // upselling → creates TODO activity for salesperson (L1964-1975). - semantic_role: OdooSemanticRole::Status }, - OdooField { name: "amount_untaxed", kind: OdooFieldKind::Monetary, target: None, - required: false, computed: Some("_compute_amounts"), - depends: &["order_line.price_subtotal", "currency_id", "company_id", "payment_term_id"], - semantic_role: OdooSemanticRole::Money }, - OdooField { name: "amount_tax", kind: OdooFieldKind::Monetary, target: None, - required: false, computed: Some("_compute_amounts"), - depends: &["order_line.price_subtotal", "currency_id", "company_id", "payment_term_id"], - semantic_role: OdooSemanticRole::Tax }, - OdooField { name: "amount_total", kind: OdooFieldKind::Monetary, target: None, - required: false, computed: Some("_compute_amounts"), - depends: &["order_line.price_subtotal", "currency_id", "company_id", "payment_term_id"], - semantic_role: OdooSemanticRole::Money }, - OdooField { name: "payment_term_id", kind: OdooFieldKind::Many2one, - target: Some("account.payment.term"), required: false, computed: None, depends: &[], - semantic_role: OdooSemanticRole::Policy }, - OdooField { name: "fiscal_position_id", kind: OdooFieldKind::Many2one, - target: Some("account.fiscal.position"), required: false, computed: None, depends: &[], - semantic_role: OdooSemanticRole::Tax }, - OdooField { name: "user_id", kind: OdooFieldKind::Many2one, target: Some("res.users"), - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "team_id", kind: OdooFieldKind::Many2one, target: Some("crm.team"), - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "company_id", kind: OdooFieldKind::Many2one, target: Some("res.company"), - required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "client_order_ref", kind: OdooFieldKind::Char, target: None, - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, - OdooField { name: "note", kind: OdooFieldKind::Html, target: None, - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Document }, + semantic_role: OdooSemanticRole::Status, + }, + OdooField { + name: "amount_untaxed", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_compute_amounts"), + depends: &[ + "order_line.price_subtotal", + "currency_id", + "company_id", + "payment_term_id", + ], + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "amount_tax", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_compute_amounts"), + depends: &[ + "order_line.price_subtotal", + "currency_id", + "company_id", + "payment_term_id", + ], + semantic_role: OdooSemanticRole::Tax, + }, + OdooField { + name: "amount_total", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_compute_amounts"), + depends: &[ + "order_line.price_subtotal", + "currency_id", + "company_id", + "payment_term_id", + ], + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "payment_term_id", + kind: OdooFieldKind::Many2one, + target: Some("account.payment.term"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, + OdooField { + name: "fiscal_position_id", + kind: OdooFieldKind::Many2one, + target: Some("account.fiscal.position"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Tax, + }, + OdooField { + name: "user_id", + kind: OdooFieldKind::Many2one, + target: Some("res.users"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "team_id", + kind: OdooFieldKind::Many2one, + target: Some("crm.team"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "company_id", + kind: OdooFieldKind::Many2one, + target: Some("res.company"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "client_order_ref", + kind: OdooFieldKind::Char, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Identity, + }, + OdooField { + name: "note", + kind: OdooFieldKind::Html, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Document, + }, ], methods: &[ - OdooMethod { name: "action_quotation_sent", kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, triggers: &["sent"] }, - OdooMethod { name: "action_confirm", kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Boolean, triggers: &["sale"] }, - OdooMethod { name: "action_draft", kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, triggers: &["draft"] }, - OdooMethod { name: "action_cancel", kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, triggers: &["cancel"] }, - OdooMethod { name: "action_lock", kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_action_cancel", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_amounts", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_invoice_status", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_prepare_invoice", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, triggers: &[] }, - OdooMethod { name: "_get_invoiceable_lines", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Recordset, triggers: &[] }, - OdooMethod { name: "_create_invoices", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Recordset, triggers: &[] }, - OdooMethod { name: "_confirmation_error_message", kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Boolean, triggers: &[] }, - OdooMethod { name: "_unlink_except_draft_or_cancel", kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "action_quotation_sent", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, + triggers: &["sent"], + }, + OdooMethod { + name: "action_confirm", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Boolean, + triggers: &["sale"], + }, + OdooMethod { + name: "action_draft", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, + triggers: &["draft"], + }, + OdooMethod { + name: "action_cancel", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, + triggers: &["cancel"], + }, + OdooMethod { + name: "action_lock", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_action_cancel", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_amounts", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_invoice_status", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_prepare_invoice", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, + OdooMethod { + name: "_get_invoiceable_lines", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Recordset, + triggers: &[], + }, + OdooMethod { + name: "_create_invoices", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Recordset, + triggers: &[], + }, + OdooMethod { + name: "_confirmation_error_message", + kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Boolean, + triggers: &[], + }, + OdooMethod { + name: "_unlink_except_draft_or_cancel", + kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, ], decorators: &[ - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["order_line.price_subtotal", "currency_id", "company_id", "payment_term_id"] }, - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["state", "order_line.invoice_status"] }, - OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, targets: &["state"] }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &[ + "order_line.price_subtotal", + "currency_id", + "company_id", + "payment_term_id", + ], + }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["state", "order_line.invoice_status"], + }, + OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["state"], + }, ], state_machine: Some(&SALE_ORDER_SM), constraints: &[ @@ -220,119 +468,314 @@ pub const SALE_ORDER_LINE: OdooEntity = OdooEntity { partial invoicing state (qty_invoiced/qty_to_invoice/invoice_status). \ Proposed OWL pivot: ubl:OrderLine → SmbFoundryInvoice (0x81) → DOLCE Perdurant.", fields: &[ - OdooField { name: "order_id", kind: OdooFieldKind::Many2one, target: Some("sale.order"), - required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "product_id", kind: OdooFieldKind::Many2one, target: Some("product.product"), - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "name", kind: OdooFieldKind::Char, target: None, - required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, - OdooField { name: "product_uom_qty", kind: OdooFieldKind::Float, target: None, - required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "product_uom_id", kind: OdooFieldKind::Many2one, target: Some("uom.uom"), - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "price_unit", kind: OdooFieldKind::Float, target: None, - required: true, computed: Some("_compute_price_unit"), + OdooField { + name: "order_id", + kind: OdooFieldKind::Many2one, + target: Some("sale.order"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "product_id", + kind: OdooFieldKind::Many2one, + target: Some("product.product"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "name", + kind: OdooFieldKind::Char, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Identity, + }, + OdooField { + name: "product_uom_qty", + kind: OdooFieldKind::Float, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "product_uom_id", + kind: OdooFieldKind::Many2one, + target: Some("uom.uom"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "price_unit", + kind: OdooFieldKind::Float, + target: None, + required: true, + computed: Some("_compute_price_unit"), depends: &["product_id", "product_uom_id", "product_uom_qty"], // Frozen once qty_invoiced>0. Manual edit detected via technical_price_unit. - semantic_role: OdooSemanticRole::Money }, - OdooField { name: "technical_price_unit", kind: OdooFieldKind::Float, target: None, - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Other, + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "technical_price_unit", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, // Shadow field: system-computed price; diff from price_unit → manual edit. }, - OdooField { name: "discount", kind: OdooFieldKind::Float, target: None, - required: false, computed: Some("_compute_discount"), + OdooField { + name: "discount", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: Some("_compute_discount"), depends: &["product_id", "product_uom_id", "product_uom_qty"], // (base_price - pricelist_price) / base_price * 100; shows only if > 0. - semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "tax_ids", kind: OdooFieldKind::Many2many, target: Some("account.tax"), - required: false, computed: Some("_compute_tax_ids"), + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "tax_ids", + kind: OdooFieldKind::Many2many, + target: Some("account.tax"), + required: false, + computed: Some("_compute_tax_ids"), depends: &["product_id", "company_id"], // Mapped through fiscal_position; combo products → tax_ids=False. - semantic_role: OdooSemanticRole::Tax }, - OdooField { name: "price_subtotal", kind: OdooFieldKind::Monetary, target: None, - required: false, computed: Some("_compute_amount"), + semantic_role: OdooSemanticRole::Tax, + }, + OdooField { + name: "price_subtotal", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_compute_amount"), depends: &["product_uom_qty", "discount", "price_unit", "tax_ids"], - semantic_role: OdooSemanticRole::Money }, - OdooField { name: "price_total", kind: OdooFieldKind::Monetary, target: None, - required: false, computed: Some("_compute_amount"), + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "price_total", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_compute_amount"), depends: &["product_uom_qty", "discount", "price_unit", "tax_ids"], - semantic_role: OdooSemanticRole::Money }, - OdooField { name: "price_tax", kind: OdooFieldKind::Float, target: None, - required: false, computed: Some("_compute_amount"), + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "price_tax", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: Some("_compute_amount"), depends: &["product_uom_qty", "discount", "price_unit", "tax_ids"], - semantic_role: OdooSemanticRole::Tax }, - OdooField { name: "qty_delivered", kind: OdooFieldKind::Float, target: None, - required: false, computed: Some("_compute_qty_delivered"), depends: &[], - semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "qty_invoiced", kind: OdooFieldKind::Float, target: None, - required: false, computed: Some("_compute_qty_invoiced"), + semantic_role: OdooSemanticRole::Tax, + }, + OdooField { + name: "qty_delivered", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: Some("_compute_qty_delivered"), + depends: &[], + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "qty_invoiced", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: Some("_compute_qty_invoiced"), depends: &["invoice_lines.move_id.state", "invoice_lines.quantity"], // out_refund DECREASES this; cancelled invoices excluded; round=False. - semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "qty_to_invoice", kind: OdooFieldKind::Float, target: None, - required: false, computed: Some("_compute_qty_to_invoice"), + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "qty_to_invoice", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: Some("_compute_qty_to_invoice"), depends: &["qty_invoiced", "qty_delivered", "product_uom_qty", "state"], // invoice_policy='order': product_uom_qty - qty_invoiced. // invoice_policy='delivery': qty_delivered - qty_invoiced. 0 when state!='sale'. - semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "invoice_status", kind: OdooFieldKind::Selection, target: None, - required: false, computed: Some("_compute_invoice_status"), - depends: &["state", "product_uom_qty", "qty_delivered", "qty_to_invoice", "qty_invoiced"], + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "invoice_status", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: Some("_compute_invoice_status"), + depends: &[ + "state", + "product_uom_qty", + "qty_delivered", + "qty_to_invoice", + "qty_invoiced", + ], // Decision tree: no → invoiced → to invoice → upselling → invoiced → no. - semantic_role: OdooSemanticRole::Status }, - OdooField { name: "invoice_lines", kind: OdooFieldKind::Many2many, - target: Some("account.move.line"), required: false, computed: None, depends: &[], - semantic_role: OdooSemanticRole::Document }, - OdooField { name: "is_downpayment", kind: OdooFieldKind::Boolean, target: None, - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, - OdooField { name: "display_type", kind: OdooFieldKind::Selection, target: None, - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Other }, - OdooField { name: "untaxed_amount_to_invoice", kind: OdooFieldKind::Monetary, target: None, - required: false, computed: Some("_compute_untaxed_amount_to_invoice"), - depends: &["state", "product_id", "untaxed_amount_invoiced", - "qty_delivered", "product_uom_qty", "price_unit"], + semantic_role: OdooSemanticRole::Status, + }, + OdooField { + name: "invoice_lines", + kind: OdooFieldKind::Many2many, + target: Some("account.move.line"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Document, + }, + OdooField { + name: "is_downpayment", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, + OdooField { + name: "display_type", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + OdooField { + name: "untaxed_amount_to_invoice", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_compute_untaxed_amount_to_invoice"), + depends: &[ + "state", + "product_id", + "untaxed_amount_invoiced", + "qty_delivered", + "product_uom_qty", + "price_unit", + ], // Floored at max(..., 0). Handles discount drift in re-invoicing. - semantic_role: OdooSemanticRole::Money }, + semantic_role: OdooSemanticRole::Money, + }, ], methods: &[ - OdooMethod { name: "_compute_tax_ids", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_price_unit", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_reset_price_unit", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_discount", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_amount", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_qty_invoiced", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_qty_to_invoice", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_invoice_status", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_untaxed_amount_to_invoice", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_prepare_invoice_line", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, triggers: &[] }, - OdooMethod { name: "_prepare_base_line_for_taxes_computation", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, triggers: &[] }, - OdooMethod { name: "_validate_analytic_distribution", kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "_compute_tax_ids", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_price_unit", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_reset_price_unit", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_discount", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_amount", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_qty_invoiced", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_qty_to_invoice", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_invoice_status", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_untaxed_amount_to_invoice", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_prepare_invoice_line", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, + OdooMethod { + name: "_prepare_base_line_for_taxes_computation", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, + OdooMethod { + name: "_validate_analytic_distribution", + kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, ], decorators: &[ - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id", "company_id"] }, - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id", "product_uom_id", "product_uom_qty"] }, - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["product_uom_qty", "discount", "price_unit", "tax_ids"] }, - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["invoice_lines.move_id.state", "invoice_lines.quantity"] }, - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["qty_invoiced", "qty_delivered", "product_uom_qty", "state"] }, - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["state", "product_uom_qty", "qty_delivered", "qty_to_invoice", "qty_invoiced"] }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["product_id", "company_id"], + }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["product_id", "product_uom_id", "product_uom_qty"], + }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["product_uom_qty", "discount", "price_unit", "tax_ids"], + }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["invoice_lines.move_id.state", "invoice_lines.quantity"], + }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["qty_invoiced", "qty_delivered", "product_uom_qty", "state"], + }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &[ + "state", + "product_uom_qty", + "qty_delivered", + "qty_to_invoice", + "qty_invoiced", + ], + }, ], state_machine: None, constraints: &[OdooConstraint { @@ -357,52 +800,92 @@ pub const SALE_ORDER_LINE: OdooEntity = OdooEntity { const PURCHASE_ORDER_SM: OdooStateMachine = OdooStateMachine { state_field: "state", states: &[ - OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, - OdooState { name: "sent", semantic: OdooStateSemantic::Active }, - OdooState { name: "to approve", semantic: OdooStateSemantic::Active }, - OdooState { name: "purchase", semantic: OdooStateSemantic::InProgress }, - OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, + OdooState { + name: "draft", + semantic: OdooStateSemantic::Draft, + }, + OdooState { + name: "sent", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "to approve", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "purchase", + semantic: OdooStateSemantic::InProgress, + }, + OdooState { + name: "cancel", + semantic: OdooStateSemantic::Cancelled, + }, ], transitions: &[ OdooTransition { - from: "draft", to: "to approve", trigger: "button_confirm", + from: "draft", + to: "to approve", + trigger: "button_confirm", guards: &["_confirmation_error_message", "_approval_allowed"], // Two-step path: po_double_validation='two_step' AND amount>=threshold // AND user NOT in purchase.group_purchase_manager. }, OdooTransition { - from: "sent", to: "to approve", trigger: "button_confirm", + from: "sent", + to: "to approve", + trigger: "button_confirm", guards: &["_confirmation_error_message", "_approval_allowed"], }, OdooTransition { - from: "draft", to: "purchase", trigger: "button_confirm", + from: "draft", + to: "purchase", + trigger: "button_confirm", guards: &["_confirmation_error_message", "_approval_allowed"], // One-step path. Side effect: _add_supplier_to_product() (max 10 vendors). }, OdooTransition { - from: "sent", to: "purchase", trigger: "button_confirm", + from: "sent", + to: "purchase", + trigger: "button_confirm", guards: &["_confirmation_error_message", "_approval_allowed"], }, OdooTransition { - from: "to approve", to: "purchase", trigger: "button_approve", + from: "to approve", + to: "purchase", + trigger: "button_approve", guards: &[], // Writes state='purchase' + date_approve=now(); optional lock. }, OdooTransition { - from: "draft", to: "cancel", trigger: "button_cancel", guards: &[], + from: "draft", + to: "cancel", + trigger: "button_cancel", + guards: &[], }, OdooTransition { - from: "sent", to: "cancel", trigger: "button_cancel", guards: &[], + from: "sent", + to: "cancel", + trigger: "button_cancel", + guards: &[], }, OdooTransition { - from: "to approve", to: "cancel", trigger: "button_cancel", guards: &[], + from: "to approve", + to: "cancel", + trigger: "button_cancel", + guards: &[], }, OdooTransition { - from: "purchase", to: "cancel", trigger: "button_cancel", guards: &[], + from: "purchase", + to: "cancel", + trigger: "button_cancel", + guards: &[], // Guard: raises UserError if locked or has non-draft/non-cancel invoices. }, OdooTransition { - from: "cancel", to: "draft", trigger: "button_draft", guards: &[], + from: "cancel", + to: "draft", + trigger: "button_draft", + guards: &[], }, ], }; @@ -415,92 +898,250 @@ pub const PURCHASE_ORDER: OdooEntity = OdooEntity { via action_create_invoice. \ Proposed OWL pivot: ubl:Order → SmbFoundryInvoice (0x81) → DOLCE Perdurant.", fields: &[ - OdooField { name: "name", kind: OdooFieldKind::Char, target: None, - required: false, computed: Some("_compute_name"), depends: &[], - semantic_role: OdooSemanticRole::Identity }, - OdooField { name: "state", kind: OdooFieldKind::Selection, target: None, - required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, - OdooField { name: "partner_id", kind: OdooFieldKind::Many2one, target: Some("res.partner"), - required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "currency_id", kind: OdooFieldKind::Many2one, target: Some("res.currency"), - required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "date_order", kind: OdooFieldKind::Datetime, target: None, - required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Date }, - OdooField { name: "date_approve", kind: OdooFieldKind::Datetime, target: None, - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Date, + OdooField { + name: "name", + kind: OdooFieldKind::Char, + target: None, + required: false, + computed: Some("_compute_name"), + depends: &[], + semantic_role: OdooSemanticRole::Identity, + }, + OdooField { + name: "state", + kind: OdooFieldKind::Selection, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Status, + }, + OdooField { + name: "partner_id", + kind: OdooFieldKind::Many2one, + target: Some("res.partner"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "currency_id", + kind: OdooFieldKind::Many2one, + target: Some("res.currency"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "date_order", + kind: OdooFieldKind::Datetime, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Date, + }, + OdooField { + name: "date_approve", + kind: OdooFieldKind::Datetime, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Date, // Set to now() by button_approve. }, - OdooField { name: "order_line", kind: OdooFieldKind::One2many, - target: Some("purchase.order.line"), required: false, computed: None, depends: &[], - semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "invoice_ids", kind: OdooFieldKind::Many2many, - target: Some("account.move"), required: false, computed: Some("_compute_invoice"), - depends: &[], semantic_role: OdooSemanticRole::Document }, - OdooField { name: "invoice_status", kind: OdooFieldKind::Selection, target: None, - required: false, computed: Some("_get_invoiced"), + OdooField { + name: "order_line", + kind: OdooFieldKind::One2many, + target: Some("purchase.order.line"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "invoice_ids", + kind: OdooFieldKind::Many2many, + target: Some("account.move"), + required: false, + computed: Some("_compute_invoice"), + depends: &[], + semantic_role: OdooSemanticRole::Document, + }, + OdooField { + name: "invoice_status", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: Some("_get_invoiced"), depends: &["state", "order_line.qty_to_invoice"], // Values: 'no' | 'to invoice' | 'invoiced'. NO 'upselling' (purchase only). // 'invoiced' requires invoice_ids non-empty (L46-68). - semantic_role: OdooSemanticRole::Status }, - OdooField { name: "amount_untaxed", kind: OdooFieldKind::Monetary, target: None, - required: false, computed: Some("_amount_all"), + semantic_role: OdooSemanticRole::Status, + }, + OdooField { + name: "amount_untaxed", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_amount_all"), depends: &["order_line.price_subtotal", "company_id", "currency_id"], - semantic_role: OdooSemanticRole::Money }, - OdooField { name: "amount_tax", kind: OdooFieldKind::Monetary, target: None, - required: false, computed: Some("_amount_all"), + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "amount_tax", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_amount_all"), depends: &["order_line.price_subtotal", "company_id", "currency_id"], - semantic_role: OdooSemanticRole::Tax }, - OdooField { name: "amount_total", kind: OdooFieldKind::Monetary, target: None, - required: false, computed: Some("_amount_all"), + semantic_role: OdooSemanticRole::Tax, + }, + OdooField { + name: "amount_total", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_amount_all"), depends: &["order_line.price_subtotal", "company_id", "currency_id"], - semantic_role: OdooSemanticRole::Money }, - OdooField { name: "amount_total_cc", kind: OdooFieldKind::Monetary, target: None, - required: false, computed: Some("_amount_all"), + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "amount_total_cc", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_amount_all"), depends: &["order_line.price_subtotal", "company_id", "currency_id"], // Company-currency total; purchase-only (not in sale variant). - semantic_role: OdooSemanticRole::Money }, - OdooField { name: "fiscal_position_id", kind: OdooFieldKind::Many2one, - target: Some("account.fiscal.position"), required: false, computed: None, depends: &[], - semantic_role: OdooSemanticRole::Tax }, - OdooField { name: "payment_term_id", kind: OdooFieldKind::Many2one, - target: Some("account.payment.term"), required: false, computed: None, depends: &[], - semantic_role: OdooSemanticRole::Policy }, - OdooField { name: "company_id", kind: OdooFieldKind::Many2one, target: Some("res.company"), - required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "locked", kind: OdooFieldKind::Boolean, target: None, - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, - OdooField { name: "note", kind: OdooFieldKind::Html, target: None, - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Document }, + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "fiscal_position_id", + kind: OdooFieldKind::Many2one, + target: Some("account.fiscal.position"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Tax, + }, + OdooField { + name: "payment_term_id", + kind: OdooFieldKind::Many2one, + target: Some("account.payment.term"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, + OdooField { + name: "company_id", + kind: OdooFieldKind::Many2one, + target: Some("res.company"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "locked", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, + OdooField { + name: "note", + kind: OdooFieldKind::Html, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Document, + }, ], methods: &[ - OdooMethod { name: "button_confirm", kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Boolean, triggers: &["purchase", "to approve"] }, - OdooMethod { name: "button_approve", kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, triggers: &["purchase"] }, - OdooMethod { name: "button_cancel", kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, triggers: &["cancel"] }, - OdooMethod { name: "button_draft", kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, triggers: &["draft"] }, - OdooMethod { name: "_amount_all", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_get_invoiced", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "action_create_invoice", kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Action, triggers: &[] }, - OdooMethod { name: "_prepare_invoice", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, triggers: &[] }, - OdooMethod { name: "_approval_allowed", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Boolean, triggers: &[] }, - OdooMethod { name: "_add_supplier_to_product", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_confirmation_error_message", kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Boolean, triggers: &[] }, + OdooMethod { + name: "button_confirm", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Boolean, + triggers: &["purchase", "to approve"], + }, + OdooMethod { + name: "button_approve", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, + triggers: &["purchase"], + }, + OdooMethod { + name: "button_cancel", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, + triggers: &["cancel"], + }, + OdooMethod { + name: "button_draft", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, + triggers: &["draft"], + }, + OdooMethod { + name: "_amount_all", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_get_invoiced", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "action_create_invoice", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Action, + triggers: &[], + }, + OdooMethod { + name: "_prepare_invoice", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, + OdooMethod { + name: "_approval_allowed", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Boolean, + triggers: &[], + }, + OdooMethod { + name: "_add_supplier_to_product", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_confirmation_error_message", + kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Boolean, + triggers: &[], + }, ], decorators: &[ - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["order_line.price_subtotal", "company_id", "currency_id"] }, - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["state", "order_line.qty_to_invoice"] }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["order_line.price_subtotal", "company_id", "currency_id"], + }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["state", "order_line.qty_to_invoice"], + }, ], state_machine: Some(&PURCHASE_ORDER_SM), constraints: &[ @@ -533,58 +1174,173 @@ pub const PURCHASE_ORDER_LINE: OdooEntity = OdooEntity { _get_invoiced computation (L46-68). \ Proposed OWL pivot: ubl:OrderLine → SmbFoundryInvoice (0x81) → DOLCE Perdurant.", fields: &[ - OdooField { name: "order_id", kind: OdooFieldKind::Many2one, target: Some("purchase.order"), - required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "product_id", kind: OdooFieldKind::Many2one, target: Some("product.product"), - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "name", kind: OdooFieldKind::Char, target: None, - required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, - OdooField { name: "product_qty", kind: OdooFieldKind::Float, target: None, - required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "product_uom", kind: OdooFieldKind::Many2one, target: Some("uom.uom"), - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "price_unit", kind: OdooFieldKind::Float, target: None, - required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Money }, - OdooField { name: "taxes_id", kind: OdooFieldKind::Many2many, target: Some("account.tax"), - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Tax }, - OdooField { name: "price_subtotal", kind: OdooFieldKind::Monetary, target: None, - required: false, computed: Some("_compute_amount"), + OdooField { + name: "order_id", + kind: OdooFieldKind::Many2one, + target: Some("purchase.order"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "product_id", + kind: OdooFieldKind::Many2one, + target: Some("product.product"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "name", + kind: OdooFieldKind::Char, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Identity, + }, + OdooField { + name: "product_qty", + kind: OdooFieldKind::Float, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "product_uom", + kind: OdooFieldKind::Many2one, + target: Some("uom.uom"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "price_unit", + kind: OdooFieldKind::Float, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "taxes_id", + kind: OdooFieldKind::Many2many, + target: Some("account.tax"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Tax, + }, + OdooField { + name: "price_subtotal", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_compute_amount"), depends: &["product_qty", "price_unit", "taxes_id"], - semantic_role: OdooSemanticRole::Money }, - OdooField { name: "qty_received", kind: OdooFieldKind::Float, target: None, - required: false, computed: Some("_compute_qty_received"), depends: &[], - semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "qty_invoiced", kind: OdooFieldKind::Float, target: None, - required: false, computed: Some("_compute_qty_invoiced"), + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "qty_received", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: Some("_compute_qty_received"), + depends: &[], + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "qty_invoiced", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: Some("_compute_qty_invoiced"), depends: &["invoice_lines.move_id.state", "invoice_lines.quantity"], - semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "qty_to_invoice", kind: OdooFieldKind::Float, target: None, - required: false, computed: Some("_compute_qty_to_invoice"), - depends: &["qty_invoiced", "qty_received", "product_qty", "order_id.state"], - semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "invoice_lines", kind: OdooFieldKind::Many2many, - target: Some("account.move.line"), required: false, computed: None, depends: &[], - semantic_role: OdooSemanticRole::Document }, - OdooField { name: "display_type", kind: OdooFieldKind::Selection, target: None, - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Other }, - OdooField { name: "date_planned", kind: OdooFieldKind::Datetime, target: None, - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Date }, + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "qty_to_invoice", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: Some("_compute_qty_to_invoice"), + depends: &[ + "qty_invoiced", + "qty_received", + "product_qty", + "order_id.state", + ], + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "invoice_lines", + kind: OdooFieldKind::Many2many, + target: Some("account.move.line"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Document, + }, + OdooField { + name: "display_type", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + OdooField { + name: "date_planned", + kind: OdooFieldKind::Datetime, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Date, + }, ], methods: &[ - OdooMethod { name: "_compute_amount", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_qty_invoiced", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_qty_to_invoice", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_qty_received", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "_compute_amount", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_qty_invoiced", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_qty_to_invoice", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_qty_received", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, ], decorators: &[ - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["product_qty", "price_unit", "taxes_id"] }, - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["invoice_lines.move_id.state", "invoice_lines.quantity"] }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["product_qty", "price_unit", "taxes_id"], + }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["invoice_lines.move_id.state", "invoice_lines.quantity"], + }, ], state_machine: None, constraints: &[], @@ -633,41 +1389,64 @@ mod tests { #[test] fn all_entities_cite_l6_doc() { for entity in ENTITIES { - assert_eq!(entity.provenance.l_doc, "L6-SALE-PURCHASE.md", - "entity {} must cite L6 doc", entity.model_name); + assert_eq!( + entity.provenance.l_doc, "L6-SALE-PURCHASE.md", + "entity {} must cite L6 doc", + entity.model_name + ); } } #[test] fn all_entities_are_curated() { for entity in ENTITIES { - assert_eq!(entity.provenance.confidence, OdooConfidence::Curated, - "entity {} must be Curated", entity.model_name); + assert_eq!( + entity.provenance.confidence, + OdooConfidence::Curated, + "entity {} must be Curated", + entity.model_name + ); } } #[test] fn sale_order_state_machine_no_done_state() { - let sm = SALE_ORDER.state_machine.expect("sale.order must have a state machine"); + let sm = SALE_ORDER + .state_machine + .expect("sale.order must have a state machine"); assert_eq!(sm.state_field, "state"); // Community Odoo 17: no 'done' state — locked boolean replaces it. - assert!(sm.states.iter().all(|s| s.name != "done"), - "sale.order must NOT have a 'done' state in Odoo 17 community"); + assert!( + sm.states.iter().all(|s| s.name != "done"), + "sale.order must NOT have a 'done' state in Odoo 17 community" + ); let names: Vec<&str> = sm.states.iter().map(|s| s.name).collect(); - assert!(names.contains(&"draft") && names.contains(&"sent") - && names.contains(&"sale") && names.contains(&"cancel")); + assert!( + names.contains(&"draft") + && names.contains(&"sent") + && names.contains(&"sale") + && names.contains(&"cancel") + ); } #[test] fn sale_order_action_confirm_transitions_to_sale() { - let sm = SALE_ORDER.state_machine.expect("sale.order must have a state machine"); - assert!(sm.transitions.iter().any(|t| t.trigger == "action_confirm" && t.to == "sale"), - "action_confirm must have a transition to 'sale'"); + let sm = SALE_ORDER + .state_machine + .expect("sale.order must have a state machine"); + assert!( + sm.transitions + .iter() + .any(|t| t.trigger == "action_confirm" && t.to == "sale"), + "action_confirm must have a transition to 'sale'" + ); } #[test] fn purchase_order_has_to_approve_state() { - let sm = PURCHASE_ORDER.state_machine.expect("purchase.order must have a state machine"); + let sm = PURCHASE_ORDER + .state_machine + .expect("purchase.order must have a state machine"); let to_approve = sm.states.iter().find(|s| s.name == "to approve"); assert!(to_approve.is_some(), "'to approve' state must be present"); assert_eq!(to_approve.unwrap().semantic, OdooStateSemantic::Active); @@ -675,23 +1454,36 @@ mod tests { #[test] fn purchase_order_invoice_status_computed_by_get_invoiced() { - let f = PURCHASE_ORDER.fields.iter().find(|f| f.name == "invoice_status") + let f = PURCHASE_ORDER + .fields + .iter() + .find(|f| f.name == "invoice_status") .expect("invoice_status must be present on purchase.order"); assert_eq!(f.computed, Some("_get_invoiced")); } #[test] fn sale_order_line_qty_to_invoice_depends_on_state() { - let f = SALE_ORDER_LINE.fields.iter().find(|f| f.name == "qty_to_invoice") + let f = SALE_ORDER_LINE + .fields + .iter() + .find(|f| f.name == "qty_to_invoice") .expect("qty_to_invoice must be present"); - assert!(f.depends.contains(&"state"), "qty_to_invoice must depend on state"); + assert!( + f.depends.contains(&"state"), + "qty_to_invoice must depend on state" + ); assert_eq!(f.computed, Some("_compute_qty_to_invoice")); } #[test] fn sale_order_has_sql_constraint_on_date_order() { - assert!(SALE_ORDER.constraints.iter() - .any(|c| c.kind == OdooConstraintKind::Sql), - "sale.order must have at least one SQL constraint (date_order check)"); + assert!( + SALE_ORDER + .constraints + .iter() + .any(|c| c.kind == OdooConstraintKind::Sql), + "sale.order must have at least one SQL constraint (date_order check)" + ); } } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l7.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l7.rs index 8518bc4b..eb55a5bf 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l7.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l7.rs @@ -18,8 +18,8 @@ use super::{ OdooConfidence, OdooConstraint, OdooConstraintKind, OdooDecorator, OdooDecoratorKind, OdooEntity, OdooEntityKind, OdooField, OdooFieldKind, OdooMethod, OdooMethodKind, - OdooProvenance, OdooReturnKind, OdooSemanticRole, OdooSourceRef, OdooState, - OdooStateMachine, OdooStateSemantic, OdooTransition, + OdooProvenance, OdooReturnKind, OdooSemanticRole, OdooSourceRef, OdooState, OdooStateMachine, + OdooStateSemantic, OdooTransition, }; // ─── stock.move state machine ───────────────────────────────────────────────── @@ -27,27 +27,108 @@ use super::{ const STOCK_MOVE_STATE_MACHINE: OdooStateMachine = OdooStateMachine { state_field: "state", states: &[ - OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, - OdooState { name: "waiting", semantic: OdooStateSemantic::InProgress }, - OdooState { name: "confirmed", semantic: OdooStateSemantic::InProgress }, - OdooState { name: "partially_available", semantic: OdooStateSemantic::InProgress }, - OdooState { name: "assigned", semantic: OdooStateSemantic::Active }, - OdooState { name: "done", semantic: OdooStateSemantic::Completed }, - OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, + OdooState { + name: "draft", + semantic: OdooStateSemantic::Draft, + }, + OdooState { + name: "waiting", + semantic: OdooStateSemantic::InProgress, + }, + OdooState { + name: "confirmed", + semantic: OdooStateSemantic::InProgress, + }, + OdooState { + name: "partially_available", + semantic: OdooStateSemantic::InProgress, + }, + OdooState { + name: "assigned", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "done", + semantic: OdooStateSemantic::Completed, + }, + OdooState { + name: "cancel", + semantic: OdooStateSemantic::Cancelled, + }, ], transitions: &[ - OdooTransition { from: "draft", to: "waiting", trigger: "_action_confirm", guards: &[] }, - OdooTransition { from: "draft", to: "confirmed", trigger: "_action_confirm", guards: &[] }, - OdooTransition { from: "confirmed", to: "partially_available", trigger: "_action_assign", guards: &[] }, - OdooTransition { from: "confirmed", to: "assigned", trigger: "_action_assign", guards: &[] }, - OdooTransition { from: "waiting", to: "assigned", trigger: "_action_assign", guards: &[] }, - OdooTransition { from: "partially_available", to: "assigned", trigger: "_action_assign", guards: &[] }, - OdooTransition { from: "assigned", to: "done", trigger: "_action_done", guards: &[] }, - OdooTransition { from: "partially_available", to: "done", trigger: "_action_done", guards: &[] }, - OdooTransition { from: "confirmed", to: "cancel", trigger: "_action_cancel", guards: &[] }, - OdooTransition { from: "waiting", to: "cancel", trigger: "_action_cancel", guards: &[] }, - OdooTransition { from: "assigned", to: "cancel", trigger: "_action_cancel", guards: &[] }, - OdooTransition { from: "partially_available", to: "cancel", trigger: "_action_cancel", guards: &[] }, + OdooTransition { + from: "draft", + to: "waiting", + trigger: "_action_confirm", + guards: &[], + }, + OdooTransition { + from: "draft", + to: "confirmed", + trigger: "_action_confirm", + guards: &[], + }, + OdooTransition { + from: "confirmed", + to: "partially_available", + trigger: "_action_assign", + guards: &[], + }, + OdooTransition { + from: "confirmed", + to: "assigned", + trigger: "_action_assign", + guards: &[], + }, + OdooTransition { + from: "waiting", + to: "assigned", + trigger: "_action_assign", + guards: &[], + }, + OdooTransition { + from: "partially_available", + to: "assigned", + trigger: "_action_assign", + guards: &[], + }, + OdooTransition { + from: "assigned", + to: "done", + trigger: "_action_done", + guards: &[], + }, + OdooTransition { + from: "partially_available", + to: "done", + trigger: "_action_done", + guards: &[], + }, + OdooTransition { + from: "confirmed", + to: "cancel", + trigger: "_action_cancel", + guards: &[], + }, + OdooTransition { + from: "waiting", + to: "cancel", + trigger: "_action_cancel", + guards: &[], + }, + OdooTransition { + from: "assigned", + to: "cancel", + trigger: "_action_cancel", + guards: &[], + }, + OdooTransition { + from: "partially_available", + to: "cancel", + trigger: "_action_cancel", + guards: &[], + }, ], }; @@ -62,66 +143,338 @@ pub const STOCK_MOVE: OdooEntity = OdooEntity { (K10, DOLCE Perdurant, FLAG-1). _recompute_state re-derives state \ live from quantity vs product_uom_qty — NOT a simple FSM.", fields: &[ - OdooField { name: "name", kind: OdooFieldKind::Char, target: None, required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, - OdooField { name: "state", kind: OdooFieldKind::Selection, target: None, required: false, computed: Some("_recompute_state"), depends: &["quantity", "product_uom_qty", "move_orig_ids.state"], semantic_role: OdooSemanticRole::Status }, - OdooField { name: "product_id", kind: OdooFieldKind::Many2one, target: Some("product.product"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "name", + kind: OdooFieldKind::Char, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Identity, + }, + OdooField { + name: "state", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: Some("_recompute_state"), + depends: &["quantity", "product_uom_qty", "move_orig_ids.state"], + semantic_role: OdooSemanticRole::Status, + }, + OdooField { + name: "product_id", + kind: OdooFieldKind::Many2one, + target: Some("product.product"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, // Demand qty in move UoM. Always write product_uom_qty, not product_qty. - OdooField { name: "product_uom_qty", kind: OdooFieldKind::Float, target: None, required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, + OdooField { + name: "product_uom_qty", + kind: OdooFieldKind::Float, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Quantity, + }, // READ-ONLY computed — writes raise UserError. product_uom._compute_quantity(HALF-UP). - OdooField { name: "product_qty", kind: OdooFieldKind::Float, target: None, required: false, computed: Some("_compute_product_qty"), depends: &["product_uom_qty", "product_uom", "product_id.uom_id"], semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "quantity", kind: OdooFieldKind::Float, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "product_uom", kind: OdooFieldKind::Many2one, target: Some("uom.uom"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "location_id", kind: OdooFieldKind::Many2one, target: Some("stock.location"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "location_dest_id", kind: OdooFieldKind::Many2one, target: Some("stock.location"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "picking_id", kind: OdooFieldKind::Many2one, target: Some("stock.picking"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "move_line_ids", kind: OdooFieldKind::One2many, target: Some("stock.move.line"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "move_orig_ids", kind: OdooFieldKind::Many2many, target: Some("stock.move"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "move_dest_ids", kind: OdooFieldKind::Many2many, target: Some("stock.move"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "product_qty", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: Some("_compute_product_qty"), + depends: &["product_uom_qty", "product_uom", "product_id.uom_id"], + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "quantity", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "product_uom", + kind: OdooFieldKind::Many2one, + target: Some("uom.uom"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "location_id", + kind: OdooFieldKind::Many2one, + target: Some("stock.location"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "location_dest_id", + kind: OdooFieldKind::Many2one, + target: Some("stock.location"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "picking_id", + kind: OdooFieldKind::Many2one, + target: Some("stock.picking"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "move_line_ids", + kind: OdooFieldKind::One2many, + target: Some("stock.move.line"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "move_orig_ids", + kind: OdooFieldKind::Many2many, + target: Some("stock.move"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "move_dest_ids", + kind: OdooFieldKind::Many2many, + target: Some("stock.move"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, // 'make_to_stock'|'make_to_order'|'mts_else_mto'. Branch selector in _action_confirm/_action_assign. - OdooField { name: "procure_method", kind: OdooFieldKind::Selection, target: None, required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { + name: "procure_method", + kind: OdooFieldKind::Selection, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, // 'at_confirm'|'manual'|'by_date'. Gate for _should_assign_at_confirm. - OdooField { name: "reservation_method", kind: OdooFieldKind::Selection, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, - OdooField { name: "reservation_date", kind: OdooFieldKind::Date, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Date }, + OdooField { + name: "reservation_method", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, + OdooField { + name: "reservation_date", + kind: OdooFieldKind::Date, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Date, + }, // '0' normal | '1' urgent. action_assign sorts by -int(priority) first. - OdooField { name: "priority", kind: OdooFieldKind::Selection, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, - OdooField { name: "date_deadline", kind: OdooFieldKind::Datetime, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Date }, + OdooField { + name: "priority", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, + OdooField { + name: "date_deadline", + kind: OdooFieldKind::Datetime, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Date, + }, // True: cancel propagates to move_dest_ids when ALL siblings cancelled. - OdooField { name: "propagate_cancel", kind: OdooFieldKind::Boolean, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, - OdooField { name: "picked", kind: OdooFieldKind::Boolean, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, - OdooField { name: "price_unit", kind: OdooFieldKind::Float, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Money }, + OdooField { + name: "propagate_cancel", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, + OdooField { + name: "picked", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Status, + }, + OdooField { + name: "price_unit", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Money, + }, // min(product_qty, quant.available_qty) or product_qty when state=done. - OdooField { name: "availability", kind: OdooFieldKind::Float, target: None, required: false, computed: Some("_compute_product_availability"), depends: &["state", "product_id", "product_uom_qty", "location_id"], semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "rule_id", kind: OdooFieldKind::Many2one, target: Some("stock.rule"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "availability", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: Some("_compute_product_availability"), + depends: &["state", "product_id", "product_uom_qty", "location_id"], + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "rule_id", + kind: OdooFieldKind::Many2one, + target: Some("stock.rule"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, ], methods: &[ - OdooMethod { name: "_action_confirm", kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Self_, triggers: &["waiting", "confirmed"] }, - OdooMethod { name: "_action_assign", kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Unit, triggers: &["partially_available", "assigned"] }, - OdooMethod { name: "_action_done", kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Recordset, triggers: &["done"] }, - OdooMethod { name: "_action_cancel", kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Self_, triggers: &["cancel"] }, - OdooMethod { name: "_recompute_state", kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_product_qty", kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_product_availability", kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_create_backorder", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Self_, triggers: &[] }, - OdooMethod { name: "_split", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Record, triggers: &[] }, - OdooMethod { name: "_get_available_quantity", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Number, triggers: &[] }, - OdooMethod { name: "_update_reserved_quantity", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_should_bypass_reservation", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Boolean, triggers: &[] }, - OdooMethod { name: "_trigger_assign", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_push_apply", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "_action_confirm", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Self_, + triggers: &["waiting", "confirmed"], + }, + OdooMethod { + name: "_action_assign", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, + triggers: &["partially_available", "assigned"], + }, + OdooMethod { + name: "_action_done", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Recordset, + triggers: &["done"], + }, + OdooMethod { + name: "_action_cancel", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Self_, + triggers: &["cancel"], + }, + OdooMethod { + name: "_recompute_state", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_product_qty", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_product_availability", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_create_backorder", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Self_, + triggers: &[], + }, + OdooMethod { + name: "_split", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Record, + triggers: &[], + }, + OdooMethod { + name: "_get_available_quantity", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Number, + triggers: &[], + }, + OdooMethod { + name: "_update_reserved_quantity", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_should_bypass_reservation", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Boolean, + triggers: &[], + }, + OdooMethod { + name: "_trigger_assign", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_push_apply", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, ], decorators: &[ - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["product_uom_qty", "product_uom", "product_id.uom_id"] }, - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["quantity", "product_uom_qty", "move_orig_ids.state"] }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["product_uom_qty", "product_uom", "product_id.uom_id"], + }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["quantity", "product_uom_qty", "move_orig_ids.state"], + }, ], state_machine: Some(&STOCK_MOVE_STATE_MACHINE), constraints: &[ - OdooConstraint { kind: OdooConstraintKind::Python, condition: "product_qty is read-only; writing raises UserError — always write product_uom_qty", source_method: None }, - OdooConstraint { kind: OdooConstraintKind::Python, condition: "cancel blocked when state=done and location_dest_usage != 'inventory'", source_method: Some("_action_cancel") }, + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: + "product_qty is read-only; writing raises UserError — always write product_uom_qty", + source_method: None, + }, + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "cancel blocked when state=done and location_dest_usage != 'inventory'", + source_method: Some("_action_cancel"), + }, ], provenance: OdooProvenance { l_doc: "L7-STOCK.md", l_doc_lines: (31, 108), - odoo_source: &[OdooSourceRef { path: "addons/stock/models/stock_move.py", line_range: (107, 2503) }], + odoo_source: &[OdooSourceRef { + path: "addons/stock/models/stock_move.py", + line_range: (107, 2503), + }], confidence: OdooConfidence::Curated, regulation_iri: &[], }, @@ -136,21 +489,119 @@ pub const STOCK_MOVE_LINE: OdooEntity = OdooEntity { _action_done drives quant mutation via stock.quant._update_available_quantity; \ serial products get one move line per unit (K10, DOLCE Perdurant).", fields: &[ - OdooField { name: "move_id", kind: OdooFieldKind::Many2one, target: Some("stock.move"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "picking_id", kind: OdooFieldKind::Many2one, target: Some("stock.picking"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "product_id", kind: OdooFieldKind::Many2one, target: Some("product.product"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "location_id", kind: OdooFieldKind::Many2one, target: Some("stock.location"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "location_dest_id", kind: OdooFieldKind::Many2one, target: Some("stock.location"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "lot_id", kind: OdooFieldKind::Many2one, target: Some("stock.lot"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "package_id", kind: OdooFieldKind::Many2one, target: Some("stock.quant.package"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "owner_id", kind: OdooFieldKind::Many2one, target: Some("res.partner"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "quantity", kind: OdooFieldKind::Float, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "reserved_qty", kind: OdooFieldKind::Float, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "picked", kind: OdooFieldKind::Boolean, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, + OdooField { + name: "move_id", + kind: OdooFieldKind::Many2one, + target: Some("stock.move"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "picking_id", + kind: OdooFieldKind::Many2one, + target: Some("stock.picking"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "product_id", + kind: OdooFieldKind::Many2one, + target: Some("product.product"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "location_id", + kind: OdooFieldKind::Many2one, + target: Some("stock.location"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "location_dest_id", + kind: OdooFieldKind::Many2one, + target: Some("stock.location"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "lot_id", + kind: OdooFieldKind::Many2one, + target: Some("stock.lot"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "package_id", + kind: OdooFieldKind::Many2one, + target: Some("stock.quant.package"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "owner_id", + kind: OdooFieldKind::Many2one, + target: Some("res.partner"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "quantity", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "reserved_qty", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "picked", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Status, + }, ], methods: &[ - OdooMethod { name: "_action_done", kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_apply_putaway_strategy", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "_action_done", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_apply_putaway_strategy", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, ], decorators: &[], state_machine: None, @@ -162,7 +613,10 @@ pub const STOCK_MOVE_LINE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "L7-STOCK.md", l_doc_lines: (77, 108), - odoo_source: &[OdooSourceRef { path: "addons/stock/models/stock_move.py", line_range: (1763, 1820) }], + odoo_source: &[OdooSourceRef { + path: "addons/stock/models/stock_move.py", + line_range: (1763, 1820), + }], confidence: OdooConfidence::Curated, regulation_iri: &[], }, @@ -180,12 +634,60 @@ pub const STOCK_QUANT: OdooEntity = OdooEntity { in_date = min(incoming_dates) — FIFO invariant at quant level \ (K10, DOLCE Endurant, FLAG-3).", fields: &[ - OdooField { name: "product_id", kind: OdooFieldKind::Many2one, target: Some("product.product"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "location_id", kind: OdooFieldKind::Many2one, target: Some("stock.location"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "lot_id", kind: OdooFieldKind::Many2one, target: Some("stock.lot"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "package_id", kind: OdooFieldKind::Many2one, target: Some("stock.quant.package"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "owner_id", kind: OdooFieldKind::Many2one, target: Some("res.partner"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "quantity", kind: OdooFieldKind::Float, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, + OdooField { + name: "product_id", + kind: OdooFieldKind::Many2one, + target: Some("product.product"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "location_id", + kind: OdooFieldKind::Many2one, + target: Some("stock.location"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "lot_id", + kind: OdooFieldKind::Many2one, + target: Some("stock.lot"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "package_id", + kind: OdooFieldKind::Many2one, + target: Some("stock.quant.package"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "owner_id", + kind: OdooFieldKind::Many2one, + target: Some("res.partner"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "quantity", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Quantity, + }, OdooField { name: "reserved_quantity", kind: OdooFieldKind::Float, @@ -216,32 +718,118 @@ pub const STOCK_QUANT: OdooEntity = OdooEntity { // FEFO: domain filter removal_date >= threshold OR NULL in _get_gather_domain. semantic_role: OdooSemanticRole::Date, }, - OdooField { name: "inventory_quantity", kind: OdooFieldKind::Float, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "inventory_quantity_set", kind: OdooFieldKind::Boolean, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, + OdooField { + name: "inventory_quantity", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "inventory_quantity_set", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Status, + }, ], methods: &[ - OdooMethod { name: "_get_available_quantity", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Number, triggers: &[] }, - OdooMethod { name: "_gather", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Recordset, triggers: &[] }, - OdooMethod { name: "_get_removal_strategy", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, - OdooMethod { name: "_get_gather_domain", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, - OdooMethod { name: "_get_reserve_quantity", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, - OdooMethod { name: "_update_available_quantity", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, - OdooMethod { name: "_apply_inventory", kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_merge_quants", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_unlink_zero_quants", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_run_least_packages_removal_strategy_astar", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Recordset, triggers: &[] }, + OdooMethod { + name: "_get_available_quantity", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Number, + triggers: &[], + }, + OdooMethod { + name: "_gather", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Recordset, + triggers: &[], + }, + OdooMethod { + name: "_get_removal_strategy", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, + OdooMethod { + name: "_get_gather_domain", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, + OdooMethod { + name: "_get_reserve_quantity", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, + OdooMethod { + name: "_update_available_quantity", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, + OdooMethod { + name: "_apply_inventory", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_merge_quants", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_unlink_zero_quants", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_run_least_packages_removal_strategy_astar", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Recordset, + triggers: &[], + }, ], - decorators: &[OdooDecorator { kind: OdooDecoratorKind::ApiAutovacuum, targets: &[] }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiAutovacuum, + targets: &[], + }], state_machine: None, constraints: &[ - OdooConstraint { kind: OdooConstraintKind::Sql, condition: "UNIQUE(product_id, location_id, lot_id, package_id, owner_id)", source_method: None }, - OdooConstraint { kind: OdooConstraintKind::Python, condition: "reserved_quantity >= 0 (max(0, reserved + delta) in _update_available_quantity)", source_method: Some("_update_available_quantity") }, - OdooConstraint { kind: OdooConstraintKind::Python, condition: "serial tracking: fractional reserve qty clamped to 0 (_get_reserve_quantity)", source_method: Some("_get_reserve_quantity") }, + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "UNIQUE(product_id, location_id, lot_id, package_id, owner_id)", + source_method: None, + }, + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: + "reserved_quantity >= 0 (max(0, reserved + delta) in _update_available_quantity)", + source_method: Some("_update_available_quantity"), + }, + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: + "serial tracking: fractional reserve qty clamped to 0 (_get_reserve_quantity)", + source_method: Some("_get_reserve_quantity"), + }, ], provenance: OdooProvenance { l_doc: "L7-STOCK.md", l_doc_lines: (110, 415), - odoo_source: &[OdooSourceRef { path: "addons/stock/models/stock_quant.py", line_range: (617, 1138) }], + odoo_source: &[OdooSourceRef { + path: "addons/stock/models/stock_quant.py", + line_range: (617, 1138), + }], confidence: OdooConfidence::Curated, regulation_iri: &[], }, @@ -252,19 +840,57 @@ pub const STOCK_QUANT: OdooEntity = OdooEntity { const STOCK_PICKING_STATE_MACHINE: OdooStateMachine = OdooStateMachine { state_field: "state", states: &[ - OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, - OdooState { name: "waiting", semantic: OdooStateSemantic::InProgress }, - OdooState { name: "confirmed", semantic: OdooStateSemantic::InProgress }, + OdooState { + name: "draft", + semantic: OdooStateSemantic::Draft, + }, + OdooState { + name: "waiting", + semantic: OdooStateSemantic::InProgress, + }, + OdooState { + name: "confirmed", + semantic: OdooStateSemantic::InProgress, + }, // partially_available move → 'assigned' picking when move_type='direct' (_compute_state L858). - OdooState { name: "assigned", semantic: OdooStateSemantic::Active }, - OdooState { name: "done", semantic: OdooStateSemantic::Completed }, - OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, + OdooState { + name: "assigned", + semantic: OdooStateSemantic::Active, + }, + OdooState { + name: "done", + semantic: OdooStateSemantic::Completed, + }, + OdooState { + name: "cancel", + semantic: OdooStateSemantic::Cancelled, + }, ], transitions: &[ - OdooTransition { from: "draft", to: "confirmed", trigger: "action_confirm", guards: &[] }, - OdooTransition { from: "confirmed", to: "assigned", trigger: "action_assign", guards: &[] }, - OdooTransition { from: "assigned", to: "done", trigger: "button_validate", guards: &["_sanity_check"] }, - OdooTransition { from: "confirmed", to: "done", trigger: "button_validate", guards: &["_sanity_check"] }, + OdooTransition { + from: "draft", + to: "confirmed", + trigger: "action_confirm", + guards: &[], + }, + OdooTransition { + from: "confirmed", + to: "assigned", + trigger: "action_assign", + guards: &[], + }, + OdooTransition { + from: "assigned", + to: "done", + trigger: "button_validate", + guards: &["_sanity_check"], + }, + OdooTransition { + from: "confirmed", + to: "done", + trigger: "button_validate", + guards: &["_sanity_check"], + }, ], }; @@ -361,7 +987,15 @@ pub const STOCK_LOCATION: OdooEntity = OdooEntity { should_bypass_reservation() short-circuits quant ops for \ virtual/supplier/customer locations (K10, DOLCE Endurant).", fields: &[ - OdooField { name: "name", kind: OdooFieldKind::Char, target: None, required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, + OdooField { + name: "name", + kind: OdooFieldKind::Char, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Identity, + }, OdooField { name: "complete_name", kind: OdooFieldKind::Char, @@ -372,7 +1006,15 @@ pub const STOCK_LOCATION: OdooEntity = OdooEntity { depends: &["name", "location_id.complete_name"], semantic_role: OdooSemanticRole::Identity, }, - OdooField { name: "location_id", kind: OdooFieldKind::Many2one, target: Some("stock.location"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "location_id", + kind: OdooFieldKind::Many2one, + target: Some("stock.location"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, OdooField { name: "usage", kind: OdooFieldKind::Selection, @@ -393,14 +1035,43 @@ pub const STOCK_LOCATION: OdooEntity = OdooEntity { // RemovalStrategySelector dispatch. product.categ wins; walk hierarchy; default fifo. semantic_role: OdooSemanticRole::Policy, }, - OdooField { name: "active", kind: OdooFieldKind::Boolean, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, - OdooField { name: "last_inventory_date", kind: OdooFieldKind::Date, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Audit }, + OdooField { + name: "active", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Status, + }, + OdooField { + name: "last_inventory_date", + kind: OdooFieldKind::Date, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Audit, + }, ], methods: &[ - OdooMethod { name: "should_bypass_reservation", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Boolean, triggers: &[] }, - OdooMethod { name: "_compute_complete_name", kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "should_bypass_reservation", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Boolean, + triggers: &[], + }, + OdooMethod { + name: "_compute_complete_name", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, ], - decorators: &[OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["name", "location_id.complete_name"] }], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["name", "location_id.complete_name"], + }], state_machine: None, constraints: &[OdooConstraint { kind: OdooConstraintKind::Domain, @@ -410,7 +1081,10 @@ pub const STOCK_LOCATION: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "L7-STOCK.md", l_doc_lines: (155, 207), - odoo_source: &[OdooSourceRef { path: "addons/stock/models/stock_quant.py", line_range: (617, 791) }], + odoo_source: &[OdooSourceRef { + path: "addons/stock/models/stock_quant.py", + line_range: (617, 791), + }], confidence: OdooConfidence::Curated, regulation_iri: &[], }, @@ -426,10 +1100,42 @@ pub const STOCK_WAREHOUSE: OdooEntity = OdooEntity { proposed gs1:Location (K10, DOLCE Endurant, FLAG-4). \ TODO: alignment row needed before OGIT hydration.", fields: &[ - OdooField { name: "name", kind: OdooFieldKind::Char, target: None, required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, - OdooField { name: "code", kind: OdooFieldKind::Char, target: None, required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, - OdooField { name: "partner_id", kind: OdooFieldKind::Many2one, target: Some("res.partner"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Address }, - OdooField { name: "lot_stock_id", kind: OdooFieldKind::Many2one, target: Some("stock.location"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "name", + kind: OdooFieldKind::Char, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Identity, + }, + OdooField { + name: "code", + kind: OdooFieldKind::Char, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Identity, + }, + OdooField { + name: "partner_id", + kind: OdooFieldKind::Many2one, + target: Some("res.partner"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Address, + }, + OdooField { + name: "lot_stock_id", + kind: OdooFieldKind::Many2one, + target: Some("stock.location"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, OdooField { name: "reception_steps", kind: OdooFieldKind::Selection, @@ -450,12 +1156,38 @@ pub const STOCK_WAREHOUSE: OdooEntity = OdooEntity { // 'ship_only'|'pick_ship'|'pick_pack_ship'. semantic_role: OdooSemanticRole::Policy, }, - OdooField { name: "route_ids", kind: OdooFieldKind::Many2many, target: Some("stock.route"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "company_id", kind: OdooFieldKind::Many2one, target: Some("res.company"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "route_ids", + kind: OdooFieldKind::Many2many, + target: Some("stock.route"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "company_id", + kind: OdooFieldKind::Many2one, + target: Some("res.company"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, ], methods: &[ - OdooMethod { name: "_get_picking_type_create_edit", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, - OdooMethod { name: "_update_reception_delivery", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "_get_picking_type_create_edit", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, + OdooMethod { + name: "_update_reception_delivery", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, ], decorators: &[], state_machine: None, @@ -518,7 +1250,9 @@ mod tests { #[test] fn stock_move_has_state_machine() { - let sm = STOCK_MOVE.state_machine.expect("stock.move must have a state machine"); + let sm = STOCK_MOVE + .state_machine + .expect("stock.move must have a state machine"); assert_eq!(sm.state_field, "state"); assert_eq!(sm.states.len(), 7); assert!(!sm.transitions.is_empty()); @@ -535,53 +1269,86 @@ mod tests { #[test] fn stock_move_product_qty_is_computed() { - let f = STOCK_MOVE.fields.iter().find(|f| f.name == "product_qty").unwrap(); + let f = STOCK_MOVE + .fields + .iter() + .find(|f| f.name == "product_qty") + .unwrap(); assert_eq!(f.computed, Some("_compute_product_qty")); assert_eq!(f.kind, OdooFieldKind::Float); } #[test] fn stock_move_reservation_policy_fields_present() { let ns: Vec<&str> = STOCK_MOVE.fields.iter().map(|f| f.name).collect(); - assert!(ns.contains(&"reservation_method") && ns.contains(&"reservation_date") - && ns.contains(&"procure_method") && ns.contains(&"priority")); + assert!( + ns.contains(&"reservation_method") + && ns.contains(&"reservation_date") + && ns.contains(&"procure_method") + && ns.contains(&"priority") + ); } #[test] fn stock_quant_reservation_invariant_captured() { - let f = STOCK_QUANT.fields.iter().find(|f| f.name == "reserved_quantity").unwrap(); + let f = STOCK_QUANT + .fields + .iter() + .find(|f| f.name == "reserved_quantity") + .unwrap(); assert_eq!(f.semantic_role, OdooSemanticRole::Quantity); assert!(!STOCK_QUANT.constraints.is_empty()); } #[test] fn stock_quant_has_removal_strategy_methods() { let ns: Vec<&str> = STOCK_QUANT.methods.iter().map(|m| m.name).collect(); - assert!(ns.contains(&"_gather") && ns.contains(&"_get_removal_strategy") - && ns.contains(&"_get_reserve_quantity") && ns.contains(&"_update_available_quantity")); + assert!( + ns.contains(&"_gather") + && ns.contains(&"_get_removal_strategy") + && ns.contains(&"_get_reserve_quantity") + && ns.contains(&"_update_available_quantity") + ); } #[test] fn stock_picking_state_is_computed() { - let f = STOCK_PICKING.fields.iter().find(|f| f.name == "state").unwrap(); + let f = STOCK_PICKING + .fields + .iter() + .find(|f| f.name == "state") + .unwrap(); assert_eq!(f.computed, Some("_compute_state")); } #[test] fn stock_picking_has_state_machine() { - let sm = STOCK_PICKING.state_machine.expect("stock.picking must have a state machine"); + let sm = STOCK_PICKING + .state_machine + .expect("stock.picking must have a state machine"); assert_eq!(sm.state_field, "state"); assert_eq!(sm.states.len(), 6); } #[test] fn stock_picking_move_type_is_policy() { - let f = STOCK_PICKING.fields.iter().find(|f| f.name == "move_type").unwrap(); + let f = STOCK_PICKING + .fields + .iter() + .find(|f| f.name == "move_type") + .unwrap(); assert_eq!(f.semantic_role, OdooSemanticRole::Policy); } #[test] fn stock_location_removal_strategy_is_policy() { - let f = STOCK_LOCATION.fields.iter().find(|f| f.name == "removal_strategy_id").unwrap(); + let f = STOCK_LOCATION + .fields + .iter() + .find(|f| f.name == "removal_strategy_id") + .unwrap(); assert_eq!(f.kind, OdooFieldKind::Many2one); assert_eq!(f.semantic_role, OdooSemanticRole::Policy); } #[test] fn stock_location_has_bypass_method() { - assert!(STOCK_LOCATION.methods.iter().any(|m| m.name == "should_bypass_reservation")); + assert!(STOCK_LOCATION + .methods + .iter() + .any(|m| m.name == "should_bypass_reservation")); } #[test] fn stock_warehouse_has_steps_policy_fields() { @@ -591,13 +1358,22 @@ mod tests { #[test] fn all_entities_are_curated() { for e in ENTITIES { - assert_eq!(e.provenance.confidence, OdooConfidence::Curated, "{} must be Curated", e.model_name); + assert_eq!( + e.provenance.confidence, + OdooConfidence::Curated, + "{} must be Curated", + e.model_name + ); } } #[test] fn all_entities_cite_l7_doc() { for e in ENTITIES { - assert_eq!(e.provenance.l_doc, "L7-STOCK.md", "{} must cite L7 doc", e.model_name); + assert_eq!( + e.provenance.l_doc, "L7-STOCK.md", + "{} must cite L7 doc", + e.model_name + ); } } } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l8.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l8.rs index cb493ef1..7dbafea4 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l8.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l8.rs @@ -35,7 +35,12 @@ macro_rules! f { macro_rules! m { ($name:expr, $kind:expr, $ret:expr) => { - OdooMethod { name: $name, kind: $kind, return_kind: $ret, triggers: &[] } + OdooMethod { + name: $name, + kind: $kind, + return_kind: $ret, + triggers: &[], + } }; } @@ -48,33 +53,93 @@ pub const PRODUCT_CATEGORY: OdooEntity = OdooEntity { pricelist categ ancestor check; company-dependent income/expense GL accounts \ (account resolution waterfall R7).", fields: &[ - f!("name", OdooFieldKind::Char, None, true, None, &[], OdooSemanticRole::Identity), + f!( + "name", + OdooFieldKind::Char, + None, + true, + None, + &[], + OdooSemanticRole::Identity + ), // Recursive breadcrumb "All / Consumable / Electronic". - f!("complete_name", OdooFieldKind::Computed, None, false, - Some("_compute_complete_name"), &["name", "parent_id.complete_name"], - OdooSemanticRole::Identity), + f!( + "complete_name", + OdooFieldKind::Computed, + None, + false, + Some("_compute_complete_name"), + &["name", "parent_id.complete_name"], + OdooSemanticRole::Identity + ), // Cascade delete; DFS cycle guard _check_category_recursion. - f!("parent_id", OdooFieldKind::Many2one, Some("product.category"), false, - None, &[], OdooSemanticRole::Reference), + f!( + "parent_id", + OdooFieldKind::Many2one, + Some("product.category"), + false, + None, + &[], + OdooSemanticRole::Reference + ), // Materialized closure "1/4/7/" — pricelist rule categ prefix check. - f!("parent_path", OdooFieldKind::Char, None, false, None, &[], - OdooSemanticRole::Reference), - f!("child_id", OdooFieldKind::One2many, Some("product.category"), false, - None, &[], OdooSemanticRole::Reference), + f!( + "parent_path", + OdooFieldKind::Char, + None, + false, + None, + &[], + OdooSemanticRole::Reference + ), + f!( + "child_id", + OdooFieldKind::One2many, + Some("product.category"), + false, + None, + &[], + OdooSemanticRole::Reference + ), // company_dependent; income account for customer invoices (R6/R7). - f!("property_account_income_categ_id", OdooFieldKind::Many2one, - Some("account.account"), false, None, &[], OdooSemanticRole::Tax), + f!( + "property_account_income_categ_id", + OdooFieldKind::Many2one, + Some("account.account"), + false, + None, + &[], + OdooSemanticRole::Tax + ), // company_dependent; expense/COGS account for vendor bills. - f!("property_account_expense_categ_id", OdooFieldKind::Many2one, - Some("account.account"), false, None, &[], OdooSemanticRole::Tax), + f!( + "property_account_expense_categ_id", + OdooFieldKind::Many2one, + Some("account.account"), + false, + None, + &[], + OdooSemanticRole::Tax + ), ], methods: &[ - m!("_check_category_recursion", OdooMethodKind::Constrain, OdooReturnKind::Unit), + m!( + "_check_category_recursion", + OdooMethodKind::Constrain, + OdooReturnKind::Unit + ), // Account resolution waterfall (R7): product prop → categ walk → company default. - m!("_get_product_accounts", OdooMethodKind::Helper, OdooReturnKind::Dict), + m!( + "_get_product_accounts", + OdooMethodKind::Helper, + OdooReturnKind::Dict + ), ], decorators: &[ - OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, targets: &["parent_id"] }, + OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["parent_id"], + }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["name", "parent_id.complete_name"], @@ -90,8 +155,14 @@ pub const PRODUCT_CATEGORY: OdooEntity = OdooEntity { l_doc: "L8-PRODUCT-UOM-PRICELIST.md", l_doc_lines: (180, 238), odoo_source: &[ - OdooSourceRef { path: "addons/product/models/product_category.py", line_range: (1, 69) }, - OdooSourceRef { path: "addons/account/models/product.py", line_range: (13, 29) }, + OdooSourceRef { + path: "addons/product/models/product_category.py", + line_range: (1, 69), + }, + OdooSourceRef { + path: "addons/account/models/product.py", + line_range: (13, 29), + }, ], confidence: OdooConfidence::Curated, regulation_iri: &[], @@ -109,53 +180,136 @@ pub const UOM_UOM: OdooEntity = OdooEntity { SQL constraints: factor!=0, rounding>0. \ Stock guard: blocks factor change when open moves/quants (R21).", fields: &[ - f!("name", OdooFieldKind::Char, None, true, None, &[], OdooSemanticRole::Identity), - f!("category_id", OdooFieldKind::Many2one, Some("uom.category"), true, - None, &[], OdooSemanticRole::Reference), + f!( + "name", + OdooFieldKind::Char, + None, + true, + None, + &[], + OdooSemanticRole::Identity + ), + f!( + "category_id", + OdooFieldKind::Many2one, + Some("uom.category"), + true, + None, + &[], + OdooSemanticRole::Reference + ), // Ratio vs reference. Bigger UoM: factor<1 (dozen≈0.0833); smaller: factor>1. - f!("factor", OdooFieldKind::Float, None, true, None, &[], OdooSemanticRole::Quantity), - f!("factor_inv", OdooFieldKind::Computed, None, false, - Some("_compute_factor_inv"), &["factor"], OdooSemanticRole::Quantity), + f!( + "factor", + OdooFieldKind::Float, + None, + true, + None, + &[], + OdooSemanticRole::Quantity + ), + f!( + "factor_inv", + OdooFieldKind::Computed, + None, + false, + Some("_compute_factor_inv"), + &["factor"], + OdooSemanticRole::Quantity + ), // Precision step e.g. 0.01, 1.0. SQL constraint: rounding>0. - f!("rounding", OdooFieldKind::Float, None, true, None, &[], OdooSemanticRole::Quantity), + f!( + "rounding", + OdooFieldKind::Float, + None, + true, + None, + &[], + OdooSemanticRole::Quantity + ), // bigger | reference | smaller; each category has exactly one 'reference'. - f!("uom_type", OdooFieldKind::Selection, None, true, None, &[], OdooSemanticRole::Policy), - f!("active", OdooFieldKind::Boolean, None, true, None, &[], OdooSemanticRole::Status), + f!( + "uom_type", + OdooFieldKind::Selection, + None, + true, + None, + &[], + OdooSemanticRole::Policy + ), + f!( + "active", + OdooFieldKind::Boolean, + None, + true, + None, + &[], + OdooSemanticRole::Status + ), ], methods: &[ // Core qty conversion (R5); rounding_method defaults 'UP', stock uses 'HALF-UP'. - m!("_compute_quantity", OdooMethodKind::Helper, OdooReturnKind::Number), + m!( + "_compute_quantity", + OdooMethodKind::Helper, + OdooReturnKind::Number + ), // Price conversion (R5): no rounding; called from lst_price + pricelist fixed (R2, R13). - m!("_compute_price", OdooMethodKind::Helper, OdooReturnKind::Number), - m!("_compute_factor_inv", OdooMethodKind::Compute, OdooReturnKind::Unit), + m!( + "_compute_price", + OdooMethodKind::Helper, + OdooReturnKind::Number + ), + m!( + "_compute_factor_inv", + OdooMethodKind::Compute, + OdooReturnKind::Unit + ), // Stock guard (R21): blocks factor write when open stock.move/quant uses this UoM. m!("write", OdooMethodKind::Override, OdooReturnKind::Boolean), ], - decorators: &[ - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["factor"] }, - ], + decorators: &[OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["factor"], + }], state_machine: None, constraints: &[ - OdooConstraint { kind: OdooConstraintKind::Sql, condition: "factor != 0", - source_method: None }, - OdooConstraint { kind: OdooConstraintKind::Sql, condition: "rounding > 0", - source_method: None }, + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "factor != 0", + source_method: None, + }, + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "rounding > 0", + source_method: None, + }, // Each category has exactly one uom_type='reference' with factor=1.0 (data-seed level). - OdooConstraint { kind: OdooConstraintKind::Domain, + OdooConstraint { + kind: OdooConstraintKind::Domain, condition: "Each uom.category has exactly one reference unit (factor=1.0)", - source_method: None }, - OdooConstraint { kind: OdooConstraintKind::Python, + source_method: None, + }, + OdooConstraint { + kind: OdooConstraintKind::Python, condition: "Cannot change factor when open stock.move or non-zero stock.quant \ references this UoM", - source_method: Some("write") }, + source_method: Some("write"), + }, ], provenance: OdooProvenance { l_doc: "L8-PRODUCT-UOM-PRICELIST.md", l_doc_lines: (119, 177), odoo_source: &[ // Core uom module absent from clone; reconstructed via GitHub WebFetch (R5). - OdooSourceRef { path: "addons/uom/models/uom_uom.py", line_range: (1, 200) }, - OdooSourceRef { path: "addons/stock/models/product.py", line_range: (1344, 1375) }, + OdooSourceRef { + path: "addons/uom/models/uom_uom.py", + line_range: (1, 200), + }, + OdooSourceRef { + path: "addons/stock/models/product.py", + line_range: (1344, 1375), + }, ], confidence: OdooConfidence::Curated, regulation_iri: &[], @@ -172,77 +326,256 @@ pub const PRODUCT_TEMPLATE: OdooEntity = OdooEntity { Holds list_price, company-dependent standard_price, currency_id. \ _price_compute + _get_contextual_price are the pricing entry points (R16, R22).", fields: &[ - f!("name", OdooFieldKind::Char, None, true, None, &[], OdooSemanticRole::Identity), + f!( + "name", + OdooFieldKind::Char, + None, + true, + None, + &[], + OdooSemanticRole::Identity + ), // consu | service | combo. combo: combo_ids required, attribute_line_ids forbidden. - f!("type", OdooFieldKind::Selection, None, true, None, &[], OdooSemanticRole::Policy), - f!("active", OdooFieldKind::Boolean, None, true, None, &[], OdooSemanticRole::Status), + f!( + "type", + OdooFieldKind::Selection, + None, + true, + None, + &[], + OdooSemanticRole::Policy + ), + f!( + "active", + OdooFieldKind::Boolean, + None, + true, + None, + &[], + OdooSemanticRole::Status + ), // Base sale price per default UoM; variant lst_price adds price_extra (R2). - f!("list_price", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Money), + f!( + "list_price", + OdooFieldKind::Float, + None, + false, + None, + &[], + OdooSemanticRole::Money + ), // company_dependent; delegated compute from single variant when one variant exists (R3). - f!("standard_price", OdooFieldKind::Computed, None, false, - Some("_compute_template_field_from_variant_field"), - &["product_variant_ids", "product_variant_ids.standard_price"], - OdooSemanticRole::Money), + f!( + "standard_price", + OdooFieldKind::Computed, + None, + false, + Some("_compute_template_field_from_variant_field"), + &["product_variant_ids", "product_variant_ids.standard_price"], + OdooSemanticRole::Money + ), // company_id.currency_id OR main_company.currency_id (R4). - f!("currency_id", OdooFieldKind::Computed, Some("res.currency"), false, - Some("_compute_currency_id"), &["company_id"], OdooSemanticRole::Money), + f!( + "currency_id", + OdooFieldKind::Computed, + Some("res.currency"), + false, + Some("_compute_currency_id"), + &["company_id"], + OdooSemanticRole::Money + ), // env.company.currency_id; depends_context('company') (R4). - f!("cost_currency_id", OdooFieldKind::Computed, Some("res.currency"), false, - Some("_compute_cost_currency_id"), &[], OdooSemanticRole::Money), - f!("uom_id", OdooFieldKind::Many2one, Some("uom.uom"), true, - None, &[], OdooSemanticRole::Reference), - f!("uom_po_id", OdooFieldKind::Many2one, Some("uom.uom"), true, - None, &[], OdooSemanticRole::Reference), - f!("categ_id", OdooFieldKind::Many2one, Some("product.category"), true, - None, &[], OdooSemanticRole::Reference), - f!("company_id", OdooFieldKind::Many2one, Some("res.company"), false, - None, &[], OdooSemanticRole::Reference), - f!("sale_ok", OdooFieldKind::Boolean, None, true, None, &[], OdooSemanticRole::Policy), + f!( + "cost_currency_id", + OdooFieldKind::Computed, + Some("res.currency"), + false, + Some("_compute_cost_currency_id"), + &[], + OdooSemanticRole::Money + ), + f!( + "uom_id", + OdooFieldKind::Many2one, + Some("uom.uom"), + true, + None, + &[], + OdooSemanticRole::Reference + ), + f!( + "uom_po_id", + OdooFieldKind::Many2one, + Some("uom.uom"), + true, + None, + &[], + OdooSemanticRole::Reference + ), + f!( + "categ_id", + OdooFieldKind::Many2one, + Some("product.category"), + true, + None, + &[], + OdooSemanticRole::Reference + ), + f!( + "company_id", + OdooFieldKind::Many2one, + Some("res.company"), + false, + None, + &[], + OdooSemanticRole::Reference + ), + f!( + "sale_ok", + OdooFieldKind::Boolean, + None, + true, + None, + &[], + OdooSemanticRole::Policy + ), // stored+recomputable; no-op base; overridden by purchase module. - f!("purchase_ok", OdooFieldKind::Boolean, None, true, None, &[], OdooSemanticRole::Policy), + f!( + "purchase_ok", + OdooFieldKind::Boolean, + None, + true, + None, + &[], + OdooSemanticRole::Policy + ), // Drives variant matrix Cartesian product. - f!("attribute_line_ids", OdooFieldKind::One2many, - Some("product.template.attribute.line"), false, None, &[], OdooSemanticRole::Reference), - f!("product_variant_ids", OdooFieldKind::One2many, Some("product.product"), false, - None, &[], OdooSemanticRole::Reference), + f!( + "attribute_line_ids", + OdooFieldKind::One2many, + Some("product.template.attribute.line"), + false, + None, + &[], + OdooSemanticRole::Reference + ), + f!( + "product_variant_ids", + OdooFieldKind::One2many, + Some("product.product"), + false, + None, + &[], + OdooSemanticRole::Reference + ), // Non-empty only when type='combo'. - f!("combo_ids", OdooFieldKind::Many2many, Some("product.combo"), false, - None, &[], OdooSemanticRole::Reference), + f!( + "combo_ids", + OdooFieldKind::Many2many, + Some("product.combo"), + false, + None, + &[], + OdooSemanticRole::Reference + ), // company_dependent product-level income account override (R7). - f!("property_account_income_id", OdooFieldKind::Many2one, Some("account.account"), - false, None, &[], OdooSemanticRole::Tax), - f!("property_account_expense_id", OdooFieldKind::Many2one, Some("account.account"), - false, None, &[], OdooSemanticRole::Tax), + f!( + "property_account_income_id", + OdooFieldKind::Many2one, + Some("account.account"), + false, + None, + &[], + OdooSemanticRole::Tax + ), + f!( + "property_account_expense_id", + OdooFieldKind::Many2one, + Some("account.account"), + false, + None, + &[], + OdooSemanticRole::Tax + ), ], methods: &[ // Returns {product_id: float}: raw price → attr extra → UoM → currency (R16). - m!("_price_compute", OdooMethodKind::Helper, OdooReturnKind::Dict), + m!( + "_price_compute", + OdooMethodKind::Helper, + OdooReturnKind::Dict + ), // Reads context pricelist/qty/uom/date; calls pricelist._get_product_price (R22). - m!("_get_contextual_price", OdooMethodKind::Helper, OdooReturnKind::Number), - m!("_get_contextual_pricelist", OdooMethodKind::Helper, OdooReturnKind::Record), - m!("_compute_currency_id", OdooMethodKind::Compute, OdooReturnKind::Unit), - m!("_compute_cost_currency_id", OdooMethodKind::Compute, OdooReturnKind::Unit), - m!("_compute_template_field_from_variant_field", OdooMethodKind::Compute, - OdooReturnKind::Unit), + m!( + "_get_contextual_price", + OdooMethodKind::Helper, + OdooReturnKind::Number + ), + m!( + "_get_contextual_pricelist", + OdooMethodKind::Helper, + OdooReturnKind::Record + ), + m!( + "_compute_currency_id", + OdooMethodKind::Compute, + OdooReturnKind::Unit + ), + m!( + "_compute_cost_currency_id", + OdooMethodKind::Compute, + OdooReturnKind::Unit + ), + m!( + "_compute_template_field_from_variant_field", + OdooMethodKind::Compute, + OdooReturnKind::Unit + ), // Recomputes Cartesian product after attribute line changes (R18). // Limit: ir.config_parameter product.dynamic_variant_limit (default 1000). - m!("_create_variant_ids", OdooMethodKind::Helper, OdooReturnKind::Unit), + m!( + "_create_variant_ids", + OdooMethodKind::Helper, + OdooReturnKind::Unit + ), // Account resolution: product prop → categ walk → company default (R7). - m!("_get_product_accounts", OdooMethodKind::Helper, OdooReturnKind::Dict), + m!( + "_get_product_accounts", + OdooMethodKind::Helper, + OdooReturnKind::Dict + ), // Invoice line unit price: lst_price → UoM → fiscal-pos tax adapt → currency (R23). - m!("_get_tax_included_unit_price", OdooMethodKind::Helper, OdooReturnKind::Number), + m!( + "_get_tax_included_unit_price", + OdooMethodKind::Helper, + OdooReturnKind::Number + ), // type='combo': combo_ids >= 1 and attribute_line_ids empty (R1). - m!("_check_combo_constraints", OdooMethodKind::Constrain, OdooReturnKind::Unit), + m!( + "_check_combo_constraints", + OdooMethodKind::Constrain, + OdooReturnKind::Unit + ), // Cross-model: blocks uom_id change if posted account_move_line has different UoM (R20). - m!("_check_uom_id", OdooMethodKind::Constrain, OdooReturnKind::Unit), + m!( + "_check_uom_id", + OdooMethodKind::Constrain, + OdooReturnKind::Unit + ), ], decorators: &[ - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["company_id"] }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["company_id"], + }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["product_variant_ids", "product_variant_ids.standard_price"], }, - OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, targets: &["uom_id"] }, + OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["uom_id"], + }, OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, targets: &["type", "attribute_line_ids", "combo_ids"], @@ -270,7 +603,10 @@ pub const PRODUCT_TEMPLATE: OdooEntity = OdooEntity { path: "addons/product/models/product_template.py", line_range: (1, 1598), }, - OdooSourceRef { path: "addons/account/models/product.py", line_range: (67, 293) }, + OdooSourceRef { + path: "addons/account/models/product.py", + line_range: (67, 293), + }, ], confidence: OdooConfidence::Curated, regulation_iri: &[], @@ -286,36 +622,102 @@ pub const PRODUCT_PRODUCT: OdooEntity = OdooEntity { price_extra ± UoM conversion (R2). company_dependent standard_price ≥ 0 \ (R3). combination_indices unique index within template (R18).", fields: &[ - f!("product_tmpl_id", OdooFieldKind::Many2one, Some("product.template"), true, - None, &[], OdooSemanticRole::Reference), + f!( + "product_tmpl_id", + OdooFieldKind::Many2one, + Some("product.template"), + true, + None, + &[], + OdooSemanticRole::Reference + ), // list_price + price_extra; context 'uom' triggers uom._compute_price (R2). - f!("lst_price", OdooFieldKind::Computed, None, false, - Some("_compute_product_lst_price"), &["list_price", "price_extra"], - OdooSemanticRole::Money), + f!( + "lst_price", + OdooFieldKind::Computed, + None, + false, + Some("_compute_product_lst_price"), + &["list_price", "price_extra"], + OdooSemanticRole::Money + ), // Sum of product_template_attribute_value.price_extra for this variant's PTAVs. - f!("price_extra", OdooFieldKind::Computed, None, false, - Some("_compute_product_price_extra"), - &["product_template_attribute_value_ids.price_extra"], - OdooSemanticRole::Money), + f!( + "price_extra", + OdooFieldKind::Computed, + None, + false, + Some("_compute_product_price_extra"), + &["product_template_attribute_value_ids.price_extra"], + OdooSemanticRole::Money + ), // company_dependent; constraint: standard_price >= 0 (R3). - f!("standard_price", OdooFieldKind::Float, None, false, None, &[], - OdooSemanticRole::Money), + f!( + "standard_price", + OdooFieldKind::Float, + None, + false, + None, + &[], + OdooSemanticRole::Money + ), // Dedup key: ",".join(sorted ptav ids). Unique index: (tmpl_id, combo_indices) active. - f!("combination_indices", OdooFieldKind::Char, None, false, None, &[], - OdooSemanticRole::Identity), - f!("product_template_attribute_value_ids", OdooFieldKind::Many2many, - Some("product.template.attribute.value"), false, None, &[], - OdooSemanticRole::Reference), - f!("active", OdooFieldKind::Boolean, None, true, None, &[], OdooSemanticRole::Status), + f!( + "combination_indices", + OdooFieldKind::Char, + None, + false, + None, + &[], + OdooSemanticRole::Identity + ), + f!( + "product_template_attribute_value_ids", + OdooFieldKind::Many2many, + Some("product.template.attribute.value"), + false, + None, + &[], + OdooSemanticRole::Reference + ), + f!( + "active", + OdooFieldKind::Boolean, + None, + true, + None, + &[], + OdooSemanticRole::Status + ), ], methods: &[ - m!("_compute_product_lst_price", OdooMethodKind::Compute, OdooReturnKind::Unit), + m!( + "_compute_product_lst_price", + OdooMethodKind::Compute, + OdooReturnKind::Unit + ), // Inverse: value = convert(lst_price) - price_extra → write({'list_price': value}). - m!("_set_product_lst_price", OdooMethodKind::Inverse, OdooReturnKind::Unit), - m!("_compute_product_price_extra", OdooMethodKind::Compute, OdooReturnKind::Unit), + m!( + "_set_product_lst_price", + OdooMethodKind::Inverse, + OdooReturnKind::Unit + ), + m!( + "_compute_product_price_extra", + OdooMethodKind::Compute, + OdooReturnKind::Unit + ), // Adds no_variant_attributes_price_extra from context key (R16). - m!("_price_compute", OdooMethodKind::Override, OdooReturnKind::Dict), - m!("_onchange_standard_price", OdooMethodKind::Onchange, OdooReturnKind::Unit), + m!( + "_price_compute", + OdooMethodKind::Override, + OdooReturnKind::Dict + ), + m!( + "_onchange_standard_price", + OdooMethodKind::Onchange, + OdooReturnKind::Unit + ), ], decorators: &[ OdooDecorator { @@ -326,7 +728,10 @@ pub const PRODUCT_PRODUCT: OdooEntity = OdooEntity { kind: OdooDecoratorKind::ApiDepends, targets: &["product_template_attribute_value_ids.price_extra"], }, - OdooDecorator { kind: OdooDecoratorKind::ApiOnchange, targets: &["standard_price"] }, + OdooDecorator { + kind: OdooDecoratorKind::ApiOnchange, + targets: &["standard_price"], + }, ], state_machine: None, constraints: &[ @@ -365,31 +770,103 @@ pub const PRODUCT_PRICELIST: OdooEntity = OdooEntity { L6 overlap: partner assignment (_get_partner_pricelist_multi AXIS-B \ → PricelistAssignmentAgent) is L6 territory.", fields: &[ - f!("name", OdooFieldKind::Char, None, true, None, &[], OdooSemanticRole::Identity), - f!("currency_id", OdooFieldKind::Many2one, Some("res.currency"), true, - None, &[], OdooSemanticRole::Money), - f!("company_id", OdooFieldKind::Many2one, Some("res.company"), false, - None, &[], OdooSemanticRole::Reference), - f!("country_group_ids", OdooFieldKind::Many2many, Some("res.country.group"), false, - None, &[], OdooSemanticRole::Reference), - f!("item_ids", OdooFieldKind::One2many, Some("product.pricelist.item"), false, - None, &[], OdooSemanticRole::Document), + f!( + "name", + OdooFieldKind::Char, + None, + true, + None, + &[], + OdooSemanticRole::Identity + ), + f!( + "currency_id", + OdooFieldKind::Many2one, + Some("res.currency"), + true, + None, + &[], + OdooSemanticRole::Money + ), + f!( + "company_id", + OdooFieldKind::Many2one, + Some("res.company"), + false, + None, + &[], + OdooSemanticRole::Reference + ), + f!( + "country_group_ids", + OdooFieldKind::Many2many, + Some("res.country.group"), + false, + None, + &[], + OdooSemanticRole::Reference + ), + f!( + "item_ids", + OdooFieldKind::One2many, + Some("product.pricelist.item"), + false, + None, + &[], + OdooSemanticRole::Document + ), // Lower sequence = higher priority when multiple pricelists qualify. - f!("sequence", OdooFieldKind::Integer, None, false, None, &[], OdooSemanticRole::Policy), - f!("active", OdooFieldKind::Boolean, None, true, None, &[], OdooSemanticRole::Status), + f!( + "sequence", + OdooFieldKind::Integer, + None, + false, + None, + &[], + OdooSemanticRole::Policy + ), + f!( + "active", + OdooFieldKind::Boolean, + None, + true, + None, + &[], + OdooSemanticRole::Status + ), ], methods: &[ // Core engine (R12): {product_id: (price, rule_id)}. Pre-fetches applicable rules, // iterates per product, first match → _compute_price; no match → list_price fallback. - m!("_compute_price_rule", OdooMethodKind::Helper, OdooReturnKind::Dict), - m!("_get_product_price", OdooMethodKind::Helper, OdooReturnKind::Number), + m!( + "_compute_price_rule", + OdooMethodKind::Helper, + OdooReturnKind::Dict + ), + m!( + "_get_product_price", + OdooMethodKind::Helper, + OdooReturnKind::Number + ), // Rule candidate fetch (R10): filter by pricelist_id, products, date, categ ancestry. // ORDER BY applied_on ASC, min_quantity DESC, categ_id DESC, id DESC. - m!("_get_applicable_rules_domain", OdooMethodKind::Helper, OdooReturnKind::Dict), + m!( + "_get_applicable_rules_domain", + OdooMethodKind::Helper, + OdooReturnKind::Dict + ), // Partner assignment (R15, AXIS-B): explicit property → country-group → fallback // waterfall. Fallback ordering is business-policy judgment → PricelistAssignmentAgent. - m!("_get_partner_pricelist_multi", OdooMethodKind::Helper, OdooReturnKind::Dict), - m!("_unlink_except_used_as_rule_base", OdooMethodKind::Override, OdooReturnKind::Boolean), + m!( + "_get_partner_pricelist_multi", + OdooMethodKind::Helper, + OdooReturnKind::Dict + ), + m!( + "_unlink_except_used_as_rule_base", + OdooMethodKind::Override, + OdooReturnKind::Boolean + ), ], decorators: &[], state_machine: None, @@ -420,64 +897,233 @@ pub const PRODUCT_PRICELIST_ITEM: OdooEntity = OdooEntity { Base resolvers: list_price/standard_price/pricelist (R14). \ DFS cycle guard prevents recursive pricelist chaining (R19).", fields: &[ - f!("pricelist_id", OdooFieldKind::Many2one, Some("product.pricelist"), true, - None, &[], OdooSemanticRole::Reference), + f!( + "pricelist_id", + OdooFieldKind::Many2one, + Some("product.pricelist"), + true, + None, + &[], + OdooSemanticRole::Reference + ), // 3_global | 2_product_category | 1_product | 0_product_variant. - f!("applied_on", OdooFieldKind::Selection, None, true, None, &[], OdooSemanticRole::Policy), - f!("categ_id", OdooFieldKind::Many2one, Some("product.category"), false, - None, &[], OdooSemanticRole::Reference), - f!("product_tmpl_id", OdooFieldKind::Many2one, Some("product.template"), false, - None, &[], OdooSemanticRole::Reference), - f!("product_id", OdooFieldKind::Many2one, Some("product.product"), false, - None, &[], OdooSemanticRole::Reference), + f!( + "applied_on", + OdooFieldKind::Selection, + None, + true, + None, + &[], + OdooSemanticRole::Policy + ), + f!( + "categ_id", + OdooFieldKind::Many2one, + Some("product.category"), + false, + None, + &[], + OdooSemanticRole::Reference + ), + f!( + "product_tmpl_id", + OdooFieldKind::Many2one, + Some("product.template"), + false, + None, + &[], + OdooSemanticRole::Reference + ), + f!( + "product_id", + OdooFieldKind::Many2one, + Some("product.product"), + false, + None, + &[], + OdooSemanticRole::Reference + ), // In product default UoM; qty already converted before _is_applicable_for check. - f!("min_quantity", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Quantity), - f!("date_start", OdooFieldKind::Datetime, None, false, None, &[], OdooSemanticRole::Date), - f!("date_end", OdooFieldKind::Datetime, None, false, None, &[], OdooSemanticRole::Date), + f!( + "min_quantity", + OdooFieldKind::Float, + None, + false, + None, + &[], + OdooSemanticRole::Quantity + ), + f!( + "date_start", + OdooFieldKind::Datetime, + None, + false, + None, + &[], + OdooSemanticRole::Date + ), + f!( + "date_end", + OdooFieldKind::Datetime, + None, + false, + None, + &[], + OdooSemanticRole::Date + ), // fixed | percentage | formula. - f!("compute_price", OdooFieldKind::Selection, None, true, None, &[], OdooSemanticRole::Policy), + f!( + "compute_price", + OdooFieldKind::Selection, + None, + true, + None, + &[], + OdooSemanticRole::Policy + ), // list_price | standard_price | pricelist. - f!("base", OdooFieldKind::Selection, None, false, None, &[], OdooSemanticRole::Policy), + f!( + "base", + OdooFieldKind::Selection, + None, + false, + None, + &[], + OdooSemanticRole::Policy + ), // Only when base='pricelist'; DFS cycle check on write (R19). - f!("base_pricelist_id", OdooFieldKind::Many2one, Some("product.pricelist"), false, - None, &[], OdooSemanticRole::Reference), + f!( + "base_pricelist_id", + OdooFieldKind::Many2one, + Some("product.pricelist"), + false, + None, + &[], + OdooSemanticRole::Reference + ), // fixed: stored in product UoM; UoM-converted on retrieval (R13-A). - f!("fixed_price", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Money), + f!( + "fixed_price", + OdooFieldKind::Float, + None, + false, + None, + &[], + OdooSemanticRole::Money + ), // percentage: discount %; negative = markup (R13-B). - f!("percent_price", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Money), + f!( + "percent_price", + OdooFieldKind::Float, + None, + false, + None, + &[], + OdooSemanticRole::Money + ), // formula: discount % on base; base=standard_price → label shows "Markup" (R13-C). - f!("price_discount", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Money), + f!( + "price_discount", + OdooFieldKind::Float, + None, + false, + None, + &[], + OdooSemanticRole::Money + ), // price_markup = -price_discount (computed inverse for standard_price display). - f!("price_markup", OdooFieldKind::Computed, None, false, - Some("_compute_price_markup"), &["price_discount"], OdooSemanticRole::Money), + f!( + "price_markup", + OdooFieldKind::Computed, + None, + false, + Some("_compute_price_markup"), + &["price_discount"], + OdooSemanticRole::Money + ), // Rounding step (precision_rounding e.g. 0.05 = nearest 5c), NOT decimal digits. - f!("price_round", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Money), + f!( + "price_round", + OdooFieldKind::Float, + None, + false, + None, + &[], + OdooSemanticRole::Money + ), // Additive surcharge in product UoM; UoM-converted before adding to formula price. - f!("price_surcharge", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Money), + f!( + "price_surcharge", + OdooFieldKind::Float, + None, + false, + None, + &[], + OdooSemanticRole::Money + ), // Min margin over base (not absolute floor): price >= base + price_min_margin. - f!("price_min_margin", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Money), - f!("price_max_margin", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Money), + f!( + "price_min_margin", + OdooFieldKind::Float, + None, + false, + None, + &[], + OdooSemanticRole::Money + ), + f!( + "price_max_margin", + OdooFieldKind::Float, + None, + false, + None, + &[], + OdooSemanticRole::Money + ), ], methods: &[ // Inner-loop applicability check (R11): min_quantity, categ parent_path prefix, // tmpl/variant id match. Called after candidate fetch in _compute_price_rule. - m!("_is_applicable_for", OdooMethodKind::Helper, OdooReturnKind::Boolean), + m!( + "_is_applicable_for", + OdooMethodKind::Helper, + OdooReturnKind::Boolean + ), // Three-way branch (R13): fixed→uom_cvt; percentage→base*(1-p/100); // formula→discount→round→surcharge→margin clamp. Empty self → list_price fallback. - m!("_compute_price", OdooMethodKind::Helper, OdooReturnKind::Number), + m!( + "_compute_price", + OdooMethodKind::Helper, + OdooReturnKind::Number + ), // Base resolver (R14): pricelist→recursive call; standard_price→cost_currency; // list_price→currency. Then currency_convert(src→pl.currency, round=False). - m!("_compute_base_price", OdooMethodKind::Helper, OdooReturnKind::Number), + m!( + "_compute_base_price", + OdooMethodKind::Helper, + OdooReturnKind::Number + ), // DFS cycle detection on write when base='pricelist' (R19). - m!("_check_pricelist_recursion", OdooMethodKind::Constrain, OdooReturnKind::Unit), - m!("_compute_price_markup", OdooMethodKind::Compute, OdooReturnKind::Unit), + m!( + "_check_pricelist_recursion", + OdooMethodKind::Constrain, + OdooReturnKind::Unit + ), + m!( + "_compute_price_markup", + OdooMethodKind::Compute, + OdooReturnKind::Unit + ), ], decorators: &[ OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, targets: &["base_pricelist_id", "pricelist_id"], }, - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["price_discount"] }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["price_discount"], + }, ], state_machine: None, constraints: &[ @@ -535,13 +1181,19 @@ mod tests { #[test] fn product_category_has_parent_path() { - let f = PRODUCT_CATEGORY.fields.iter().find(|f| f.name == "parent_path").unwrap(); + let f = PRODUCT_CATEGORY + .fields + .iter() + .find(|f| f.name == "parent_path") + .unwrap(); assert_eq!(f.kind, OdooFieldKind::Char); } #[test] fn uom_uom_sql_constraints() { - let sql: Vec<_> = UOM_UOM.constraints.iter() + let sql: Vec<_> = UOM_UOM + .constraints + .iter() .filter(|c| c.kind == OdooConstraintKind::Sql) .collect(); assert_eq!(sql.len(), 2, "factor!=0 and rounding>0"); @@ -549,20 +1201,32 @@ mod tests { #[test] fn product_template_curated() { - assert_eq!(PRODUCT_TEMPLATE.provenance.confidence, OdooConfidence::Curated); - assert_eq!(PRODUCT_TEMPLATE.provenance.l_doc, "L8-PRODUCT-UOM-PRICELIST.md"); + assert_eq!( + PRODUCT_TEMPLATE.provenance.confidence, + OdooConfidence::Curated + ); + assert_eq!( + PRODUCT_TEMPLATE.provenance.l_doc, + "L8-PRODUCT-UOM-PRICELIST.md" + ); } #[test] fn product_product_lst_price_computed() { - let lst = PRODUCT_PRODUCT.fields.iter().find(|f| f.name == "lst_price").unwrap(); + let lst = PRODUCT_PRODUCT + .fields + .iter() + .find(|f| f.name == "lst_price") + .unwrap(); assert_eq!(lst.kind, OdooFieldKind::Computed); assert_eq!(lst.computed, Some("_compute_product_lst_price")); } #[test] fn pricelist_item_has_applicable_check() { - let m = PRODUCT_PRICELIST_ITEM.methods.iter() + let m = PRODUCT_PRICELIST_ITEM + .methods + .iter() .find(|m| m.name == "_is_applicable_for") .unwrap(); assert_eq!(m.return_kind, OdooReturnKind::Boolean); @@ -571,10 +1235,17 @@ mod tests { #[test] fn all_entities_have_l8_ldoc() { for e in ENTITIES { - assert_eq!(e.provenance.l_doc, "L8-PRODUCT-UOM-PRICELIST.md", - "{} has wrong l_doc", e.model_name); - assert_eq!(e.provenance.confidence, OdooConfidence::Curated, - "{} not Curated", e.model_name); + assert_eq!( + e.provenance.l_doc, "L8-PRODUCT-UOM-PRICELIST.md", + "{} has wrong l_doc", + e.model_name + ); + assert_eq!( + e.provenance.confidence, + OdooConfidence::Curated, + "{} not Curated", + e.model_name + ); } } } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l9.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l9.rs index ef35246c..0c916d32 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l9.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l9.rs @@ -41,102 +41,272 @@ pub const ACCOUNT_FISCAL_POSITION: OdooEntity = OdooEntity { description: "Named tax-and-account mapping applied to a partner; selected by \ _get_fiscal_position (FiscalPositionResolver savant) or manual override.", fields: &[ - OdooField { name: "name", kind: OdooFieldKind::Char, target: None, required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, + OdooField { + name: "name", + kind: OdooFieldKind::Char, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Identity, + }, // Sort key: company-specificity first (-len(parent_ids)), then sequence ASC. - OdooField { name: "sequence", kind: OdooFieldKind::Integer, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, - OdooField { name: "active", kind: OdooFieldKind::Boolean, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, - OdooField { name: "company_id", kind: OdooFieldKind::Many2one, target: Some("res.company"), - required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "sequence", + kind: OdooFieldKind::Integer, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, + OdooField { + name: "active", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Status, + }, + OdooField { + name: "company_id", + kind: OdooFieldKind::Many2one, + target: Some("res.company"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, // auto_apply=True → candidate for _get_fiscal_position auto-detection (R8). - OdooField { name: "auto_apply", kind: OdooFieldKind::Boolean, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { + name: "auto_apply", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, // Predicate 1 in _get_fpos_validation_functions: partner must have VAT. - OdooField { name: "vat_required", kind: OdooFieldKind::Boolean, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { + name: "vat_required", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, // Predicate 4: partner.country_id == this (absent → any country). - OdooField { name: "country_id", kind: OdooFieldKind::Many2one, target: Some("res.country"), - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "country_id", + kind: OdooFieldKind::Many2one, + target: Some("res.country"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, // Predicate 5: partner.country_id in group.country_ids AND state not excluded. - OdooField { name: "country_group_id", kind: OdooFieldKind::Many2one, - target: Some("res.country.group"), required: false, computed: None, depends: &[], - semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "country_group_id", + kind: OdooFieldKind::Many2one, + target: Some("res.country.group"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, // Predicate 3: partner.state_id in this set (empty → any state). - OdooField { name: "state_ids", kind: OdooFieldKind::Many2many, - target: Some("res.country.state"), required: false, computed: None, depends: &[], - semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "state_ids", + kind: OdooFieldKind::Many2many, + target: Some("res.country.state"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, // Predicate 2: padded with leading zeros by _convert_zip_values (R11). - OdooField { name: "zip_from", kind: OdooFieldKind::Char, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, - OdooField { name: "zip_to", kind: OdooFieldKind::Char, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, - OdooField { name: "foreign_vat", kind: OdooFieldKind::Char, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, + OdooField { + name: "zip_from", + kind: OdooFieldKind::Char, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, + OdooField { + name: "zip_to", + kind: OdooFieldKind::Char, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, + OdooField { + name: "foreign_vat", + kind: OdooFieldKind::Char, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Identity, + }, // True if this fpos == company.domestic_fiscal_position_id (R12). - OdooField { name: "is_domestic", kind: OdooFieldKind::Boolean, target: None, required: false, + OdooField { + name: "is_domestic", + kind: OdooFieldKind::Boolean, + target: None, + required: false, computed: Some("_compute_is_domestic"), depends: &["company_id.domestic_fiscal_position_id"], - semantic_role: OdooSemanticRole::Status }, + semantic_role: OdooSemanticRole::Status, + }, // {src_tax_id: [dest_tax_id, ...]} — used by map_tax (R9, R20). // L3 overlap: content is tax repartition data; the MAP structure is L9-authoritative. - OdooField { name: "tax_map", kind: OdooFieldKind::Computed, target: None, required: false, - computed: Some("_compute_tax_map"), depends: &["tax_ids"], - semantic_role: OdooSemanticRole::Tax }, + OdooField { + name: "tax_map", + kind: OdooFieldKind::Computed, + target: None, + required: false, + computed: Some("_compute_tax_map"), + depends: &["tax_ids"], + semantic_role: OdooSemanticRole::Tax, + }, // {src_account_id: dest_account_id} — used by map_account (R10, R20). - OdooField { name: "account_map", kind: OdooFieldKind::Computed, target: None, required: false, + OdooField { + name: "account_map", + kind: OdooFieldKind::Computed, + target: None, + required: false, computed: Some("_compute_account_map"), depends: &["account_ids.account_src_id", "account_ids.account_dest_id"], - semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "account_ids", kind: OdooFieldKind::One2many, - target: Some("account.fiscal.position.account"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "note", kind: OdooFieldKind::Html, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Document }, + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "account_ids", + kind: OdooFieldKind::One2many, + target: Some("account.fiscal.position.account"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "note", + kind: OdooFieldKind::Html, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Document, + }, ], methods: &[ // R8 / FiscalPositionResolver savant boundary ──────────────────── // @api.model: precedence → (1) manual property wins; (2) no country → empty; // (3) auto-detect via _get_first_matching_fpos (AXIS-B). - OdooMethod { name: "_get_fiscal_position", kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Record, triggers: &[] }, + OdooMethod { + name: "_get_fiscal_position", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Record, + triggers: &[], + }, // Company-specific first, then sequence ASC; runs all 5 predicates. - OdooMethod { name: "_get_first_matching_fpos", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Record, triggers: &[] }, + OdooMethod { + name: "_get_first_matching_fpos", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Record, + triggers: &[], + }, // Returns 5 lambdas: vat_required, zip_range, state, country, country_group. - OdooMethod { name: "_get_fpos_validation_functions", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { + name: "_get_fpos_validation_functions", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, // R9: taxes → mapped taxes; special: empty fpos + fpos-aware taxes → remove all. - OdooMethod { name: "map_tax", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Recordset, triggers: &[] }, + OdooMethod { + name: "map_tax", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Recordset, + triggers: &[], + }, // R10: account_id → mapped account via account_map; identity if no mapping. - OdooMethod { name: "map_account", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Record, triggers: &[] }, + OdooMethod { + name: "map_account", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Record, + triggers: &[], + }, // R11: pads digit-only zips to equal length for correct lexicographic range match. - OdooMethod { name: "_convert_zip_values", kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Dict, triggers: &[] }, - OdooMethod { name: "create", kind: OdooMethodKind::ApiModelCreateMulti, - return_kind: OdooReturnKind::Recordset, triggers: &[] }, - OdooMethod { name: "write", kind: OdooMethodKind::Override, - return_kind: OdooReturnKind::Boolean, triggers: &[] }, - OdooMethod { name: "_compute_is_domestic", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_tax_map", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_account_map", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "_convert_zip_values", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, + OdooMethod { + name: "create", + kind: OdooMethodKind::ApiModelCreateMulti, + return_kind: OdooReturnKind::Recordset, + triggers: &[], + }, + OdooMethod { + name: "write", + kind: OdooMethodKind::Override, + return_kind: OdooReturnKind::Boolean, + triggers: &[], + }, + OdooMethod { + name: "_compute_is_domestic", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_tax_map", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_account_map", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, ], decorators: &[ - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["company_id.domestic_fiscal_position_id"] }, - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["tax_ids"] }, - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &["account_ids.account_src_id", "account_ids.account_dest_id"] }, - OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, targets: &["zip_from", "zip_to"] }, - OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, - targets: &["country_id", "country_group_id", "state_ids", "foreign_vat"] }, - OdooDecorator { kind: OdooDecoratorKind::ApiModel, targets: &[] }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["company_id.domestic_fiscal_position_id"], + }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["tax_ids"], + }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["account_ids.account_src_id", "account_ids.account_dest_id"], + }, + OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["zip_from", "zip_to"], + }, + OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["country_id", "country_group_id", "state_ids", "foreign_vat"], + }, + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, ], state_machine: None, constraints: &[ @@ -176,18 +346,43 @@ pub const ACCOUNT_FISCAL_POS_ACCOUNT: OdooEntity = OdooEntity { description: "One account-substitution rule inside a fiscal position: \ account_src_id → account_dest_id when the position is active (map_account).", fields: &[ - OdooField { name: "position_id", kind: OdooFieldKind::Many2one, - target: Some("account.fiscal.position"), required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "company_id", kind: OdooFieldKind::Many2one, target: Some("res.company"), - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "position_id", + kind: OdooFieldKind::Many2one, + target: Some("account.fiscal.position"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "company_id", + kind: OdooFieldKind::Many2one, + target: Some("res.company"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, // Lookup key in account_map at posting time. - OdooField { name: "account_src_id", kind: OdooFieldKind::Many2one, - target: Some("account.account"), required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "account_dest_id", kind: OdooFieldKind::Many2one, - target: Some("account.account"), required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "account_src_id", + kind: OdooFieldKind::Many2one, + target: Some("account.account"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "account_dest_id", + kind: OdooFieldKind::Many2one, + target: Some("account.account"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, ], methods: &[], decorators: &[], @@ -229,109 +424,286 @@ pub const ACCOUNT_FISCAL_POS_ACCOUNT: OdooEntity = OdooEntity { pub const RES_PARTNER_ACCOUNTING: OdooEntity = OdooEntity { model_name: "res.partner", kind: OdooEntityKind::Model, - description: "Partner extended by account module: AR/AP property accounts, payment terms, \ + description: + "Partner extended by account module: AR/AP property accounts, payment terms, \ fiscal-position override, trust/dunning signal, rank counters, credit-limit, EDI.", fields: &[ // R1: company_dependent AR/AP accounts; ondelete=restrict; synced via commercial rollup (R5). - OdooField { name: "property_account_receivable_id", kind: OdooFieldKind::Property, - target: Some("account.account"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, - OdooField { name: "property_account_payable_id", kind: OdooFieldKind::Property, - target: Some("account.account"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "property_account_receivable_id", + kind: OdooFieldKind::Property, + target: Some("account.account"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, + OdooField { + name: "property_account_payable_id", + kind: OdooFieldKind::Property, + target: Some("account.account"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, // R2: company_dependent payment terms; None = immediate / journal fallback. - OdooField { name: "property_payment_term_id", kind: OdooFieldKind::Property, - target: Some("account.payment.term"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, - OdooField { name: "property_supplier_payment_term_id", kind: OdooFieldKind::Property, - target: Some("account.payment.term"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { + name: "property_payment_term_id", + kind: OdooFieldKind::Property, + target: Some("account.payment.term"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, + OdooField { + name: "property_supplier_payment_term_id", + kind: OdooFieldKind::Property, + target: Some("account.payment.term"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, // R3: company_dependent manual override; ALWAYS wins over auto-detection in R8. - OdooField { name: "property_account_position_id", kind: OdooFieldKind::Property, - target: Some("account.fiscal.position"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Tax }, + OdooField { + name: "property_account_position_id", + kind: OdooFieldKind::Property, + target: Some("account.fiscal.position"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Tax, + }, // R4: incremented via _increase_rank on invoice/purchase confirm (deferred when rank > 0). - OdooField { name: "customer_rank", kind: OdooFieldKind::Integer, target: None, - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, - OdooField { name: "supplier_rank", kind: OdooFieldKind::Integer, target: None, - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, + OdooField { + name: "customer_rank", + kind: OdooFieldKind::Integer, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Quantity, + }, + OdooField { + name: "supplier_rank", + kind: OdooFieldKind::Integer, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Quantity, + }, // R6: SUM(amount_residual) on posted receivable/payable lines (raw SQL, PG SPLIT_PART). - OdooField { name: "credit", kind: OdooFieldKind::Monetary, target: None, required: false, - computed: Some("_credit_debit_get"), depends: &[], semantic_role: OdooSemanticRole::Money }, - OdooField { name: "debit", kind: OdooFieldKind::Monetary, target: None, required: false, - computed: Some("_credit_debit_get"), depends: &[], semantic_role: OdooSemanticRole::Money }, + OdooField { + name: "credit", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_credit_debit_get"), + depends: &[], + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "debit", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_credit_debit_get"), + depends: &[], + semantic_role: OdooSemanticRole::Money, + }, // R7: (credit / total_invoiced) * days_since_oldest_invoice; 0 when no invoices. - OdooField { name: "days_sales_outstanding", kind: OdooFieldKind::Float, target: None, - required: false, computed: Some("_compute_days_sales_outstanding"), - depends: &["credit"], semantic_role: OdooSemanticRole::Quantity }, + OdooField { + name: "days_sales_outstanding", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: Some("_compute_days_sales_outstanding"), + depends: &["credit"], + semantic_role: OdooSemanticRole::Quantity, + }, // R14: 'always' | 'ask' | 'never'; ask triggers wizard after 3 unmodified validations. - OdooField { name: "autopost_bills", kind: OdooFieldKind::Selection, target: None, - required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { + name: "autopost_bills", + kind: OdooFieldKind::Selection, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, // R15: company_dependent; enforcement (blocking invoice) is in the sale/invoice flow. - OdooField { name: "credit_limit", kind: OdooFieldKind::Float, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Money }, - OdooField { name: "use_partner_credit_limit", kind: OdooFieldKind::Boolean, target: None, - required: false, computed: Some("_compute_use_partner_credit_limit"), depends: &[], - semantic_role: OdooSemanticRole::Policy }, + OdooField { + name: "credit_limit", + kind: OdooFieldKind::Float, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Money, + }, + OdooField { + name: "use_partner_credit_limit", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: Some("_compute_use_partner_credit_limit"), + depends: &[], + semantic_role: OdooSemanticRole::Policy, + }, // R16: 'good' | 'normal' | 'bad'; company_dependent; PartnerTrustAdvisor savant input. - OdooField { name: "trust", kind: OdooFieldKind::Selection, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, + OdooField { + name: "trust", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Status, + }, // R17: computed from commercial_partner_id.invoice_edi_format_store; // l10n_de overrides _get_suggested_invoice_edi_format to return 'xrechnung'. - OdooField { name: "invoice_edi_format", kind: OdooFieldKind::Selection, target: None, - required: false, computed: Some("_compute_invoice_edi_format"), depends: &[], - semantic_role: OdooSemanticRole::Document }, - OdooField { name: "invoice_edi_format_store", kind: OdooFieldKind::Char, target: None, - required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Document }, + OdooField { + name: "invoice_edi_format", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: Some("_compute_invoice_edi_format"), + depends: &[], + semantic_role: OdooSemanticRole::Document, + }, + OdooField { + name: "invoice_edi_format_store", + kind: OdooFieldKind::Char, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Document, + }, // DSO denominator: SUM(price_subtotal) on posted sale invoices for commercial partner. - OdooField { name: "total_invoiced", kind: OdooFieldKind::Monetary, target: None, - required: false, computed: Some("_invoice_total"), depends: &[], - semantic_role: OdooSemanticRole::Money }, + OdooField { + name: "total_invoiced", + kind: OdooFieldKind::Monetary, + target: None, + required: false, + computed: Some("_invoice_total"), + depends: &[], + semantic_role: OdooSemanticRole::Money, + }, ], methods: &[ // R4: deferred post-commit when rank > 0; immediate when rank == 0. - OdooMethod { name: "_increase_rank", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "_increase_rank", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, // R5: returns partner.commercial_partner_id — accounting entries post to commercial parent. - OdooMethod { name: "_find_accounting_partner", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Record, triggers: &[] }, + OdooMethod { + name: "_find_accounting_partner", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Record, + triggers: &[], + }, // R5: extends base list with the 5 property fields synced from parent → children. - OdooMethod { name: "_commercial_fields", kind: OdooMethodKind::Override, - return_kind: OdooReturnKind::Dict, triggers: &[] }, - OdooMethod { name: "_credit_debit_get", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_days_sales_outstanding", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "_commercial_fields", + kind: OdooMethodKind::Override, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, + OdooMethod { + name: "_credit_debit_get", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_days_sales_outstanding", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, // R13: community stub returns (vat, country_code) unchanged; VIES is Enterprise-only. - OdooMethod { name: "_run_vat_checks", kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { + name: "_run_vat_checks", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, // Returns bool(partner.vat) in community; fpos predicate 1 input. - OdooMethod { name: "_get_vat_required_valid", kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Boolean, triggers: &[] }, - OdooMethod { name: "_compute_use_partner_credit_limit", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_inverse_use_partner_credit_limit", kind: OdooMethodKind::Inverse, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_compute_invoice_edi_format", kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, triggers: &[] }, - OdooMethod { name: "_inverse_invoice_edi_format", kind: OdooMethodKind::Inverse, - return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "_get_vat_required_valid", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Boolean, + triggers: &[], + }, + OdooMethod { + name: "_compute_use_partner_credit_limit", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_inverse_use_partner_credit_limit", + kind: OdooMethodKind::Inverse, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_compute_invoice_edi_format", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + OdooMethod { + name: "_inverse_invoice_edi_format", + kind: OdooMethodKind::Inverse, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, // Stub; overridden in l10n_de to return 'xrechnung'. - OdooMethod { name: "_get_suggested_invoice_edi_format", kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { + name: "_get_suggested_invoice_edi_format", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, + triggers: &[], + }, // R18: @api.ondelete — blocks deletion when any draft/posted account.move references partner. - OdooMethod { name: "_unlink_if_partner_in_account_move", kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { + name: "_unlink_if_partner_in_account_move", + kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, // R19: VAT guard on reparent + re-points move lines to new commercial_partner_id // with bypass_lock_check (K11 GoBD consideration). - OdooMethod { name: "write", kind: OdooMethodKind::Override, - return_kind: OdooReturnKind::Boolean, triggers: &[] }, - OdooMethod { name: "create", kind: OdooMethodKind::ApiModelCreateMulti, - return_kind: OdooReturnKind::Recordset, triggers: &[] }, + OdooMethod { + name: "write", + kind: OdooMethodKind::Override, + return_kind: OdooReturnKind::Boolean, + triggers: &[], + }, + OdooMethod { + name: "create", + kind: OdooMethodKind::ApiModelCreateMulti, + return_kind: OdooReturnKind::Recordset, + triggers: &[], + }, ], decorators: &[ - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["credit"] }, - OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["company_id", "country_code"] }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["credit"], + }, + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["company_id", "country_code"], + }, ], state_machine: None, constraints: &[OdooConstraint { @@ -406,16 +778,35 @@ pub const RES_COUNTRY_GROUP: OdooEntity = OdooEntity { description: "Named set of countries for fpos matching predicate 5: \ partner.country_id ∈ country_ids AND partner.state_id ∉ exclude_state_ids.", fields: &[ - OdooField { name: "name", kind: OdooFieldKind::Char, target: None, required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, + OdooField { + name: "name", + kind: OdooFieldKind::Char, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Identity, + }, // Inclusion set: partner.country_id must be in this M2M. - OdooField { name: "country_ids", kind: OdooFieldKind::Many2many, - target: Some("res.country"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "country_ids", + kind: OdooFieldKind::Many2many, + target: Some("res.country"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, // Exclusion set: partner's state (if any) must NOT appear here. - OdooField { name: "exclude_state_ids", kind: OdooFieldKind::Many2many, - target: Some("res.country.state"), required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { + name: "exclude_state_ids", + kind: OdooFieldKind::Many2many, + target: Some("res.country.state"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Reference, + }, ], methods: &[], decorators: &[], @@ -445,13 +836,28 @@ pub const RES_COUNTRY_GROUP: OdooEntity = OdooEntity { pub const ACCOUNT_PAYMENT_TERM_REF: OdooEntity = OdooEntity { model_name: "account.payment.term", kind: OdooEntityKind::Model, - description: "Payment terms (L5 authoritative); projected in L9 only as target of \ + description: + "Payment terms (L5 authoritative); projected in L9 only as target of \ property_payment_term_id / property_supplier_payment_term_id on res.partner (R2).", fields: &[ - OdooField { name: "name", kind: OdooFieldKind::Char, target: None, required: true, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, - OdooField { name: "active", kind: OdooFieldKind::Boolean, target: None, required: false, - computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, + OdooField { + name: "name", + kind: OdooFieldKind::Char, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Identity, + }, + OdooField { + name: "active", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Status, + }, ], methods: &[], decorators: &[], @@ -494,7 +900,9 @@ pub const ENTITIES: &[OdooEntity] = &[ #[cfg(test)] mod tests { use super::*; - use crate::odoo_blueprint::{OdooConfidence, OdooConstraintKind, OdooFieldKind, OdooSemanticRole}; + use crate::odoo_blueprint::{ + OdooConfidence, OdooConstraintKind, OdooFieldKind, OdooSemanticRole, + }; #[test] fn entities_slice_has_six_entries() { @@ -503,16 +911,27 @@ mod tests { #[test] fn fiscal_position_identity() { - assert_eq!(ACCOUNT_FISCAL_POSITION.model_name, "account.fiscal.position"); - assert_eq!(ACCOUNT_FISCAL_POSITION.provenance.confidence, OdooConfidence::Curated); - assert_eq!(ACCOUNT_FISCAL_POSITION.provenance.l_doc, "L9-PARTNER-FISCALPOS.md"); + assert_eq!( + ACCOUNT_FISCAL_POSITION.model_name, + "account.fiscal.position" + ); + assert_eq!( + ACCOUNT_FISCAL_POSITION.provenance.confidence, + OdooConfidence::Curated + ); + assert_eq!( + ACCOUNT_FISCAL_POSITION.provenance.l_doc, + "L9-PARTNER-FISCALPOS.md" + ); assert!(ACCOUNT_FISCAL_POSITION.state_machine.is_none()); } #[test] fn fiscal_position_has_auto_apply_policy_field() { let f = ACCOUNT_FISCAL_POSITION - .fields.iter().find(|f| f.name == "auto_apply") + .fields + .iter() + .find(|f| f.name == "auto_apply") .expect("auto_apply must be present"); assert_eq!(f.kind, OdooFieldKind::Boolean); assert_eq!(f.semantic_role, OdooSemanticRole::Policy); @@ -521,7 +940,9 @@ mod tests { #[test] fn fiscal_position_has_get_fiscal_position_method() { let m = ACCOUNT_FISCAL_POSITION - .methods.iter().find(|m| m.name == "_get_fiscal_position") + .methods + .iter() + .find(|m| m.name == "_get_fiscal_position") .expect("_get_fiscal_position must be present"); assert_eq!(m.kind, OdooMethodKind::ApiModel); assert_eq!(m.return_kind, OdooReturnKind::Record); @@ -529,14 +950,23 @@ mod tests { #[test] fn fiscal_position_has_map_tax_and_map_account() { - let names: Vec<&str> = ACCOUNT_FISCAL_POSITION.methods.iter().map(|m| m.name).collect(); + let names: Vec<&str> = ACCOUNT_FISCAL_POSITION + .methods + .iter() + .map(|m| m.name) + .collect(); assert!(names.contains(&"map_tax"), "map_tax must be present"); - assert!(names.contains(&"map_account"), "map_account must be present"); + assert!( + names.contains(&"map_account"), + "map_account must be present" + ); } #[test] fn fiscal_position_zip_constraint_present() { - let c = ACCOUNT_FISCAL_POSITION.constraints.iter() + let c = ACCOUNT_FISCAL_POSITION + .constraints + .iter() .find(|c| c.source_method == Some("_check_zip")) .expect("_check_zip constraint must be present"); assert_eq!(c.kind, OdooConstraintKind::Python); @@ -544,8 +974,13 @@ mod tests { #[test] fn fiscal_position_account_unique_constraint() { - assert_eq!(ACCOUNT_FISCAL_POS_ACCOUNT.model_name, "account.fiscal.position.account"); - let c = ACCOUNT_FISCAL_POS_ACCOUNT.constraints.first() + assert_eq!( + ACCOUNT_FISCAL_POS_ACCOUNT.model_name, + "account.fiscal.position.account" + ); + let c = ACCOUNT_FISCAL_POS_ACCOUNT + .constraints + .first() .expect("SQL unique constraint must be present"); assert_eq!(c.kind, OdooConstraintKind::Sql); } @@ -553,7 +988,10 @@ mod tests { #[test] fn res_partner_accounting_trust_field() { assert_eq!(RES_PARTNER_ACCOUNTING.model_name, "res.partner"); - let f = RES_PARTNER_ACCOUNTING.fields.iter().find(|f| f.name == "trust") + let f = RES_PARTNER_ACCOUNTING + .fields + .iter() + .find(|f| f.name == "trust") .expect("trust field must be present"); assert_eq!(f.kind, OdooFieldKind::Selection); assert_eq!(f.semantic_role, OdooSemanticRole::Status); @@ -561,7 +999,11 @@ mod tests { #[test] fn res_partner_accounting_has_ar_ap_property_fields() { - let names: Vec<&str> = RES_PARTNER_ACCOUNTING.fields.iter().map(|f| f.name).collect(); + let names: Vec<&str> = RES_PARTNER_ACCOUNTING + .fields + .iter() + .map(|f| f.name) + .collect(); assert!(names.contains(&"property_account_receivable_id")); assert!(names.contains(&"property_account_payable_id")); assert!(names.contains(&"property_account_position_id")); @@ -571,7 +1013,11 @@ mod tests { #[test] fn res_partner_accounting_has_fiscal_position_resolver_inputs() { // FiscalPositionResolver savant inputs: manual override, AR balance, trust signal. - let names: Vec<&str> = RES_PARTNER_ACCOUNTING.fields.iter().map(|f| f.name).collect(); + let names: Vec<&str> = RES_PARTNER_ACCOUNTING + .fields + .iter() + .map(|f| f.name) + .collect(); assert!(names.contains(&"property_account_position_id")); assert!(names.contains(&"credit")); assert!(names.contains(&"trust")); @@ -579,7 +1025,9 @@ mod tests { #[test] fn res_partner_accounting_has_deletion_guard() { - let c = RES_PARTNER_ACCOUNTING.constraints.first() + let c = RES_PARTNER_ACCOUNTING + .constraints + .first() .expect("deletion guard constraint must be present"); assert_eq!(c.kind, OdooConstraintKind::Python); assert_eq!(c.source_method, Some("_unlink_if_partner_in_account_move")); @@ -588,7 +1036,10 @@ mod tests { #[test] fn res_country_has_code_identity_field() { assert_eq!(RES_COUNTRY.model_name, "res.country"); - let f = RES_COUNTRY.fields.iter().find(|f| f.name == "code") + let f = RES_COUNTRY + .fields + .iter() + .find(|f| f.name == "code") .expect("code field must be present"); assert_eq!(f.kind, OdooFieldKind::Char); assert_eq!(f.semantic_role, OdooSemanticRole::Identity); @@ -597,7 +1048,10 @@ mod tests { #[test] fn res_country_group_has_exclude_state_ids() { assert_eq!(RES_COUNTRY_GROUP.model_name, "res.country.group"); - let f = RES_COUNTRY_GROUP.fields.iter().find(|f| f.name == "exclude_state_ids") + let f = RES_COUNTRY_GROUP + .fields + .iter() + .find(|f| f.name == "exclude_state_ids") .expect("exclude_state_ids must be present"); assert_eq!(f.kind, OdooFieldKind::Many2many); } @@ -612,16 +1066,23 @@ mod tests { #[test] fn all_entities_have_curated_confidence() { for e in ENTITIES { - assert_eq!(e.provenance.confidence, OdooConfidence::Curated, - "entity {} must be Curated", e.model_name); + assert_eq!( + e.provenance.confidence, + OdooConfidence::Curated, + "entity {} must be Curated", + e.model_name + ); } } #[test] fn all_entities_reference_l9_l_doc() { for e in ENTITIES { - assert_eq!(e.provenance.l_doc, "L9-PARTNER-FISCALPOS.md", - "entity {} must reference L9 l_doc", e.model_name); + assert_eq!( + e.provenance.l_doc, "L9-PARTNER-FISCALPOS.md", + "entity {} must reference L9 l_doc", + e.model_name + ); } } } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/mod.rs b/crates/lance-graph-ontology/src/odoo_blueprint/mod.rs index ebf1f272..0447b7a5 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/mod.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/mod.rs @@ -54,6 +54,12 @@ pub mod class_signature; pub mod l1; +pub mod l10; +pub mod l11; +pub mod l12; +pub mod l13; +pub mod l14; +pub mod l15; pub mod l2; pub mod l3; pub mod l4; @@ -62,12 +68,6 @@ pub mod l6; pub mod l7; pub mod l8; pub mod l9; -pub mod l10; -pub mod l11; -pub mod l12; -pub mod l13; -pub mod l14; -pub mod l15; // ─── Source-extracted sub-modules (D-ODOO-EXT-2) ───────────────────────── // @@ -530,9 +530,18 @@ mod tests { const INVOICE_STATE: OdooStateMachine = OdooStateMachine { state_field: "state", states: &[ - OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, - OdooState { name: "posted", semantic: OdooStateSemantic::Posted }, - OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, + OdooState { + name: "draft", + semantic: OdooStateSemantic::Draft, + }, + OdooState { + name: "posted", + semantic: OdooStateSemantic::Posted, + }, + OdooState { + name: "cancel", + semantic: OdooStateSemantic::Cancelled, + }, ], transitions: &[OdooTransition { from: "draft", diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/op_emitter.rs b/crates/lance-graph-ontology/src/odoo_blueprint/op_emitter.rs index 1e20a442..1fe9c4cc 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/op_emitter.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/op_emitter.rs @@ -66,8 +66,8 @@ use std::collections::BTreeMap; use std::fmt::Write as FmtWrite; +use crate::odoo_blueprint::style_recipe::{derive_style_recipe, OdooStyleRecipe}; use crate::odoo_blueprint::{OdooEntity, OdooMethodKind}; -use crate::odoo_blueprint::style_recipe::{OdooStyleRecipe, derive_style_recipe}; // --------------------------------------------------------------------------- // Public types @@ -148,8 +148,16 @@ pub fn emit_op_dispatch(buckets: &[BucketedRecipe]) -> (String, EmitStats) { let mut src = String::new(); // Header - writeln!(src, "// --- auto-generated by odoo_blueprint::op_emitter ---").unwrap(); - writeln!(src, "// DO NOT EDIT: regenerate via `bucket_corpus` + `emit_op_dispatch`").unwrap(); + writeln!( + src, + "// --- auto-generated by odoo_blueprint::op_emitter ---" + ) + .unwrap(); + writeln!( + src, + "// DO NOT EDIT: regenerate via `bucket_corpus` + `emit_op_dispatch`" + ) + .unwrap(); writeln!(src, "//").unwrap(); writeln!(src, "// Buckets : {}", groups.len()).unwrap(); writeln!(src, "// Unique recipes : {}", recipe_map.len()).unwrap(); @@ -181,7 +189,8 @@ pub fn emit_op_dispatch(buckets: &[BucketedRecipe]) -> (String, EmitStats) { // Sort for determinism: recipe_id asc, then method_id asc. let mut sorted: Vec<&BucketedRecipe> = entries.iter().copied().collect(); sorted.sort_by(|a, b| { - a.recipe.recipe_id + a.recipe + .recipe_id .cmp(&b.recipe.recipe_id) .then_with(|| a.method_id.cmp(&b.method_id)) }); @@ -330,12 +339,11 @@ fn atom_comment(recipe: &OdooStyleRecipe) -> String { #[cfg(test)] mod tests { use super::*; + use crate::odoo_blueprint::style_recipe::DAtom; use crate::odoo_blueprint::{ - OdooConfidence, OdooEntity, OdooEntityKind, OdooField, - OdooFieldKind, OdooMethod, OdooMethodKind, OdooProvenance, OdooReturnKind, - OdooSemanticRole, + OdooConfidence, OdooEntity, OdooEntityKind, OdooField, OdooFieldKind, OdooMethod, + OdooMethodKind, OdooProvenance, OdooReturnKind, OdooSemanticRole, }; - use crate::odoo_blueprint::style_recipe::DAtom; // ── Minimal fixture ────────────────────────────────────────────────────── @@ -444,7 +452,10 @@ mod tests { #[test] fn bucket_corpus_method_id_matches_entity_dot_method() { let buckets = bucket_corpus(&[&TEST_ENTITY]); - let compute = buckets.iter().find(|b| b.kind == OdooMethodKind::Compute).unwrap(); + let compute = buckets + .iter() + .find(|b| b.kind == OdooMethodKind::Compute) + .unwrap(); assert_eq!(compute.method_id, "test.move._compute_amount"); } @@ -468,11 +479,20 @@ mod tests { // Three kinds present → three structs + three statics assert!(src.contains("pub struct ComputeOp {"), "ComputeOp struct"); - assert!(src.contains("pub static COMPUTE_OPS:"), "COMPUTE_OPS static"); + assert!( + src.contains("pub static COMPUTE_OPS:"), + "COMPUTE_OPS static" + ); assert!(src.contains("pub struct ActionOp {"), "ActionOp struct"); assert!(src.contains("pub static ACTION_OPS:"), "ACTION_OPS static"); - assert!(src.contains("pub struct ConstrainOp {"), "ConstrainOp struct"); - assert!(src.contains("pub static CONSTRAIN_OPS:"), "CONSTRAIN_OPS static"); + assert!( + src.contains("pub struct ConstrainOp {"), + "ConstrainOp struct" + ); + assert!( + src.contains("pub static CONSTRAIN_OPS:"), + "CONSTRAIN_OPS static" + ); // Helper / Override / Onchange / etc. absent (not in TEST_ENTITY) assert!(!src.contains("pub struct HelperOp"), "no HelperOp"); @@ -551,7 +571,10 @@ mod tests { assert!(src.contains("_prepare_b"), "_prepare_b in HELPER_OPS"); // Only one RECIPE_* const emitted let recipe_count = src.matches("pub const RECIPE_").count(); - assert_eq!(recipe_count, 1, "exactly one RECIPE_* const for the collapsed pair"); + assert_eq!( + recipe_count, 1, + "exactly one RECIPE_* const for the collapsed pair" + ); } #[test] @@ -564,7 +587,10 @@ mod tests { // the source (bucket declaration order: Compute=0, Action=4). let compute_pos = src.find("pub static COMPUTE_OPS").unwrap(); let action_pos = src.find("pub static ACTION_OPS").unwrap(); - assert!(compute_pos < action_pos, "Compute bucket before Action bucket"); + assert!( + compute_pos < action_pos, + "Compute bucket before Action bucket" + ); } #[test] diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/structural.rs b/crates/lance-graph-ontology/src/odoo_blueprint/structural.rs index 558d45dc..a9044cec 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/structural.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/structural.rs @@ -139,7 +139,11 @@ pub fn project_inherits_from(table: &[OdooInherits]) -> Vec { for row in table { let child = format!("odoo:{}", underscore(row.model)); for base in row.bases { - out.push((child.clone(), "inherits_from", format!("odoo:{}", underscore(base)))); + out.push(( + child.clone(), + "inherits_from", + format!("odoo:{}", underscore(base)), + )); } } out @@ -196,7 +200,10 @@ mod tests { .filter(|(s, _, _)| s == "odoo:account_move") .map(|(_, _, o)| o.as_str()) .collect(); - assert_eq!(am_bases, vec!["odoo:mail_activity_mixin", "odoo:sequence_mixin"]); + assert_eq!( + am_bases, + vec!["odoo:mail_activity_mixin", "odoo:sequence_mixin"] + ); } #[test] diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/style_recipe.rs b/crates/lance-graph-ontology/src/odoo_blueprint/style_recipe.rs index ac4d11e2..e1aef4cd 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/style_recipe.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/style_recipe.rs @@ -352,9 +352,10 @@ pub fn derive_style_recipe(entity: &OdooEntity, method: &OdooMethod) -> OdooStyl // 7. State-machine participation if let Some(sm) = entity.state_machine { - let participates = sm.transitions.iter().any(|t| { - t.trigger == method.name || t.guards.contains(&method.name) - }); + let participates = sm + .transitions + .iter() + .any(|t| t.trigger == method.name || t.guards.contains(&method.name)); if participates { bump(&mut weights, DAtom::FiscalCtx, 6); bump(&mut weights, DAtom::Event, 2); @@ -367,7 +368,11 @@ pub fn derive_style_recipe(entity: &OdooEntity, method: &OdooMethod) -> OdooStyl .enumerate() .filter_map(|(i, &a)| { let w = weights[i]; - if w > 0 { Some((a, w)) } else { None } + if w > 0 { + Some((a, w)) + } else { + None + } }) .collect(); @@ -391,11 +396,7 @@ pub fn derive_style_recipe(entity: &OdooEntity, method: &OdooMethod) -> OdooStyl pub fn derive_corpus_recipes(entities: &[&OdooEntity]) -> Vec { let mut recipes: Vec = entities .iter() - .flat_map(|e| { - e.methods - .iter() - .map(move |m| derive_style_recipe(e, m)) - }) + .flat_map(|e| e.methods.iter().map(move |m| derive_style_recipe(e, m))) .collect(); recipes.sort_by(|a, b| a.method_id.cmp(&b.method_id)); recipes @@ -480,9 +481,7 @@ fn fnv1a_recipe(atoms: &[(DAtom, u8)]) -> u32 { #[cfg(test)] mod tests { use super::*; - use crate::odoo_blueprint::{ - OdooConfidence, OdooEntityKind, OdooProvenance, - }; + use crate::odoo_blueprint::{OdooConfidence, OdooEntityKind, OdooProvenance}; fn empty_entity() -> OdooEntity { OdooEntity { @@ -576,7 +575,11 @@ mod tests { #[test] fn money_return_emits_both_money_and_emit_amount() { let e = empty_entity(); - let m = method("_compute_total", OdooMethodKind::Compute, OdooReturnKind::Money); + let m = method( + "_compute_total", + OdooMethodKind::Compute, + OdooReturnKind::Money, + ); let r = derive_style_recipe(&e, &m); assert_eq!(weight_of(&r, DAtom::Money), 6); assert_eq!(weight_of(&r, DAtom::EmitAmount), 7); @@ -587,7 +590,11 @@ mod tests { fn action_return_boosts_action_atom() { let e = empty_entity(); // Action method whose return is also an action dict. - let m = method("button_post", OdooMethodKind::Action, OdooReturnKind::Action); + let m = method( + "button_post", + OdooMethodKind::Action, + OdooReturnKind::Action, + ); let r = derive_style_recipe(&e, &m); // 7 from kind + 2 from return, max-merged = 7 (max wins). assert_eq!(weight_of(&r, DAtom::Action), 7); @@ -608,7 +615,11 @@ mod tests { let mut e = empty_entity(); e.fields = FIELDS; - let m = method("_compute_amount", OdooMethodKind::Compute, OdooReturnKind::Unit); + let m = method( + "_compute_amount", + OdooMethodKind::Compute, + OdooReturnKind::Unit, + ); let r = derive_style_recipe(&e, &m); // From Monetary kind on the field. assert_eq!(weight_of(&r, DAtom::EmitAmount), 7); @@ -621,7 +632,11 @@ mod tests { let mut e = empty_entity(); e.provenance.regulation_iri = IRIS; - let m = method("_compute_tax", OdooMethodKind::Compute, OdooReturnKind::Money); + let m = method( + "_compute_tax", + OdooMethodKind::Compute, + OdooReturnKind::Money, + ); let r = derive_style_recipe(&e, &m); assert_eq!(weight_of(&r, DAtom::Law), 8); assert_eq!(r.regulation_iris.len(), 2); @@ -732,8 +747,7 @@ mod tests { "no methods derived from chosen entities — extracted data missing?" ); - let mut seen_atoms: std::collections::BTreeSet = - std::collections::BTreeSet::new(); + let mut seen_atoms: std::collections::BTreeSet = std::collections::BTreeSet::new(); for r in &recipes { for (a, _) in &r.atoms { seen_atoms.insert(*a); diff --git a/crates/lance-graph-ontology/tests/dolce_edge_whitelist_registered.rs b/crates/lance-graph-ontology/tests/dolce_edge_whitelist_registered.rs index 99d6ecb8..775fcfb0 100644 --- a/crates/lance-graph-ontology/tests/dolce_edge_whitelist_registered.rs +++ b/crates/lance-graph-ontology/tests/dolce_edge_whitelist_registered.rs @@ -36,9 +36,7 @@ fn edge_whitelist_registered() { ); // Load-bearing minimum: DnS classification + role-binding. - let dul = |name: &str| { - format!("http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#{name}") - }; + let dul = |name: &str| format!("http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#{name}"); for name in &["isClassifiedBy", "classifies", "hasRole", "hasParticipant"] { let iri = dul(name); assert!( diff --git a/crates/lance-graph-ontology/tests/odoo_dolce_classifier.rs b/crates/lance-graph-ontology/tests/odoo_dolce_classifier.rs index 32a033ed..9671ef93 100644 --- a/crates/lance-graph-ontology/tests/odoo_dolce_classifier.rs +++ b/crates/lance-graph-ontology/tests/odoo_dolce_classifier.rs @@ -15,26 +15,26 @@ fn classify_odoo_matrix_matches_seam_table() { // (odoo model, expected category) — verbatim from the seam doc's 21-row // table, in the same order. let matrix: &[(&str, DolceCategory)] = &[ - ("res.partner", Endurant), // persistent stateful object - ("res.users", Endurant), // persistent stateful object - ("res.company", Endurant), // persistent stateful object - ("account.move", Perdurant), // .move — the journal-entry event - ("account.move.line", Perdurant), // child of Perdurant; fact within event - ("account.account", Endurant), // chart-of-accounts entry persists - ("account.tax", Quality), // .tax — a rate, characterises a txn - ("account.journal", Endurant), // persistent container - ("product.product", Endurant), // the product is the stateful thing - ("product.template", Endurant), // SPECIAL-CASE: master record, not config - ("product.category", Quality), // classification - ("stock.move", Perdurant), // .move — the stock event - ("stock.picking", Perdurant), // .picking — the logistic event - ("stock.warehouse", Endurant), // the physical warehouse - ("mail.message", Perdurant), // .message — communication event - ("crm.lead", Endurant), // the lead persists - ("crm.tag", Quality), // classification - ("hr.employee", Endurant), // persistent person - ("hr.attendance", Perdurant), // .attendance — an attendance event - ("mail.template", AbstractEntity), // .template — true template/config + ("res.partner", Endurant), // persistent stateful object + ("res.users", Endurant), // persistent stateful object + ("res.company", Endurant), // persistent stateful object + ("account.move", Perdurant), // .move — the journal-entry event + ("account.move.line", Perdurant), // child of Perdurant; fact within event + ("account.account", Endurant), // chart-of-accounts entry persists + ("account.tax", Quality), // .tax — a rate, characterises a txn + ("account.journal", Endurant), // persistent container + ("product.product", Endurant), // the product is the stateful thing + ("product.template", Endurant), // SPECIAL-CASE: master record, not config + ("product.category", Quality), // classification + ("stock.move", Perdurant), // .move — the stock event + ("stock.picking", Perdurant), // .picking — the logistic event + ("stock.warehouse", Endurant), // the physical warehouse + ("mail.message", Perdurant), // .message — communication event + ("crm.lead", Endurant), // the lead persists + ("crm.tag", Quality), // classification + ("hr.employee", Endurant), // persistent person + ("hr.attendance", Perdurant), // .attendance — an attendance event + ("mail.template", AbstractEntity), // .template — true template/config ("account.chart.template", AbstractEntity), // .template — chart template ]; @@ -56,7 +56,10 @@ fn product_template_special_case_overrides_template_suffix() { // it for the master product record — the seam's single special-case. assert_eq!(classify_odoo("product.template"), DolceCategory::Endurant); // ...while other `.template` models stay Abstract. - assert_eq!(classify_odoo("mail.template"), DolceCategory::AbstractEntity); + assert_eq!( + classify_odoo("mail.template"), + DolceCategory::AbstractEntity + ); assert_eq!( classify_odoo("account.chart.template"), DolceCategory::AbstractEntity diff --git a/crates/lance-graph-ontology/tests/odoo_hydrator_smoke.rs b/crates/lance-graph-ontology/tests/odoo_hydrator_smoke.rs index 35ee7c00..cba4d6eb 100644 --- a/crates/lance-graph-ontology/tests/odoo_hydrator_smoke.rs +++ b/crates/lance-graph-ontology/tests/odoo_hydrator_smoke.rs @@ -97,7 +97,9 @@ fn odoo_hydrator_smoke_canonical_paths() { let g = hydrate_odoo(®istry).expect("odoo hydrates from canonical paths"); assert_eq!(g, OGIT::ODOO_V1.0); - let bundle = registry.bundle_for(OGIT::ODOO_V1.0).expect("bundle registered"); + let bundle = registry + .bundle_for(OGIT::ODOO_V1.0) + .expect("bundle registered"); // Seed alone is ~20 classes; with the FIBO + SKR alignment overlays the // interned count is strictly larger (pivot IRIs get interned too). assert!( diff --git a/crates/lance-graph-ontology/tests/skos_hydrator_smoke.rs b/crates/lance-graph-ontology/tests/skos_hydrator_smoke.rs index 498aac7b..44e72ec9 100644 --- a/crates/lance-graph-ontology/tests/skos_hydrator_smoke.rs +++ b/crates/lance-graph-ontology/tests/skos_hydrator_smoke.rs @@ -50,7 +50,12 @@ fn skos_core_classes_and_properties_resolve() { hydrate_skos(®istry).expect("SKOS hydrates"); let g = OGIT::SKOS_V1.0; // SKOS Core classes - for name in &["Concept", "ConceptScheme", "Collection", "OrderedCollection"] { + for name in &[ + "Concept", + "ConceptScheme", + "Collection", + "OrderedCollection", + ] { let iri = skos(name); assert!( registry.resolve_iri_in(g, &iri).is_some(), diff --git a/crates/lance-graph-ontology/tests/skr_hydrator_smoke.rs b/crates/lance-graph-ontology/tests/skr_hydrator_smoke.rs index 7f865832..7978cf53 100644 --- a/crates/lance-graph-ontology/tests/skr_hydrator_smoke.rs +++ b/crates/lance-graph-ontology/tests/skr_hydrator_smoke.rs @@ -136,11 +136,15 @@ fn skr03_and_skr04_are_separate_slots() { // Cross-resolve: SKR 03 / 1000 must NOT resolve in the SKR 04 slot. assert!( - skr04.resolve_iri(&format!("{SKR03_IRI_PREFIX}/1000")).is_none(), + skr04 + .resolve_iri(&format!("{SKR03_IRI_PREFIX}/1000")) + .is_none(), "SKR 03 IRI must not resolve in SKR 04 bundle" ); assert!( - skr03.resolve_iri(&format!("{SKR04_IRI_PREFIX}/1000")).is_none(), + skr03 + .resolve_iri(&format!("{SKR04_IRI_PREFIX}/1000")) + .is_none(), "SKR 04 IRI must not resolve in SKR 03 bundle" ); } @@ -191,12 +195,18 @@ fn skr03_canonical_and_bau_coexist_in_one_registry() { hydrate_skr03(®istry).expect("canonical SKR 03"); hydrate_skr03_bau(®istry).expect("SKR 03 Bau"); - let canonical = registry.bundle_for(OGIT::SKR03_V1.0).expect("canonical bundle"); - let bau = registry.bundle_for(OGIT::SKR03BAU_V1.0).expect("Bau bundle"); + let canonical = registry + .bundle_for(OGIT::SKR03_V1.0) + .expect("canonical bundle"); + let bau = registry + .bundle_for(OGIT::SKR03BAU_V1.0) + .expect("Bau bundle"); // Canonical bundle: 4-digit IRI base, includes load-bearing accounts. assert!( - canonical.resolve_iri(&format!("{SKR03_IRI_PREFIX}/1000")).is_some(), + canonical + .resolve_iri(&format!("{SKR03_IRI_PREFIX}/1000")) + .is_some(), "canonical SKR 03 / 1000 Kasse must still resolve after Bau hydration" ); assert!( @@ -206,17 +216,21 @@ fn skr03_canonical_and_bau_coexist_in_one_registry() { // Bau bundle: 6-digit IRI base, includes trade-specific extensions. assert!( - bau.resolve_iri(&format!("{SKR03_BAU_IRI_PREFIX}/007510")).is_some(), + bau.resolve_iri(&format!("{SKR03_BAU_IRI_PREFIX}/007510")) + .is_some(), "Bau extension 007510 must resolve in Bau bundle" ); // Cross-resolve: Bau IRI must NOT resolve in canonical bundle and vice versa. assert!( - canonical.resolve_iri(&format!("{SKR03_BAU_IRI_PREFIX}/007510")).is_none(), + canonical + .resolve_iri(&format!("{SKR03_BAU_IRI_PREFIX}/007510")) + .is_none(), "Bau IRI must not resolve in canonical SKR 03 bundle" ); assert!( - bau.resolve_iri(&format!("{SKR03_IRI_PREFIX}/1000")).is_none(), + bau.resolve_iri(&format!("{SKR03_IRI_PREFIX}/1000")) + .is_none(), "canonical SKR 03 IRI must not resolve in Bau bundle" ); } diff --git a/crates/lance-graph-ontology/tests/zugferd_hydrator_smoke.rs b/crates/lance-graph-ontology/tests/zugferd_hydrator_smoke.rs index ced2ca5b..1319dee8 100644 --- a/crates/lance-graph-ontology/tests/zugferd_hydrator_smoke.rs +++ b/crates/lance-graph-ontology/tests/zugferd_hydrator_smoke.rs @@ -8,7 +8,8 @@ use lance_graph_contract::manifest::OGIT; use lance_graph_ontology::{hydrate_zugferd, OntologyRegistry}; const RSM: &str = "urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"; -const RAM: &str = "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"; +const RAM: &str = + "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"; const UDT: &str = "urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"; const QDT: &str = "urn:un:unece:uncefact:data:standard:QualifiedDataType:100"; diff --git a/crates/lance-graph-ontology/tests/zugferd_rules_hydrator_smoke.rs b/crates/lance-graph-ontology/tests/zugferd_rules_hydrator_smoke.rs index 19814e9a..f84acac2 100644 --- a/crates/lance-graph-ontology/tests/zugferd_rules_hydrator_smoke.rs +++ b/crates/lance-graph-ontology/tests/zugferd_rules_hydrator_smoke.rs @@ -127,7 +127,9 @@ fn zugferd_rules_distinct_business_rule_namespace() { // K/L/M/O-NN (VAT category-specific), and PEPPOL-EN16931-*. let registry = OntologyRegistry::new_in_memory(); hydrate_zugferd_rules(®istry).expect("hydrate"); - let bundle = registry.bundle_for(OGIT::ZUGFERDRULES_V1.0).expect("bundle"); + let bundle = registry + .bundle_for(OGIT::ZUGFERDRULES_V1.0) + .expect("bundle"); let ontology = bundle.ontology.as_ref().expect("ontology slot present"); let rule_iris: Vec<&String> = ontology @@ -144,9 +146,15 @@ fn zugferd_rules_distinct_business_rule_namespace() { }) }; - assert!(saw("BR-01") || saw("BR-02"), "EN16931 BR-NN core rules missing"); + assert!( + saw("BR-01") || saw("BR-02"), + "EN16931 BR-NN core rules missing" + ); assert!(saw("BR-CO-"), "BR-CO-NN co-occurrence rules missing"); - assert!(saw("BR-DEC-"), "BR-DEC-NN decimal-restriction rules missing"); + assert!( + saw("BR-DEC-"), + "BR-DEC-NN decimal-restriction rules missing" + ); assert!(saw("BR-S-"), "BR-S-NN standard-rated VAT rules missing"); assert!(saw("BR-Z-"), "BR-Z-NN zero-rated VAT rules missing"); assert!(saw("PEPPOL-"), "PEPPOL extension rules missing"); diff --git a/crates/lance-graph-planner/src/cache/nars_engine.rs b/crates/lance-graph-planner/src/cache/nars_engine.rs index 39ffdc1c..55043e51 100644 --- a/crates/lance-graph-planner/src/cache/nars_engine.rs +++ b/crates/lance-graph-planner/src/cache/nars_engine.rs @@ -161,13 +161,13 @@ impl SpoDistances { #[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] pub enum Inference { - Deduction = 0, // A→B, B→C ⊢ A→C - Induction = 1, // A→B, A→C ⊢ B→C - Abduction = 2, // A→B, C→B ⊢ A→C - Revision = 3, // merge evidence - Analogy = 4, // A→B, C≈A ⊢ C→B - Resemblance = 5, // A≈B, A≈C ⊢ B≈C - Synthesis = 6, // complementary merge + Deduction = 0, // A→B, B→C ⊢ A→C + Induction = 1, // A→B, A→C ⊢ B→C + Abduction = 2, // A→B, C→B ⊢ A→C + Revision = 3, // merge evidence + Analogy = 4, // A→B, C≈A ⊢ C→B + Resemblance = 5, // A≈B, A≈C ⊢ B≈C + Synthesis = 6, // complementary merge /// Pearl rung 2: do-calculus intervention. /// Surgically severs the causal mechanism and forces a variable to a value. /// Routes through MASK_PO (Predicate + Object planes) — the interventional diff --git a/crates/lance-graph-planner/src/mul/escalation.rs b/crates/lance-graph-planner/src/mul/escalation.rs index c0bcaf67..42dacb12 100644 --- a/crates/lance-graph-planner/src/mul/escalation.rs +++ b/crates/lance-graph-planner/src/mul/escalation.rs @@ -40,12 +40,12 @@ pub fn boot_checklist() -> Checklist { ChecklistItem::new("soa_floor_up", GateKind::Hard), // SoaColumns, i4-32 unpack ChecklistItem::new("operational_store", GateKind::Hard), // Lance / SQLite (not surreal) ChecklistItem::new("nars_tables_loaded", GateKind::Hard), // NarsTables lookup hot - ChecklistItem::new("thresholds_loaded", GateKind::Hard), // MUL profile, SD_FLOW/BLOCK, rung thresholds - ChecklistItem::new("free_energy_wired", GateKind::Hard), // FreeEnergy::compose available + ChecklistItem::new("thresholds_loaded", GateKind::Hard), // MUL profile, SD_FLOW/BLOCK, rung thresholds + ChecklistItem::new("free_energy_wired", GateKind::Hard), // FreeEnergy::compose available // ── SOFT (degrade if red) ───────────────────────────────────────── ChecklistItem::new("capabilities_registered", GateKind::Soft), // ExpertCapability / actor / MCP ChecklistItem::new("wisdom_marker_store", GateKind::Soft), // cold start → foot of curve - ChecklistItem::new("macro_eval_harness", GateKind::Soft), // run without offline updates if absent + ChecklistItem::new("macro_eval_harness", GateKind::Soft), // run without offline updates if absent ]) } diff --git a/crates/lance-graph-planner/src/temporal.rs b/crates/lance-graph-planner/src/temporal.rs index 2731b02c..ae769195 100644 --- a/crates/lance-graph-planner/src/temporal.rs +++ b/crates/lance-graph-planner/src/temporal.rs @@ -79,7 +79,9 @@ impl EpistemicMode { pub fn admits(self, status: TemporalStatus) -> bool { match status { TemporalStatus::Contemporary => true, - TemporalStatus::Anachronistic => matches!(self, EpistemicMode::Aware | EpistemicMode::Retro), + TemporalStatus::Anachronistic => { + matches!(self, EpistemicMode::Aware | EpistemicMode::Retro) + } TemporalStatus::Spoiler => matches!(self, EpistemicMode::Retro), TemporalStatus::Unknowable => false, } @@ -124,7 +126,13 @@ pub struct QueryReference { impl Default for QueryReference { fn default() -> Self { // The single-server reading: latest version, strict, rung 0, no HLC. - Self { server_id: 0, ref_version: u64::MAX, hlc_tick: None, mode: EpistemicMode::Strict, rung: 0 } + Self { + server_id: 0, + ref_version: u64::MAX, + hlc_tick: None, + mode: EpistemicMode::Strict, + rung: 0, + } } } @@ -133,7 +141,13 @@ impl QueryReference { /// `rung` (single-server: no HLC, `server_id` 0). #[must_use] pub fn at(ref_version: LanceVersion, rung: u8) -> Self { - Self { server_id: 0, ref_version, hlc_tick: None, mode: EpistemicMode::for_rung(rung), rung } + Self { + server_id: 0, + ref_version, + hlc_tick: None, + mode: EpistemicMode::for_rung(rung), + rung, + } } } @@ -144,7 +158,11 @@ impl QueryReference { /// `Contemporary` if in-phase; otherwise a future-frame row, which is a /// `Spoiler` under `Retro` (an intentional peek) and `Anachronistic` otherwise. #[must_use] -pub fn classify(row_version: LanceVersion, knowable_from: LanceVersion, v_ref: &QueryReference) -> TemporalStatus { +pub fn classify( + row_version: LanceVersion, + knowable_from: LanceVersion, + v_ref: &QueryReference, +) -> TemporalStatus { if knowable_from > v_ref.ref_version { TemporalStatus::Unknowable } else if row_version <= v_ref.ref_version { @@ -197,7 +215,10 @@ impl DepClosure { /// A satisfied, dependency-free closure — the trivial result. #[must_use] pub fn ready() -> Self { - Self { edges: Vec::new(), satisfied: true } + Self { + edges: Vec::new(), + satisfied: true, + } } } @@ -306,8 +327,14 @@ where let mut out: Vec = rows .iter() .filter(|r| { - classify_ready(r.subject(), r.lance_version(), r.knowable_from(), v_ref, deps) - .dispatchable(v_ref.mode) + classify_ready( + r.subject(), + r.lance_version(), + r.knowable_from(), + v_ref, + deps, + ) + .dispatchable(v_ref.mode) }) .cloned() .collect(); @@ -315,7 +342,12 @@ where // (single-server / legacy rows) — NOT to 0, which would force every // missing-HLC row ahead of all HLC rows regardless of its version (Codex // P2 on #468; honors the documented "fallback to lance_version"). - out.sort_by_key(|r| (r.hlc_tick().unwrap_or_else(|| r.lance_version()), r.lance_version())); + out.sort_by_key(|r| { + ( + r.hlc_tick().unwrap_or_else(|| r.lance_version()), + r.lance_version(), + ) + }); out } @@ -332,7 +364,12 @@ mod tests { } impl Row { fn new(v: LanceVersion, knowable: LanceVersion, hlc: Option) -> Self { - Self { subj: "ogit-erp/sale.order/1".into(), v, knowable, hlc } + Self { + subj: "ogit-erp/sale.order/1".into(), + v, + knowable, + hlc, + } } } impl DeinterlaceRow for Row { @@ -399,7 +436,11 @@ mod tests { assert!(!EpistemicMode::Aware.admits(TemporalStatus::Spoiler)); assert!(EpistemicMode::Retro.admits(TemporalStatus::Spoiler)); // Unknowable is never admitted. - for m in [EpistemicMode::Strict, EpistemicMode::Aware, EpistemicMode::Retro] { + for m in [ + EpistemicMode::Strict, + EpistemicMode::Aware, + EpistemicMode::Retro, + ] { assert!(!m.admits(TemporalStatus::Unknowable)); } } @@ -438,7 +479,10 @@ mod tests { fn deinterlace_hlc_orders_across_frames() { // Two frames interlaced; HLC tick is the deinterlace key (cross-server // progressive scan). All contemporary, admitted under strict. - let v_ref = QueryReference { ref_version: 1000, ..QueryReference::default() }; + let v_ref = QueryReference { + ref_version: 1000, + ..QueryReference::default() + }; let rows = vec![ Row::new(900, 1, Some(3)), Row::new(100, 1, Some(1)), @@ -446,7 +490,10 @@ mod tests { ]; let out = deinterlace(&rows, &v_ref, &NoDeps); // Ordered by hlc, NOT by per-frame lance_version. - assert_eq!(out.iter().map(|r| r.hlc.unwrap()).collect::>(), vec![1, 2, 3]); + assert_eq!( + out.iter().map(|r| r.hlc.unwrap()).collect::>(), + vec![1, 2, 3] + ); } #[test] @@ -464,7 +511,10 @@ mod tests { #[test] fn dep_closure_default_is_ready_not_blocking() { let d = DepClosure::default(); - assert!(d.satisfied, "Default DepClosure must be ready (satisfied: true)"); + assert!( + d.satisfied, + "Default DepClosure must be ready (satisfied: true)" + ); assert!(d.edges.is_empty()); } @@ -473,7 +523,10 @@ mod tests { /// legacy rows ahead of all HLC rows during partial cross-server rollout). #[test] fn deinterlace_mixed_hlc_falls_back_to_lance_version() { - let v_ref = QueryReference { ref_version: 1000, ..QueryReference::default() }; + let v_ref = QueryReference { + ref_version: 1000, + ..QueryReference::default() + }; // Two HLC-bearing rows + one legacy row (no HLC, lance_version 750). // With the old `unwrap_or(0)` the legacy row would sort first; with // the fallback to lance_version it sorts between HLCs 500 and 900. @@ -483,8 +536,11 @@ mod tests { Row::new(900, 1, Some(900)), ]; let out = deinterlace(&rows, &v_ref, &NoDeps); - let order: Vec = - out.iter().map(|r| r.hlc.unwrap_or(r.v)).collect(); - assert_eq!(order, vec![500, 750, 900], "legacy row must sort by its lance_version, not 0"); + let order: Vec = out.iter().map(|r| r.hlc.unwrap_or(r.v)).collect(); + assert_eq!( + order, + vec![500, 750, 900], + "legacy row must sort by its lance_version, not 0" + ); } } diff --git a/crates/lance-graph-planner/tests/w1_probes.rs b/crates/lance-graph-planner/tests/w1_probes.rs index 09e02373..6a67e527 100644 --- a/crates/lance-graph-planner/tests/w1_probes.rs +++ b/crates/lance-graph-planner/tests/w1_probes.rs @@ -91,15 +91,24 @@ fn probe_delegation_miss_then_hit() { resolver_calls += 1; mailbox + 1000 // arbitrary deterministic "resolved owner" transform }); - assert!(!was_hit_first, "first resolve for a mailbox must be a cache miss"); + assert!( + !was_hit_first, + "first resolve for a mailbox must be a cache miss" + ); assert_eq!(resolver_calls, 1); let (owner_second, was_hit_second) = writer.resolve_owner(on_behalf, |mailbox| { resolver_calls += 1; mailbox + 1000 }); - assert!(was_hit_second, "second resolve for the same mailbox must be a cache hit"); - assert_eq!(resolver_calls, 1, "resolver must not be called again on cache hit"); + assert!( + was_hit_second, + "second resolve for the same mailbox must be a cache hit" + ); + assert_eq!( + resolver_calls, 1, + "resolver must not be called again on cache hit" + ); assert_eq!(owner_first, owner_second); } diff --git a/crates/lance-graph-supervisor/tests/w2b_real_owner_probe.rs b/crates/lance-graph-supervisor/tests/w2b_real_owner_probe.rs index ade43c6b..656ecd6b 100644 --- a/crates/lance-graph-supervisor/tests/w2b_real_owner_probe.rs +++ b/crates/lance-graph-supervisor/tests/w2b_real_owner_probe.rs @@ -33,7 +33,9 @@ mod w2b_real_owner_probe { /// followed by `set_populated` (W1c discipline). This mirrors the /// crate's own construction idiom, not an invented shape. fn real_mailbox() -> ProbeMailbox { - let mut mb = MailboxSoA::new(/* mailbox_id */ 77, /* w_slot */ 3, /* threshold */ 1.0); + let mut mb = MailboxSoA::new( + /* mailbox_id */ 77, /* w_slot */ 3, /* threshold */ 1.0, + ); // Declare 1 populated row so MailboxSoaView::n_rows() is non-zero, // matching how a real spawn would declare its logical size // (`MailboxSoA::set_populated` docs: "mirrors fixing BindSpace::len diff --git a/crates/sigma-tier-router/src/lib.rs b/crates/sigma-tier-router/src/lib.rs index 3b275aca..5784303d 100644 --- a/crates/sigma-tier-router/src/lib.rs +++ b/crates/sigma-tier-router/src/lib.rs @@ -31,7 +31,7 @@ //! The prior hand-tuned values are preserved as `SigmaTierBands::hand_tuned()` for //! backwards comparison. -use lance_graph_contract::mul::{GateDecision, i4_eval::gate_decision_i4}; +use lance_graph_contract::mul::{i4_eval::gate_decision_i4, GateDecision}; use lance_graph_contract::qualia::QualiaI4_16D; // ───────────────────────────────────────────────────────────────────────────── @@ -437,10 +437,10 @@ mod tests { /// → Calibrated trust + Flow state → GateDecision::Flow. fn flow_qualia() -> QualiaI4_16D { QualiaI4_16D::ZERO - .with(9, 5) // coherence (DIM_COHERENCE) - .with(1, 3) // valence - .with(2, 0) // tension (low) - .with(3, 5) // warmth + .with(9, 5) // coherence (DIM_COHERENCE) + .with(1, 3) // valence + .with(2, 0) // tension (low) + .with(3, 5) // warmth .with(14, 4) // groundedness } @@ -449,8 +449,8 @@ mod tests { /// Low coherence + high tension → Uncertain trust → Block. fn block_qualia() -> QualiaI4_16D { QualiaI4_16D::ZERO - .with(9, -5) // coherence (very low) - .with(2, 5) // tension (high) + .with(9, -5) // coherence (very low) + .with(2, 5) // tension (high) } // ── Test 1: default band thresholds are strictly monotonic ──────────────── @@ -470,7 +470,10 @@ mod tests { assert!( t[i] > t[i - 1], "threshold[{}]={} must be > threshold[{}]={}", - i, t[i], i - 1, t[i - 1] + i, + t[i], + i - 1, + t[i - 1] ); } } @@ -484,15 +487,15 @@ mod tests { // F values just at/below each threshold should give the correct tier. // Default: Σk upper bound = k * 0.10 let cases: &[(f32, u8)] = &[ - (0.05, 1), // below Σ1 threshold (0.10) - (0.10, 1), // exactly at Σ1 threshold - (0.15, 2), // between Σ1 and Σ2 - (0.20, 2), // exactly at Σ2 threshold - (0.55, 6), // between Σ5 and Σ6 - (0.90, 9), // exactly at Σ9 threshold - (0.95, 10), // between Σ9 and Σ10 → tier 10 - (1.00, 10), // exactly at Σ10 threshold - (1.10, 10), // above all thresholds → clamp to 10 + (0.05, 1), // below Σ1 threshold (0.10) + (0.10, 1), // exactly at Σ1 threshold + (0.15, 2), // between Σ1 and Σ2 + (0.20, 2), // exactly at Σ2 threshold + (0.55, 6), // between Σ5 and Σ6 + (0.90, 9), // exactly at Σ9 threshold + (0.95, 10), // between Σ9 and Σ10 → tier 10 + (1.00, 10), // exactly at Σ10 threshold + (1.10, 10), // above all thresholds → clamp to 10 ]; for &(f, expected_tier) in cases { let actual = bands.tier_for(f); @@ -573,7 +576,13 @@ mod tests { assert!(router.state.last_delta < 0.0, "expected F-falling delta"); let outcome = router.dispatch(&flow_qualia(), 3); assert!( - matches!(outcome, DispatchOutcome::Commit { tier_reached: 10, .. }), + matches!( + outcome, + DispatchOutcome::Commit { + tier_reached: 10, + .. + } + ), "Σ10 + F-falling should Commit, got {:?}", outcome ); @@ -637,9 +646,15 @@ mod tests { fn test_tick_updates_delta() { let mut router = make_router(0.0); let d1 = router.tick(0.5); - assert!((d1 - 0.5).abs() < 1e-6, "first tick delta should be 0.5 - 0.0 = 0.5"); + assert!( + (d1 - 0.5).abs() < 1e-6, + "first tick delta should be 0.5 - 0.0 = 0.5" + ); let d2 = router.tick(0.3); - assert!((d2 - (-0.2)).abs() < 1e-6, "second tick delta should be 0.3 - 0.5 = -0.2"); + assert!( + (d2 - (-0.2)).abs() < 1e-6, + "second tick delta should be 0.3 - 0.5 = -0.2" + ); assert!((router.state.last_delta - (-0.2)).abs() < 1e-6); assert!((router.state.current_f - 0.3).abs() < 1e-6); assert!((router.state.last_f - 0.5).abs() < 1e-6); @@ -655,7 +670,10 @@ mod tests { assert!((s.last_delta).abs() < 1e-9); s.update(0.7); - assert!((s.last_f).abs() < 1e-9, "last_f should be 0.0 after first update"); + assert!( + (s.last_f).abs() < 1e-9, + "last_f should be 0.0 after first update" + ); assert!((s.current_f - 0.7).abs() < 1e-6); assert!((s.last_delta - 0.7).abs() < 1e-6); @@ -694,7 +712,13 @@ mod tests { assert!(router.state.last_delta < 0.0); let outcome = router.dispatch(&flow_qualia(), 4); assert!( - matches!(outcome, DispatchOutcome::Commit { tier_reached: 10, .. }), + matches!( + outcome, + DispatchOutcome::Commit { + tier_reached: 10, + .. + } + ), "floor=0.0 + Σ10 + F-falling must Commit, got {:?}", outcome ); @@ -738,7 +762,10 @@ mod tests { assert!( deltas[i + 1] > deltas[i], "Jirak default must be convex: delta[{}]={:.6} must be < delta[{}]={:.6}", - i, deltas[i], i + 1, deltas[i + 1] + i, + deltas[i], + i + 1, + deltas[i + 1] ); } } @@ -755,7 +782,8 @@ mod tests { assert!( (t[0] - expected_sigma1).abs() < 1e-6, "Σ1 should be ≈ {:.7} (k^1.5/10^1.5), got {:.7}", - expected_sigma1, t[0] + expected_sigma1, + t[0] ); // Σ10 = 1.0 exactly (anchored) assert_eq!(t[9], 1.0_f32, "Σ10 must be exactly 1.0"); @@ -766,7 +794,9 @@ mod tests { #[test] fn test_hand_tuned_preserves_old_values() { let bands = SigmaTierBands::hand_tuned(); - let expected = [0.10_f32, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.00]; + let expected = [ + 0.10_f32, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.00, + ]; assert_eq!( bands.sigma1_to_sigma10, expected, "hand_tuned() must return exactly the sprint-11 linear baseline" @@ -813,7 +843,8 @@ mod tests { var_p4 > var_p3, "jirak_p(4.0) should have higher delta variance ({:.8}) than jirak_p(3.0) ({:.8}); \ p=4 has a larger Jirak tail correction (more convex spacing)", - var_p4, var_p3 + var_p4, + var_p3 ); } @@ -862,7 +893,10 @@ mod tests { assert!( t[i] < t[i + 1], "Jirak band: t[{}]={:.6} must be < t[{}]={:.6}", - i, t[i], i + 1, t[i + 1] + i, + t[i], + i + 1, + t[i + 1] ); } } diff --git a/crates/surreal_container/tests/scheduler_seam.rs b/crates/surreal_container/tests/scheduler_seam.rs index b1b2c208..f2fe5939 100644 --- a/crates/surreal_container/tests/scheduler_seam.rs +++ b/crates/surreal_container/tests/scheduler_seam.rs @@ -36,7 +36,11 @@ fn full_rubicon_arc_lowers_to_legal_successors() { ]; for (i, (from, want_to)) in arc.iter().enumerate() { let mv = scheduler - .on_version(&view_at(*from), DatasetVersion(i as u64 + 1), ExecTarget::Native) + .on_version( + &view_at(*from), + DatasetVersion(i as u64 + 1), + ExecTarget::Native, + ) .unwrap_or_else(|| panic!("{from:?} must schedule a forward move")); assert_eq!(mv.from, *from, "move.from must echo the observed phase"); assert_eq!(mv.to, *want_to, "{from:?} must lower to {want_to:?}"); @@ -56,7 +60,10 @@ fn full_rubicon_arc_lowers_to_legal_successors() { fn absorbing_columns_schedule_no_move() { let scheduler = NextPhaseScheduler; for phase in [KanbanColumn::Commit, KanbanColumn::Prune] { - assert!(phase.is_absorbing(), "{phase:?} must be absorbing (precondition)"); + assert!( + phase.is_absorbing(), + "{phase:?} must be absorbing (precondition)" + ); assert!( scheduler .on_version(&view_at(phase), DatasetVersion(99), ExecTarget::Native) @@ -75,7 +82,11 @@ fn libet_anchor_only_on_sigma_commit_crossing() { let scheduler = NextPhaseScheduler; let crossing = scheduler - .on_version(&view_at(KanbanColumn::Planning), DatasetVersion(1), ExecTarget::Native) + .on_version( + &view_at(KanbanColumn::Planning), + DatasetVersion(1), + ExecTarget::Native, + ) .expect("Planning advances"); assert_eq!(crossing.to, KanbanColumn::CognitiveWork); assert_eq!( @@ -83,7 +94,11 @@ fn libet_anchor_only_on_sigma_commit_crossing() { "the Σ-commit crossing must carry the -550ms Libet anchor" ); - for from in [KanbanColumn::CognitiveWork, KanbanColumn::Evaluation, KanbanColumn::Plan] { + for from in [ + KanbanColumn::CognitiveWork, + KanbanColumn::Evaluation, + KanbanColumn::Plan, + ] { let mv = scheduler .on_version(&view_at(from), DatasetVersion(2), ExecTarget::Native) .expect("non-absorbing column advances"); @@ -102,12 +117,23 @@ fn libet_anchor_only_on_sigma_commit_crossing() { fn lowering_is_deterministic() { let scheduler = NextPhaseScheduler; let a = scheduler - .on_version(&view_at(KanbanColumn::CognitiveWork), DatasetVersion(7), ExecTarget::Jit) + .on_version( + &view_at(KanbanColumn::CognitiveWork), + DatasetVersion(7), + ExecTarget::Jit, + ) .expect("advances"); let b = scheduler - .on_version(&view_at(KanbanColumn::CognitiveWork), DatasetVersion(7), ExecTarget::Jit) + .on_version( + &view_at(KanbanColumn::CognitiveWork), + DatasetVersion(7), + ExecTarget::Jit, + ) .expect("advances"); - assert_eq!(a, b, "same (view, version, exec) must lower to the same move"); + assert_eq!( + a, b, + "same (view, version, exec) must lower to the same move" + ); } /// KILL-CONDITION: the `exec` backend selector must ride through the lowering @@ -116,7 +142,12 @@ fn lowering_is_deterministic() { #[test] fn exec_target_rides_onto_the_move() { let scheduler = NextPhaseScheduler; - for exec in [ExecTarget::Native, ExecTarget::Jit, ExecTarget::SurrealQl, ExecTarget::Elixir] { + for exec in [ + ExecTarget::Native, + ExecTarget::Jit, + ExecTarget::SurrealQl, + ExecTarget::Elixir, + ] { let mv = scheduler .on_version(&view_at(KanbanColumn::Planning), DatasetVersion(3), exec) .expect("advances"); diff --git a/crates/thinking-engine/src/layered.rs b/crates/thinking-engine/src/layered.rs index 2b56c80d..39e64888 100644 --- a/crates/thinking-engine/src/layered.rs +++ b/crates/thinking-engine/src/layered.rs @@ -76,7 +76,9 @@ impl CascadeChannels8 { /// Set one channel's i8 net_strength. Out-of-range idx is a no-op. #[inline] pub fn set_channel(&mut self, idx: usize, value: i8) { - if idx >= 8 { return; } + if idx >= 8 { + return; + } let mask = 0xFFu64 << (idx * 8); self.0 = (self.0 & !mask) | ((value as u8 as u64) << (idx * 8)); } @@ -127,8 +129,14 @@ impl Default for CascadeChannels8 { impl CascadeChannels8 { /// 8 channel labels for diagnostics + tests. pub const CHANNEL_NAMES: [&'static str; 8] = [ - "BECOMES", "CAUSES", "SUPPORTS", "REFINES", - "GROUNDS", "ABSTRACTS", "RELATES", "CONTRADICTS", + "BECOMES", + "CAUSES", + "SUPPORTS", + "REFINES", + "GROUNDS", + "ABSTRACTS", + "RELATES", + "CONTRADICTS", ]; /// Index of the dominant channel (max |net_strength|). Ties break to @@ -154,7 +162,11 @@ impl CascadeChannels8 { #[inline] pub fn active_channel_count(&self) -> u8 { let mut n = 0u8; - for i in 0..8 { if self.channel(i) != 0 { n += 1; } } + for i in 0..8 { + if self.channel(i) != 0 { + n += 1; + } + } n } @@ -190,8 +202,17 @@ impl CascadeChannels8 { } else { -(mantissa_magnitude as i8) }; - SpoEdge::pack_v2(s_idx, p_idx, o_idx, freq_u8, conf_u8, causal_mask, 0, causal_edge::PlasticityState::ALL_FROZEN) - .with_inference_mantissa(mantissa_signed) + SpoEdge::pack_v2( + s_idx, + p_idx, + o_idx, + freq_u8, + conf_u8, + causal_mask, + 0, + causal_edge::PlasticityState::ALL_FROZEN, + ) + .with_inference_mantissa(mantissa_signed) } /// Inverse: project an SPO-palette edge into the 8-channel form @@ -203,7 +224,13 @@ impl CascadeChannels8 { let mag = mantissa.unsigned_abs(); let dom = match mag { 0 => 6, // RELATES (neutral) - 1 => if mantissa >= 0 { 0 } else { 7 }, // BECOMES vs CONTRADICTS + 1 => { + if mantissa >= 0 { + 0 + } else { + 7 + } + } // BECOMES vs CONTRADICTS 2 => 5, // ABSTRACTS 3 => 5, // (Synthesis tilts ABSTRACTS) — matches the table tilt 4 => 2, // SUPPORTS @@ -715,7 +742,7 @@ mod transcoder_tests { #[test] fn test_dominant_channel_picks_max_abs() { let mut e = CascadeChannels8::default(); - e.set_channel(2, 30); // SUPPORTS + e.set_channel(2, 30); // SUPPORTS e.set_channel(5, -100); // ABSTRACTS, larger magnitude e.set_channel(7, 10); assert_eq!(e.dominant_channel(), 5); @@ -729,7 +756,11 @@ mod transcoder_tests { assert_eq!(spo.s_idx(), 10); assert_eq!(spo.p_idx(), 20); assert_eq!(spo.o_idx(), 30); - assert_eq!(spo.inference_mantissa(), 1, "BECOMES → mantissa +1 Deduction"); + assert_eq!( + spo.inference_mantissa(), + 1, + "BECOMES → mantissa +1 Deduction" + ); assert!(spo.frequency_u8() > 0, "non-zero net → non-zero frequency"); } @@ -737,14 +768,22 @@ mod transcoder_tests { fn test_to_spo_causes_negative_is_counterfactual() { let e = build_8ch_with(1, -32); // CAUSES, negative magnitude let spo = e.to_spo(1, 2, 3); - assert_eq!(spo.inference_mantissa(), -6, "CAUSES negative → mantissa -6 Counterfactual"); + assert_eq!( + spo.inference_mantissa(), + -6, + "CAUSES negative → mantissa -6 Counterfactual" + ); } #[test] fn test_to_spo_relates_neutral_mantissa_zero() { - let e = build_8ch_with(6, 100); // RELATES dominant + let e = build_8ch_with(6, 100); // RELATES dominant let spo = e.to_spo(0, 0, 0); - assert_eq!(spo.inference_mantissa(), 0, "RELATES → mantissa 0 (Identity)"); + assert_eq!( + spo.inference_mantissa(), + 0, + "RELATES → mantissa 0 (Identity)" + ); } #[test] @@ -770,12 +809,12 @@ mod transcoder_tests { // lossy collapse: negative-BECOMES/GROUNDS is semantically CONTRADICTS // in the SPO lattice (both carry |mantissa|=1 in the backward slot). 0 | 4 => &[0, 7], - 1 => &[1], // CAUSES → mantissa ±6 → CAUSES - 2 => &[2], // SUPPORTS → mantissa +4 → SUPPORTS - 3 => &[3, 5], // REFINES → mantissa +5 → REFINES (or ABSTRACTS in tilt) - 5 => &[5], // ABSTRACTS → mantissa +2 → ABSTRACTS - 6 => &[6], // RELATES → mantissa 0 → RELATES - 7 => &[7, 0], // CONTRADICTS → mantissa ±1 (sign distinguishes) + 1 => &[1], // CAUSES → mantissa ±6 → CAUSES + 2 => &[2], // SUPPORTS → mantissa +4 → SUPPORTS + 3 => &[3, 5], // REFINES → mantissa +5 → REFINES (or ABSTRACTS in tilt) + 5 => &[5], // ABSTRACTS → mantissa +2 → ABSTRACTS + 6 => &[6], // RELATES → mantissa 0 → RELATES + 7 => &[7, 0], // CONTRADICTS → mantissa ±1 (sign distinguishes) _ => &[], }; assert!( From 6f9158f9729923f30d2705130c2e305ffe1e9607 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Jul 2026 16:26:54 +0000 Subject: [PATCH 4/7] Generic hot-plug: contract socket + OgarAuthority bridge The plug-and-play pattern goes GENERIC (operator ruling) -- the migration target for ALL consumers, not a per-consumer plug crate: - lance-graph-contract gains src/hotplug.rs, the zero-dep SOCKET: HotPlug { consumer, classids, covered }, Activation { concepts, capabilities }, ActivationDrift (5 named arms), and the CapabilityAuthority trait. Pure types -- no OGAR dep, member-safe (the CI workspace-load lesson is in the module doc). - lance-graph-ogar (workspace-EXCLUDED) gains OgarAuthority: the contract socket implemented via ogar_vocab::capability_registry:: resolve_hotplug -- the consumer tells OGAR which classids are hot-plugged and receives BOTH the vocab rows and the action surface for exactly those ids; classid is the join key on both sides. E2E bridge test: the OCR plug resolves to 3 concepts + 8 capabilities through a dyn CapabilityAuthority. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1 --- crates/lance-graph-contract/src/hotplug.rs | 129 +++++++++++++++++++++ crates/lance-graph-contract/src/lib.rs | 1 + crates/lance-graph-ogar/src/lib.rs | 68 +++++++++++ 3 files changed, 198 insertions(+) create mode 100644 crates/lance-graph-contract/src/hotplug.rs diff --git a/crates/lance-graph-contract/src/hotplug.rs b/crates/lance-graph-contract/src/hotplug.rs new file mode 100644 index 00000000..e627727b --- /dev/null +++ b/crates/lance-graph-contract/src/hotplug.rs @@ -0,0 +1,129 @@ +//! Generic consumer hot-plug — the plug-and-play pattern EVERY consumer +//! migrates to (operator, 2026-07-07). +//! +//! Three roles, three homes: +//! +//! 1. **This module (the SOCKET, zero-dep):** the shapes a consumer uses to +//! declare WHICH classids it hot-plugs, and the [`CapabilityAuthority`] +//! trait the authority implements. No OGAR dep — the contract is a +//! workspace member and MUST stay dependency-free (a path dep here breaks +//! every CI cargo invocation at workspace-load time; learned 2026-07-07). +//! 2. **OGAR (the AUTHORITY):** resolves the hot-plugged classids to BOTH the +//! vocab rows and the action definitions, and verifies the registration +//! (expected consumer, coverage both directions, ids minted exactly once). +//! 3. **The consumer:** declares one [`HotPlug`] const naming its classids + +//! covered capabilities, calls `activate` in its own binary/tests — drift +//! bangs once, no pins, no serialization, no per-consumer plug crate. +//! +//! The classid is the join key on BOTH sides: the consumer says "0x0805, +//! 0x0808, 0x0809 are hot", the authority hands back the concepts and every +//! action whose subject is one of those ids. + +/// A consumer's hot-plug declaration: which classids it activates and which +/// capability names its executor covers. One `const` per consumer — the +/// whole registration surface. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct HotPlug { + /// Consumer name (crate name by convention) — the authority checks it + /// against the expected-executor list of the tables it resolves. + pub consumer: &'static str, + /// The canon-high concept ids the consumer hot-plugs. + pub classids: &'static [u16], + /// Capability names the consumer's executor covers. + pub covered: &'static [&'static str], +} + +/// What the authority returns for a green activation: the vocab rows and +/// capability names resolved for the hot-plugged classids. Plain owned +/// `std` types — zero-dep, no serialization. +#[derive(Debug, Clone, PartialEq, Eq, Default)] +pub struct Activation { + /// `(concept, classid)` vocab rows for every hot-plugged id. + pub concepts: Vec<(String, u16)>, + /// Capability names whose subject is one of the hot-plugged ids. + pub capabilities: Vec, +} + +/// Why an activation failed — each arm is one named bang. +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum ActivationDrift { + /// A hot-plugged classid is not minted in the authority's codebook. + UnknownClassid(u16), + /// The consumer is not an expected executor for a resolved table. + UnexpectedConsumer(String), + /// The authority declares a capability on a hot-plugged id that the + /// consumer does not cover. + Uncovered(String), + /// The consumer claims a capability the authority does not declare on + /// its hot-plugged ids. + Undeclared(String), + /// A hot-plugged classid resolves to no declared capability at all — + /// plugging it is either premature or the table was forgotten. + NoCapabilitiesFor(u16), +} + +impl core::fmt::Display for ActivationDrift { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + match self { + Self::UnknownClassid(id) => write!(f, "hot-plugged classid 0x{id:04X} is not minted"), + Self::UnexpectedConsumer(c) => write!(f, "consumer `{c}` is not an expected executor"), + Self::Uncovered(cap) => write!(f, "declared capability `{cap}` has no consumer arm"), + Self::Undeclared(cap) => write!(f, "consumer covers `{cap}` which is not declared"), + Self::NoCapabilitiesFor(id) => { + write!(f, "classid 0x{id:04X} resolves to no declared capability") + } + } + } +} + +impl std::error::Error for ActivationDrift {} + +/// Implemented by the authority (OGAR side, same binary): resolve a +/// [`HotPlug`] to its [`Activation`] or the first [`ActivationDrift`]. +pub trait CapabilityAuthority { + /// Verify the plug and hand back the vocab + capability surface for + /// exactly the hot-plugged classids. + fn activate(&self, plug: &HotPlug) -> Result; +} + +#[cfg(test)] +mod tests { + use super::*; + + struct TinyAuthority; + impl CapabilityAuthority for TinyAuthority { + fn activate(&self, plug: &HotPlug) -> Result { + if plug.classids.contains(&0xDEAD) { + return Err(ActivationDrift::UnknownClassid(0xDEAD)); + } + Ok(Activation { + concepts: plug + .classids + .iter() + .map(|&id| (format!("c{id:04x}"), id)) + .collect(), + capabilities: plug.covered.iter().map(|s| (*s).to_string()).collect(), + }) + } + } + + #[test] + fn socket_shape_round_trips_through_a_trait_object() { + let plug = HotPlug { + consumer: "demo", + classids: &[0x0805], + covered: &["recognize_line"], + }; + let auth: &dyn CapabilityAuthority = &TinyAuthority; + let act = auth.activate(&plug).unwrap(); + assert_eq!(act.concepts, vec![("c0805".to_string(), 0x0805)]); + assert_eq!(act.capabilities, vec!["recognize_line".to_string()]); + assert!(matches!( + auth.activate(&HotPlug { + classids: &[0xDEAD], + ..plug + }), + Err(ActivationDrift::UnknownClassid(0xDEAD)) + )); + } +} diff --git a/crates/lance-graph-contract/src/lib.rs b/crates/lance-graph-contract/src/lib.rs index db27b286..89140f71 100644 --- a/crates/lance-graph-contract/src/lib.rs +++ b/crates/lance-graph-contract/src/lib.rs @@ -91,6 +91,7 @@ pub mod hash; pub mod head2head; pub mod hhtl; pub mod high_heel; +pub mod hotplug; pub mod jit; pub mod kanban; pub mod literal_graph; diff --git a/crates/lance-graph-ogar/src/lib.rs b/crates/lance-graph-ogar/src/lib.rs index 83bdf590..4621048a 100644 --- a/crates/lance-graph-ogar/src/lib.rs +++ b/crates/lance-graph-ogar/src/lib.rs @@ -251,3 +251,71 @@ mod tests { let _as_trait: &dyn ClassView = &view; } } + +/// The generic hot-plug bridge (operator, 2026-07-07): "lance-graph-contract +/// pulling into OGAR with a generic activation." The contract defines the +/// zero-dep SOCKET ([`lance_graph_contract::hotplug`]); OGAR owns the data +/// resolution (`ogar_vocab::capability_registry::resolve_hotplug`); THIS +/// workspace-excluded crate is where the two meet in one binary. A consumer +/// declares a [`lance_graph_contract::hotplug::HotPlug`] const and activates +/// it through this authority (or calls `resolve_hotplug` directly — same +/// data path, same drift arms). +pub struct OgarAuthority; + +impl lance_graph_contract::hotplug::CapabilityAuthority for OgarAuthority { + fn activate( + &self, + plug: &lance_graph_contract::hotplug::HotPlug, + ) -> Result< + lance_graph_contract::hotplug::Activation, + lance_graph_contract::hotplug::ActivationDrift, + > { + use lance_graph_contract::hotplug::{Activation, ActivationDrift}; + use ogar_vocab::capability_registry::{resolve_hotplug, HotplugDrift}; + + match resolve_hotplug(plug.consumer, plug.classids, plug.covered) { + Ok((concepts, capabilities)) => Ok(Activation { + concepts: concepts + .into_iter() + .map(|(name, id)| (name.to_string(), id)) + .collect(), + capabilities, + }), + Err(HotplugDrift::UnknownClassid(id)) => Err(ActivationDrift::UnknownClassid(id)), + Err(HotplugDrift::NoCapabilitiesFor(id)) => Err(ActivationDrift::NoCapabilitiesFor(id)), + Err(HotplugDrift::UnexpectedConsumer(c)) => Err(ActivationDrift::UnexpectedConsumer(c)), + Err(HotplugDrift::Uncovered(c)) => Err(ActivationDrift::Uncovered(c)), + Err(HotplugDrift::Undeclared(c)) => Err(ActivationDrift::Undeclared(c)), + } + } +} + +#[cfg(test)] +mod hotplug_bridge_tests { + use lance_graph_contract::hotplug::{CapabilityAuthority, HotPlug}; + + /// The generic activation, end to end through the contract socket: the + /// OCR consumer's plug resolves to the 3 vocab rows + 8 capabilities. + #[test] + fn ocr_hotplug_activates_through_the_contract_socket() { + let plug = HotPlug { + consumer: "tesseract-ogar", + classids: &[0x0805, 0x0808, 0x0809], + covered: &[ + "extract_page_image", + "extract_text_layer", + "recognize_line", + "recognize_page", + "render_hocr", + "render_searchable_pdf", + "render_text", + "render_tsv", + ], + }; + let auth: &dyn CapabilityAuthority = &super::OgarAuthority; + let act = auth.activate(&plug).expect("green activation"); + assert_eq!(act.concepts.len(), 3); + assert!(act.concepts.contains(&("textline".to_string(), 0x0805))); + assert_eq!(act.capabilities.len(), 8); + } +} From 7cc6279185684f355395ea9af58ea5d1f0936942 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Jul 2026 16:33:14 +0000 Subject: [PATCH 5/7] CI: run the lance-graph-ogar fuse tests (armed tier) in rust-test Review finding on #658 (still valid after the armed-contract revert): the entry-level mirror<->live-vocab parity and the roundtrip green light live in the workspace-EXCLUDED lance-graph-ogar crate, so CI never executed them -- COUNT_FUSE alone cannot catch a same-sized codebook remap. The OGAR sibling checkout already exists in this workflow; one scoped test step closes the gap. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1 --- .github/workflows/rust-test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/rust-test.yml b/.github/workflows/rust-test.yml index f8c0c8db..22fd6b0e 100644 --- a/.github/workflows/rust-test.yml +++ b/.github/workflows/rust-test.yml @@ -113,6 +113,14 @@ jobs: run: cargo test --manifest-path crates/lance-graph-contract/Cargo.toml --tests - name: Run contract doctests run: cargo test --manifest-path crates/lance-graph-contract/Cargo.toml --doc + # lance-graph-ogar is the workspace-EXCLUDED armed tier: it owns the + # mirror<->live-vocab fuses (COUNT_FUSE, per-entry parity, the + # authoritative-table roundtrip green light) against the OGAR sibling + # checked out above. Without this step those fuses only ever ran on a + # developer machine — a same-sized codebook remap would ship green + # (codex/coderabbit finding on PR #658). One scoped step closes it. + - name: Run lance-graph-ogar fuse tests (armed tier, OGAR sibling) + run: cargo test --manifest-path crates/lance-graph-ogar/Cargo.toml # deepnsm: standalone 0-dep codec crate, workspace-excluded, so the # lance-graph test steps above never reached it. ~217 lib + integration + # doctests, fast (no lance/datafusion/ndarray deps). Gating. From d72c46fa9e75a50a245904c16d66d6c167e83467 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Jul 2026 16:38:46 +0000 Subject: [PATCH 6/7] Drop the accidental cargo-fmt sweep of 69 unrelated files A diagnostic `cargo fmt --all` run (reproducing the CI failure) reformatted ~60 files this PR never intended to touch, and a later `git add -A` swept them in -- ontology hydrators, planner, callcenter, thinking-engine, etc. Restored to origin/main byte-for-byte; the pre-existing workspace fmt drift stays a separate concern (noted in the PR body). The PR is back to its declared surface: NO-PIN path deps, zero-dep contract + hotplug socket, lance-graph-ogar armed tier + OgarAuthority, CI sibling checkouts + fuse gate, dawg preflight, board notes. Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1 --- crates/bgz-tensor/src/matryoshka.rs | 4 +- .../src/graph_gremlin.rs | 5 +- .../lance-graph-callcenter/src/graph_table.rs | 20 +- .../src/odoo_alignment.rs | 10 +- .../src/savant_reasoners.rs | 157 +- .../src/hydrators/dolce.rs | 11 +- .../src/hydrators/fibo.rs | 10 +- .../lance-graph-ontology/src/hydrators/mod.rs | 4 +- .../src/hydrators/odoo.rs | 17 +- .../lance-graph-ontology/src/hydrators/owl.rs | 22 +- .../src/hydrators/provo.rs | 5 +- .../src/hydrators/schematron.rs | 42 +- .../lance-graph-ontology/src/hydrators/skr.rs | 6 +- .../src/hydrators/skr_datev.rs | 10 +- .../lance-graph-ontology/src/hydrators/xsd.rs | 45 +- .../src/hydrators/zugferd.rs | 5 +- .../lance-graph-ontology/src/lance_cache.rs | 93 +- crates/lance-graph-ontology/src/lib.rs | 10 +- .../src/namespace_registry.rs | 3 +- .../src/odoo_blueprint/extracted/account.rs | 1149 +++++---- .../extracted/account_edi_ubl_cii.rs | 243 +- .../extracted/account_payment.rs | 120 +- .../extracted/account_peppol.rs | 181 +- .../src/odoo_blueprint/extracted/analytic.rs | 178 +- .../src/odoo_blueprint/extracted/base.rs | 2141 +++++++++-------- .../src/odoo_blueprint/extracted/coverage.rs | 41 +- .../src/odoo_blueprint/extracted/l10n_de.rs | 225 +- .../odoo_blueprint/extracted/l10n_de_chart.rs | 186 +- .../extracted/l10n_de_kennzahlen.rs | 75 +- .../src/odoo_blueprint/extracted/pairing.rs | 9 +- .../src/odoo_blueprint/extracted/product.rs | 487 ++-- .../src/odoo_blueprint/extracted/purchase.rs | 361 ++- .../src/odoo_blueprint/extracted/sale.rs | 473 ++-- .../src/odoo_blueprint/extracted/stock.rs | 854 +++---- .../src/odoo_blueprint/extracted/uom.rs | 12 +- .../src/odoo_blueprint/l1.rs | 1017 ++------ .../src/odoo_blueprint/l10.rs | 30 +- .../src/odoo_blueprint/l11.rs | 43 +- .../src/odoo_blueprint/l12.rs | 32 +- .../src/odoo_blueprint/l13.rs | 48 +- .../src/odoo_blueprint/l14.rs | 40 +- .../src/odoo_blueprint/l15.rs | 18 +- .../src/odoo_blueprint/l2.rs | 51 +- .../src/odoo_blueprint/l3.rs | 29 +- .../src/odoo_blueprint/l4.rs | 33 +- .../src/odoo_blueprint/l5.rs | 46 +- .../src/odoo_blueprint/l6.rs | 1478 +++--------- .../src/odoo_blueprint/l7.rs | 1056 ++------ .../src/odoo_blueprint/l8.rs | 1015 ++------ .../src/odoo_blueprint/l9.rs | 841 ++----- .../src/odoo_blueprint/mod.rs | 27 +- .../src/odoo_blueprint/op_emitter.rs | 54 +- .../src/odoo_blueprint/structural.rs | 11 +- .../src/odoo_blueprint/style_recipe.rs | 50 +- .../tests/dolce_edge_whitelist_registered.rs | 4 +- .../tests/odoo_dolce_classifier.rs | 45 +- .../tests/odoo_hydrator_smoke.rs | 4 +- .../tests/skos_hydrator_smoke.rs | 7 +- .../tests/skr_hydrator_smoke.rs | 30 +- .../tests/zugferd_hydrator_smoke.rs | 3 +- .../tests/zugferd_rules_hydrator_smoke.rs | 14 +- .../src/cache/nars_engine.rs | 14 +- .../lance-graph-planner/src/mul/escalation.rs | 6 +- crates/lance-graph-planner/src/temporal.rs | 90 +- crates/lance-graph-planner/tests/w1_probes.rs | 15 +- .../tests/w2b_real_owner_probe.rs | 4 +- crates/sigma-tier-router/src/lib.rs | 88 +- .../surreal_container/tests/scheduler_seam.rs | 47 +- crates/thinking-engine/src/layered.rs | 75 +- 69 files changed, 4820 insertions(+), 8759 deletions(-) diff --git a/crates/bgz-tensor/src/matryoshka.rs b/crates/bgz-tensor/src/matryoshka.rs index c7e5515f..1eea28a0 100644 --- a/crates/bgz-tensor/src/matryoshka.rs +++ b/crates/bgz-tensor/src/matryoshka.rs @@ -555,9 +555,7 @@ pub fn decode_row(encoded: &MatryoshkaRow, basis: &SvdBasis, profile: &BandProfi // Cap to the coeff buffer: the basis rank can be lower than the // profile's nominal max (e.g. fewer sample rows than requested // components), so a band may extend past the available coeffs. - let n = band - .n_components() - .min(coeffs.len().saturating_sub(band.start)); + let n = band.n_components().min(coeffs.len().saturating_sub(band.start)); match band.precision { BandPrecision::I16 => { diff --git a/crates/lance-graph-callcenter/src/graph_gremlin.rs b/crates/lance-graph-callcenter/src/graph_gremlin.rs index ed876bc7..c314becb 100644 --- a/crates/lance-graph-callcenter/src/graph_gremlin.rs +++ b/crates/lance-graph-callcenter/src/graph_gremlin.rs @@ -229,10 +229,7 @@ mod tests { fn values_kind_projects_node_property() { let s = sample(); // A's "member-of" neighbour is the family hub → kind "Family". - assert_eq!( - g(&s).v(&["A"]).out_e("member-of").values_kind(), - vec!["Family"] - ); + assert_eq!(g(&s).v(&["A"]).out_e("member-of").values_kind(), vec!["Family"]); } #[test] diff --git a/crates/lance-graph-callcenter/src/graph_table.rs b/crates/lance-graph-callcenter/src/graph_table.rs index 81285fc5..cabf0499 100644 --- a/crates/lance-graph-callcenter/src/graph_table.rs +++ b/crates/lance-graph-callcenter/src/graph_table.rs @@ -96,7 +96,10 @@ pub fn edges_table(snap: &GraphSnapshot) -> DfResult { pub fn graph_tables( snap: &GraphSnapshot, ) -> DfResult<(Arc, Arc)> { - Ok((Arc::new(nodes_table(snap)?), Arc::new(edges_table(snap)?))) + Ok(( + Arc::new(nodes_table(snap)?), + Arc::new(edges_table(snap)?), + )) } /// Register `nodes` + `edges` into a DataFusion `SessionContext`, so a consumer @@ -177,10 +180,7 @@ mod tests { let member_a = snap .nodes .iter() - .find(|n| { - n.kind == "OSINT/Gotham" - && n.props.iter().any(|(k, v)| k == "family" && v == "00000a") - }) + .find(|n| n.kind == "OSINT/Gotham" && n.props.iter().any(|(k, v)| k == "family" && v == "00000a")) .unwrap() .id .clone(); @@ -192,13 +192,13 @@ mod tests { .unwrap(); let batches = df.collect().await.unwrap(); let rows: usize = batches.iter().map(|b| b.num_rows()).sum(); - assert_eq!( - rows, 1, - "the out-of-family adapter edge is queryable via SQL" - ); + assert_eq!(rows, 1, "the out-of-family adapter edge is queryable via SQL"); // GROUP BY over node kinds: 2 OSINT members + 2 family nodes. - let df = ctx.sql("SELECT count(*) AS n FROM nodes").await.unwrap(); + let df = ctx + .sql("SELECT count(*) AS n FROM nodes") + .await + .unwrap(); let batches = df.collect().await.unwrap(); assert_eq!(batches[0].num_rows(), 1); } diff --git a/crates/lance-graph-callcenter/src/odoo_alignment.rs b/crates/lance-graph-callcenter/src/odoo_alignment.rs index 630c5617..effd34ab 100644 --- a/crates/lance-graph-callcenter/src/odoo_alignment.rs +++ b/crates/lance-graph-callcenter/src/odoo_alignment.rs @@ -684,20 +684,14 @@ mod tests { #[test] fn resolve_odoo_style_chains_class_to_cluster() { // res.partner → SmbFoundryCustomer (0x80) → Empathic. - assert_eq!( - resolve_odoo_style("res.partner"), - Some(StyleCluster::Empathic) - ); + assert_eq!(resolve_odoo_style("res.partner"), Some(StyleCluster::Empathic)); // product.pricelist → ProductCatalog (0x64) → Analytical. assert_eq!( resolve_odoo_style("product.pricelist"), Some(StyleCluster::Analytical) ); // hr.employee → HRFoundation (0x90) → Empathic. - assert_eq!( - resolve_odoo_style("hr.employee"), - Some(StyleCluster::Empathic) - ); + assert_eq!(resolve_odoo_style("hr.employee"), Some(StyleCluster::Empathic)); // unmapped class → None. assert_eq!(resolve_odoo_style("stock.move"), None); } diff --git a/crates/lance-graph-callcenter/src/savant_reasoners.rs b/crates/lance-graph-callcenter/src/savant_reasoners.rs index c8ba9e0f..f007e5e6 100644 --- a/crates/lance-graph-callcenter/src/savant_reasoners.rs +++ b/crates/lance-graph-callcenter/src/savant_reasoners.rs @@ -20,8 +20,8 @@ //! No serialization anywhere in this module. JSON exists only at the //! callcenter ↔ MedCareV2 FFI boundary, never on these types. -use core::future::Future; use std::borrow::Cow; +use core::future::Future; use lance_graph_contract::exploration::NarsTruth; use lance_graph_contract::nars::QueryStrategy; @@ -91,56 +91,30 @@ pub enum SavantSuggestion { fn suggestion_for(savant: &Savant) -> SavantSuggestion { use SavantSuggestion::*; match savant.id { - 1 => SelectFromTable { - candidate_table: Cow::Borrowed("account_fiscal_position"), - }, + 1 => SelectFromTable { candidate_table: Cow::Borrowed("account_fiscal_position") }, 2 => PolicyChoice, - 3 => SelectFromTable { - candidate_table: Cow::Borrowed("product.pricelist"), - }, - 4 => Distribution { - over_table: Cow::Borrowed("account.analytic.distribution.model"), - }, - 5 => SelectFromTable { - candidate_table: Cow::Borrowed("account.analytic.distribution.model"), - }, + 3 => SelectFromTable { candidate_table: Cow::Borrowed("product.pricelist") }, + 4 => Distribution { over_table: Cow::Borrowed("account.analytic.distribution.model") }, + 5 => SelectFromTable { candidate_table: Cow::Borrowed("account.analytic.distribution.model") }, 6 => Anomaly, - 7 => SelectFromTable { - candidate_table: Cow::Borrowed("account.account"), - }, + 7 => SelectFromTable { candidate_table: Cow::Borrowed("account.account") }, 8 => PolicyChoice, - 9 => RankedSet { - from_table: Cow::Borrowed("res.currency"), - }, + 9 => RankedSet { from_table: Cow::Borrowed("res.currency") }, 10 => PolicyChoice, - 11 => SelectFromTable { - candidate_table: Cow::Borrowed("stock.rule"), - }, + 11 => SelectFromTable { candidate_table: Cow::Borrowed("stock.rule") }, 12 => AdvancePeriod, - 13 => Distribution { - over_table: Cow::Borrowed("stock.warehouse.orderpoint"), - }, - 14 => SelectFromTable { - candidate_table: Cow::Borrowed("stock.route"), - }, + 13 => Distribution { over_table: Cow::Borrowed("stock.warehouse.orderpoint") }, + 14 => SelectFromTable { candidate_table: Cow::Borrowed("stock.route") }, 15 => PolicyChoice, 17 => Gate, 18 => AdvancePeriod, - 19 => RankedSet { - from_table: Cow::Borrowed("account.move.line"), - }, - 20 => SelectFromTable { - candidate_table: Cow::Borrowed("account.reconcile.model"), - }, + 19 => RankedSet { from_table: Cow::Borrowed("account.move.line") }, + 20 => SelectFromTable { candidate_table: Cow::Borrowed("account.reconcile.model") }, 21 => Gate, 22 => Gate, - 23 => SelectFromTable { - candidate_table: Cow::Borrowed("product.pricelist.item"), - }, + 23 => SelectFromTable { candidate_table: Cow::Borrowed("product.pricelist.item") }, 24 => PolicyChoice, - 25 => RankedSet { - from_table: Cow::Borrowed("stock.move"), - }, + 25 => RankedSet { from_table: Cow::Borrowed("stock.move") }, 26 => Gate, _ => PolicyChoice, } @@ -200,10 +174,8 @@ fn kind_matches(a: ReasoningKind, b: ReasoningKind) -> bool { /// A kind with a single roster savant ignores the namespace; a kind with /// several resolves via [`DISPATCH_NS`] first, then by `namespace == savant.name`. pub fn resolve_savant(kind: ReasoningKind, namespace: &str) -> Option<&'static Savant> { - let candidates: Vec<&'static Savant> = SAVANTS - .iter() - .filter(|s| kind_matches(s.kind, kind)) - .collect(); + let candidates: Vec<&'static Savant> = + SAVANTS.iter().filter(|s| kind_matches(s.kind, kind)).collect(); match candidates.len() { 0 => None, 1 => Some(candidates[0]), @@ -367,37 +339,19 @@ mod tests { } fn budget() -> Budget { - Budget { - max_tokens: 1000, - max_ms: 100, - max_evidence_rows: 100, - } + Budget { max_tokens: 1000, max_ms: 100, max_evidence_rows: 100 } } fn ev(table: &'static str, rows: u64) -> EvidenceRef<'static> { - EvidenceRef { - table, - schema_fingerprint: 0, - rows, - } + EvidenceRef { table, schema_fingerprint: 0, rows } } - fn ctx<'a>( - kind: ReasoningKind, - ns: &'a str, - evidence: &'a [EvidenceRef<'a>], - ) -> ReasoningContext<'a> { - ReasoningContext { - namespace: ns, - kind, - evidence, - budget: budget(), - } + fn ctx<'a>(kind: ReasoningKind, ns: &'a str, evidence: &'a [EvidenceRef<'a>]) -> ReasoningContext<'a> { + ReasoningContext { namespace: ns, kind, evidence, budget: budget() } } #[test] fn resolves_ambiguous_kind_by_savant_name() { // PostingAnomaly has 3 savants → namespace=name disambiguates. - let s = - resolve_savant(ReasoningKind::PostingAnomaly, "SequenceGapAnomalyDetector").unwrap(); + let s = resolve_savant(ReasoningKind::PostingAnomaly, "SequenceGapAnomalyDetector").unwrap(); assert_eq!(s.id, 6); let s2 = resolve_savant(ReasoningKind::PostingAnomaly, "LockDateAdvancer").unwrap(); assert_eq!(s2.id, 18); @@ -405,16 +359,8 @@ mod tests { #[test] fn other_reconcile_match_splits_by_namespace() { - let a = resolve_savant( - ReasoningKind::Other(other_kind::RECONCILE_MATCH), - "erp.k3.reconcile_match", - ) - .unwrap(); - let b = resolve_savant( - ReasoningKind::Other(other_kind::RECONCILE_MATCH), - "erp.k3.payment_reconcile", - ) - .unwrap(); + let a = resolve_savant(ReasoningKind::Other(other_kind::RECONCILE_MATCH), "erp.k3.reconcile_match").unwrap(); + let b = resolve_savant(ReasoningKind::Other(other_kind::RECONCILE_MATCH), "erp.k3.payment_reconcile").unwrap(); assert_eq!(a.id, 19, "ReconcileMatchSelector"); assert_eq!(b.id, 21, "PaymentToInvoiceMatcher"); } @@ -422,25 +368,14 @@ mod tests { #[test] fn other_single_candidate_ignores_namespace() { // PRICELIST_ASSIGNMENT (code 1) has one savant — namespace irrelevant. - let s = resolve_savant( - ReasoningKind::Other(other_kind::PRICELIST_ASSIGNMENT), - "whatever", - ) - .unwrap(); + let s = resolve_savant(ReasoningKind::Other(other_kind::PRICELIST_ASSIGNMENT), "whatever").unwrap(); assert_eq!(s.id, 3, "PricelistAssignmentAgent"); } #[test] fn conclusion_strategy_follows_inference_type() { let fiscal = savant_by_name("FiscalPositionResolver").unwrap(); - let c = build_conclusion( - fiscal, - &ctx( - ReasoningKind::CustomerCategory, - "FiscalPositionResolver", - &[ev("account_fiscal_position", 3)], - ), - ); + let c = build_conclusion(fiscal, &ctx(ReasoningKind::CustomerCategory, "FiscalPositionResolver", &[ev("account_fiscal_position", 3)])); assert_eq!(c.savant_id, 1); // Deduction → CamExact. assert_eq!(c.query_strategy, QueryStrategy::CamExact); @@ -449,28 +384,11 @@ mod tests { #[test] fn confidence_is_monotone_in_evidence() { let s = savant_by_name("AutopostRecommender").unwrap(); - let low = build_conclusion( - s, - &ctx( - ReasoningKind::PostingAnomaly, - "AutopostRecommender", - &[ev("account_move", 1)], - ), - ); - let hi = build_conclusion( - s, - &ctx( - ReasoningKind::PostingAnomaly, - "AutopostRecommender", - &[ev("account_move", 50)], - ), - ); + let low = build_conclusion(s, &ctx(ReasoningKind::PostingAnomaly, "AutopostRecommender", &[ev("account_move", 1)])); + let hi = build_conclusion(s, &ctx(ReasoningKind::PostingAnomaly, "AutopostRecommender", &[ev("account_move", 50)])); assert!(hi.confidence.frequency >= low.confidence.frequency); assert!(hi.confidence.confidence > low.confidence.confidence); - assert!( - hi.confidence.confidence <= 0.99, - "NarsTruth caps confidence" - ); + assert!(hi.confidence.confidence <= 0.99, "NarsTruth caps confidence"); } #[test] @@ -488,16 +406,13 @@ mod tests { #[test] fn other_reasoner_rejects_non_other_kind() { - let err = block_on(OtherReasoner.reason(ctx(ReasoningKind::CustomerCategory, "x", &[]))) - .unwrap_err(); + let err = block_on(OtherReasoner.reason(ctx(ReasoningKind::CustomerCategory, "x", &[]))).unwrap_err(); assert_eq!(err, SavantError::KindMismatch); } #[test] fn wrong_reasoner_for_kind_is_mismatch() { - let err = - block_on(PostingAnomalyReasoner.reason(ctx(ReasoningKind::NextBestAction, "x", &[]))) - .unwrap_err(); + let err = block_on(PostingAnomalyReasoner.reason(ctx(ReasoningKind::NextBestAction, "x", &[]))).unwrap_err(); assert_eq!(err, SavantError::KindMismatch); } @@ -507,11 +422,7 @@ mod tests { // named in slot 1 of its spec (`account_fiscal_position`). let fiscal = build_conclusion( savant_by_name("FiscalPositionResolver").unwrap(), - &ctx( - ReasoningKind::CustomerCategory, - "FiscalPositionResolver", - &[], - ), + &ctx(ReasoningKind::CustomerCategory, "FiscalPositionResolver", &[]), ); assert!(matches!( &fiscal.suggestion, @@ -520,11 +431,7 @@ mod tests { // SequenceGapAnomalyDetector → Anomaly. let gap = build_conclusion( savant_by_name("SequenceGapAnomalyDetector").unwrap(), - &ctx( - ReasoningKind::PostingAnomaly, - "SequenceGapAnomalyDetector", - &[], - ), + &ctx(ReasoningKind::PostingAnomaly, "SequenceGapAnomalyDetector", &[]), ); assert_eq!(gap.suggestion, SavantSuggestion::Anomaly); // AutopostRecommender / PaymentToInvoiceMatcher → Gate. diff --git a/crates/lance-graph-ontology/src/hydrators/dolce.rs b/crates/lance-graph-ontology/src/hydrators/dolce.rs index a0b5f6d8..181f2364 100644 --- a/crates/lance-graph-ontology/src/hydrators/dolce.rs +++ b/crates/lance-graph-ontology/src/hydrators/dolce.rs @@ -87,10 +87,8 @@ const DOLCE_EDGE_WHITELIST: &[&str] = &[ /// [`OntologyRegistry::register_edge_types`]. pub fn hydrate_dolce(registry: &OntologyRegistry) -> Result { let dul = dul_ttl_path(); - let extensions: Vec = DUL_EXTENSION_RELATIVE_PATHS - .iter() - .map(extension_path) - .collect(); + let extensions: Vec = + DUL_EXTENSION_RELATIVE_PATHS.iter().map(extension_path).collect(); let mut paths: Vec<&Path> = Vec::with_capacity(1 + extensions.len()); paths.push(&dul); for ext in &extensions { @@ -104,7 +102,10 @@ pub fn hydrate_dolce(registry: &OntologyRegistry) -> Result { /// Test-friendly variant: hydrate DOLCE from an explicit single path /// (typically a test fixture). Use [`hydrate_dolce_from_many`] when you want /// to mix the canonical DUL.ttl with extension modules. -pub fn hydrate_dolce_from(ttl_path: &Path, registry: &OntologyRegistry) -> Result { +pub fn hydrate_dolce_from( + ttl_path: &Path, + registry: &OntologyRegistry, +) -> Result { hydrate_dolce_from_many(&[ttl_path], registry) } diff --git a/crates/lance-graph-ontology/src/hydrators/fibo.rs b/crates/lance-graph-ontology/src/hydrators/fibo.rs index dad808c7..ee223f2f 100644 --- a/crates/lance-graph-ontology/src/hydrators/fibo.rs +++ b/crates/lance-graph-ontology/src/hydrators/fibo.rs @@ -91,7 +91,10 @@ pub fn hydrate_fibo_fnd(registry: &OntologyRegistry) -> Result } /// Test-friendly variant: hydrate FIBO-FND from an explicit directory. -pub fn hydrate_fibo_fnd_from(dir: &Path, registry: &OntologyRegistry) -> Result { +pub fn hydrate_fibo_fnd_from( + dir: &Path, + registry: &OntologyRegistry, +) -> Result { let files = collect_rdf_files(dir)?; let path_refs: Vec<&Path> = files.iter().map(|p| p.as_path()).collect(); let hydrator = OwlHydrator { @@ -117,7 +120,10 @@ pub fn hydrate_fibo_be(registry: &OntologyRegistry) -> Result { } /// Test-friendly variant: hydrate FIBO-BE from an explicit directory. -pub fn hydrate_fibo_be_from(dir: &Path, registry: &OntologyRegistry) -> Result { +pub fn hydrate_fibo_be_from( + dir: &Path, + registry: &OntologyRegistry, +) -> Result { let files = collect_rdf_files(dir)?; let path_refs: Vec<&Path> = files.iter().map(|p| p.as_path()).collect(); let hydrator = OwlHydrator { diff --git a/crates/lance-graph-ontology/src/hydrators/mod.rs b/crates/lance-graph-ontology/src/hydrators/mod.rs index 0e97a776..8d82b338 100644 --- a/crates/lance-graph-ontology/src/hydrators/mod.rs +++ b/crates/lance-graph-ontology/src/hydrators/mod.rs @@ -38,9 +38,7 @@ pub use dolce::{hydrate_dolce, hydrate_dolce_from, hydrate_dolce_from_many}; pub use dolce_odoo::{classify_odoo, DolceCategory}; pub use fibo::{hydrate_fibo_be, hydrate_fibo_be_from, hydrate_fibo_fnd, hydrate_fibo_fnd_from}; pub use odoo::{hydrate_odoo, hydrate_odoo_from}; -pub use owl::{ - ContextBundle, EntityId, HydrateErr, MetaStructureHydrator, OntologySlot, OwlHydrator, -}; +pub use owl::{ContextBundle, EntityId, HydrateErr, MetaStructureHydrator, OntologySlot, OwlHydrator}; pub use owltime::{hydrate_owltime, hydrate_owltime_from}; pub use provo::{hydrate_provo, hydrate_provo_from}; pub use qudt::{hydrate_qudt, hydrate_qudt_from}; diff --git a/crates/lance-graph-ontology/src/hydrators/odoo.rs b/crates/lance-graph-ontology/src/hydrators/odoo.rs index 604b3113..f0833e35 100644 --- a/crates/lance-graph-ontology/src/hydrators/odoo.rs +++ b/crates/lance-graph-ontology/src/hydrators/odoo.rs @@ -77,10 +77,8 @@ const ODOO_EDGE_WHITELIST: &[&str] = &[ /// cascade edge whitelist. pub fn hydrate_odoo(registry: &OntologyRegistry) -> Result { let core = odoo_core_path(); - let alignments: Vec = ODOO_ALIGNMENT_RELATIVE_PATHS - .iter() - .map(alignment_path) - .collect(); + let alignments: Vec = + ODOO_ALIGNMENT_RELATIVE_PATHS.iter().map(alignment_path).collect(); let mut paths: Vec<&Path> = Vec::with_capacity(1 + alignments.len()); paths.push(&core); for a in &alignments { @@ -97,7 +95,10 @@ pub fn hydrate_odoo(registry: &OntologyRegistry) -> Result { /// [`super::owl::ContextBundle`] keyed by `OGIT::ODOO_V1.0`, then registers the /// cascade edge whitelist. Used by [`hydrate_odoo`] to merge the core seed with /// the alignment overlays, and by tests that compose a custom bundle. -pub fn hydrate_odoo_from(paths: &[&Path], registry: &OntologyRegistry) -> Result { +pub fn hydrate_odoo_from( + paths: &[&Path], + registry: &OntologyRegistry, +) -> Result { let hydrator = OwlHydrator { g: OGIT::ODOO_V1.0, version: OGIT::ODOO_V1.1, @@ -148,11 +149,13 @@ mod tests { #[test] fn odoo_edge_whitelist_has_the_two_load_bearing_iris() { assert!( - ODOO_EDGE_WHITELIST.contains(&"http://www.w3.org/2000/01/rdf-schema#subClassOf"), + ODOO_EDGE_WHITELIST + .contains(&"http://www.w3.org/2000/01/rdf-schema#subClassOf"), "rdfs:subClassOf is load-bearing" ); assert!( - ODOO_EDGE_WHITELIST.contains(&"http://www.w3.org/2002/07/owl#equivalentClass"), + ODOO_EDGE_WHITELIST + .contains(&"http://www.w3.org/2002/07/owl#equivalentClass"), "owl:equivalentClass is load-bearing" ); } diff --git a/crates/lance-graph-ontology/src/hydrators/owl.rs b/crates/lance-graph-ontology/src/hydrators/owl.rs index 30f68099..b952d355 100644 --- a/crates/lance-graph-ontology/src/hydrators/owl.rs +++ b/crates/lance-graph-ontology/src/hydrators/owl.rs @@ -192,16 +192,18 @@ impl OwlHydrator { let mut iri_to_id: HashMap = HashMap::new(); let mut next_id: EntityId = self.starting_entity_id; - let intern = - |iri: &str, map: &mut HashMap, n: &mut EntityId| -> EntityId { - if let Some(&id) = map.get(iri) { - return id; - } - let id = *n; - *n += 1; - map.insert(iri.to_string(), id); - id - }; + let intern = |iri: &str, + map: &mut HashMap, + n: &mut EntityId| + -> EntityId { + if let Some(&id) = map.get(iri) { + return id; + } + let id = *n; + *n += 1; + map.insert(iri.to_string(), id); + id + }; for ttl_path in ttl_paths { let bytes = fs::read(ttl_path).map_err(|e| HydrateErr::Io { diff --git a/crates/lance-graph-ontology/src/hydrators/provo.rs b/crates/lance-graph-ontology/src/hydrators/provo.rs index 28405b86..ca895421 100644 --- a/crates/lance-graph-ontology/src/hydrators/provo.rs +++ b/crates/lance-graph-ontology/src/hydrators/provo.rs @@ -54,7 +54,10 @@ pub fn hydrate_provo(registry: &OntologyRegistry) -> Result { } /// Test-friendly variant: hydrate PROV-O from an explicit path. -pub fn hydrate_provo_from(ttl_path: &Path, registry: &OntologyRegistry) -> Result { +pub fn hydrate_provo_from( + ttl_path: &Path, + registry: &OntologyRegistry, +) -> Result { let hydrator = OwlHydrator { g: OGIT::PROVO_V1.0, version: OGIT::PROVO_V1.1, diff --git a/crates/lance-graph-ontology/src/hydrators/schematron.rs b/crates/lance-graph-ontology/src/hydrators/schematron.rs index cee04554..cabb8799 100644 --- a/crates/lance-graph-ontology/src/hydrators/schematron.rs +++ b/crates/lance-graph-ontology/src/hydrators/schematron.rs @@ -76,7 +76,13 @@ impl SchematronHydrator { path: path.to_path_buf(), source: e, })?; - walk_sch(path, &bytes, &self.base_iri, &mut iri_to_id, &mut next_id)?; + walk_sch( + path, + &bytes, + &self.base_iri, + &mut iri_to_id, + &mut next_id, + )?; } let entity_count = iri_to_id.len() as u32; @@ -359,13 +365,13 @@ mod tests { assert!(looks_like_business_rule_id("PEPPOL-EN16931-R008")); assert!(looks_like_business_rule_id("BR-DEC-19")); // Negatives. - assert!(!looks_like_business_rule_id("br-52")); // lowercase - assert!(!looks_like_business_rule_id("BR")); // no dash - assert!(!looks_like_business_rule_id("-BR")); // leading dash - assert!(!looks_like_business_rule_id("BR-")); // trailing dash - assert!(!looks_like_business_rule_id("BR--52")); // double dash - assert!(!looks_like_business_rule_id("BR 52")); // space - assert!(!looks_like_business_rule_id("1BR-2")); // leading digit + assert!(!looks_like_business_rule_id("br-52")); // lowercase + assert!(!looks_like_business_rule_id("BR")); // no dash + assert!(!looks_like_business_rule_id("-BR")); // leading dash + assert!(!looks_like_business_rule_id("BR-")); // trailing dash + assert!(!looks_like_business_rule_id("BR--52")); // double dash + assert!(!looks_like_business_rule_id("BR 52")); // space + assert!(!looks_like_business_rule_id("1BR-2")); // leading digit } #[test] @@ -419,29 +425,19 @@ mod tests { let bundle = reg.bundle_for(6666).expect("bundle"); // Assert IDs from both the empty and the normal assert resolve. - assert!(bundle - .resolve_iri("urn:schematron:test/assert/A-EMPTY-001") - .is_some()); - assert!(bundle - .resolve_iri("urn:schematron:test/assert/A-NORMAL-001") - .is_some()); - assert!(bundle - .resolve_iri("urn:schematron:test/pattern/P-empty") - .is_some()); + assert!(bundle.resolve_iri("urn:schematron:test/assert/A-EMPTY-001").is_some()); + assert!(bundle.resolve_iri("urn:schematron:test/assert/A-NORMAL-001").is_some()); + assert!(bundle.resolve_iri("urn:schematron:test/pattern/P-empty").is_some()); // BR-42 from the NORMAL assert's body must resolve (positive control). assert!( - bundle - .resolve_iri("urn:schematron:test/rule/BR-42") - .is_some(), + bundle.resolve_iri("urn:schematron:test/rule/BR-42").is_some(), "BR-42 from the normal assert's message body must resolve" ); // BR-99 from text OUTSIDE any assert/report must NOT resolve. assert!( - bundle - .resolve_iri("urn:schematron:test/rule/BR-99") - .is_none(), + bundle.resolve_iri("urn:schematron:test/rule/BR-99").is_none(), "BR-99 was in stray text outside an assert; must NOT have been \ interned as a rule IRI (this was the P2 corruption case)" ); diff --git a/crates/lance-graph-ontology/src/hydrators/skr.rs b/crates/lance-graph-ontology/src/hydrators/skr.rs index 2fc4c9a0..0fb98e5d 100644 --- a/crates/lance-graph-ontology/src/hydrators/skr.rs +++ b/crates/lance-graph-ontology/src/hydrators/skr.rs @@ -56,7 +56,11 @@ pub struct SkrHydrator { impl SkrHydrator { /// Read the CSV at `csv_path` and intern each row's account number as /// `{iri_prefix}/{account_number}`. - pub fn hydrate(&self, csv_path: &Path, registry: &OntologyRegistry) -> Result { + pub fn hydrate( + &self, + csv_path: &Path, + registry: &OntologyRegistry, + ) -> Result { let bytes = fs::read(csv_path).map_err(|e| HydrateErr::Io { path: csv_path.to_path_buf(), source: e, diff --git a/crates/lance-graph-ontology/src/hydrators/skr_datev.rs b/crates/lance-graph-ontology/src/hydrators/skr_datev.rs index c1aeaa65..e02f5ac5 100644 --- a/crates/lance-graph-ontology/src/hydrators/skr_datev.rs +++ b/crates/lance-graph-ontology/src/hydrators/skr_datev.rs @@ -38,7 +38,10 @@ pub fn hydrate_skr03(registry: &OntologyRegistry) -> Result { hydrate_skr03_from(&skr03_csv_path(), registry) } -pub fn hydrate_skr03_from(csv_path: &Path, registry: &OntologyRegistry) -> Result { +pub fn hydrate_skr03_from( + csv_path: &Path, + registry: &OntologyRegistry, +) -> Result { let h = SkrHydrator { g: OGIT::SKR03_V1.0, version: OGIT::SKR03_V1.1, @@ -81,7 +84,10 @@ pub fn hydrate_skr04(registry: &OntologyRegistry) -> Result { hydrate_skr04_from(&skr04_csv_path(), registry) } -pub fn hydrate_skr04_from(csv_path: &Path, registry: &OntologyRegistry) -> Result { +pub fn hydrate_skr04_from( + csv_path: &Path, + registry: &OntologyRegistry, +) -> Result { let h = SkrHydrator { g: OGIT::SKR04_V1.0, version: OGIT::SKR04_V1.1, diff --git a/crates/lance-graph-ontology/src/hydrators/xsd.rs b/crates/lance-graph-ontology/src/hydrators/xsd.rs index 4a1c9f88..16d99f2c 100644 --- a/crates/lance-graph-ontology/src/hydrators/xsd.rs +++ b/crates/lance-graph-ontology/src/hydrators/xsd.rs @@ -39,8 +39,11 @@ use crate::registry::OntologyRegistry; /// Closure type for the IRI interning callback. Factored out to keep /// `walk_xsd`'s signature inside clippy's `type_complexity` budget. -type InternFn<'a> = - &'a mut dyn FnMut(String, &mut HashMap, &mut EntityId) -> EntityId; +type InternFn<'a> = &'a mut dyn FnMut( + String, + &mut HashMap, + &mut EntityId, +) -> EntityId; /// XSD hydrator. Reusable for every XSD-shaped business-document schema. pub struct XsdHydrator { @@ -64,16 +67,18 @@ impl XsdHydrator { let mut iri_to_id: HashMap = HashMap::new(); let mut next_id: EntityId = self.starting_entity_id; - let mut intern = - |iri: String, map: &mut HashMap, n: &mut EntityId| -> EntityId { - if let Some(&id) = map.get(&iri) { - return id; - } - let id = *n; - *n += 1; - map.insert(iri, id); - id - }; + let mut intern = |iri: String, + map: &mut HashMap, + n: &mut EntityId| + -> EntityId { + if let Some(&id) = map.get(&iri) { + return id; + } + let id = *n; + *n += 1; + map.insert(iri, id); + id + }; for path in xsd_paths { let bytes = fs::read(path).map_err(|e| HydrateErr::Io { @@ -255,9 +260,17 @@ mod tests { // Foo (element) + BarType (complexType) + baz (nested element) + // Quux (simpleType) + anAttr (attribute) = 5 names. assert!(bundle.entity_count() >= 5); - assert!(bundle.resolve_iri("urn:example:test#Foo").is_some()); - assert!(bundle.resolve_iri("urn:example:test#BarType").is_some()); - assert!(bundle.resolve_iri("urn:example:test#baz").is_some()); - assert!(bundle.resolve_iri("urn:example:test#anAttr").is_some()); + assert!(bundle + .resolve_iri("urn:example:test#Foo") + .is_some()); + assert!(bundle + .resolve_iri("urn:example:test#BarType") + .is_some()); + assert!(bundle + .resolve_iri("urn:example:test#baz") + .is_some()); + assert!(bundle + .resolve_iri("urn:example:test#anAttr") + .is_some()); } } diff --git a/crates/lance-graph-ontology/src/hydrators/zugferd.rs b/crates/lance-graph-ontology/src/hydrators/zugferd.rs index cd81a301..b8b6df9b 100644 --- a/crates/lance-graph-ontology/src/hydrators/zugferd.rs +++ b/crates/lance-graph-ontology/src/hydrators/zugferd.rs @@ -73,7 +73,10 @@ pub fn hydrate_zugferd(registry: &OntologyRegistry) -> Result { } /// Test-friendly variant: hydrate ZUGFeRD from an explicit directory. -pub fn hydrate_zugferd_from(dir: &Path, registry: &OntologyRegistry) -> Result { +pub fn hydrate_zugferd_from( + dir: &Path, + registry: &OntologyRegistry, +) -> Result { let files = collect_xsd_files(dir)?; let path_refs: Vec<&Path> = files.iter().map(|p| p.as_path()).collect(); let hydrator = XsdHydrator { diff --git a/crates/lance-graph-ontology/src/lance_cache.rs b/crates/lance-graph-ontology/src/lance_cache.rs index 7ae5a37c..5cc52b66 100644 --- a/crates/lance-graph-ontology/src/lance_cache.rs +++ b/crates/lance-graph-ontology/src/lance_cache.rs @@ -19,9 +19,9 @@ use crate::error::{Error, Result}; use crate::namespace::{NamespaceId, OgitUri, SchemaKind, SchemaPtr}; use crate::proposal::{AttributeProvenance, IdentityCodec, MappingRow, QualiaMeta}; use arrow::array::{ - Array, ArrayRef, BooleanArray, FixedSizeBinaryArray, FixedSizeBinaryBuilder, - FixedSizeListArray, FixedSizeListBuilder, Float32Array, Float32Builder, RecordBatch, - StringArray, TimestampMicrosecondArray, UInt32Array, UInt64Array, UInt8Array, + Array, ArrayRef, BooleanArray, FixedSizeBinaryArray, FixedSizeBinaryBuilder, FixedSizeListArray, + FixedSizeListBuilder, Float32Array, Float32Builder, RecordBatch, StringArray, + TimestampMicrosecondArray, UInt32Array, UInt64Array, UInt8Array, }; use arrow_schema::{DataType, Field, Schema as ArrowSchema, TimeUnit}; use lance::dataset::{Dataset, WriteMode, WriteParams}; @@ -289,7 +289,10 @@ fn dictionary_schema() -> Arc { // to accept the column. The outer list field stays non-null. Field::new( "qualia", - DataType::FixedSizeList(Arc::new(Field::new("item", DataType::Float32, true)), 18), + DataType::FixedSizeList( + Arc::new(Field::new("item", DataType::Float32, true)), + 18, + ), false, ), Field::new("codec_meta", DataType::UInt32, false), @@ -331,7 +334,10 @@ fn rows_to_record_batch(rows: &[MappingRow]) -> Result { // ── D-CASCADE-V1-7: IdentityCodec ────────────────────────────────────── let mut cam_pq_code_builder = FixedSizeBinaryBuilder::new(6); let mut base17_head_builder = FixedSizeBinaryBuilder::new(8); - let palette_key: Vec = rows.iter().map(|r| r.identity_codec.palette_key).collect(); + let palette_key: Vec = rows + .iter() + .map(|r| r.identity_codec.palette_key) + .collect(); let scent: Vec = rows.iter().map(|r| r.identity_codec.scent).collect(); for r in rows { cam_pq_code_builder @@ -465,13 +471,14 @@ fn record_batch_to_rows(batch: &RecordBatch) -> Result> { meta: codec_meta_arr.map(|a| a.value(i)).unwrap_or(0), edge: codec_edge_arr.map(|a| a.value(i)).unwrap_or(0), }; - let thinking_style = thinking_style_arr.and_then(|a| { - if a.is_null(i) || a.value(i).is_empty() { - None - } else { - parse_thinking_style_label(a.value(i)) - } - }); + let thinking_style = thinking_style_arr + .and_then(|a| { + if a.is_null(i) || a.value(i).is_empty() { + None + } else { + parse_thinking_style_label(a.value(i)) + } + }); let attribute_sources = attr_src_enc_arr .map(|a| decode_attribute_sources(a.value(i))) .unwrap_or_default(); @@ -816,8 +823,8 @@ mod tests { }, qualia_meta: QualiaMeta { qualia: [ - 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, - 1.7, 1.8, + 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, + 1.6, 1.7, 1.8, ], meta: 0xDEAD_BEEF, edge: 0x0102_0304_0506_0708, @@ -851,45 +858,46 @@ mod tests { // IdentityCodec assert_eq!( - r.identity_codec.cam_pq_code, row.identity_codec.cam_pq_code, + r.identity_codec.cam_pq_code, + row.identity_codec.cam_pq_code, "cam_pq_code mismatch" ); assert_eq!( - r.identity_codec.base17_head, row.identity_codec.base17_head, + r.identity_codec.base17_head, + row.identity_codec.base17_head, "base17_head mismatch" ); assert_eq!( - r.identity_codec.palette_key, row.identity_codec.palette_key, + r.identity_codec.palette_key, + row.identity_codec.palette_key, "palette_key mismatch" ); assert_eq!( - r.identity_codec.scent, row.identity_codec.scent, + r.identity_codec.scent, + row.identity_codec.scent, "scent mismatch" ); // QualiaMeta assert_eq!( - r.qualia_meta.qualia, row.qualia_meta.qualia, + r.qualia_meta.qualia, + row.qualia_meta.qualia, "qualia mismatch" ); - assert_eq!( - r.qualia_meta.meta, row.qualia_meta.meta, - "codec_meta mismatch" - ); - assert_eq!( - r.qualia_meta.edge, row.qualia_meta.edge, - "codec_edge mismatch" - ); + assert_eq!(r.qualia_meta.meta, row.qualia_meta.meta, "codec_meta mismatch"); + assert_eq!(r.qualia_meta.edge, row.qualia_meta.edge, "codec_edge mismatch"); // ThinkingStyle assert_eq!( - r.thinking_style, row.thinking_style, + r.thinking_style, + row.thinking_style, "thinking_style mismatch" ); // AttributeProvenance assert_eq!( - r.attribute_sources, row.attribute_sources, + r.attribute_sources, + row.attribute_sources, "attribute_sources mismatch" ); @@ -897,7 +905,8 @@ mod tests { assert_eq!(r.subject_type, row.subject_type, "subject_type mismatch"); assert_eq!(r.object_type, row.object_type, "object_type mismatch"); assert_eq!( - r.entity_type_ref, row.entity_type_ref, + r.entity_type_ref, + row.entity_type_ref, "entity_type_ref mismatch" ); } @@ -935,14 +944,8 @@ mod tests { .expect("rows_to_record_batch must not fail"); let mut back = record_batch_to_rows(&batch).expect("record_batch_to_rows must not fail"); let r = back.remove(0); - assert_eq!( - r.thinking_style, None, - "None thinking_style must survive round-trip" - ); - assert!( - r.attribute_sources.is_empty(), - "empty attribute_sources must survive round-trip" - ); + assert_eq!(r.thinking_style, None, "None thinking_style must survive round-trip"); + assert!(r.attribute_sources.is_empty(), "empty attribute_sources must survive round-trip"); } // Pins the schema field-set against `SCHEMA_VERSION`. If you change @@ -956,13 +959,7 @@ mod tests { let actual: Vec<(String, String, bool)> = schema .fields() .iter() - .map(|f| { - ( - f.name().clone(), - format!("{:?}", f.data_type()), - f.is_nullable(), - ) - }) + .map(|f| (f.name().clone(), format!("{:?}", f.data_type()), f.is_nullable())) .collect(); // Pinned to SCHEMA_VERSION = 2. let expected: Vec<(&str, &str, bool)> = vec![ @@ -1025,8 +1022,10 @@ mod tests { // from TTL. Same path covers "future v3 wrote columns we don't know". #[tokio::test] async fn stale_meta_invalidates_cache_dir() { - let tmp = - std::env::temp_dir().join(format!("lance_cache_invalidate_{}", std::process::id())); + let tmp = std::env::temp_dir().join(format!( + "lance_cache_invalidate_{}", + std::process::id() + )); let _ = std::fs::remove_dir_all(&tmp); std::fs::create_dir_all(&tmp).unwrap(); let writer = LanceWriter::open_or_create(&tmp).await.unwrap(); diff --git a/crates/lance-graph-ontology/src/lib.rs b/crates/lance-graph-ontology/src/lib.rs index c04e8f4d..21407fe3 100644 --- a/crates/lance-graph-ontology/src/lib.rs +++ b/crates/lance-graph-ontology/src/lib.rs @@ -62,11 +62,11 @@ pub use hydrators::{ hydrate_fibo_be, hydrate_fibo_be_from, hydrate_fibo_fnd, hydrate_fibo_fnd_from, hydrate_odoo, hydrate_odoo_from, hydrate_owltime, hydrate_owltime_from, hydrate_provo, hydrate_provo_from, hydrate_qudt, hydrate_qudt_from, hydrate_schemaorg, hydrate_schemaorg_from, hydrate_skos, - hydrate_skos_from, hydrate_skr03, hydrate_skr03_bau, hydrate_skr03_bau_from, - hydrate_skr03_from, hydrate_skr04, hydrate_skr04_from, hydrate_zugferd, hydrate_zugferd_from, - hydrate_zugferd_rules, hydrate_zugferd_rules_from, ContextBundle, DolceCategory, EntityId, - HydrateErr, MetaStructureHydrator, OntologySlot, OwlHydrator, SchematronHydrator, SkrHydrator, - XsdHydrator, SKR03_BAU_IRI_PREFIX, SKR03_IRI_PREFIX, SKR04_IRI_PREFIX, + hydrate_skos_from, hydrate_skr03, hydrate_skr03_bau, hydrate_skr03_bau_from, hydrate_skr03_from, + hydrate_skr04, hydrate_skr04_from, hydrate_zugferd, hydrate_zugferd_from, hydrate_zugferd_rules, + hydrate_zugferd_rules_from, ContextBundle, DolceCategory, EntityId, HydrateErr, + MetaStructureHydrator, OntologySlot, OwlHydrator, SchematronHydrator, SkrHydrator, XsdHydrator, + SKR03_BAU_IRI_PREFIX, SKR03_IRI_PREFIX, SKR04_IRI_PREFIX, }; pub use namespace::{NamespaceId, OgitUri, SchemaPtr}; pub use proposal::{ diff --git a/crates/lance-graph-ontology/src/namespace_registry.rs b/crates/lance-graph-ontology/src/namespace_registry.rs index 821da3bd..953c1e98 100644 --- a/crates/lance-graph-ontology/src/namespace_registry.rs +++ b/crates/lance-graph-ontology/src/namespace_registry.rs @@ -187,7 +187,8 @@ impl NamespaceRegistry { /// dynamically-allocated ones; only the seed table is consulted. pub fn seed_context_id(namespace_iri: &str) -> Option { use std::sync::LazyLock; - static SEED: LazyLock = LazyLock::new(NamespaceRegistry::seed_defaults); + static SEED: LazyLock = + LazyLock::new(NamespaceRegistry::seed_defaults); SEED.get(namespace_iri) } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account.rs index a3d0207a..2ef49b36 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account.rs @@ -855,10 +855,7 @@ pub const EXT_ACCOUNT_ACCOUNT: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_account.py", - line_range: (19, 1494), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_account.py", line_range: (19, 1494) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1034,10 +1031,7 @@ pub const EXT_ACCOUNT_GROUP: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_account.py", - line_range: (1497, 1641), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_account.py", line_range: (1497, 1641) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1191,18 +1185,17 @@ pub const EXT_ACCOUNT_ACCOUNT_TAG: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "A tag with the same name and applicability already exists in this country.", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "A tag with the same name and applicability already exists in this country.", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_account_tag.py", - line_range: (7, 140), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_account_tag.py", line_range: (7, 140) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1269,14 +1262,13 @@ pub const EXT_ACCOUNT_ANALYTIC_ACCOUNT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_analytic_account.py", - line_range: (6, 78), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_analytic_account.py", line_range: (6, 78) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1350,19 +1342,20 @@ pub const EXT_ACCOUNT_ANALYTIC_DISTRIBUTION_MODEL: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["analytic_precision"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["analytic_precision"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_analytic_distribution_model.py", - line_range: (6, 70), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_analytic_distribution_model.py", line_range: (6, 70) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1523,18 +1516,17 @@ pub const EXT_ACCOUNT_ANALYTIC_LINE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on move_line_id, general_account_id", - source_method: Some("_check_general_account_id"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on move_line_id, general_account_id", + source_method: Some("_check_general_account_id"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_analytic_line.py", - line_range: (7, 110), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_analytic_line.py", line_range: (7, 110) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1622,14 +1614,13 @@ pub const EXT_ACCOUNT_ANALYTIC_APPLICABILITY: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_analytic_plan.py", - line_range: (6, 81), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_analytic_plan.py", line_range: (6, 81) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1930,12 +1921,7 @@ pub const EXT_ACCOUNT_BANK_STATEMENT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "balance_end", - "balance_end_real", - "line_ids.amount", - "line_ids.state", - ], + targets: &["balance_end", "balance_end_real", "line_ids.amount", "line_ids.state"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -1955,14 +1941,13 @@ pub const EXT_ACCOUNT_BANK_STATEMENT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_bank_statement.py", - line_range: (10, 373), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_bank_statement.py", line_range: (10, 373) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6400,23 +6385,24 @@ pub const EXT_ACCOUNT_CASH_ROUNDING: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["rounding"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["rounding"], + }, + ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on rounding", - source_method: Some("validate_rounding"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on rounding", + source_method: Some("validate_rounding"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_cash_rounding.py", - line_range: (8, 69), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_cash_rounding.py", line_range: (8, 69) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6504,14 +6490,13 @@ pub const EXT_ACCOUNT_CODE_MAPPING: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_code_mapping.py", - line_range: (9, 86), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_code_mapping.py", line_range: (9, 86) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6521,7 +6506,9 @@ pub const EXT_ACCOUNT_DOCUMENT_IMPORT_MIXIN: OdooEntity = OdooEntity { model_name: "account.document.import.mixin", kind: OdooEntityKind::Abstract, description: "Business document import mixin", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_create_records_from_attachments", @@ -6673,14 +6660,13 @@ pub const EXT_ACCOUNT_DOCUMENT_IMPORT_MIXIN: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_document_import_mixin.py", - line_range: (126, 568), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_document_import_mixin.py", line_range: (126, 568) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6710,25 +6696,28 @@ pub const EXT_ACCOUNT_FULL_RECONCILE: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[OdooMethod { - name: "create", - kind: OdooMethodKind::ApiModelCreateMulti, - return_kind: OdooReturnKind::Record, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModelCreateMulti, - targets: &[], - }], + methods: &[ + OdooMethod { + name: "create", + kind: OdooMethodKind::ApiModelCreateMulti, + return_kind: OdooReturnKind::Record, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModelCreateMulti, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_full_reconcile.py", - line_range: (5, 45), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_full_reconcile.py", line_range: (5, 45) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6767,25 +6756,28 @@ pub const EXT_ACCOUNT_INCOTERMS: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[OdooMethod { - name: "_compute_display_name", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["code"], - }], + methods: &[ + OdooMethod { + name: "_compute_display_name", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["code"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_incoterms.py", - line_range: (7, 24), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_incoterms.py", line_range: (7, 24) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6833,21 +6825,24 @@ pub const EXT_ACCOUNT_JOURNAL_GROUP: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "A Ledger group name must be unique per company.", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "A Ledger group name must be unique per company.", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_journal.py", - line_range: (16, 39), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_journal.py", line_range: (16, 39) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -8035,14 +8030,13 @@ pub const EXT_ACCOUNT_LOCK_EXCEPTION: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_lock_exception.py", - line_range: (11, 306), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_lock_exception.py", line_range: (11, 306) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10022,7 +10016,9 @@ pub const EXT_ACCOUNT_MOVE_SEND: OdooEntity = OdooEntity { model_name: "account.move.send", kind: OdooEntityKind::Abstract, description: "Account Move Send", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_get_default_sending_methods", @@ -10504,14 +10500,13 @@ pub const EXT_ACCOUNT_MOVE_SEND: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_move_send.py", - line_range: (13, 863), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_move_send.py", line_range: (13, 863) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10811,18 +10806,17 @@ pub const EXT_ACCOUNT_PARTIAL_RECONCILE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on debit_currency_id, credit_currency_id", - source_method: Some("_check_required_computed_currencies"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on debit_currency_id, credit_currency_id", + source_method: Some("_check_required_computed_currencies"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_partial_reconcile.py", - line_range: (9, 705), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_partial_reconcile.py", line_range: (9, 705) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11638,20 +11632,11 @@ pub const EXT_ACCOUNT_PAYMENT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "reconciled_invoice_ids.payment_state", - "reconciled_bill_ids.payment_state", - "move_id.line_ids.amount_residual", - ], + targets: &["reconciled_invoice_ids.payment_state", "reconciled_bill_ids.payment_state", "move_id.line_ids.amount_residual"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "move_id.line_ids.amount_residual", - "move_id.line_ids.amount_residual_currency", - "move_id.line_ids.account_id", - "state", - ], + targets: &["move_id.line_ids.amount_residual", "move_id.line_ids.amount_residual_currency", "move_id.line_ids.account_id", "state"], }, OdooDecorator { kind: OdooDecoratorKind::ApiModel, @@ -11667,15 +11652,7 @@ pub const EXT_ACCOUNT_PAYMENT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "move_id.amount_total_signed", - "amount", - "payment_type", - "currency_id", - "date", - "company_id", - "company_currency_id", - ], + targets: &["move_id.amount_total_signed", "amount", "payment_type", "currency_id", "date", "company_id", "company_currency_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -11715,23 +11692,11 @@ pub const EXT_ACCOUNT_PAYMENT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "partner_bank_id", - "amount", - "memo", - "currency_id", - "journal_id", - "move_id.state", - "payment_method_line_id", - "payment_type", - ], + targets: &["partner_bank_id", "amount", "memo", "currency_id", "journal_id", "move_id.state", "payment_method_line_id", "payment_type"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "move_id.line_ids.matched_debit_ids", - "move_id.line_ids.matched_credit_ids", - ], + targets: &["move_id.line_ids.matched_debit_ids", "move_id.line_ids.matched_credit_ids"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -11779,10 +11744,7 @@ pub const EXT_ACCOUNT_PAYMENT: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_payment.py", - line_range: (7, 1236), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_payment.py", line_range: (7, 1236) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11878,18 +11840,17 @@ pub const EXT_ACCOUNT_PAYMENT_METHOD: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "The combination code/payment type already exists!", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "The combination code/payment type already exists!", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_payment_method.py", - line_range: (7, 92), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_payment_method.py", line_range: (7, 92) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12042,18 +12003,17 @@ pub const EXT_ACCOUNT_PAYMENT_METHOD_LINE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on name", - source_method: Some("_ensure_unique_name_for_journal"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on name", + source_method: Some("_ensure_unique_name_for_journal"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_payment_method.py", - line_range: (95, 174), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_payment_method.py", line_range: (95, 174) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12338,17 +12298,7 @@ pub const EXT_ACCOUNT_PAYMENT_TERM: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "currency_id", - "example_amount", - "example_date", - "line_ids.value", - "line_ids.value_amount", - "line_ids.nb_days", - "early_discount", - "discount_percentage", - "discount_days", - ], + targets: &["currency_id", "example_amount", "example_date", "line_ids.value", "line_ids.value_amount", "line_ids.nb_days", "early_discount", "discount_percentage", "discount_days"], }, OdooDecorator { kind: OdooDecoratorKind::ApiModel, @@ -12360,18 +12310,17 @@ pub const EXT_ACCOUNT_PAYMENT_TERM: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on line_ids, early_discount", - source_method: Some("_check_lines"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on line_ids, early_discount", + source_method: Some("_check_lines"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_payment_term.py", - line_range: (11, 278), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_payment_term.py", line_range: (11, 278) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12522,10 +12471,7 @@ pub const EXT_ACCOUNT_PAYMENT_TERM_LINE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_payment_term.py", - line_range: (281, 367), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_payment_term.py", line_range: (281, 367) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12662,18 +12608,17 @@ pub const EXT_ACCOUNT_RECONCILE_MODEL_LINE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on amount_string", - source_method: Some("_validate_amount"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on amount_string", + source_method: Some("_validate_amount"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_reconcile_model.py", - line_range: (8, 88), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_reconcile_model.py", line_range: (8, 88) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12880,13 +12825,7 @@ pub const EXT_ACCOUNT_RECONCILE_MODEL: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "mapped_partner_id", - "match_label", - "match_amount", - "match_partner_ids", - "trigger", - ], + targets: &["mapped_partner_id", "match_label", "match_amount", "match_partner_ids", "trigger"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -12894,18 +12833,17 @@ pub const EXT_ACCOUNT_RECONCILE_MODEL: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on match_label, match_label_param", - source_method: Some("_check_match_label_param"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on match_label, match_label_param", + source_method: Some("_check_match_label_param"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_reconcile_model.py", - line_range: (91, 200), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_reconcile_model.py", line_range: (91, 200) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -13387,10 +13325,7 @@ pub const EXT_ACCOUNT_REPORT: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_report.py", - line_range: (44, 346), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_report.py", line_range: (44, 346) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -13736,10 +13671,7 @@ pub const EXT_ACCOUNT_REPORT_LINE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_report.py", - line_range: (349, 576), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_report.py", line_range: (349, 576) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/eu/en16931"], }, @@ -14018,10 +13950,7 @@ pub const EXT_ACCOUNT_REPORT_EXPRESSION: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_report.py", - line_range: (579, 929), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_report.py", line_range: (579, 929) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14105,17 +14034,20 @@ pub const EXT_ACCOUNT_REPORT_COLUMN: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_report.py", - line_range: (932, 944), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_report.py", line_range: (932, 944) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14226,17 +14158,20 @@ pub const EXT_ACCOUNT_REPORT_EXTERNAL_VALUE: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_report.py", - line_range: (947, 967), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_report.py", line_range: (947, 967) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14292,19 +14227,20 @@ pub const EXT_ACCOUNT_ROOT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_root.py", - line_range: (9, 39), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_root.py", line_range: (9, 39) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14406,25 +14342,28 @@ pub const EXT_ACCOUNT_TAX_GROUP: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[OdooMethod { - name: "_compute_country_id", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["company_id"], - }], + methods: &[ + OdooMethod { + name: "_compute_country_id", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["company_id"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_tax.py", - line_range: (25, 68), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_tax.py", line_range: (25, 68) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -15960,10 +15899,7 @@ pub const EXT_ACCOUNT_TAX_REPARTITION_LINE: OdooEntity = OdooEntity { decorators: &[ OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "company_id.multi_vat_foreign_country_ids", - "company_id.account_fiscal_country_id", - ], + targets: &["company_id.multi_vat_foreign_country_ids", "company_id.account_fiscal_country_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -15979,14 +15915,13 @@ pub const EXT_ACCOUNT_TAX_REPARTITION_LINE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/account_tax.py", - line_range: (5141, 5209), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/account_tax.py", line_range: (5141, 5209) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -15996,7 +15931,9 @@ pub const EXT_ACCOUNT_CHART_TEMPLATE: OdooEntity = OdooEntity { model_name: "account.chart.template", kind: OdooEntityKind::Abstract, description: "Account Chart Template", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_template_register", @@ -16244,14 +16181,13 @@ pub const EXT_ACCOUNT_CHART_TEMPLATE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/chart_template.py", - line_range: (73, 1544), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/chart_template.py", line_range: (73, 1544) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17364,26 +17300,31 @@ pub const EXT_DECIMAL_PRECISION: OdooEntity = OdooEntity { model_name: "decimal.precision", kind: OdooEntityKind::Model, description: "", - fields: &[], - methods: &[OdooMethod { - name: "precision_get", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "precision_get", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/decimal_precision.py", - line_range: (4, 12), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/decimal_precision.py", line_range: (4, 12) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17427,16 +17368,17 @@ pub const EXT_DIGEST_DIGEST: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/digest.py", - line_range: (8, 39), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/digest.py", line_range: (8, 39) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17446,15 +17388,17 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { model_name: "ir.actions.report", kind: OdooEntityKind::Model, description: "", - fields: &[OdooField { - name: "is_invoice_report", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], + fields: &[ + OdooField { + name: "is_invoice_report", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], methods: &[ OdooMethod { name: "_render_qweb_pdf_prepare_streams", @@ -17493,16 +17437,17 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/ir_actions_report.py", - line_range: (10, 96), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/ir_actions_report.py", line_range: (10, 96) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17512,7 +17457,9 @@ pub const EXT_IR_ATTACHMENT: OdooEntity = OdooEntity { model_name: "ir.attachment", kind: OdooEntityKind::Model, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_build_zip_from_attachments", @@ -17545,16 +17492,17 @@ pub const EXT_IR_ATTACHMENT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/ir_attachment.py", - line_range: (10, 90), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/ir_attachment.py", line_range: (10, 90) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17564,26 +17512,31 @@ pub const EXT_IR_HTTP: OdooEntity = OdooEntity { model_name: "ir.http", kind: OdooEntityKind::Abstract, description: "", - fields: &[], - methods: &[OdooMethod { - name: "lazy_session_info", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "lazy_session_info", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/ir_http.py", - line_range: (4, 11), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/ir_http.py", line_range: (4, 11) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17593,15 +17546,17 @@ pub const EXT_IR_MODULE_MODULE: OdooEntity = OdooEntity { model_name: "ir.module.module", kind: OdooEntityKind::Model, description: "", - fields: &[OdooField { - name: "account_templates", - kind: OdooFieldKind::Computed, - target: None, - required: false, - computed: Some("_compute_account_templates"), - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], + fields: &[ + OdooField { + name: "account_templates", + kind: OdooFieldKind::Computed, + target: None, + required: false, + computed: Some("_compute_account_templates"), + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], methods: &[ OdooMethod { name: "_compute_account_templates", @@ -17634,19 +17589,20 @@ pub const EXT_IR_MODULE_MODULE: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["state"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["state"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/ir_module.py", - line_range: (24, 115), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/ir_module.py", line_range: (24, 115) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17656,7 +17612,9 @@ pub const EXT_KPI_PROVIDER: OdooEntity = OdooEntity { model_name: "kpi.provider", kind: OdooEntityKind::Abstract, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "get_account_kpi_summary", @@ -17682,14 +17640,13 @@ pub const EXT_KPI_PROVIDER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/kpi_provider.py", - line_range: (4, 41), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/kpi_provider.py", line_range: (4, 41) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17874,19 +17831,20 @@ pub const EXT_MAIL_MESSAGE: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["tracking_value_ids"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["tracking_value_ids"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/mail_message.py", - line_range: (33, 199), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/mail_message.py", line_range: (33, 199) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17896,23 +17854,28 @@ pub const EXT_MAIL_TEMPLATE: OdooEntity = OdooEntity { model_name: "mail.template", kind: OdooEntityKind::Model, description: "", - fields: &[], - methods: &[OdooMethod { - name: "_unlink_except_master_mail_template", - kind: OdooMethodKind::Override, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "_unlink_except_master_mail_template", + kind: OdooMethodKind::Override, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/mail_template.py", - line_range: (5, 16), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/mail_template.py", line_range: (5, 16) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17922,7 +17885,9 @@ pub const EXT_MAIL_TRACKING_VALUE: OdooEntity = OdooEntity { model_name: "mail.tracking.value", kind: OdooEntityKind::Model, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_except_audit_log", @@ -17937,16 +17902,17 @@ pub const EXT_MAIL_TRACKING_VALUE: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/mail_tracking_value.py", - line_range: (6, 15), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/mail_tracking_value.py", line_range: (6, 15) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17956,23 +17922,28 @@ pub const EXT_BASE_PARTNER_MERGE_AUTOMATIC_WIZARD: OdooEntity = OdooEntity { model_name: "base.partner.merge.automatic.wizard", kind: OdooEntityKind::Transient, description: "", - fields: &[], - methods: &[OdooMethod { - name: "_update_reference_fields", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "_update_reference_fields", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/merge_partner_automatic.py", - line_range: (5, 9), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/merge_partner_automatic.py", line_range: (5, 9) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17982,7 +17953,9 @@ pub const EXT_ONBOARDING_ONBOARDING: OdooEntity = OdooEntity { model_name: "onboarding.onboarding", kind: OdooEntityKind::Model, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "action_close_panel_account_invoice", @@ -18014,14 +17987,13 @@ pub const EXT_ONBOARDING_ONBOARDING: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/onboarding_onboarding.py", - line_range: (6, 29), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/onboarding_onboarding.py", line_range: (6, 29) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -18031,7 +18003,9 @@ pub const EXT_ONBOARDING_ONBOARDING_STEP: OdooEntity = OdooEntity { model_name: "onboarding.onboarding.step", kind: OdooEntityKind::Model, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "action_open_step_company_data", @@ -18117,14 +18091,13 @@ pub const EXT_ONBOARDING_ONBOARDING_STEP: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/onboarding_onboarding_step.py", - line_range: (6, 120), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/onboarding_onboarding_step.py", line_range: (6, 120) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -18528,10 +18501,7 @@ pub const EXT_ACCOUNT_FISCAL_POSITION: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/partner.py", - line_range: (26, 300), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/partner.py", line_range: (26, 300) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -18579,21 +18549,24 @@ pub const EXT_ACCOUNT_FISCAL_POSITION_ACCOUNT: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "An account fiscal position could be defined only one time on same accounts.", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "An account fiscal position could be defined only one time on same accounts.", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/partner.py", - line_range: (303, 323), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/partner.py", line_range: (303, 323) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19387,14 +19360,13 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/partner.py", - line_range: (326, 1161), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/partner.py", line_range: (326, 1161) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -19424,17 +19396,20 @@ pub const EXT_PRODUCT_CATEGORY: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/product.py", - line_range: (13, 29), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/product.py", line_range: (13, 29) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19618,18 +19593,17 @@ pub const EXT_PRODUCT_TEMPLATE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on uom_id", - source_method: Some("_check_uom_not_in_invoice"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on uom_id", + source_method: Some("_check_uom_not_in_invoice"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/product.py", - line_range: (36, 211), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/product.py", line_range: (36, 211) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19639,15 +19613,17 @@ pub const EXT_PRODUCT_PRODUCT: OdooEntity = OdooEntity { model_name: "product.product", kind: OdooEntityKind::Model, description: "", - fields: &[OdooField { - name: "tax_string", - kind: OdooFieldKind::Computed, - target: None, - required: false, - computed: Some("_compute_tax_string"), - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], + fields: &[ + OdooField { + name: "tax_string", + kind: OdooFieldKind::Computed, + target: None, + required: false, + computed: Some("_compute_tax_string"), + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], methods: &[ OdooMethod { name: "_get_product_accounts", @@ -19743,14 +19719,13 @@ pub const EXT_PRODUCT_PRODUCT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/product.py", - line_range: (214, 522), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/product.py", line_range: (214, 522) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19760,7 +19735,9 @@ pub const EXT_PRODUCT_CATALOG_MIXIN: OdooEntity = OdooEntity { model_name: "product.catalog.mixin", kind: OdooEntityKind::Abstract, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_create_section", @@ -19805,16 +19782,17 @@ pub const EXT_PRODUCT_CATALOG_MIXIN: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/product_catalog_mixin.py", - line_range: (6, 192), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/product_catalog_mixin.py", line_range: (6, 192) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -20518,14 +20496,13 @@ pub const EXT_RES_CONFIG_SETTINGS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/res_config_settings.py", - line_range: (8, 311), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/res_config_settings.py", line_range: (8, 311) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -20535,26 +20512,31 @@ pub const EXT_RES_COUNTRY_GROUP: OdooEntity = OdooEntity { model_name: "res.country.group", kind: OdooEntityKind::Model, description: "", - fields: &[OdooField { - name: "exclude_state_ids", - kind: OdooFieldKind::Many2many, - target: Some("res.country.state"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], - methods: &[], - decorators: &[], + fields: &[ + OdooField { + name: "exclude_state_ids", + kind: OdooFieldKind::Many2many, + target: Some("res.country.state"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/res_country_group.py", - line_range: (6, 12), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/res_country_group.py", line_range: (6, 12) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -20658,19 +20640,20 @@ pub const EXT_RES_CURRENCY: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["rounding"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["rounding"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/res_currency.py", - line_range: (9, 285), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/res_currency.py", line_range: (9, 285) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -21022,12 +21005,7 @@ pub const EXT_RES_PARTNER_BANK: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "partner_id.country_id", - "sanitized_acc_number", - "allow_out_payment", - "acc_type", - ], + targets: &["partner_id.country_id", "sanitized_acc_number", "allow_out_payment", "acc_type"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -21063,18 +21041,17 @@ pub const EXT_RES_PARTNER_BANK: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on journal_id", - source_method: Some("_check_journal_id"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on journal_id", + source_method: Some("_check_journal_id"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/res_partner_bank.py", - line_range: (13, 397), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/res_partner_bank.py", line_range: (13, 397) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -21084,7 +21061,9 @@ pub const EXT_RES_GROUPS: OdooEntity = OdooEntity { model_name: "res.groups", kind: OdooEntityKind::Model, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "get_application_groups", @@ -21110,14 +21089,13 @@ pub const EXT_RES_GROUPS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/res_users.py", - line_range: (8, 38), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/res_users.py", line_range: (8, 38) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -21290,18 +21268,17 @@ pub const EXT_SEQUENCE_MIXIN: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint", - source_method: Some("_constrains_date_sequence"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint", + source_method: Some("_constrains_date_sequence"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/sequence_mixin.py", - line_range: (17, 511), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/sequence_mixin.py", line_range: (17, 511) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -21311,15 +21288,17 @@ pub const EXT_UOM_UOM: OdooEntity = OdooEntity { model_name: "uom.uom", kind: OdooEntityKind::Model, description: "", - fields: &[OdooField { - name: "fiscal_country_codes", - kind: OdooFieldKind::Computed, - target: None, - required: false, - computed: Some("_compute_fiscal_country_codes"), - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], + fields: &[ + OdooField { + name: "fiscal_country_codes", + kind: OdooFieldKind::Computed, + target: None, + required: false, + computed: Some("_compute_fiscal_country_codes"), + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], methods: &[ OdooMethod { name: "_compute_fiscal_country_codes", @@ -21340,20 +21319,22 @@ pub const EXT_UOM_UOM: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account/models/uom_uom.py", - line_range: (38, 59), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account/models/uom_uom.py", line_range: (38, 59) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; + diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_edi_ubl_cii.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_edi_ubl_cii.rs index a2d18155..5e9b1e12 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_edi_ubl_cii.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_edi_ubl_cii.rs @@ -8,7 +8,9 @@ pub const EXT_ACCOUNT_EDI_COMMON: OdooEntity = OdooEntity { model_name: "account.edi.common", kind: OdooEntityKind::Abstract, description: "Common functions for EDI documents: generate the data, the constraints, etc", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "module_installed", @@ -226,14 +228,13 @@ pub const EXT_ACCOUNT_EDI_COMMON: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_edi_ubl_cii/models/account_edi_common.py", - line_range: (282, 1100), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_common.py", line_range: (282, 1100) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1480,7 +1481,9 @@ pub const EXT_ACCOUNT_EDI_XML_CII: OdooEntity = OdooEntity { model_name: "account.edi.xml.cii", kind: OdooEntityKind::Abstract, description: "Factur-x/XRechnung CII 2.2.0", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_find_value", @@ -1597,16 +1600,17 @@ pub const EXT_ACCOUNT_EDI_XML_CII: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py", - line_range: (25, 414), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_cii_facturx.py", line_range: (25, 414) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/eu/en16931"], }, @@ -1616,7 +1620,9 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_20: OdooEntity = OdooEntity { model_name: "account.edi.xml.ubl_20", kind: OdooEntityKind::Abstract, description: "UBL 2.0", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_find_value", @@ -2147,16 +2153,17 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_20: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py", - line_range: (18, 1314), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py", line_range: (18, 1314) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/eu/en16931"], }, @@ -2166,7 +2173,9 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_21: OdooEntity = OdooEntity { model_name: "account.edi.xml.ubl_21", kind: OdooEntityKind::Abstract, description: "UBL 2.1", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_export_invoice_filename", @@ -2205,16 +2214,17 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_21: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_21.py", - line_range: (4, 75), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_21.py", line_range: (4, 75) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/eu/en16931"], }, @@ -2224,7 +2234,9 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_A_NZ: OdooEntity = OdooEntity { model_name: "account.edi.xml.ubl_a_nz", kind: OdooEntityKind::Abstract, description: "A-NZ BIS Billing 3.0", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_export_invoice_filename", @@ -2281,16 +2293,17 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_A_NZ: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_a_nz.py", - line_range: (6, 114), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_a_nz.py", line_range: (6, 114) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2772,23 +2785,28 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_EFFF: OdooEntity = OdooEntity { model_name: "account.edi.xml.ubl_efff", kind: OdooEntityKind::Abstract, description: "E-FFF (BE)", - fields: &[], - methods: &[OdooMethod { - name: "_export_invoice_filename", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "_export_invoice_filename", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_efff.py", - line_range: (8, 20), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_efff.py", line_range: (8, 20) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2798,7 +2816,9 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_NL: OdooEntity = OdooEntity { model_name: "account.edi.xml.ubl_nl", kind: OdooEntityKind::Abstract, description: "SI-UBL 2.0 (NLCIUS)", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_export_invoice_filename", @@ -2861,16 +2881,17 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_NL: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_nlcius.py", - line_range: (6, 121), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_nlcius.py", line_range: (6, 121) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/eu/en16931"], }, @@ -2880,7 +2901,9 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_SG: OdooEntity = OdooEntity { model_name: "account.edi.xml.ubl_sg", kind: OdooEntityKind::Abstract, description: "SG BIS Billing 3.0", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_export_invoice_filename", @@ -2931,16 +2954,17 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_SG: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_sg.py", - line_range: (5, 84), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_sg.py", line_range: (5, 84) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2950,7 +2974,9 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_DE: OdooEntity = OdooEntity { model_name: "account.edi.xml.ubl_de", kind: OdooEntityKind::Abstract, description: "BIS3 DE (XRechnung)", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_export_invoice_filename", @@ -3019,16 +3045,17 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_DE: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_xrechnung.py", - line_range: (5, 121), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_edi_xml_ubl_xrechnung.py", line_range: (5, 121) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/eu/en16931"], }, @@ -3208,14 +3235,13 @@ pub const EXT_ACCOUNT_MOVE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_edi_ubl_cii/models/account_move.py", - line_range: (14, 402), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_move.py", line_range: (14, 402) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3225,7 +3251,9 @@ pub const EXT_ACCOUNT_MOVE_SEND: OdooEntity = OdooEntity { model_name: "account.move.send", kind: OdooEntityKind::Abstract, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_get_move_constraints", @@ -3317,14 +3345,13 @@ pub const EXT_ACCOUNT_MOVE_SEND: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_edi_ubl_cii/models/account_move_send.py", - line_range: (16, 316), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_move_send.py", line_range: (16, 316) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3388,14 +3415,13 @@ pub const EXT_ACCOUNT_TAX: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_edi_ubl_cii/models/account_tax.py", - line_range: (4, 128), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/account_tax.py", line_range: (4, 128) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -3405,23 +3431,28 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { model_name: "ir.actions.report", kind: OdooEntityKind::Model, description: "", - fields: &[], - methods: &[OdooMethod { - name: "_render_qweb_pdf_prepare_streams", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "_render_qweb_pdf_prepare_streams", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_edi_ubl_cii/models/ir_actions_report.py", - line_range: (6, 30), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/ir_actions_report.py", line_range: (6, 30) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3654,19 +3685,19 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on peppol_endpoint", - source_method: Some("_check_peppol_fields"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on peppol_endpoint", + source_method: Some("_check_peppol_fields"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_edi_ubl_cii/models/res_partner.py", - line_range: (25, 340), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_edi_ubl_cii/models/res_partner.py", line_range: (25, 340) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13", "ogit:regulation/eu/en16931"], }, }; + diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_payment.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_payment.rs index 018333e1..52bc3d6d 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_payment.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_payment.rs @@ -8,7 +8,9 @@ pub const EXT_ACCOUNT_JOURNAL: OdooEntity = OdooEntity { model_name: "account.journal", kind: OdooEntityKind::Model, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_get_available_payment_method_lines", @@ -23,16 +25,17 @@ pub const EXT_ACCOUNT_JOURNAL: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_payment/models/account_journal.py", - line_range: (8, 25), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_payment/models/account_journal.py", line_range: (8, 25) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -169,14 +172,13 @@ pub const EXT_ACCOUNT_MOVE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_payment/models/account_move.py", - line_range: (13, 182), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_payment/models/account_move.py", line_range: (13, 182) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -334,14 +336,13 @@ pub const EXT_ACCOUNT_PAYMENT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_payment/models/account_payment.py", - line_range: (7, 230), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_payment/models/account_payment.py", line_range: (7, 230) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -351,26 +352,31 @@ pub const EXT_ACCOUNT_PAYMENT_METHOD: OdooEntity = OdooEntity { model_name: "account.payment.method", kind: OdooEntityKind::Model, description: "", - fields: &[], - methods: &[OdooMethod { - name: "_get_payment_method_information", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "_get_payment_method_information", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_payment/models/account_payment_method.py", - line_range: (7, 20), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_payment/models/account_payment_method.py", line_range: (7, 20) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -437,14 +443,13 @@ pub const EXT_ACCOUNT_PAYMENT_METHOD_LINE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_payment/models/account_payment_method_line.py", - line_range: (7, 85), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_payment/models/account_payment_method_line.py", line_range: (7, 85) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -454,15 +459,17 @@ pub const EXT_PAYMENT_PROVIDER: OdooEntity = OdooEntity { model_name: "payment.provider", kind: OdooEntityKind::Model, description: "", - fields: &[OdooField { - name: "journal_id", - kind: OdooFieldKind::Computed, - target: Some("account.journal"), - required: false, - computed: Some("_compute_journal_id"), - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], + fields: &[ + OdooField { + name: "journal_id", + kind: OdooFieldKind::Computed, + target: Some("account.journal"), + required: false, + computed: Some("_compute_journal_id"), + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], methods: &[ OdooMethod { name: "_ensure_payment_method_line", @@ -542,14 +549,13 @@ pub const EXT_PAYMENT_PROVIDER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_payment/models/payment_provider.py", - line_range: (7, 147), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_payment/models/payment_provider.py", line_range: (7, 147) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -643,15 +649,15 @@ pub const EXT_PAYMENT_TRANSACTION: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_payment/models/payment_transaction.py", - line_range: (6, 242), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_payment/models/payment_transaction.py", line_range: (6, 242) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; + diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_peppol.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_peppol.rs index b7484bb4..1616fbdb 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_peppol.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/account_peppol.rs @@ -8,7 +8,9 @@ pub const EXT_ACCOUNT_EDI_COMMON: OdooEntity = OdooEntity { model_name: "account.edi.common", kind: OdooEntityKind::Abstract, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_add_logs_import_invoice_ubl_cii", @@ -23,16 +25,17 @@ pub const EXT_ACCOUNT_EDI_COMMON: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_peppol/models/account_edi_common.py", - line_range: (4, 18), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/account_edi_common.py", line_range: (4, 18) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -42,15 +45,17 @@ pub const EXT_ACCOUNT_EDI_PROXY_CLIENT_USER: OdooEntity = OdooEntity { model_name: "account_edi_proxy_client.user", kind: OdooEntityKind::Model, description: "", - fields: &[OdooField { - name: "proxy_type", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], + fields: &[ + OdooField { + name: "proxy_type", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], methods: &[ OdooMethod { name: "_get_proxy_urls", @@ -266,14 +271,13 @@ pub const EXT_ACCOUNT_EDI_PROXY_CLIENT_USER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_peppol/models/account_edi_proxy_user.py", - line_range: (18, 586), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/account_edi_proxy_user.py", line_range: (18, 586) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -283,23 +287,28 @@ pub const EXT_ACCOUNT_EDI_UBL: OdooEntity = OdooEntity { model_name: "account.edi.ubl", kind: OdooEntityKind::Abstract, description: "", - fields: &[], - methods: &[OdooMethod { - name: "_ubl_add_values_company", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "_ubl_add_values_company", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_peppol/models/account_edi_ubl_xml.py", - line_range: (4, 15), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/account_edi_ubl_xml.py", line_range: (4, 15) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -309,23 +318,28 @@ pub const EXT_ACCOUNT_EDI_XML_UBL_BIS3: OdooEntity = OdooEntity { model_name: "account.edi.xml.ubl_bis3", kind: OdooEntityKind::Abstract, description: "", - fields: &[], - methods: &[OdooMethod { - name: "_invoice_constraints_peppol_en16931_ubl", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "_invoice_constraints_peppol_en16931_ubl", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_peppol/models/account_edi_xml_ubl_bis3.py", - line_range: (4, 29), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/account_edi_xml_ubl_bis3.py", line_range: (4, 29) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -402,18 +416,17 @@ pub const EXT_ACCOUNT_JOURNAL: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on type", - source_method: Some("_check_type_for_peppol_journal"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on type", + source_method: Some("_check_type_for_peppol_journal"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_peppol/models/account_journal.py", - line_range: (5, 67), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/account_journal.py", line_range: (5, 67) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -501,14 +514,13 @@ pub const EXT_ACCOUNT_MOVE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_peppol/models/account_move.py", - line_range: (8, 91), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/account_move.py", line_range: (8, 91) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -518,7 +530,9 @@ pub const EXT_ACCOUNT_MOVE_SEND: OdooEntity = OdooEntity { model_name: "account.move.send", kind: OdooEntityKind::Abstract, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_get_default_sending_methods", @@ -581,19 +595,20 @@ pub const EXT_ACCOUNT_MOVE_SEND: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_peppol/models/account_move_send.py", - line_range: (15, 296), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/account_move_send.py", line_range: (15, 296) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -979,10 +994,7 @@ pub const EXT_RES_COMPANY: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_peppol/models/res_company.py", - line_range: (54, 448), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/res_company.py", line_range: (54, 448) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13", "ogit:regulation/eu/en16931"], }, @@ -1218,14 +1230,13 @@ pub const EXT_RES_CONFIG_SETTINGS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_peppol/models/res_config_settings.py", - line_range: (4, 165), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/res_config_settings.py", line_range: (4, 165) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1421,15 +1432,15 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/account_peppol/models/res_partner.py", - line_range: (19, 303), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/account_peppol/models/res_partner.py", line_range: (19, 303) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; + diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/analytic.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/analytic.rs index 3639e700..b283fc48 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/analytic.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/analytic.rs @@ -198,18 +198,17 @@ pub const EXT_ACCOUNT_ANALYTIC_ACCOUNT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on company_id", - source_method: Some("_check_company_consistency"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on company_id", + source_method: Some("_check_company_consistency"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/analytic/models/analytic_account.py", - line_range: (11, 243), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/analytic_account.py", line_range: (11, 243) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -308,18 +307,17 @@ pub const EXT_ACCOUNT_ANALYTIC_DISTRIBUTION_MODEL: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on company_id", - source_method: Some("_check_company_accounts"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on company_id", + source_method: Some("_check_company_accounts"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/analytic/models/analytic_distribution_model.py", - line_range: (9, 96), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/analytic_distribution_model.py", line_range: (9, 96) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -462,18 +460,17 @@ pub const EXT_ANALYTIC_PLAN_FIELDS_MIXIN: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint", - source_method: Some("_check_account_id"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint", + source_method: Some("_check_account_id"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/analytic/models/analytic_line.py", - line_range: (11, 160), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/analytic_line.py", line_range: (11, 160) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -628,16 +625,17 @@ pub const EXT_ACCOUNT_ANALYTIC_LINE: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/analytic/models/analytic_line.py", - line_range: (163, 274), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/analytic_line.py", line_range: (163, 274) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -795,14 +793,13 @@ pub const EXT_ANALYTIC_MIXIN: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/analytic/models/analytic_mixin.py", - line_range: (12, 275), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/analytic_mixin.py", line_range: (12, 275) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1144,14 +1141,13 @@ pub const EXT_ACCOUNT_ANALYTIC_PLAN: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/analytic/models/analytic_plan.py", - line_range: (14, 390), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/analytic_plan.py", line_range: (14, 390) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1199,22 +1195,25 @@ pub const EXT_ACCOUNT_ANALYTIC_APPLICABILITY: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[OdooMethod { - name: "_get_score", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + methods: &[ + OdooMethod { + name: "_get_score", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/analytic/models/analytic_plan.py", - line_range: (393, 430), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/analytic_plan.py", line_range: (393, 430) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1224,23 +1223,28 @@ pub const EXT_IR_CONFIG_PARAMETER: OdooEntity = OdooEntity { model_name: "ir.config_parameter", kind: OdooEntityKind::Model, description: "", - fields: &[], - methods: &[OdooMethod { - name: "write", - kind: OdooMethodKind::Override, - return_kind: OdooReturnKind::Boolean, - triggers: &[], - }], - decorators: &[], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "write", + kind: OdooMethodKind::Override, + return_kind: OdooReturnKind::Boolean, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/analytic/models/ir_config_parameter.py", - line_range: (7, 28), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/ir_config_parameter.py", line_range: (7, 28) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1250,27 +1254,33 @@ pub const EXT_RES_CONFIG_SETTINGS: OdooEntity = OdooEntity { model_name: "res.config.settings", kind: OdooEntityKind::Transient, description: "", - fields: &[OdooField { - name: "group_analytic_accounting", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], - methods: &[], - decorators: &[], + fields: &[ + OdooField { + name: "group_analytic_accounting", + kind: OdooFieldKind::Boolean, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/analytic/models/res_config_settings.py", - line_range: (7, 10), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/analytic/models/res_config_settings.py", line_range: (7, 10) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; + diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/base.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/base.rs index 7b51cec5..bb5ffbc2 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/base.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/base.rs @@ -142,14 +142,13 @@ pub const EXT_AVATAR_MIXIN: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/avatar_mixin.py", - line_range: (22, 90), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/avatar_mixin.py", line_range: (22, 90) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -226,18 +225,17 @@ pub const EXT_DECIMAL_PRECISION: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Only one value can be defined for each given usage!", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Only one value can be defined for each given usage!", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/decimal_precision.py", - line_range: (9, 60), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/decimal_precision.py", line_range: (9, 60) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -294,17 +292,20 @@ pub const EXT_IMAGE_MIXIN: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/image_mixin.py", - line_range: (7, 19), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/image_mixin.py", line_range: (7, 19) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -500,10 +501,7 @@ pub const EXT_IR_ACTIONS_ACTIONS: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_actions.py", - line_range: (54, 257), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (54, 257) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -783,10 +781,7 @@ pub const EXT_IR_ACTIONS_ACT_WINDOW: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_actions.py", - line_range: (260, 397), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (260, 397) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -843,17 +838,20 @@ pub const EXT_IR_ACTIONS_ACT_WINDOW_VIEW: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_actions.py", - line_range: (410, 424), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (410, 424) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -863,31 +861,36 @@ pub const EXT_IR_ACTIONS_ACT_WINDOW_CLOSE: OdooEntity = OdooEntity { model_name: "ir.actions.act_window_close", kind: OdooEntityKind::Model, description: "Action Window Close", - fields: &[OdooField { - name: "type", - kind: OdooFieldKind::Char, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], - methods: &[OdooMethod { - name: "_get_readable_fields", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + fields: &[ + OdooField { + name: "type", + kind: OdooFieldKind::Char, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], + methods: &[ + OdooMethod { + name: "_get_readable_fields", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_actions.py", - line_range: (427, 441), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (427, 441) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -926,22 +929,25 @@ pub const EXT_IR_ACTIONS_ACT_URL: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[OdooMethod { - name: "_get_readable_fields", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + methods: &[ + OdooMethod { + name: "_get_readable_fields", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_actions.py", - line_range: (444, 460), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (444, 460) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1020,14 +1026,13 @@ pub const EXT_SERVER_ACTION_HISTORY_WIZARD: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_actions.py", - line_range: (463, 499), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (463, 499) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1071,19 +1076,20 @@ pub const EXT_IR_ACTIONS_SERVER_HISTORY: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiAutovacuum, - targets: &[], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiAutovacuum, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_actions.py", - line_range: (502, 538), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (502, 538) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1760,35 +1766,18 @@ pub const EXT_IR_ACTIONS_SERVER: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { - name: "object_write", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "object_create", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "object_copy", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "code", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "webhook", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "multi", - semantic: OdooStateSemantic::Active, - }, - ], - transitions: &[], - }), + state_field: "state", + states: &[ + OdooState { name: "object_write", semantic: OdooStateSemantic::Active }, + OdooState { name: "object_create", semantic: OdooStateSemantic::Active }, + OdooState { name: "object_copy", semantic: OdooStateSemantic::Active }, + OdooState { name: "code", semantic: OdooStateSemantic::Active }, + OdooState { name: "webhook", semantic: OdooStateSemantic::Active }, + OdooState { name: "multi", semantic: OdooStateSemantic::Active }, + ], + transitions: &[ + ], + }), constraints: &[ OdooConstraint { kind: OdooConstraintKind::Python, @@ -1804,10 +1793,7 @@ pub const EXT_IR_ACTIONS_SERVER: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_actions.py", - line_range: (566, 1341), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (566, 1341) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1904,40 +1890,33 @@ pub const EXT_IR_ACTIONS_TODO: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { - name: "open", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "done", - semantic: OdooStateSemantic::Completed, - }, - ], - transitions: &[ - OdooTransition { - from: "open", - to: "done", - trigger: "action_launch", - guards: &[], - }, - OdooTransition { - from: "open", - to: "open", - trigger: "action_open", - guards: &[], - }, - ], - }), - constraints: &[], + state_field: "state", + states: &[ + OdooState { name: "open", semantic: OdooStateSemantic::Active }, + OdooState { name: "done", semantic: OdooStateSemantic::Completed }, + ], + transitions: &[ + OdooTransition { + from: "open", + to: "done", + trigger: "action_launch", + guards: &[], + }, + OdooTransition { + from: "open", + to: "open", + trigger: "action_open", + guards: &[], + }, + ], + }), + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_actions.py", - line_range: (1344, 1420), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (1344, 1420) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2032,19 +2011,20 @@ pub const EXT_IR_ACTIONS_CLIENT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["params_store"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["params_store"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_actions.py", - line_range: (1423, 1460), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions.py", line_range: (1423, 1460) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2455,14 +2435,13 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_actions_report.py", - line_range: (157, 1217), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_actions_report.py", line_range: (157, 1217) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2650,14 +2629,13 @@ pub const EXT_IR_ASSET: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_asset.py", - line_range: (51, 387), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_asset.py", line_range: (51, 387) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3243,18 +3221,17 @@ pub const EXT_IR_ATTACHMENT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on res_model, res_id", - source_method: Some("_check_circular_attachment"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on res_model, res_id", + source_method: Some("_check_circular_attachment"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_attachment.py", - line_range: (61, 984), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_attachment.py", line_range: (61, 984) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3264,7 +3241,9 @@ pub const EXT_IR_AUTOVACUUM: OdooEntity = OdooEntity { model_name: "ir.autovacuum", kind: OdooEntityKind::Abstract, description: "Automatic Vacuum", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_run_vacuum_cleaner", @@ -3279,19 +3258,20 @@ pub const EXT_IR_AUTOVACUUM: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiAutovacuum, - targets: &[], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiAutovacuum, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_autovacuum.py", - line_range: (22, 75), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_autovacuum.py", line_range: (22, 75) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3301,7 +3281,9 @@ pub const EXT_IR_BINARY: OdooEntity = OdooEntity { model_name: "ir.binary", kind: OdooEntityKind::Abstract, description: "File streaming helper model for controllers", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_find_record", @@ -3340,16 +3322,17 @@ pub const EXT_IR_BINARY: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_binary.py", - line_range: (19, 259), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_binary.py", line_range: (19, 259) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3448,18 +3431,17 @@ pub const EXT_IR_CONFIG_PARAMETER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Key must be unique.", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Key must be unique.", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_config_parameter.py", - line_range: (28, 125), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_config_parameter.py", line_range: (28, 125) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3795,18 +3777,17 @@ pub const EXT_IR_CRON: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "The interval number must be a strictly positive number.", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "The interval number must be a strictly positive number.", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_cron.py", - line_range: (91, 894), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_cron.py", line_range: (91, 894) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3836,25 +3817,28 @@ pub const EXT_IR_CRON_TRIGGER: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[OdooMethod { - name: "_gc_cron_triggers", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiAutovacuum, - targets: &[], - }], + methods: &[ + OdooMethod { + name: "_gc_cron_triggers", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiAutovacuum, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_cron.py", - line_range: (897, 915), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_cron.py", line_range: (897, 915) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3911,25 +3895,28 @@ pub const EXT_IR_CRON_PROGRESS: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[OdooMethod { - name: "_gc_cron_progress", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiAutovacuum, - targets: &[], - }], + methods: &[ + OdooMethod { + name: "_gc_cron_progress", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiAutovacuum, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_cron.py", - line_range: (918, 933), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_cron.py", line_range: (918, 933) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4085,18 +4072,17 @@ pub const EXT_IR_DEFAULT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on json_value, field_id", - source_method: Some("_check_json_format"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on json_value, field_id", + source_method: Some("_check_json_format"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_default.py", - line_range: (13, 239), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_default.py", line_range: (13, 239) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4106,23 +4092,28 @@ pub const EXT_IR_DEMO: OdooEntity = OdooEntity { model_name: "ir.demo", kind: OdooEntityKind::Transient, description: "Demo", - fields: &[], - methods: &[OdooMethod { - name: "install_demo", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "install_demo", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_demo.py", - line_range: (7, 19), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_demo.py", line_range: (7, 19) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4161,17 +4152,20 @@ pub const EXT_IR_DEMO_FAILURE: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_demo_failure.py", - line_range: (4, 12), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_demo_failure.py", line_range: (4, 12) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4215,19 +4209,20 @@ pub const EXT_IR_DEMO_FAILURE_WIZARD: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["failure_ids"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["failure_ids"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_demo_failure.py", - line_range: (15, 32), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_demo_failure.py", line_range: (15, 32) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4467,17 +4462,20 @@ pub const EXT_IR_EXPORTS: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_exports.py", - line_range: (7, 14), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_exports.py", line_range: (7, 14) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4507,17 +4505,20 @@ pub const EXT_IR_EXPORTS_LINE: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_exports.py", - line_range: (17, 23), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_exports.py", line_range: (17, 23) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4527,7 +4528,9 @@ pub const EXT_IR_FIELDS_CONVERTER: OdooEntity = OdooEntity { model_name: "ir.fields.converter", kind: OdooEntityKind::Abstract, description: "Fields Converter", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_format_import_error", @@ -4743,14 +4746,13 @@ pub const EXT_IR_FIELDS_CONVERTER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_fields.py", - line_range: (44, 740), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_fields.py", line_range: (44, 740) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4949,7 +4951,9 @@ pub const EXT_IR_HTTP: OdooEntity = OdooEntity { model_name: "ir.http", kind: OdooEntityKind::Abstract, description: "HTTP Routing", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_slugify_one", @@ -5145,14 +5149,13 @@ pub const EXT_IR_HTTP: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_http.py", - line_range: (138, 458), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_http.py", line_range: (138, 458) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -5272,22 +5275,25 @@ pub const EXT_IR_LOGGING: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[OdooMethod { - name: "init", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + methods: &[ + OdooMethod { + name: "init", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_logging.py", - line_range: (5, 45), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_logging.py", line_range: (5, 45) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -5674,7 +5680,9 @@ pub const EXT_BASE: OdooEntity = OdooEntity { model_name: "base", kind: OdooEntityKind::Abstract, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_get_access_action", @@ -5890,14 +5898,13 @@ pub const EXT_BASE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], - provenance: OdooProvenance { - l_doc: "", + constraints: &[ + + ], + provenance: OdooProvenance { + l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_ui_view.py", - line_range: (2725, 3325), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_ui_view.py", line_range: (2725, 3325) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -5907,18 +5914,23 @@ pub const EXT__UNKNOWN: OdooEntity = OdooEntity { model_name: "_unknown", kind: OdooEntityKind::Abstract, description: "Unknown", - fields: &[], - methods: &[], - decorators: &[], + fields: &[ + + ], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_model.py", - line_range: (198, 204), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (198, 204) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6244,19 +6256,14 @@ pub const EXT_IR_MODEL: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { - name: "manual", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "base", - semantic: OdooStateSemantic::Active, - }, - ], - transitions: &[], - }), + state_field: "state", + states: &[ + OdooState { name: "manual", semantic: OdooStateSemantic::Active }, + OdooState { name: "base", semantic: OdooStateSemantic::Active }, + ], + transitions: &[ + ], + }), constraints: &[ OdooConstraint { kind: OdooConstraintKind::Sql, @@ -6282,10 +6289,7 @@ pub const EXT_IR_MODEL: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_model.py", - line_range: (207, 501), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (207, 501) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7018,19 +7022,14 @@ pub const EXT_IR_MODEL_FIELDS: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { - name: "manual", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "base", - semantic: OdooStateSemantic::Active, - }, - ], - transitions: &[], - }), + state_field: "state", + states: &[ + OdooState { name: "manual", semantic: OdooStateSemantic::Active }, + OdooState { name: "base", semantic: OdooStateSemantic::Active }, + ], + transitions: &[ + ], + }), constraints: &[ OdooConstraint { kind: OdooConstraintKind::Sql, @@ -7091,10 +7090,7 @@ pub const EXT_IR_MODEL_FIELDS: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_model.py", - line_range: (508, 1419), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (508, 1419) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7133,26 +7129,29 @@ pub const EXT_IR_MODEL_INHERIT: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[OdooMethod { - name: "_reflect_inherits", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + methods: &[ + OdooMethod { + name: "_reflect_inherits", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Models inherits from another only once", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Models inherits from another only once", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_model.py", - line_range: (1422, 1504), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (1422, 1504) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7268,23 +7267,24 @@ pub const EXT_IR_MODEL_FIELDS_SELECTION: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModelCreateMulti, - targets: &[], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModelCreateMulti, + targets: &[], + }, + ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Selections values must be unique per field", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Selections values must be unique per field", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_model.py", - line_range: (1507, 1847), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (1507, 1847) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7382,20 +7382,21 @@ pub const EXT_IR_MODEL_CONSTRAINT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Constraints with the same name are unique per module.", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Constraints with the same name are unique per module.", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_model.py", - line_range: (1850, 2003), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (1850, 2003) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7466,16 +7467,17 @@ pub const EXT_IR_MODEL_RELATION: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_model.py", - line_range: (2006, 2069), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (2006, 2069) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7638,14 +7640,13 @@ pub const EXT_IR_MODEL_ACCESS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_model.py", - line_range: (2072, 2215), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (2072, 2215) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7901,18 +7902,17 @@ pub const EXT_IR_MODEL_DATA: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "External IDs cannot contain spaces", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "External IDs cannot contain spaces", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_model.py", - line_range: (2218, 2717), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_model.py", line_range: (2218, 2717) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -8028,23 +8028,24 @@ pub const EXT_IR_MODULE_CATEGORY: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["parent_id"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["parent_id"], + }, + ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on parent_id", - source_method: Some("_check_parent_not_circular"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on parent_id", + source_method: Some("_check_parent_not_circular"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_module.py", - line_range: (76, 104), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_module.py", line_range: (76, 104) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -8640,18 +8641,17 @@ pub const EXT_IR_MODULE_MODULE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "The name of the module must be unique!", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "The name of the module must be unique!", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_module.py", - line_range: (157, 988), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_module.py", line_range: (157, 988) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -8749,14 +8749,13 @@ pub const EXT_IR_MODULE_MODULE_DEPENDENCY: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_module.py", - line_range: (994, 1057), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_module.py", line_range: (994, 1057) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -8835,14 +8834,13 @@ pub const EXT_IR_MODULE_MODULE_EXCLUSION: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_module.py", - line_range: (1060, 1096), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_module.py", line_range: (1060, 1096) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9097,14 +9095,13 @@ pub const EXT_IR_PROFILE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_profile.py", - line_range: (21, 217), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_profile.py", line_range: (21, 217) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9148,19 +9145,20 @@ pub const EXT_BASE_ENABLE_PROFILING_WIZARD: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["duration"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["duration"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_profile.py", - line_range: (219, 239), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_profile.py", line_range: (219, 239) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9170,7 +9168,9 @@ pub const EXT_IR_QWEB: OdooEntity = OdooEntity { model_name: "ir.qweb", kind: OdooEntityKind::Abstract, description: "Qweb", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_render", @@ -9598,14 +9598,13 @@ pub const EXT_IR_QWEB: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb.py", - line_range: (673, 2960), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb.py", line_range: (673, 2960) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9615,7 +9614,9 @@ pub const EXT_IR_QWEB_FIELD: OdooEntity = OdooEntity { model_name: "ir.qweb.field", kind: OdooEntityKind::Abstract, description: "Qweb Field", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "get_available_options", @@ -9671,14 +9672,13 @@ pub const EXT_IR_QWEB_FIELD: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (48, 182), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (48, 182) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9688,7 +9688,9 @@ pub const EXT_IR_QWEB_FIELD_INTEGER: OdooEntity = OdooEntity { model_name: "ir.qweb.field.integer", kind: OdooEntityKind::Abstract, description: "Qweb Field Integer", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "get_available_options", @@ -9714,14 +9716,13 @@ pub const EXT_IR_QWEB_FIELD_INTEGER: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (185, 203), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (185, 203) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9731,7 +9732,9 @@ pub const EXT_IR_QWEB_FIELD_FLOAT: OdooEntity = OdooEntity { model_name: "ir.qweb.field.float", kind: OdooEntityKind::Abstract, description: "Qweb Field Float", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "get_available_options", @@ -9767,14 +9770,13 @@ pub const EXT_IR_QWEB_FIELD_FLOAT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (206, 254), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (206, 254) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9784,7 +9786,9 @@ pub const EXT_IR_QWEB_FIELD_DATE: OdooEntity = OdooEntity { model_name: "ir.qweb.field.date", kind: OdooEntityKind::Abstract, description: "Qweb Field Date", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "get_available_options", @@ -9810,14 +9814,13 @@ pub const EXT_IR_QWEB_FIELD_DATE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (257, 272), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (257, 272) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9827,7 +9830,9 @@ pub const EXT_IR_QWEB_FIELD_DATETIME: OdooEntity = OdooEntity { model_name: "ir.qweb.field.datetime", kind: OdooEntityKind::Abstract, description: "Qweb Field Datetime", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "get_available_options", @@ -9853,14 +9858,13 @@ pub const EXT_IR_QWEB_FIELD_DATETIME: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (275, 330), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (275, 330) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9870,26 +9874,31 @@ pub const EXT_IR_QWEB_FIELD_TEXT: OdooEntity = OdooEntity { model_name: "ir.qweb.field.text", kind: OdooEntityKind::Abstract, description: "Qweb Field Text", - fields: &[], - methods: &[OdooMethod { - name: "value_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "value_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (333, 343), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (333, 343) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9899,7 +9908,9 @@ pub const EXT_IR_QWEB_FIELD_SELECTION: OdooEntity = OdooEntity { model_name: "ir.qweb.field.selection", kind: OdooEntityKind::Abstract, description: "Qweb Field Selection", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "get_available_options", @@ -9935,14 +9946,13 @@ pub const EXT_IR_QWEB_FIELD_SELECTION: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (346, 372), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (346, 372) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9952,26 +9962,31 @@ pub const EXT_IR_QWEB_FIELD_MANY2ONE: OdooEntity = OdooEntity { model_name: "ir.qweb.field.many2one", kind: OdooEntityKind::Abstract, description: "Qweb Field Many to One", - fields: &[], - methods: &[OdooMethod { - name: "value_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "value_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (375, 387), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (375, 387) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9981,26 +9996,31 @@ pub const EXT_IR_QWEB_FIELD_MANY2MANY: OdooEntity = OdooEntity { model_name: "ir.qweb.field.many2many", kind: OdooEntityKind::Abstract, description: "Qweb field many2many", - fields: &[], - methods: &[OdooMethod { - name: "value_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "value_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (390, 400), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (390, 400) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10010,26 +10030,31 @@ pub const EXT_IR_QWEB_FIELD_ONE2MANY: OdooEntity = OdooEntity { model_name: "ir.qweb.field.one2many", kind: OdooEntityKind::Abstract, description: "Qweb field one2many", - fields: &[], - methods: &[OdooMethod { - name: "value_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "value_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (403, 413), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (403, 413) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10039,26 +10064,31 @@ pub const EXT_IR_QWEB_FIELD_HTML: OdooEntity = OdooEntity { model_name: "ir.qweb.field.html", kind: OdooEntityKind::Abstract, description: "Qweb Field HTML", - fields: &[], - methods: &[OdooMethod { - name: "value_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "value_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (416, 433), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (416, 433) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10068,7 +10098,9 @@ pub const EXT_IR_QWEB_FIELD_IMAGE: OdooEntity = OdooEntity { model_name: "ir.qweb.field.image", kind: OdooEntityKind::Abstract, description: "Qweb Field Image", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_get_src_data_b64", @@ -10094,14 +10126,13 @@ pub const EXT_IR_QWEB_FIELD_IMAGE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (436, 473), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (436, 473) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10111,26 +10142,31 @@ pub const EXT_IR_QWEB_FIELD_IMAGE_URL: OdooEntity = OdooEntity { model_name: "ir.qweb.field.image_url", kind: OdooEntityKind::Abstract, description: "Qweb Field Image", - fields: &[], - methods: &[OdooMethod { - name: "value_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "value_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (476, 486), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (476, 486) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10140,7 +10176,9 @@ pub const EXT_IR_QWEB_FIELD_MONETARY: OdooEntity = OdooEntity { model_name: "ir.qweb.field.monetary", kind: OdooEntityKind::Abstract, description: "Qweb Field Monetary", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "get_available_options", @@ -10176,14 +10214,13 @@ pub const EXT_IR_QWEB_FIELD_MONETARY: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (489, 581), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (489, 581) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10193,26 +10230,31 @@ pub const EXT_IR_QWEB_FIELD_FLOAT_TIME: OdooEntity = OdooEntity { model_name: "ir.qweb.field.float_time", kind: OdooEntityKind::Abstract, description: "Qweb Field Float Time", - fields: &[], - methods: &[OdooMethod { - name: "value_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "value_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (595, 607), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (595, 607) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10222,26 +10264,31 @@ pub const EXT_IR_QWEB_FIELD_TIME: OdooEntity = OdooEntity { model_name: "ir.qweb.field.time", kind: OdooEntityKind::Abstract, description: "QWeb Field Time", - fields: &[], - methods: &[OdooMethod { - name: "value_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "value_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (610, 633), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (610, 633) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10251,7 +10298,9 @@ pub const EXT_IR_QWEB_FIELD_DURATION: OdooEntity = OdooEntity { model_name: "ir.qweb.field.duration", kind: OdooEntityKind::Abstract, description: "Qweb Field Duration", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "get_available_options", @@ -10277,14 +10326,13 @@ pub const EXT_IR_QWEB_FIELD_DURATION: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (636, 740), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (636, 740) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10294,7 +10342,9 @@ pub const EXT_IR_QWEB_FIELD_RELATIVE: OdooEntity = OdooEntity { model_name: "ir.qweb.field.relative", kind: OdooEntityKind::Abstract, description: "Qweb Field Relative", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "get_available_options", @@ -10330,14 +10380,13 @@ pub const EXT_IR_QWEB_FIELD_RELATIVE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (743, 772), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (743, 772) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10347,7 +10396,9 @@ pub const EXT_IR_QWEB_FIELD_BARCODE: OdooEntity = OdooEntity { model_name: "ir.qweb.field.barcode", kind: OdooEntityKind::Abstract, description: "Qweb Field Barcode", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "get_available_options", @@ -10373,14 +10424,13 @@ pub const EXT_IR_QWEB_FIELD_BARCODE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (775, 816), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (775, 816) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10390,7 +10440,9 @@ pub const EXT_IR_QWEB_FIELD_CONTACT: OdooEntity = OdooEntity { model_name: "ir.qweb.field.contact", kind: OdooEntityKind::Abstract, description: "Qweb Field Contact", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "get_available_options", @@ -10416,14 +10468,13 @@ pub const EXT_IR_QWEB_FIELD_CONTACT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (819, 893), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (819, 893) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10433,26 +10484,31 @@ pub const EXT_IR_QWEB_FIELD_QWEB: OdooEntity = OdooEntity { model_name: "ir.qweb.field.qweb", kind: OdooEntityKind::Abstract, description: "Qweb Field qweb", - fields: &[], - methods: &[OdooMethod { - name: "record_to_html", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "record_to_html", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", - line_range: (896, 911), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_qweb_fields.py", line_range: (896, 911) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10672,10 +10728,7 @@ pub const EXT_IR_RULE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_rule.py", - line_range: (15, 268), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_rule.py", line_range: (15, 268) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10899,14 +10952,13 @@ pub const EXT_IR_SEQUENCE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_sequence.py", - line_range: (85, 292), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_sequence.py", line_range: (85, 292) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11024,19 +11076,17 @@ pub const EXT_IR_SEQUENCE_DATE_RANGE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: - "You cannot create two date ranges for the same sequence with the same date range.", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "You cannot create two date ranges for the same sequence with the same date range.", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_sequence.py", - line_range: (295, 376), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_sequence.py", line_range: (295, 376) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11286,18 +11336,17 @@ pub const EXT_IR_UI_MENU: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on parent_id", - source_method: Some("_check_parent_id"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on parent_id", + source_method: Some("_check_parent_id"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_ui_menu.py", - line_range: (16, 324), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_ui_menu.py", line_range: (16, 324) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11336,17 +11385,20 @@ pub const EXT_IR_UI_VIEW_CUSTOM: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_ui_view.py", - line_range: (66, 77), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_ui_view.py", line_range: (66, 77) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12471,14 +12523,13 @@ pub const EXT_RESET_VIEW_ARCH_WIZARD: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/ir_ui_view.py", - line_range: (2643, 2722), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/ir_ui_view.py", line_range: (2643, 2722) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12566,10 +12617,7 @@ pub const EXT_PROPERTIES_BASE_DEFINITION: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/properties_base_definition.py", - line_range: (6, 67), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/properties_base_definition.py", line_range: (6, 67) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12625,19 +12673,20 @@ pub const EXT_PROPERTIES_BASE_DEFINITION_MIXIN: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModelCreateMulti, - targets: &[], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModelCreateMulti, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/properties_base_definition_mixin.py", - line_range: (8, 56), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/properties_base_definition_mixin.py", line_range: (8, 56) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12694,17 +12743,20 @@ pub const EXT_REPORT_LAYOUT: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/report_layout.py", - line_range: (7, 17), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/report_layout.py", line_range: (7, 17) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12892,23 +12944,24 @@ pub const EXT_REPORT_PAPERFORMAT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["format"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["format"], + }, + ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on format", - source_method: Some("_check_format_or_page"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on format", + source_method: Some("_check_format_or_page"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/report_paperformat.py", - line_range: (165, 213), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/report_paperformat.py", line_range: (165, 213) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -13089,14 +13142,13 @@ pub const EXT_RES_BANK: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_bank.py", - line_range: (16, 70), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_bank.py", line_range: (16, 70) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -13398,18 +13450,17 @@ pub const EXT_RES_PARTNER_BANK: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "The combination Account Number/Partner must be unique.", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "The combination Account Number/Partner must be unique.", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_bank.py", - line_range: (73, 223), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_bank.py", line_range: (73, 223) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14128,10 +14179,7 @@ pub const EXT_RES_COMPANY: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_company.py", - line_range: (16, 493), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_company.py", line_range: (16, 493) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14141,7 +14189,9 @@ pub const EXT_RES_CONFIG: OdooEntity = OdooEntity { model_name: "res.config", kind: OdooEntityKind::Transient, description: "Config", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "start", @@ -14186,16 +14236,17 @@ pub const EXT_RES_CONFIG: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_config.py", - line_range: (13, 96), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_config.py", line_range: (13, 96) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14205,7 +14256,9 @@ pub const EXT_RES_CONFIG_SETTINGS: OdooEntity = OdooEntity { model_name: "res.config.settings", kind: OdooEntityKind::Transient, description: "Config Settings", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_valid_field_parameter", @@ -14333,14 +14386,13 @@ pub const EXT_RES_CONFIG_SETTINGS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_config.py", - line_range: (99, 567), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_config.py", line_range: (99, 567) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14581,10 +14633,7 @@ pub const EXT_RES_COUNTRY: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_country.py", - line_range: (32, 168), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_country.py", line_range: (32, 168) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -14643,23 +14692,24 @@ pub const EXT_RES_COUNTRY_GROUP: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModelCreateMulti, - targets: &[], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModelCreateMulti, + targets: &[], + }, + ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "The country group code must be unique!", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "The country group code must be unique!", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_country.py", - line_range: (171, 195), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_country.py", line_range: (171, 195) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -14739,18 +14789,17 @@ pub const EXT_RES_COUNTRY_STATE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "The code of the state must be unique by country!", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "The code of the state must be unique by country!", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_country.py", - line_range: (198, 271), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_country.py", line_range: (198, 271) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -15117,10 +15166,7 @@ pub const EXT_RES_CURRENCY: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_currency.py", - line_range: (20, 339), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_currency.py", line_range: (20, 339) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -15289,13 +15335,7 @@ pub const EXT_RES_CURRENCY_RATE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "rate", - "name", - "currency_id", - "company_id", - "currency_id.rate_ids.rate", - ], + targets: &["rate", "name", "currency_id", "company_id", "currency_id.rate_ids.rate"], }, OdooDecorator { kind: OdooDecoratorKind::ApiOnchange, @@ -15351,10 +15391,7 @@ pub const EXT_RES_CURRENCY_RATE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_currency.py", - line_range: (342, 503), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_currency.py", line_range: (342, 503) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -15548,14 +15585,13 @@ pub const EXT_RES_DEVICE_LOG: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_device.py", - line_range: (16, 171), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_device.py", line_range: (16, 171) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -15565,7 +15601,9 @@ pub const EXT_RES_DEVICE: OdooEntity = OdooEntity { model_name: "res.device", kind: OdooEntityKind::Model, description: "Devices", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "revoke", @@ -15625,14 +15663,13 @@ pub const EXT_RES_DEVICE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_device.py", - line_range: (174, 237), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_device.py", line_range: (174, 237) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -16085,10 +16122,7 @@ pub const EXT_RES_GROUPS: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_groups.py", - line_range: (9, 397), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_groups.py", line_range: (9, 397) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -16154,17 +16188,20 @@ pub const EXT_RES_GROUPS_PRIVILEGE: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_groups_privilege.py", - line_range: (4, 14), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_groups_privilege.py", line_range: (4, 14) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -16509,10 +16546,7 @@ pub const EXT_RES_LANG: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_lang.py", - line_range: (49, 455), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_lang.py", line_range: (49, 455) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -16522,26 +16556,31 @@ pub const EXT_FORMAT_VAT_LABEL_MIXIN: OdooEntity = OdooEntity { model_name: "format.vat.label.mixin", kind: OdooEntityKind::Abstract, description: "Country Specific VAT Label", - fields: &[], - methods: &[OdooMethod { - name: "_get_view", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "_get_view", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_partner.py", - line_range: (45, 58), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_partner.py", line_range: (45, 58) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -16551,7 +16590,9 @@ pub const EXT_FORMAT_ADDRESS_MIXIN: OdooEntity = OdooEntity { model_name: "format.address.mixin", kind: OdooEntityKind::Abstract, description: "Address Format", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_extract_fields_from_address", @@ -16589,14 +16630,13 @@ pub const EXT_FORMAT_ADDRESS_MIXIN: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_partner.py", - line_range: (61, 136), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_partner.py", line_range: (61, 136) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -16685,18 +16725,17 @@ pub const EXT_RES_PARTNER_CATEGORY: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on parent_id", - source_method: Some("_check_parent_id"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on parent_id", + source_method: Some("_check_parent_id"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_partner.py", - line_range: (139, 181), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_partner.py", line_range: (139, 181) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17595,14 +17634,7 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "is_company", - "name", - "parent_id.name", - "type", - "company_name", - "commercial_company_name", - ], + targets: &["is_company", "name", "parent_id.name", "type", "company_name", "commercial_company_name"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -17646,11 +17678,7 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "company_name", - "parent_id.is_company", - "commercial_partner_id.name", - ], + targets: &["company_name", "parent_id.is_company", "commercial_partner_id.name"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -17722,14 +17750,7 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "complete_name", - "email", - "vat", - "state_id", - "country_id", - "commercial_company_name", - ], + targets: &["complete_name", "email", "vat", "state_id", "country_id", "commercial_company_name"], }, OdooDecorator { kind: OdooDecoratorKind::ApiModel, @@ -17790,10 +17811,7 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_partner.py", - line_range: (184, 1242), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_partner.py", line_range: (184, 1242) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17832,17 +17850,20 @@ pub const EXT_RES_PARTNER_INDUSTRY: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_partner.py", - line_range: (1245, 1252), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_partner.py", line_range: (1245, 1252) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -17852,34 +17873,39 @@ pub const EXT_RES_USERS_LOG: OdooEntity = OdooEntity { model_name: "res.users.log", kind: OdooEntityKind::Model, description: "Users Log", - fields: &[OdooField { - name: "create_uid", - kind: OdooFieldKind::Many2one, - target: Some("res.users"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], - methods: &[OdooMethod { - name: "_gc_user_logs", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiAutovacuum, - targets: &[], - }], + fields: &[ + OdooField { + name: "create_uid", + kind: OdooFieldKind::Many2one, + target: Some("res.users"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], + methods: &[ + OdooMethod { + name: "_gc_user_logs", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiAutovacuum, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_users.py", - line_range: (134, 152), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (134, 152) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -18854,10 +18880,7 @@ pub const EXT_RES_USERS: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_users.py", - line_range: (155, 1346), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (155, 1346) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -18916,16 +18939,17 @@ pub const EXT_RES_USERS_IDENTITYCHECK: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_users.py", - line_range: (1400, 1439), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (1400, 1439) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -18935,15 +18959,17 @@ pub const EXT_CHANGE_PASSWORD_WIZARD: OdooEntity = OdooEntity { model_name: "change.password.wizard", kind: OdooEntityKind::Transient, description: "Change Password Wizard", - fields: &[OdooField { - name: "user_ids", - kind: OdooFieldKind::One2many, - target: Some("change.password.user"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], + fields: &[ + OdooField { + name: "user_ids", + kind: OdooFieldKind::One2many, + target: Some("change.password.user"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], methods: &[ OdooMethod { name: "_default_user_ids", @@ -18958,16 +18984,17 @@ pub const EXT_CHANGE_PASSWORD_WIZARD: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_users.py", - line_range: (1446, 1466), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (1446, 1466) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19015,22 +19042,25 @@ pub const EXT_CHANGE_PASSWORD_USER: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[OdooMethod { - name: "change_password_button", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + methods: &[ + OdooMethod { + name: "change_password_button", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_users.py", - line_range: (1469, 1483), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (1469, 1483) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19074,23 +19104,24 @@ pub const EXT_CHANGE_PASSWORD_OWN: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["new_password", "confirm_password"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["new_password", "confirm_password"], + }, + ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on new_password, confirm_password", - source_method: Some("_check_password_confirmation"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on new_password, confirm_password", + source_method: Some("_check_password_confirmation"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_users.py", - line_range: (1486, 1505), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (1486, 1505) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19224,14 +19255,13 @@ pub const EXT_RES_USERS_APIKEYS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_users.py", - line_range: (1519, 1724), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (1519, 1724) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19323,14 +19353,13 @@ pub const EXT_RES_USERS_APIKEYS_DESCRIPTION: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_users.py", - line_range: (1727, 1808), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (1727, 1808) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19360,17 +19389,20 @@ pub const EXT_RES_USERS_APIKEYS_SHOW: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_users.py", - line_range: (1811, 1817), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users.py", line_range: (1811, 1817) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19434,31 +19466,22 @@ pub const EXT_RES_USERS_DELETION: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { - name: "todo", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "done", - semantic: OdooStateSemantic::Completed, - }, - OdooState { - name: "fail", - semantic: OdooStateSemantic::Active, - }, - ], - transitions: &[], - }), - constraints: &[], + state_field: "state", + states: &[ + OdooState { name: "todo", semantic: OdooStateSemantic::Active }, + OdooState { name: "done", semantic: OdooStateSemantic::Completed }, + OdooState { name: "fail", semantic: OdooStateSemantic::Active }, + ], + transitions: &[ + ], + }), + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_users_deletion.py", - line_range: (11, 100), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users_deletion.py", line_range: (11, 100) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -19468,15 +19491,17 @@ pub const EXT_RES_USERS_SETTINGS: OdooEntity = OdooEntity { model_name: "res.users.settings", kind: OdooEntityKind::Model, description: "User Settings", - fields: &[OdooField { - name: "user_id", - kind: OdooFieldKind::Many2one, - target: Some("res.users"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], + fields: &[ + OdooField { + name: "user_id", + kind: OdooFieldKind::Many2one, + target: Some("res.users"), + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], methods: &[ OdooMethod { name: "_get_fields_blacklist", @@ -19520,19 +19545,19 @@ pub const EXT_RES_USERS_SETTINGS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "One user should only have one user settings.", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "One user should only have one user settings.", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/odoo/addons/base/models/res_users_settings.py", - line_range: (7, 55), - }], + odoo_source: &[OdooSourceRef { path: "odoo/odoo/addons/base/models/res_users_settings.py", line_range: (7, 55) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; + diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/coverage.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/coverage.rs index b78d2e58..9bd694be 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/coverage.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/coverage.rs @@ -16,10 +16,10 @@ /// When Stage 2 lands (extracts `hr` + `stock_account` + …), remove /// the corresponding entries from this list. pub const COVERAGE_EXEMPTIONS: &[(&str, &str)] = &[ - ("hr.contract.type", "hr (Stage 2)"), - ("hr.department", "hr (Stage 2)"), - ("hr.employee", "hr (Stage 2)"), - ("hr.job", "hr (Stage 2)"), + ("hr.contract.type", "hr (Stage 2)"), + ("hr.department", "hr (Stage 2)"), + ("hr.employee", "hr (Stage 2)"), + ("hr.job", "hr (Stage 2)"), ("stock.valuation.layer", "stock_account (Stage 2)"), ]; @@ -59,10 +59,7 @@ mod tests { fn lane_of(l_doc: &str) -> u8 { // Strip the leading 'L', collect ASCII digits until the first '-' let stripped = l_doc.trim_start_matches('L'); - let digits: String = stripped - .chars() - .take_while(|c| c.is_ascii_digit()) - .collect(); + let digits: String = stripped.chars().take_while(|c| c.is_ascii_digit()).collect(); digits.parse().expect("l_doc must follow 'L{N}-...' format") } @@ -77,7 +74,7 @@ mod tests { /// different lane. fn lane_of_exempt(model_name: &str) -> u8 { match model_name { - "stock.valuation.layer" => 13, + "stock.valuation.layer" => 13, "hr.contract.type" | "hr.department" | "hr.employee" | "hr.job" => 14, _ => panic!("unknown exemption model_name: {}", model_name), } @@ -94,10 +91,8 @@ mod tests { let exempt_names: std::collections::HashSet<&str> = COVERAGE_EXEMPTIONS.iter().map(|(n, _)| *n).collect(); let curated = curated_entities(); - let backed_names: std::collections::HashSet<&str> = CURATED_EXTRACTED_PAIRS - .iter() - .map(|p| p.model_name) - .collect(); + let backed_names: std::collections::HashSet<&str> = + CURATED_EXTRACTED_PAIRS.iter().map(|p| p.model_name).collect(); for lane in 1u8..=15 { let lane_entities: Vec<&str> = curated @@ -117,10 +112,7 @@ mod tests { continue; } - let backed = eligible - .iter() - .filter(|n| backed_names.contains(*n)) - .count(); + let backed = eligible.iter().filter(|n| backed_names.contains(*n)).count(); let coverage = backed as f32 / eligible.len() as f32; assert!( @@ -145,20 +137,11 @@ mod tests { let exempt_names: std::collections::HashSet<&str> = COVERAGE_EXEMPTIONS.iter().map(|(n, _)| *n).collect(); let curated = curated_entities(); - let eligible_total = curated - .iter() - .filter(|(n, _)| !exempt_names.contains(n)) - .count(); + let eligible_total = curated.iter().filter(|(n, _)| !exempt_names.contains(n)).count(); let backed_total = CURATED_EXTRACTED_PAIRS.len(); assert_eq!(curated.len(), 53, "Expected 53 curated entities total"); - assert_eq!( - eligible_total, 48, - "Expected 48 eligible after 5 TIER-2 exemptions" - ); - assert_eq!( - backed_total, 48, - "All 48 eligible should be backed for Stage 1" - ); + assert_eq!(eligible_total, 48, "Expected 48 eligible after 5 TIER-2 exemptions"); + assert_eq!(backed_total, 48, "All 48 eligible should be backed for Stage 1"); } } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de.rs index 410c3e4d..c5c188a2 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de.rs @@ -10,23 +10,28 @@ pub const EXT_ACCOUNT_ACCOUNT: OdooEntity = OdooEntity { model_name: "account.account", kind: OdooEntityKind::Model, description: "", - fields: &[], - methods: &[OdooMethod { - name: "write", - kind: OdooMethodKind::Override, - return_kind: OdooReturnKind::Boolean, - triggers: &[], - }], - decorators: &[], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "write", + kind: OdooMethodKind::Override, + return_kind: OdooReturnKind::Boolean, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/l10n_de/models/account_account.py", - line_range: (5, 19), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/l10n_de/models/account_account.py", line_range: (5, 19) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -36,26 +41,31 @@ pub const EXT_ACCOUNT_JOURNAL: OdooEntity = OdooEntity { model_name: "account.journal", kind: OdooEntityKind::Model, description: "", - fields: &[], - methods: &[OdooMethod { - name: "_prepare_liquidity_account_vals", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "_prepare_liquidity_account_vals", + kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/l10n_de/models/account_journal.py", - line_range: (6, 18), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/l10n_de/models/account_journal.py", line_range: (6, 18) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -65,7 +75,9 @@ pub const EXT_ACCOUNT_MOVE: OdooEntity = OdooEntity { model_name: "account.move", kind: OdooEntityKind::Model, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_compute_show_delivery_date", @@ -80,19 +92,20 @@ pub const EXT_ACCOUNT_MOVE: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["country_code", "move_type"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["country_code", "move_type"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/l10n_de/models/account_move.py", - line_range: (4, 19), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/l10n_de/models/account_move.py", line_range: (4, 19) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -102,7 +115,9 @@ pub const EXT_ACCOUNT_CHART_TEMPLATE: OdooEntity = OdooEntity { model_name: "account.chart.template", kind: OdooEntityKind::Abstract, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_get_de_skr03_template_data", @@ -129,16 +144,17 @@ pub const EXT_ACCOUNT_CHART_TEMPLATE: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/l10n_de/models/template_de_skr03.py", - line_range: (6, 149), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/l10n_de/models/template_de_skr03.py", line_range: (6, 149) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -148,26 +164,31 @@ pub const EXT_ACCOUNT_TAX: OdooEntity = OdooEntity { model_name: "account.tax", kind: OdooEntityKind::Model, description: "", - fields: &[OdooField { - name: "l10n_de_datev_code", - kind: OdooFieldKind::Char, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], - methods: &[], - decorators: &[], + fields: &[ + OdooField { + name: "l10n_de_datev_code", + kind: OdooFieldKind::Char, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/l10n_de/models/datev.py", - line_range: (4, 7), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/l10n_de/models/datev.py", line_range: (4, 7) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -177,23 +198,28 @@ pub const EXT_PRODUCT_TEMPLATE: OdooEntity = OdooEntity { model_name: "product.template", kind: OdooEntityKind::Model, description: "", - fields: &[], - methods: &[OdooMethod { - name: "_get_product_accounts", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "_get_product_accounts", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/l10n_de/models/datev.py", - line_range: (10, 37), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/l10n_de/models/datev.py", line_range: (10, 37) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -203,23 +229,28 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { model_name: "ir.actions.report", kind: OdooEntityKind::Model, description: "", - fields: &[], - methods: &[OdooMethod { - name: "_get_rendering_context", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "_get_rendering_context", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/l10n_de/models/ir_actions_report.py", - line_range: (4, 10), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/l10n_de/models/ir_actions_report.py", line_range: (4, 10) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -286,19 +317,19 @@ pub const EXT_RES_COMPANY: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on state_id, l10n_de_stnr", - source_method: Some("_validate_l10n_de_stnr"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on state_id, l10n_de_stnr", + source_method: Some("_validate_l10n_de_stnr"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/l10n_de/models/res_company.py", - line_range: (10, 60), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/l10n_de/models/res_company.py", line_range: (10, 60) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; + diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de_chart.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de_chart.rs index f8844713..3fbab519 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de_chart.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de_chart.rs @@ -795,8 +795,7 @@ pub const EXT_SKR03_0502: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_0503: OdooAccountTemplate = OdooAccountTemplate { code: "0503", - name: - "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Kapitalgesellschaften", + name: "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Kapitalgesellschaften", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_A_III_1"], chart: OdooSkrChart::Skr03, @@ -850,8 +849,7 @@ pub const EXT_SKR03_0508: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_0509: OdooAccountTemplate = OdooAccountTemplate { code: "0509", - name: - "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Personengesellschaften", + name: "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Personengesellschaften", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_A_III_1"], chart: OdooSkrChart::Skr03, @@ -950,8 +948,7 @@ pub const EXT_SKR03_0525: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_0530: OdooAccountTemplate = OdooAccountTemplate { code: "0530", - name: - "Wertpapiere mit Gewinnbeteiligungsansprüchen, die dem Teileinkünfteverfahren unterliegen", + name: "Wertpapiere mit Gewinnbeteiligungsansprüchen, die dem Teileinkünfteverfahren unterliegen", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_A_III_5"], chart: OdooSkrChart::Skr03, @@ -1338,8 +1335,7 @@ pub const EXT_SKR03_0761: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_0764: OdooAccountTemplate = OdooAccountTemplate { code: "0764", - name: - "Verbindlichkeiten gegenüber typisch stillen Gesellschaftern - Restlaufzeit 1 bis 5 Jahre", + name: "Verbindlichkeiten gegenüber typisch stillen Gesellschaftern - Restlaufzeit 1 bis 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr03, @@ -1348,8 +1344,7 @@ pub const EXT_SKR03_0764: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_0767: OdooAccountTemplate = OdooAccountTemplate { code: "0767", - name: - "Verbindlichkeiten gegenüber typisch stillen Gesellschaftern - Restlaufzeit größer 5 Jahre", + name: "Verbindlichkeiten gegenüber typisch stillen Gesellschaftern - Restlaufzeit größer 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr03, @@ -1376,8 +1371,7 @@ pub const EXT_SKR03_0771: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_0774: OdooAccountTemplate = OdooAccountTemplate { code: "0774", - name: - "Verbindlichkeiten gegenüber atypisch stillen Gesellschaftern - Restlaufzeit 1 bis 5 Jahre", + name: "Verbindlichkeiten gegenüber atypisch stillen Gesellschaftern - Restlaufzeit 1 bis 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr03, @@ -1386,8 +1380,7 @@ pub const EXT_SKR03_0774: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_0777: OdooAccountTemplate = OdooAccountTemplate { code: "0777", - name: - "Verbindlichkeiten gegenüber atypisch stillen Gesellschaftern - Restlaufzeit größer 5 Jahre", + name: "Verbindlichkeiten gegenüber atypisch stillen Gesellschaftern - Restlaufzeit größer 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr03, @@ -1567,8 +1560,7 @@ pub const EXT_SKR03_0854: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_0857: OdooAccountTemplate = OdooAccountTemplate { code: "0857", - name: - "Gewinnrücklagen aus den Übergangsvorschriften BilMoG (Zuschreibung Finanzanlagevermögen)", + name: "Gewinnrücklagen aus den Übergangsvorschriften BilMoG (Zuschreibung Finanzanlagevermögen)", account_type: "equity", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_A_III_4"], chart: OdooSkrChart::Skr03, @@ -2234,8 +2226,7 @@ pub const EXT_SKR03_1321: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1322: OdooAccountTemplate = OdooAccountTemplate { code: "1322", - name: - "Bills receivable from other long-term investees and investors - Restlaufzeit größer 1 Jahr", + name: "Bills receivable from other long-term investees and investors - Restlaufzeit größer 1 Jahr", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_2"], chart: OdooSkrChart::Skr03, @@ -2604,8 +2595,7 @@ pub const EXT_SKR03_1447: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1448: OdooAccountTemplate = OdooAccountTemplate { code: "1448", - name: - "Forderungen aus Lieferungen und Leistungen nach Durchschnittssätzen nach § 24 UStG (EÜR)", + name: "Forderungen aus Lieferungen und Leistungen nach Durchschnittssätzen nach § 24 UStG (EÜR)", account_type: "asset_receivable", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_1"], chart: OdooSkrChart::Skr03, @@ -2641,8 +2631,7 @@ pub const EXT_SKR03_1451: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1455: OdooAccountTemplate = OdooAccountTemplate { code: "1455", - name: - "Forderungen aus Lieferungen und Leistungen ohne Kontokorrent - Restlaufzeit größer 1 Jahr", + name: "Forderungen aus Lieferungen und Leistungen ohne Kontokorrent - Restlaufzeit größer 1 Jahr", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_1"], chart: OdooSkrChart::Skr03, @@ -2705,8 +2694,7 @@ pub const EXT_SKR03_1475: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1478: OdooAccountTemplate = OdooAccountTemplate { code: "1478", - name: - "Wertberichtigungen auf Forderungen gegen verbundene Unternehmen - Restlaufzeit bis 1 Jahr", + name: "Wertberichtigungen auf Forderungen gegen verbundene Unternehmen - Restlaufzeit bis 1 Jahr", account_type: "asset_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_2"], chart: OdooSkrChart::Skr03, @@ -2778,8 +2766,7 @@ pub const EXT_SKR03_1490: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1491: OdooAccountTemplate = OdooAccountTemplate { code: "1491", - name: - "Forderungen aus Lieferungen und Leistungen gegen Gesellschafter - Restlaufzeit bis 1 Jahr", + name: "Forderungen aus Lieferungen und Leistungen gegen Gesellschafter - Restlaufzeit bis 1 Jahr", account_type: "asset_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_1"], chart: OdooSkrChart::Skr03, @@ -3553,8 +3540,7 @@ pub const EXT_SKR03_1625: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1626: OdooAccountTemplate = OdooAccountTemplate { code: "1626", - name: - "Trade payables, no separate receivables/payables accounting - Restlaufzeit 1 bis 5 Jahre", + name: "Trade payables, no separate receivables/payables accounting - Restlaufzeit 1 bis 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_4"], chart: OdooSkrChart::Skr03, @@ -3563,8 +3549,7 @@ pub const EXT_SKR03_1626: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1628: OdooAccountTemplate = OdooAccountTemplate { code: "1628", - name: - "Trade payables, no separate receivables/payables accounting - Restlaufzeit größer 5 Jahre", + name: "Trade payables, no separate receivables/payables accounting - Restlaufzeit größer 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_4"], chart: OdooSkrChart::Skr03, @@ -3771,8 +3756,7 @@ pub const EXT_SKR03_1670: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1671: OdooAccountTemplate = OdooAccountTemplate { code: "1671", - name: - "Verbindlichkeiten gegenüber persönlich haftenden Gesellschaftern - Restlaufzeit bis 1 Jahr", + name: "Verbindlichkeiten gegenüber persönlich haftenden Gesellschaftern - Restlaufzeit bis 1 Jahr", account_type: "liability_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr03, @@ -4384,8 +4368,7 @@ pub const EXT_SKR03_1767: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_1768: OdooAccountTemplate = OdooAccountTemplate { code: "1768", - name: - "Umsatzsteuer aus im anderen EULand steuerpflichtigen sonstigen Leistungen/Werklieferungen", + name: "Umsatzsteuer aus im anderen EULand steuerpflichtigen sonstigen Leistungen/Werklieferungen", account_type: "liability_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_4"], chart: OdooSkrChart::Skr03, @@ -5888,8 +5871,7 @@ pub const EXT_SKR03_2402: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_2403: OdooAccountTemplate = OdooAccountTemplate { code: "2403", - name: - "Forderungsverluste aus im Inland steuerpflichtigen EU-Lieferungen 7 % USt (übliche Höhe)", + name: "Forderungsverluste aus im Inland steuerpflichtigen EU-Lieferungen 7 % USt (übliche Höhe)", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_7"], chart: OdooSkrChart::Skr03, @@ -5907,8 +5889,7 @@ pub const EXT_SKR03_2406: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_2408: OdooAccountTemplate = OdooAccountTemplate { code: "2408", - name: - "Forderungsverluste aus im Inland steuerpflichtigen EU-Lieferungen 19 % USt (übliche Höhe)", + name: "Forderungsverluste aus im Inland steuerpflichtigen EU-Lieferungen 19 % USt (übliche Höhe)", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_7"], chart: OdooSkrChart::Skr03, @@ -7249,8 +7230,7 @@ pub const EXT_SKR03_3109: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_3110: OdooAccountTemplate = OdooAccountTemplate { code: "3110", - name: - "Bauleistungen eines im Inland ansässigen Unternehmers 7 % Vorsteuer und 7 % Umsatzsteuer", + name: "Bauleistungen eines im Inland ansässigen Unternehmers 7 % Vorsteuer und 7 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr03, @@ -7277,8 +7257,7 @@ pub const EXT_SKR03_3115: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_3120: OdooAccountTemplate = OdooAccountTemplate { code: "3120", - name: - "Bauleistungen eines im Inland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer", + name: "Bauleistungen eines im Inland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr03, @@ -7296,8 +7275,7 @@ pub const EXT_SKR03_3123: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_3125: OdooAccountTemplate = OdooAccountTemplate { code: "3125", - name: - "Leistungen eines im Ausland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer", + name: "Leistungen eines im Ausland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr03, @@ -7306,8 +7284,7 @@ pub const EXT_SKR03_3125: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_3130: OdooAccountTemplate = OdooAccountTemplate { code: "3130", - name: - "Bauleistungen eines im Inland ansässigen Unternehmers ohne Vorsteuer und 7 % Umsatzsteuer", + name: "Bauleistungen eines im Inland ansässigen Unternehmers ohne Vorsteuer und 7 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr03, @@ -7334,8 +7311,7 @@ pub const EXT_SKR03_3135: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_3140: OdooAccountTemplate = OdooAccountTemplate { code: "3140", - name: - "Bauleistungen eines im Inland ansässigen Unternehmers ohne Vorsteuer und 19 % Umsatzsteuer", + name: "Bauleistungen eines im Inland ansässigen Unternehmers ohne Vorsteuer und 19 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr03, @@ -7353,8 +7329,7 @@ pub const EXT_SKR03_3143: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_3145: OdooAccountTemplate = OdooAccountTemplate { code: "3145", - name: - "Leistungen eines im Ausland ansässigen Unternehmers ohne Vorsteuer und 19 % Umsatzsteuer", + name: "Leistungen eines im Ausland ansässigen Unternehmers ohne Vorsteuer und 19 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr03, @@ -9163,8 +9138,7 @@ pub const EXT_SKR03_4676: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_4678: OdooAccountTemplate = OdooAccountTemplate { code: "4678", - name: - "Fahrten zwischen Wohnung und Betriebsstätte und Familienheimfahrten (abziehbarer Anteil)", + name: "Fahrten zwischen Wohnung und Betriebsstätte und Familienheimfahrten (abziehbarer Anteil)", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_5"], chart: OdooSkrChart::Skr03, @@ -9281,8 +9255,7 @@ pub const EXT_SKR03_4801: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_4805: OdooAccountTemplate = OdooAccountTemplate { code: "4805", - name: - "Reparaturen und Instandhaltungen von anderen Anlagen und Betriebsund Geschäftsausstattung", + name: "Reparaturen und Instandhaltungen von anderen Anlagen und Betriebsund Geschäftsausstattung", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_3"], chart: OdooSkrChart::Skr03, @@ -9615,8 +9588,7 @@ pub const EXT_SKR03_4875: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_4876: OdooAccountTemplate = OdooAccountTemplate { code: "4876", - name: - "Abschreibungen auf Wertpapiere des Umlaufvermögens § 3 Nr. 40 EStG bzw. § 8b Abs. 3 KStG", + name: "Abschreibungen auf Wertpapiere des Umlaufvermögens § 3 Nr. 40 EStG bzw. § 8b Abs. 3 KStG", account_type: "expense_depreciation", tag_xmlids: &["l10n_de.tag_de_pl_12"], chart: OdooSkrChart::Skr03, @@ -9886,8 +9858,7 @@ pub const EXT_SKR03_4963: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_4964: OdooAccountTemplate = OdooAccountTemplate { code: "4964", - name: - "Aufwendungen für die zeitlich befristete Überlassung von Rechten (Lizenzen, Konzessionen)", + name: "Aufwendungen für die zeitlich befristete Überlassung von Rechten (Lizenzen, Konzessionen)", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_7"], chart: OdooSkrChart::Skr03, @@ -11066,8 +11037,7 @@ pub const EXT_SKR03_8818: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_8819: OdooAccountTemplate = OdooAccountTemplate { code: "8819", - name: - "Erlöse aus Verkäufen Finanzanlagen § 3 Nr. 40 EStG bzw. § 8b Abs. 3 KStG (bei Buchverlust)", + name: "Erlöse aus Verkäufen Finanzanlagen § 3 Nr. 40 EStG bzw. § 8b Abs. 3 KStG (bei Buchverlust)", account_type: "income_other", tag_xmlids: &["l10n_de.tag_de_pl_08_7"], chart: OdooSkrChart::Skr03, @@ -11130,8 +11100,7 @@ pub const EXT_SKR03_8838: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_8839: OdooAccountTemplate = OdooAccountTemplate { code: "8839", - name: - "Erlöse aus Verkäufen Finanzanlagen § 3 Nr. 40 EStG bzw. § 8b Abs. 2 KStG (bei Buchgewinn)", + name: "Erlöse aus Verkäufen Finanzanlagen § 3 Nr. 40 EStG bzw. § 8b Abs. 2 KStG (bei Buchgewinn)", account_type: "income_other", tag_xmlids: &["l10n_de.tag_de_pl_04"], chart: OdooSkrChart::Skr03, @@ -11167,8 +11136,7 @@ pub const EXT_SKR03_8852: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_8853: OdooAccountTemplate = OdooAccountTemplate { code: "8853", - name: - "Erlöse aus Verkäufen von Wirtschaftsgütern des Umlaufvermögens nach § 4 Abs 3 Satz 4 EStG", + name: "Erlöse aus Verkäufen von Wirtschaftsgütern des Umlaufvermögens nach § 4 Abs 3 Satz 4 EStG", account_type: "income_other", tag_xmlids: &["l10n_de.tag_de_pl_04"], chart: OdooSkrChart::Skr03, @@ -11249,8 +11217,7 @@ pub const EXT_SKR03_8920: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_8921: OdooAccountTemplate = OdooAccountTemplate { code: "8921", - name: - "Verwendung von Gegenständen für Zwecke außerhalb des Unternehmens 19 % USt (Kfz-Nutzung)", + name: "Verwendung von Gegenständen für Zwecke außerhalb des Unternehmens 19 % USt (Kfz-Nutzung)", account_type: "income_other", tag_xmlids: &["l10n_de.tag_de_pl_04"], chart: OdooSkrChart::Skr03, @@ -11268,8 +11235,7 @@ pub const EXT_SKR03_8922: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR03_8924: OdooAccountTemplate = OdooAccountTemplate { code: "8924", - name: - "Verwendung von Gegenständen für Zwecke außerhalb des Unternehmens ohne USt (Kfz-Nutzung)", + name: "Verwendung von Gegenständen für Zwecke außerhalb des Unternehmens ohne USt (Kfz-Nutzung)", account_type: "income_other", tag_xmlids: &["l10n_de.tag_de_pl_04"], chart: OdooSkrChart::Skr03, @@ -12288,8 +12254,7 @@ pub const EXT_SKR04_0804: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_0805: OdooAccountTemplate = OdooAccountTemplate { code: "0805", - name: - "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Personengesellschaften", + name: "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Personengesellschaften", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_A_III_1"], chart: OdooSkrChart::Skr04, @@ -12298,8 +12263,7 @@ pub const EXT_SKR04_0805: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_0808: OdooAccountTemplate = OdooAccountTemplate { code: "0808", - name: - "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Kapitalgesellschaften", + name: "Anteile an herrschender oder mehrheitlich beteiligter Gesellschaft, Kapitalgesellschaften", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_A_III_1"], chart: OdooSkrChart::Skr04, @@ -12443,8 +12407,7 @@ pub const EXT_SKR04_0900: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_0910: OdooAccountTemplate = OdooAccountTemplate { code: "0910", - name: - "Wertpapiere mit Gewinnbeteiligungsansprüchen, die dem Teileinkünfteverfahren unterliegen", + name: "Wertpapiere mit Gewinnbeteiligungsansprüchen, die dem Teileinkünfteverfahren unterliegen", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_A_III_5"], chart: OdooSkrChart::Skr04, @@ -12759,8 +12722,7 @@ pub const EXT_SKR04_1221: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_1225: OdooAccountTemplate = OdooAccountTemplate { code: "1225", - name: - "Forderungen aus Lieferungen und Leistungen ohne Kontokorrent - Restlaufzeit größer 1 Jahr", + name: "Forderungen aus Lieferungen und Leistungen ohne Kontokorrent - Restlaufzeit größer 1 Jahr", account_type: "asset_non_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_1"], chart: OdooSkrChart::Skr04, @@ -12877,8 +12839,7 @@ pub const EXT_SKR04_1250: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_1251: OdooAccountTemplate = OdooAccountTemplate { code: "1251", - name: - "Forderungen aus Lieferungen und Leistungen gegen Gesellschafter - Restlaufzeit bis 1 Jahr", + name: "Forderungen aus Lieferungen und Leistungen gegen Gesellschafter - Restlaufzeit bis 1 Jahr", account_type: "asset_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_1"], chart: OdooSkrChart::Skr04, @@ -12986,8 +12947,7 @@ pub const EXT_SKR04_1275: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_1276: OdooAccountTemplate = OdooAccountTemplate { code: "1276", - name: - "Wertberichtigungen auf Forderungen gegen verbundene Unternehmen – Restlaufzeit bis 1 Jahr", + name: "Wertberichtigungen auf Forderungen gegen verbundene Unternehmen – Restlaufzeit bis 1 Jahr", account_type: "asset_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_2"], chart: OdooSkrChart::Skr04, @@ -14643,8 +14603,7 @@ pub const EXT_SKR04_2964: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_2965: OdooAccountTemplate = OdooAccountTemplate { code: "2965", - name: - "Gewinnrücklagen aus den Übergangsvorschriften BilMoG (Zuschreibung Finanzanlagevermögen)", + name: "Gewinnrücklagen aus den Übergangsvorschriften BilMoG (Zuschreibung Finanzanlagevermögen)", account_type: "equity", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_A_III_4"], chart: OdooSkrChart::Skr04, @@ -15571,8 +15530,7 @@ pub const EXT_SKR04_3521: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_3524: OdooAccountTemplate = OdooAccountTemplate { code: "3524", - name: - "Verbindlichkeiten gegenüber typisch stillen Gesellschaftern - Restlaufzeit 1 bis 5 Jahre", + name: "Verbindlichkeiten gegenüber typisch stillen Gesellschaftern - Restlaufzeit 1 bis 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr04, @@ -15581,8 +15539,7 @@ pub const EXT_SKR04_3524: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_3527: OdooAccountTemplate = OdooAccountTemplate { code: "3527", - name: - "Verbindlichkeiten gegenüber typisch stillen Gesellschaftern - Restlaufzeit größer 5 Jahre", + name: "Verbindlichkeiten gegenüber typisch stillen Gesellschaftern - Restlaufzeit größer 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr04, @@ -15609,8 +15566,7 @@ pub const EXT_SKR04_3531: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_3534: OdooAccountTemplate = OdooAccountTemplate { code: "3534", - name: - "Verbindlichkeiten gegenüber atypisch stillen Gesellschaftern - Restlaufzeit 1 bis 5 Jahre", + name: "Verbindlichkeiten gegenüber atypisch stillen Gesellschaftern - Restlaufzeit 1 bis 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr04, @@ -15619,8 +15575,7 @@ pub const EXT_SKR04_3534: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_3537: OdooAccountTemplate = OdooAccountTemplate { code: "3537", - name: - "Verbindlichkeiten gegenüber atypisch stillen Gesellschaftern - Restlaufzeit größer 5 Jahre", + name: "Verbindlichkeiten gegenüber atypisch stillen Gesellschaftern - Restlaufzeit größer 5 Jahre", account_type: "liability_non_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr04, @@ -15836,8 +15791,7 @@ pub const EXT_SKR04_3645: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_3646: OdooAccountTemplate = OdooAccountTemplate { code: "3646", - name: - "Verbindlichkeiten gegenüber persönlich haftenden Gesellschaftern - Restlaufzeit bis 1 Jahr", + name: "Verbindlichkeiten gegenüber persönlich haftenden Gesellschaftern - Restlaufzeit bis 1 Jahr", account_type: "liability_current", tag_xmlids: &["l10n_de.tag_de_liabilities_bs_C_8"], chart: OdooSkrChart::Skr04, @@ -16287,8 +16241,7 @@ pub const EXT_SKR04_3817: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_3818: OdooAccountTemplate = OdooAccountTemplate { code: "3818", - name: - "Umsatzsteuer aus im anderen EU-Land steuerpflichtigen sonstigen Leistungen/Werklieferungen", + name: "Umsatzsteuer aus im anderen EU-Land steuerpflichtigen sonstigen Leistungen/Werklieferungen", account_type: "liability_current", tag_xmlids: &["l10n_de.tag_de_asset_bs_B_II_4"], chart: OdooSkrChart::Skr04, @@ -16639,8 +16592,7 @@ pub const EXT_SKR04_4315: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_4320: OdooAccountTemplate = OdooAccountTemplate { code: "4320", - name: - "Erlöse aus im anderen EU-Land steuerbaren Leistungen, im Inland nicht steuerbare Umsätze", + name: "Erlöse aus im anderen EU-Land steuerbaren Leistungen, im Inland nicht steuerbare Umsätze", account_type: "income", tag_xmlids: &["l10n_de.tag_de_pl_01"], chart: OdooSkrChart::Skr04, @@ -16694,8 +16646,7 @@ pub const EXT_SKR04_4338: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_4339: OdooAccountTemplate = OdooAccountTemplate { code: "4339", - name: - "Erlöse aus im anderen EU-Land steuerbaren Leistungen, im Inland nicht steuerbare Umsätze", + name: "Erlöse aus im anderen EU-Land steuerbaren Leistungen, im Inland nicht steuerbare Umsätze", account_type: "income", tag_xmlids: &["l10n_de.tag_de_pl_01"], chart: OdooSkrChart::Skr04, @@ -16884,8 +16835,7 @@ pub const EXT_SKR04_4630: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_4639: OdooAccountTemplate = OdooAccountTemplate { code: "4639", - name: - "Verwendung von Gegenständen für Zwecke außerhalb des Unternehmens ohne USt (Kfz-Nutzung)", + name: "Verwendung von Gegenständen für Zwecke außerhalb des Unternehmens ohne USt (Kfz-Nutzung)", account_type: "income", tag_xmlids: &["l10n_de.tag_de_pl_04"], chart: OdooSkrChart::Skr04, @@ -16903,8 +16853,7 @@ pub const EXT_SKR04_4640: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_4645: OdooAccountTemplate = OdooAccountTemplate { code: "4645", - name: - "Verwendung von Gegenständen für Zwecke außerhalb des Unternehmens 19 % USt (Kfz-Nutzung)", + name: "Verwendung von Gegenständen für Zwecke außerhalb des Unternehmens 19 % USt (Kfz-Nutzung)", account_type: "income", tag_xmlids: &["l10n_de.tag_de_pl_04"], chart: OdooSkrChart::Skr04, @@ -17507,8 +17456,7 @@ pub const EXT_SKR04_4851: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_4852: OdooAccountTemplate = OdooAccountTemplate { code: "4852", - name: - "Erlöse aus Verkäufen Finanzanlagen § 3 Nr. 40 EStG bzw. § 8b Abs. 2 KStG (bei Buchgewinn)", + name: "Erlöse aus Verkäufen Finanzanlagen § 3 Nr. 40 EStG bzw. § 8b Abs. 2 KStG (bei Buchgewinn)", account_type: "income", tag_xmlids: &["l10n_de.tag_de_pl_04"], chart: OdooSkrChart::Skr04, @@ -18633,8 +18581,7 @@ pub const EXT_SKR04_5909: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_5910: OdooAccountTemplate = OdooAccountTemplate { code: "5910", - name: - "Bauleistungen eines im Inland ansässigen Unternehmers 7 % Vorsteuer und 7 % Umsatzsteuer", + name: "Bauleistungen eines im Inland ansässigen Unternehmers 7 % Vorsteuer und 7 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr04, @@ -18661,8 +18608,7 @@ pub const EXT_SKR04_5915: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_5920: OdooAccountTemplate = OdooAccountTemplate { code: "5920", - name: - "Bauleistungen eines im Inland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer", + name: "Bauleistungen eines im Inland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr04, @@ -18680,8 +18626,7 @@ pub const EXT_SKR04_5923: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_5925: OdooAccountTemplate = OdooAccountTemplate { code: "5925", - name: - "Leistungen eines im Ausland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer", + name: "Leistungen eines im Ausland ansässigen Unternehmers 19 % Vorsteuer und 19 % Umsatzsteuer", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_05"], chart: OdooSkrChart::Skr04, @@ -19842,8 +19787,7 @@ pub const EXT_SKR04_6460: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_6470: OdooAccountTemplate = OdooAccountTemplate { code: "6470", - name: - "Reparaturen und Instandhaltung von anderen Anlagen und Betriebs- und Geschäftsausstattung", + name: "Reparaturen und Instandhaltung von anderen Anlagen und Betriebs- und Geschäftsausstattung", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_3"], chart: OdooSkrChart::Skr04, @@ -20212,8 +20156,7 @@ pub const EXT_SKR04_6680: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_6688: OdooAccountTemplate = OdooAccountTemplate { code: "6688", - name: - "Fahrten zwischen Wohnung und Betriebsstätte und Familienheimfahrten (abziehbarer Anteil)", + name: "Fahrten zwischen Wohnung und Betriebsstätte und Familienheimfahrten (abziehbarer Anteil)", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_5"], chart: OdooSkrChart::Skr04, @@ -20447,8 +20390,7 @@ pub const EXT_SKR04_6835: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_6837: OdooAccountTemplate = OdooAccountTemplate { code: "6837", - name: - "Aufwendungen für die zeitlich befristete Überlassung von Rechten (Lizenzen, Konzessionen)", + name: "Aufwendungen für die zeitlich befristete Überlassung von Rechten (Lizenzen, Konzessionen)", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_7"], chart: OdooSkrChart::Skr04, @@ -20664,8 +20606,7 @@ pub const EXT_SKR04_6891: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_6892: OdooAccountTemplate = OdooAccountTemplate { code: "6892", - name: - "Erlöse aus Verkäufen Finanzanlagen § 3 Nr. 40 EStG bzw. § 8b Abs. 3 KStG (bei Buchverlust)", + name: "Erlöse aus Verkäufen Finanzanlagen § 3 Nr. 40 EStG bzw. § 8b Abs. 3 KStG (bei Buchverlust)", account_type: "income", tag_xmlids: &["l10n_de.tag_de_pl_08_7"], chart: OdooSkrChart::Skr04, @@ -20863,8 +20804,7 @@ pub const EXT_SKR04_6932: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_6933: OdooAccountTemplate = OdooAccountTemplate { code: "6933", - name: - "Forderungsverluste aus im Inland steuerpflichtigen EU-Lieferungen 7 % USt (übliche Höhe)", + name: "Forderungsverluste aus im Inland steuerpflichtigen EU-Lieferungen 7 % USt (übliche Höhe)", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_7"], chart: OdooSkrChart::Skr04, @@ -20882,8 +20822,7 @@ pub const EXT_SKR04_6936: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_6938: OdooAccountTemplate = OdooAccountTemplate { code: "6938", - name: - "Forderungsverluste aus im Inland steuerpflichtigen EU-Lieferungen 19 % USt (übliche Höhe)", + name: "Forderungsverluste aus im Inland steuerpflichtigen EU-Lieferungen 19 % USt (übliche Höhe)", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_08_7"], chart: OdooSkrChart::Skr04, @@ -21342,8 +21281,7 @@ pub const EXT_SKR04_7210: OdooAccountTemplate = OdooAccountTemplate { pub const EXT_SKR04_7214: OdooAccountTemplate = OdooAccountTemplate { code: "7214", - name: - "Abschreibungen auf Wertpapiere des Umlaufvermögens § 3 Nr. 40 EStG bzw. § 8b Abs. 3 KStG", + name: "Abschreibungen auf Wertpapiere des Umlaufvermögens § 3 Nr. 40 EStG bzw. § 8b Abs. 3 KStG", account_type: "expense", tag_xmlids: &["l10n_de.tag_de_pl_12"], chart: OdooSkrChart::Skr04, diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de_kennzahlen.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de_kennzahlen.rs index 65c92f6f..6233f6f6 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de_kennzahlen.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/l10n_de_kennzahlen.rs @@ -308,9 +308,43 @@ pub const KZ_37: OdooUstvaKennzahl = OdooUstvaKennzahl { /// All UStVA Kennzahlen — canonical iteration handle. pub static USTVA_KENNZAHLEN: &[OdooUstvaKennzahl] = &[ - KZ_81, KZ_86, KZ_87, KZ_35, KZ_77, KZ_76, KZ_41, KZ_44, KZ_49, KZ_43, KZ_48, KZ_91, KZ_89, - KZ_93, KZ_90, KZ_95, KZ_94, KZ_46, KZ_73, KZ_84, KZ_42, KZ_60, KZ_21, KZ_45, KZ_66, KZ_61, - KZ_62, KZ_67, KZ_63, KZ_59, KZ_64, KZ_65, KZ_69, KZ_39, KZ_83, KZ_50, KZ_37, + KZ_81, + KZ_86, + KZ_87, + KZ_35, + KZ_77, + KZ_76, + KZ_41, + KZ_44, + KZ_49, + KZ_43, + KZ_48, + KZ_91, + KZ_89, + KZ_93, + KZ_90, + KZ_95, + KZ_94, + KZ_46, + KZ_73, + KZ_84, + KZ_42, + KZ_60, + KZ_21, + KZ_45, + KZ_66, + KZ_61, + KZ_62, + KZ_67, + KZ_63, + KZ_59, + KZ_64, + KZ_65, + KZ_69, + KZ_39, + KZ_83, + KZ_50, + KZ_37, ]; // ─── GoBD audit-trail wiring ───────────────────────────────────────────── @@ -337,34 +371,13 @@ mod tests { fn ustva_kennzahlen_cover_canonical_boxes() { let kz_codes: std::collections::HashSet<&str> = USTVA_KENNZAHLEN.iter().map(|k| k.kz).collect(); - assert!( - kz_codes.contains("81"), - "Missing canonical UStVA Kennzahl Kz.81" - ); - assert!( - kz_codes.contains("86"), - "Missing canonical UStVA Kennzahl Kz.86" - ); - assert!( - kz_codes.contains("87"), - "Missing canonical UStVA Kennzahl Kz.87" - ); - assert!( - kz_codes.contains("35"), - "Missing canonical UStVA Kennzahl Kz.35" - ); - assert!( - kz_codes.contains("41"), - "Missing canonical UStVA Kennzahl Kz.41" - ); - assert!( - kz_codes.contains("44"), - "Missing canonical UStVA Kennzahl Kz.44" - ); - assert!( - kz_codes.contains("49"), - "Missing canonical UStVA Kennzahl Kz.49" - ); + assert!(kz_codes.contains("81"), "Missing canonical UStVA Kennzahl Kz.81"); + assert!(kz_codes.contains("86"), "Missing canonical UStVA Kennzahl Kz.86"); + assert!(kz_codes.contains("87"), "Missing canonical UStVA Kennzahl Kz.87"); + assert!(kz_codes.contains("35"), "Missing canonical UStVA Kennzahl Kz.35"); + assert!(kz_codes.contains("41"), "Missing canonical UStVA Kennzahl Kz.41"); + assert!(kz_codes.contains("44"), "Missing canonical UStVA Kennzahl Kz.44"); + assert!(kz_codes.contains("49"), "Missing canonical UStVA Kennzahl Kz.49"); } #[test] diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/pairing.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/pairing.rs index 1561b6d6..4d05da33 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/pairing.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/pairing.rs @@ -57,8 +57,7 @@ pub static CURATED_EXTRACTED_PAIRS: &[OdooEntityPairing] = &[ OdooEntityPairing { model_name: "account.analytic.distribution.model", curated: &crate::odoo_blueprint::l10::ANALYTIC_DISTRIBUTION_MODEL, - extracted: - &crate::odoo_blueprint::extracted::analytic::EXT_ACCOUNT_ANALYTIC_DISTRIBUTION_MODEL, + extracted: &crate::odoo_blueprint::extracted::analytic::EXT_ACCOUNT_ANALYTIC_DISTRIBUTION_MODEL, }, // account.analytic.line (curated: ANALYTIC_LINE in l10.rs | extracted: EXT_ACCOUNT_ANALYTIC_LINE in analytic.rs) // delta: fields=+2, methods=-1 @@ -372,12 +371,14 @@ mod tests { fn pairing_table_is_well_formed() { for pair in CURATED_EXTRACTED_PAIRS { assert_eq!( - pair.model_name, pair.curated.model_name, + pair.model_name, + pair.curated.model_name, "Curated entity model_name mismatch for {}", pair.model_name, ); assert_eq!( - pair.model_name, pair.extracted.model_name, + pair.model_name, + pair.extracted.model_name, "Extracted entity model_name mismatch for {}", pair.model_name, ); diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/product.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/product.rs index 5c61cfdd..d3339ccd 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/product.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/product.rs @@ -8,26 +8,31 @@ pub const EXT_IR_ATTACHMENT: OdooEntity = OdooEntity { model_name: "ir.attachment", kind: OdooEntityKind::Model, description: "", - fields: &[], - methods: &[OdooMethod { - name: "create", - kind: OdooMethodKind::ApiModelCreateMulti, - return_kind: OdooReturnKind::Record, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModelCreateMulti, - targets: &[], - }], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "create", + kind: OdooMethodKind::ApiModelCreateMulti, + return_kind: OdooReturnKind::Record, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModelCreateMulti, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/ir_attachment.py", - line_range: (6, 26), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/ir_attachment.py", line_range: (6, 26) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -186,10 +191,7 @@ pub const EXT_PRODUCT_ATTRIBUTE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "attribute_line_ids.active", - "attribute_line_ids.product_tmpl_id", - ], + targets: &["attribute_line_ids.active", "attribute_line_ids.product_tmpl_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiOnchange, @@ -197,18 +199,17 @@ pub const EXT_PRODUCT_ATTRIBUTE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Multi-checkbox display type is not compatible with the creation of variants", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Multi-checkbox display type is not compatible with the creation of variants", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_attribute.py", - line_range: (7, 168), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_attribute.py", line_range: (7, 168) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -247,28 +248,28 @@ pub const EXT_PRODUCT_ATTRIBUTE_CUSTOM_VALUE: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[OdooMethod { - name: "_compute_name", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "custom_product_template_attribute_value_id.name", - "custom_value", - ], - }], + methods: &[ + OdooMethod { + name: "_compute_name", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["custom_product_template_attribute_value_id.name", "custom_value"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_attribute_custom_value.py", - line_range: (6, 25), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_attribute_custom_value.py", line_range: (6, 25) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -480,14 +481,13 @@ pub const EXT_PRODUCT_ATTRIBUTE_VALUE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_attribute_value.py", - line_range: (9, 180), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_attribute_value.py", line_range: (9, 180) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -497,7 +497,9 @@ pub const EXT_PRODUCT_CATALOG_MIXIN: OdooEntity = OdooEntity { model_name: "product.catalog.mixin", kind: OdooEntityKind::Abstract, description: "Product Catalog Mixin", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "action_add_from_catalog", @@ -554,16 +556,17 @@ pub const EXT_PRODUCT_CATALOG_MIXIN: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_catalog_mixin.py", - line_range: (7, 151), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_catalog_mixin.py", line_range: (7, 151) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -691,18 +694,17 @@ pub const EXT_PRODUCT_CATEGORY: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on parent_id", - source_method: Some("_check_category_recursion"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on parent_id", + source_method: Some("_check_category_recursion"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_category.py", - line_range: (8, 69), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_category.py", line_range: (8, 69) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -862,10 +864,7 @@ pub const EXT_PRODUCT_COMBO: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_combo.py", - line_range: (7, 79), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_combo.py", line_range: (7, 79) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -931,29 +930,32 @@ pub const EXT_PRODUCT_COMBO_ITEM: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[OdooMethod { - name: "_check_product_id_no_combo", - kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["product_id"], - }], + methods: &[ + OdooMethod { + name: "_check_product_id_no_combo", + kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["product_id"], + }, + ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on product_id", - source_method: Some("_check_product_id_no_combo"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on product_id", + source_method: Some("_check_product_id_no_combo"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_combo_item.py", - line_range: (7, 33), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_combo_item.py", line_range: (7, 33) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1029,14 +1031,13 @@ pub const EXT_PRODUCT_DOCUMENT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_document.py", - line_range: (8, 60), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_document.py", line_range: (8, 60) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1260,14 +1261,13 @@ pub const EXT_PRODUCT_PRICELIST: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_pricelist.py", - line_range: (9, 414), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_pricelist.py", line_range: (9, 414) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1740,17 +1740,7 @@ pub const EXT_PRODUCT_PRICELIST_ITEM: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "compute_price", - "fixed_price", - "pricelist_id", - "percent_price", - "price_discount", - "price_markup", - "price_surcharge", - "base", - "base_pricelist_id", - ], + targets: &["compute_price", "fixed_price", "pricelist_id", "percent_price", "price_discount", "price_markup", "price_surcharge", "base", "base_pricelist_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -1758,14 +1748,7 @@ pub const EXT_PRODUCT_PRICELIST_ITEM: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "base", - "compute_price", - "price_discount", - "price_markup", - "price_round", - "price_surcharge", - ], + targets: &["base", "compute_price", "price_discount", "price_markup", "price_round", "price_surcharge"], }, OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, @@ -1859,10 +1842,7 @@ pub const EXT_PRODUCT_PRICELIST_ITEM: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_pricelist_item.py", - line_range: (8, 684), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_pricelist_item.py", line_range: (8, 684) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -2741,10 +2721,7 @@ pub const EXT_PRODUCT_PRODUCT: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_product.py", - line_range: (16, 1197), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_product.py", line_range: (16, 1197) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3012,14 +2989,13 @@ pub const EXT_PRODUCT_SUPPLIERINFO: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_supplierinfo.py", - line_range: (7, 119), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_supplierinfo.py", line_range: (7, 119) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3135,23 +3111,24 @@ pub const EXT_PRODUCT_TAG: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["product_template_ids", "product_product_ids"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["product_template_ids", "product_product_ids"], + }, + ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Tag name already exists!", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Tag name already exists!", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_tag.py", - line_range: (7, 62), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_tag.py", line_range: (7, 62) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4194,13 +4171,7 @@ pub const EXT_PRODUCT_TEMPLATE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "attribute_line_ids", - "attribute_line_ids.value_ids", - "attribute_line_ids.attribute_id.create_variant", - "attribute_line_ids.attribute_id.display_type", - "attribute_line_ids.value_ids.is_custom", - ], + targets: &["attribute_line_ids", "attribute_line_ids.value_ids", "attribute_line_ids.attribute_id.create_variant", "attribute_line_ids.attribute_id.display_type", "attribute_line_ids.value_ids.is_custom"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -4372,10 +4343,7 @@ pub const EXT_PRODUCT_TEMPLATE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_template.py", - line_range: (18, 1598), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_template.py", line_range: (18, 1598) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4434,19 +4402,20 @@ pub const EXT_PRODUCT_TEMPLATE_ATTRIBUTE_EXCLUSION: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModelCreateMulti, - targets: &[], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModelCreateMulti, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_template_attribute_exclusion.py", - line_range: (6, 47), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_template_attribute_exclusion.py", line_range: (6, 47) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4602,18 +4571,17 @@ pub const EXT_PRODUCT_TEMPLATE_ATTRIBUTE_LINE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on active, value_ids, attribute_id", - source_method: Some("_check_valid_values"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on active, value_ids, attribute_id", + source_method: Some("_check_valid_values"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_template_attribute_line.py", - line_range: (8, 284), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_template_attribute_line.py", line_range: (8, 284) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4864,10 +4832,7 @@ pub const EXT_PRODUCT_TEMPLATE_ATTRIBUTE_VALUE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_template_attribute_value.py", - line_range: (10, 198), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_template_attribute_value.py", line_range: (10, 198) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4929,10 +4894,12 @@ pub const EXT_PRODUCT_UOM: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["barcode"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiConstrains, + targets: &["barcode"], + }, + ], state_machine: None, constraints: &[ OdooConstraint { @@ -4949,10 +4916,7 @@ pub const EXT_PRODUCT_UOM: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/product_uom.py", - line_range: (8, 32), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/product_uom.py", line_range: (8, 32) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4962,7 +4926,9 @@ pub const EXT_RES_COMPANY: OdooEntity = OdooEntity { model_name: "res.company", kind: OdooEntityKind::Model, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "create", @@ -4989,19 +4955,20 @@ pub const EXT_RES_COMPANY: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModelCreateMulti, - targets: &[], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModelCreateMulti, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/res_company.py", - line_range: (6, 69), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/res_company.py", line_range: (6, 69) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -5081,19 +5048,20 @@ pub const EXT_RES_CONFIG_SETTINGS: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiOnchange, - targets: &["group_product_pricelist"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiOnchange, + targets: &["group_product_pricelist"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/res_config_settings.py", - line_range: (6, 43), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/res_config_settings.py", line_range: (6, 43) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -5103,26 +5071,31 @@ pub const EXT_RES_COUNTRY_GROUP: OdooEntity = OdooEntity { model_name: "res.country.group", kind: OdooEntityKind::Model, description: "", - fields: &[OdooField { - name: "pricelist_ids", - kind: OdooFieldKind::Many2many, - target: Some("product.pricelist"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], - methods: &[], - decorators: &[], + fields: &[ + OdooField { + name: "pricelist_ids", + kind: OdooFieldKind::Many2many, + target: Some("product.pricelist"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/res_country_group.py", - line_range: (7, 15), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/res_country_group.py", line_range: (7, 15) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -5132,7 +5105,9 @@ pub const EXT_RES_CURRENCY: OdooEntity = OdooEntity { model_name: "res.currency", kind: OdooEntityKind::Model, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_activate_group_multi_currency", @@ -5147,16 +5122,17 @@ pub const EXT_RES_CURRENCY: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/res_currency.py", - line_range: (7, 25), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/res_currency.py", line_range: (7, 25) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -5206,19 +5182,20 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["country_id", "specific_property_product_pricelist"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["country_id", "specific_property_product_pricelist"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/res_partner.py", - line_range: (6, 51), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/res_partner.py", line_range: (6, 51) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -5228,15 +5205,17 @@ pub const EXT_UOM_UOM: OdooEntity = OdooEntity { model_name: "uom.uom", kind: OdooEntityKind::Model, description: "", - fields: &[OdooField { - name: "product_uom_ids", - kind: OdooFieldKind::One2many, - target: Some("product.uom"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], + fields: &[ + OdooField { + name: "product_uom_ids", + kind: OdooFieldKind::One2many, + target: Some("product.uom"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], methods: &[ OdooMethod { name: "_domain_product_uoms", @@ -5251,17 +5230,19 @@ pub const EXT_UOM_UOM: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/product/models/uom_uom.py", - line_range: (8, 30), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/product/models/uom_uom.py", line_range: (8, 30) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; + diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/purchase.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/purchase.rs index 846a0654..b35ceae8 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/purchase.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/purchase.rs @@ -185,12 +185,7 @@ pub const EXT_ACCOUNT_MOVE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "partner_id.name", - "partner_id.purchase_warn_msg", - "invoice_line_ids.product_id.purchase_line_warn_msg", - "invoice_line_ids.product_id.display_name", - ], + targets: &["partner_id.name", "partner_id.purchase_warn_msg", "invoice_line_ids.product_id.purchase_line_warn_msg", "invoice_line_ids.product_id.display_name"], }, OdooDecorator { kind: OdooDecoratorKind::ApiModelCreateMulti, @@ -198,14 +193,13 @@ pub const EXT_ACCOUNT_MOVE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/purchase/models/account_invoice.py", - line_range: (16, 518), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/account_invoice.py", line_range: (16, 518) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -279,19 +273,20 @@ pub const EXT_ACCOUNT_MOVE_LINE: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id.purchase_line_warn_msg"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["product_id.purchase_line_warn_msg"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/purchase/models/account_invoice.py", - line_range: (521, 558), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/account_invoice.py", line_range: (521, 558) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -301,23 +296,28 @@ pub const EXT_ACCOUNT_TAX: OdooEntity = OdooEntity { model_name: "account.tax", kind: OdooEntityKind::Model, description: "", - fields: &[], - methods: &[OdooMethod { - name: "_hook_compute_is_used", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "_hook_compute_is_used", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/purchase/models/account_tax.py", - line_range: (6, 29), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/account_tax.py", line_range: (6, 29) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -327,15 +327,17 @@ pub const EXT_ACCOUNT_ANALYTIC_ACCOUNT: OdooEntity = OdooEntity { model_name: "account.analytic.account", kind: OdooEntityKind::Model, description: "", - fields: &[OdooField { - name: "purchase_order_count", - kind: OdooFieldKind::Computed, - target: None, - required: false, - computed: Some("_compute_purchase_order_count"), - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], + fields: &[ + OdooField { + name: "purchase_order_count", + kind: OdooFieldKind::Computed, + target: None, + required: false, + computed: Some("_compute_purchase_order_count"), + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], methods: &[ OdooMethod { name: "_compute_purchase_order_count", @@ -350,19 +352,20 @@ pub const EXT_ACCOUNT_ANALYTIC_ACCOUNT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["line_ids"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["line_ids"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/purchase/models/analytic_account.py", - line_range: (7, 34), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/analytic_account.py", line_range: (7, 34) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -372,26 +375,31 @@ pub const EXT_ACCOUNT_ANALYTIC_APPLICABILITY: OdooEntity = OdooEntity { model_name: "account.analytic.applicability", kind: OdooEntityKind::Model, description: "Analytic Plan's Applicabilities", - fields: &[OdooField { - name: "business_domain", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], - methods: &[], - decorators: &[], + fields: &[ + OdooField { + name: "business_domain", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/purchase/models/analytic_applicability.py", - line_range: (6, 15), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/analytic_applicability.py", line_range: (6, 15) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -401,7 +409,9 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { model_name: "ir.actions.report", kind: OdooEntityKind::Model, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_render_qweb_pdf_prepare_streams", @@ -416,16 +426,17 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/purchase/models/ir_actions_report.py", - line_range: (7, 56), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/ir_actions_report.py", line_range: (7, 56) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -507,14 +518,13 @@ pub const EXT_PRODUCT_TEMPLATE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/purchase/models/product.py", - line_range: (10, 55), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/product.py", line_range: (10, 55) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -588,16 +598,17 @@ pub const EXT_PRODUCT_PRODUCT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/purchase/models/product.py", - line_range: (58, 141), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/product.py", line_range: (58, 141) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -607,7 +618,9 @@ pub const EXT_PRODUCT_SUPPLIERINFO: OdooEntity = OdooEntity { model_name: "product.supplierinfo", kind: OdooEntityKind::Model, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_onchange_partner_id", @@ -622,19 +635,20 @@ pub const EXT_PRODUCT_SUPPLIERINFO: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiOnchange, - targets: &["partner_id"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiOnchange, + targets: &["partner_id"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/purchase/models/product.py", - line_range: (144, 154), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/product.py", line_range: (144, 154) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -939,14 +953,13 @@ pub const EXT_PURCHASE_BILL_LINE_MATCH: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/purchase/models/purchase_bill_line_match.py", - line_range: (9, 203), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/purchase_bill_line_match.py", line_range: (9, 203) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1905,11 +1918,7 @@ pub const EXT_PURCHASE_ORDER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "company_id", - "partner_id", - "partner_id.reminder_date_before_receipt", - ], + targets: &["company_id", "partner_id", "partner_id.reminder_date_before_receipt"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -1917,11 +1926,7 @@ pub const EXT_PURCHASE_ORDER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "company_id.account_fiscal_country_id", - "fiscal_position_id.country_id", - "fiscal_position_id.foreign_vat", - ], + targets: &["company_id.account_fiscal_country_id", "fiscal_position_id.country_id", "fiscal_position_id.foreign_vat"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -1929,11 +1934,7 @@ pub const EXT_PURCHASE_ORDER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "partner_id.name", - "partner_id.purchase_warn_msg", - "order_line.purchase_line_warn_msg", - ], + targets: &["partner_id.name", "partner_id.purchase_warn_msg", "order_line.purchase_line_warn_msg"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -1973,43 +1974,28 @@ pub const EXT_PURCHASE_ORDER: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { - name: "draft", - semantic: OdooStateSemantic::Draft, - }, - OdooState { - name: "sent", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "to approve", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "purchase", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "cancel", - semantic: OdooStateSemantic::Cancelled, - }, - ], - transitions: &[], - }), - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on company_id, order_line", - source_method: Some("_check_order_line_company_id"), - }], + state_field: "state", + states: &[ + OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, + OdooState { name: "sent", semantic: OdooStateSemantic::Active }, + OdooState { name: "to approve", semantic: OdooStateSemantic::Active }, + OdooState { name: "purchase", semantic: OdooStateSemantic::Active }, + OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, + ], + transitions: &[ + ], + }), + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on company_id, order_line", + source_method: Some("_check_order_line_company_id"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/purchase/models/purchase_order.py", - line_range: (21, 1418), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/purchase_order.py", line_range: (21, 1418) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2701,13 +2687,7 @@ pub const EXT_PURCHASE_ORDER_LINE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "invoice_lines.move_id.state", - "invoice_lines.quantity", - "qty_received", - "product_uom_qty", - "order_id.state", - ], + targets: &["invoice_lines.move_id.state", "invoice_lines.quantity", "qty_received", "product_uom_qty", "order_id.state"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -2735,14 +2715,7 @@ pub const EXT_PURCHASE_ORDER_LINE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "product_id", - "product_id.seller_ids", - "partner_id", - "product_qty", - "order_id.date_order", - "product_uom_id", - ], + targets: &["product_id", "product_id.seller_ids", "partner_id", "product_qty", "order_id.date_order", "product_uom_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -2766,22 +2739,11 @@ pub const EXT_PURCHASE_ORDER_LINE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "product_id", - "product_id.uom_id", - "product_id.uom_ids", - "product_id.seller_ids", - "product_id.seller_ids.product_uom_id", - ], + targets: &["product_id", "product_id.uom_id", "product_id.uom_ids", "product_id.seller_ids", "product_id.seller_ids.product_uom_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "product_qty", - "product_uom_id", - "company_id", - "order_id.partner_id", - ], + targets: &["product_qty", "product_uom_id", "company_id", "order_id.partner_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -2820,10 +2782,7 @@ pub const EXT_PURCHASE_ORDER_LINE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/purchase/models/purchase_order_line.py", - line_range: (13, 753), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/purchase_order_line.py", line_range: (13, 753) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2862,17 +2821,20 @@ pub const EXT_RES_COMPANY: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/purchase/models/res_company.py", - line_range: (7, 23), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/res_company.py", line_range: (7, 23) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/eu/en16931"], }, @@ -3014,14 +2976,13 @@ pub const EXT_RES_CONFIG_SETTINGS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/purchase/models/res_config_settings.py", - line_range: (7, 44), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/res_config_settings.py", line_range: (7, 44) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3101,17 +3062,19 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/purchase/models/res_partner.py", - line_range: (6, 54), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/purchase/models/res_partner.py", line_range: (6, 54) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; + diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/sale.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/sale.rs index c70ce93a..c5f7e9e7 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/sale.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/sale.rs @@ -167,23 +167,17 @@ pub const EXT_ACCOUNT_MOVE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "partner_id.name", - "partner_id.sale_warn_msg", - "invoice_line_ids.product_id.sale_line_warn_msg", - "invoice_line_ids.product_id.display_name", - ], + targets: &["partner_id.name", "partner_id.sale_warn_msg", "invoice_line_ids.product_id.sale_line_warn_msg", "invoice_line_ids.product_id.display_name"], }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/account_move.py", - line_range: (6, 206), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/account_move.py", line_range: (6, 206) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -307,14 +301,13 @@ pub const EXT_ACCOUNT_MOVE_LINE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/account_move_line.py", - line_range: (8, 244), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/account_move_line.py", line_range: (8, 244) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -324,26 +317,31 @@ pub const EXT_ACCOUNT_ANALYTIC_LINE: OdooEntity = OdooEntity { model_name: "account.analytic.line", kind: OdooEntityKind::Model, description: "", - fields: &[OdooField { - name: "so_line", - kind: OdooFieldKind::Many2one, - target: Some("sale.order.line"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], - methods: &[], - decorators: &[], + fields: &[ + OdooField { + name: "so_line", + kind: OdooFieldKind::Many2one, + target: Some("sale.order.line"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/analytic.py", - line_range: (6, 9), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/analytic.py", line_range: (6, 9) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -353,26 +351,31 @@ pub const EXT_ACCOUNT_ANALYTIC_APPLICABILITY: OdooEntity = OdooEntity { model_name: "account.analytic.applicability", kind: OdooEntityKind::Model, description: "Analytic Plan's Applicabilities", - fields: &[OdooField { - name: "business_domain", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], - methods: &[], - decorators: &[], + fields: &[ + OdooField { + name: "business_domain", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/analytic.py", - line_range: (12, 21), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/analytic.py", line_range: (12, 21) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -382,23 +385,28 @@ pub const EXT_ACCOUNT_CHART_TEMPLATE: OdooEntity = OdooEntity { model_name: "account.chart.template", kind: OdooEntityKind::Abstract, description: "", - fields: &[], - methods: &[OdooMethod { - name: "_get_property_accounts", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "_get_property_accounts", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/chart_template.py", - line_range: (4, 10), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/chart_template.py", line_range: (4, 10) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -481,16 +489,17 @@ pub const EXT_CRM_TEAM: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/crm_team.py", - line_range: (8, 84), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/crm_team.py", line_range: (8, 84) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -500,7 +509,9 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { model_name: "ir.actions.report", kind: OdooEntityKind::Model, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_render_qweb_pdf_prepare_streams", @@ -515,16 +526,17 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/ir_actions_report.py", - line_range: (7, 56), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/ir_actions_report.py", line_range: (7, 56) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -534,7 +546,9 @@ pub const EXT_IR_CONFIG_PARAMETER: OdooEntity = OdooEntity { model_name: "ir.config_parameter", kind: OdooEntityKind::Model, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "create", @@ -567,19 +581,20 @@ pub const EXT_IR_CONFIG_PARAMETER: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModelCreateMulti, - targets: &[], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModelCreateMulti, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/ir_config_parameter.py", - line_range: (9, 45), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/ir_config_parameter.py", line_range: (9, 45) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -589,26 +604,31 @@ pub const EXT_PAYMENT_PROVIDER: OdooEntity = OdooEntity { model_name: "payment.provider", kind: OdooEntityKind::Model, description: "", - fields: &[OdooField { - name: "so_reference_type", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], - methods: &[], - decorators: &[], + fields: &[ + OdooField { + name: "so_reference_type", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/payment_provider.py", - line_range: (6, 14), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/payment_provider.py", line_range: (6, 14) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -711,14 +731,13 @@ pub const EXT_PAYMENT_TRANSACTION: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/payment_transaction.py", - line_range: (11, 260), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/payment_transaction.py", line_range: (11, 260) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -728,26 +747,31 @@ pub const EXT_PRODUCT_DOCUMENT: OdooEntity = OdooEntity { model_name: "product.document", kind: OdooEntityKind::Model, description: "", - fields: &[OdooField { - name: "attached_on_sale", - kind: OdooFieldKind::Selection, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], - methods: &[], - decorators: &[], + fields: &[ + OdooField { + name: "attached_on_sale", + kind: OdooFieldKind::Selection, + target: None, + required: true, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/product_document.py", - line_range: (6, 25), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/product_document.py", line_range: (6, 25) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -757,7 +781,9 @@ pub const EXT_PRODUCT_PRICELIST_ITEM: OdooEntity = OdooEntity { model_name: "product.pricelist.item", kind: OdooEntityKind::Model, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_is_discount_feature_enabled", @@ -772,19 +798,20 @@ pub const EXT_PRODUCT_PRICELIST_ITEM: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/product_pricelist_item.py", - line_range: (4, 16), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/product_pricelist_item.py", line_range: (4, 16) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -876,19 +903,20 @@ pub const EXT_PRODUCT_PRODUCT: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiOnchange, - targets: &["type"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiOnchange, + targets: &["type"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/product_product.py", - line_range: (10, 123), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/product_product.py", line_range: (10, 123) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -898,30 +926,35 @@ pub const EXT_PRODUCT_ATTRIBUTE_CUSTOM_VALUE: OdooEntity = OdooEntity { model_name: "product.attribute.custom.value", kind: OdooEntityKind::Model, description: "", - fields: &[OdooField { - name: "sale_order_line_id", - kind: OdooFieldKind::Many2one, - target: Some("sale.order.line"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], - methods: &[], - decorators: &[], + fields: &[ + OdooField { + name: "sale_order_line_id", + kind: OdooFieldKind::Many2one, + target: Some("sale.order.line"), + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Only one Custom Value is allowed per Attribute Value per Sales Order Line.", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Only one Custom Value is allowed per Attribute Value per Sales Order Line.", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/product_product.py", - line_range: (126, 134), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/product_product.py", line_range: (126, 134) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1212,10 +1245,7 @@ pub const EXT_PRODUCT_TEMPLATE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/product_template.py", - line_range: (10, 311), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/product_template.py", line_range: (10, 311) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1403,19 +1433,20 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiModel, + targets: &[], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/res_partner.py", - line_range: (7, 110), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/res_partner.py", line_range: (7, 110) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2939,12 +2970,7 @@ pub const EXT_SALE_ORDER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "order_line.price_subtotal", - "currency_id", - "company_id", - "payment_term_id", - ], + targets: &["order_line.price_subtotal", "currency_id", "company_id", "payment_term_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -2988,12 +3014,7 @@ pub const EXT_SALE_ORDER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "order_line.price_subtotal", - "currency_id", - "company_id", - "payment_term_id", - ], + targets: &["order_line.price_subtotal", "currency_id", "company_id", "payment_term_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -3001,11 +3022,7 @@ pub const EXT_SALE_ORDER: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "partner_id.name", - "partner_id.sale_warn_msg", - "order_line.sale_line_warn_msg", - ], + targets: &["partner_id.name", "partner_id.sale_warn_msg", "order_line.sale_line_warn_msg"], }, OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, @@ -3081,10 +3098,7 @@ pub const EXT_SALE_ORDER: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/sale_order.py", - line_range: (34, 2301), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/sale_order.py", line_range: (34, 2301) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4386,12 +4400,7 @@ pub const EXT_SALE_ORDER_LINE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "qty_delivered_method", - "analytic_line_ids.so_line", - "analytic_line_ids.unit_amount", - "analytic_line_ids.product_uom_id", - ], + targets: &["qty_delivered_method", "analytic_line_ids.so_line", "analytic_line_ids.unit_amount", "analytic_line_ids.product_uom_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -4415,60 +4424,27 @@ pub const EXT_SALE_ORDER_LINE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "state", - "product_uom_qty", - "qty_delivered", - "qty_to_invoice", - "qty_invoiced", - ], + targets: &["state", "product_uom_qty", "qty_delivered", "qty_to_invoice", "qty_invoiced"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "invoice_lines", - "invoice_lines.price_total", - "invoice_lines.move_id.state", - "invoice_lines.move_id.move_type", - ], + targets: &["invoice_lines", "invoice_lines.price_total", "invoice_lines.move_id.state", "invoice_lines.move_id.move_type"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "invoice_lines", - "invoice_lines.price_total", - "invoice_lines.move_id.state", - ], + targets: &["invoice_lines", "invoice_lines.price_total", "invoice_lines.move_id.state"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "state", - "product_id", - "untaxed_amount_invoiced", - "qty_delivered", - "product_uom_qty", - "price_unit", - ], + targets: &["state", "product_id", "untaxed_amount_invoiced", "qty_delivered", "product_uom_qty", "price_unit"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "discount", - "price_total", - "product_uom_qty", - "qty_delivered", - "qty_invoiced_posted", - ], + targets: &["discount", "price_total", "product_uom_qty", "qty_delivered", "qty_invoiced_posted"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "price_unit", - "discount", - "qty_invoiced_at_date", - "qty_delivered_at_date", - ], + targets: &["price_unit", "discount", "qty_invoiced_at_date", "qty_delivered_at_date"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -4520,10 +4496,7 @@ pub const EXT_SALE_ORDER_LINE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/sale_order_line.py", - line_range: (12, 1819), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/sale_order_line.py", line_range: (12, 1819) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4597,17 +4570,19 @@ pub const EXT_UTM_CAMPAIGN: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/sale/models/utm_campaign.py", - line_range: (7, 72), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/sale/models/utm_campaign.py", line_range: (7, 72) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; + diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/stock.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/stock.rs index fa46eb14..2673620b 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/stock.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/stock.rs @@ -8,26 +8,31 @@ pub const EXT_BARCODE_RULE: OdooEntity = OdooEntity { model_name: "barcode.rule", kind: OdooEntityKind::Model, description: "", - fields: &[OdooField { - name: "type", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }], - methods: &[], - decorators: &[], + fields: &[ + OdooField { + name: "type", + kind: OdooFieldKind::Selection, + target: None, + required: false, + computed: None, + depends: &[], + semantic_role: OdooSemanticRole::Other, + }, + ], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/barcode.py", - line_range: (7, 20), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/barcode.py", line_range: (7, 20) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -37,23 +42,28 @@ pub const EXT_IR_ACTIONS_REPORT: OdooEntity = OdooEntity { model_name: "ir.actions.report", kind: OdooEntityKind::Model, description: "", - fields: &[], - methods: &[OdooMethod { - name: "_get_rendering_context", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "_get_rendering_context", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/ir_actions_report.py", - line_range: (4, 16), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/ir_actions_report.py", line_range: (4, 16) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -520,11 +530,7 @@ pub const EXT_PRODUCT_PRODUCT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "stock_move_ids.product_qty", - "stock_move_ids.state", - "stock_move_ids.quantity", - ], + targets: &["stock_move_ids.product_qty", "stock_move_ids.state", "stock_move_ids.quantity"], }, OdooDecorator { kind: OdooDecoratorKind::ApiOnchange, @@ -548,14 +554,13 @@ pub const EXT_PRODUCT_PRODUCT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/product.py", - line_range: (47, 810), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/product.py", line_range: (47, 810) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1061,13 +1066,7 @@ pub const EXT_PRODUCT_TEMPLATE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "product_variant_ids.qty_available", - "product_variant_ids.virtual_available", - "product_variant_ids.incoming_qty", - "product_variant_ids.outgoing_qty", - "tracking", - ], + targets: &["product_variant_ids.qty_available", "product_variant_ids.virtual_available", "product_variant_ids.incoming_qty", "product_variant_ids.outgoing_qty", "tracking"], }, OdooDecorator { kind: OdooDecoratorKind::ApiModel, @@ -1091,14 +1090,13 @@ pub const EXT_PRODUCT_TEMPLATE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/product.py", - line_range: (813, 1271), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/product.py", line_range: (813, 1271) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1210,14 +1208,13 @@ pub const EXT_PRODUCT_CATEGORY: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/product.py", - line_range: (1274, 1335), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/product.py", line_range: (1274, 1335) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1261,16 +1258,17 @@ pub const EXT_UOM_UOM: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/product.py", - line_range: (1338, 1389), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/product.py", line_range: (1338, 1389) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1280,7 +1278,9 @@ pub const EXT_PRODUCT_CATALOG_MIXIN: OdooEntity = OdooEntity { model_name: "product.catalog.mixin", kind: OdooEntityKind::Abstract, description: "", - fields: &[], + fields: &[ + + ], methods: &[ OdooMethod { name: "_get_action_add_from_catalog_extra_context", @@ -1295,16 +1295,17 @@ pub const EXT_PRODUCT_CATALOG_MIXIN: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/product_catalog_mixin.py", - line_range: (6, 16), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/product_catalog_mixin.py", line_range: (6, 16) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1334,17 +1335,20 @@ pub const EXT_PRODUCT_REMOVAL: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/product_strategy.py", - line_range: (8, 13), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/product_strategy.py", line_range: (8, 13) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1533,14 +1537,13 @@ pub const EXT_STOCK_PUTAWAY_RULE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/product_strategy.py", - line_range: (16, 183), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/product_strategy.py", line_range: (16, 183) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -1771,14 +1774,13 @@ pub const EXT_RES_COMPANY: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/res_company.py", - line_range: (6, 215), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/res_company.py", line_range: (6, 215) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2195,14 +2197,13 @@ pub const EXT_RES_CONFIG_SETTINGS: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/res_config_settings.py", - line_range: (8, 139), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/res_config_settings.py", line_range: (8, 139) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2241,22 +2242,25 @@ pub const EXT_RES_PARTNER: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[OdooMethod { - name: "action_view_stock_serial", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Action, - triggers: &[], - }], - decorators: &[], + methods: &[ + OdooMethod { + name: "action_view_stock_serial", + kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Action, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/res_partner.py", - line_range: (7, 25), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/res_partner.py", line_range: (7, 25) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2266,23 +2270,28 @@ pub const EXT_RES_USERS: OdooEntity = OdooEntity { model_name: "res.users", kind: OdooEntityKind::Model, description: "", - fields: &[], - methods: &[OdooMethod { - name: "_get_default_warehouse_id", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + fields: &[ + + ], + methods: &[ + OdooMethod { + name: "_get_default_warehouse_id", + kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/res_users.py", - line_range: (6, 12), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/res_users.py", line_range: (6, 12) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2688,16 +2697,7 @@ pub const EXT_STOCK_LOCATION: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "outgoing_move_line_ids.quantity_product_uom", - "incoming_move_line_ids.quantity_product_uom", - "outgoing_move_line_ids.state", - "incoming_move_line_ids.state", - "outgoing_move_line_ids.product_id.weight", - "outgoing_move_line_ids.product_id.weight", - "quant_ids.quantity", - "quant_ids.product_id.weight", - ], + targets: &["outgoing_move_line_ids.quantity_product_uom", "incoming_move_line_ids.quantity_product_uom", "outgoing_move_line_ids.state", "incoming_move_line_ids.state", "outgoing_move_line_ids.product_id.weight", "outgoing_move_line_ids.product_id.weight", "quant_ids.quantity", "quant_ids.product_id.weight"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -2705,12 +2705,7 @@ pub const EXT_STOCK_LOCATION: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "cyclic_inventory_frequency", - "last_inventory_date", - "usage", - "company_id", - ], + targets: &["cyclic_inventory_frequency", "last_inventory_date", "usage", "company_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -2767,10 +2762,7 @@ pub const EXT_STOCK_LOCATION: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_location.py", - line_range: (13, 514), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_location.py", line_range: (13, 514) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -2980,18 +2972,17 @@ pub const EXT_STOCK_ROUTE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on company_id", - source_method: Some("_check_company_consistency"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on company_id", + source_method: Some("_check_company_consistency"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_location.py", - line_range: (517, 595), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_location.py", line_range: (517, 595) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -3322,18 +3313,17 @@ pub const EXT_STOCK_LOT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on name, product_id, company_id", - source_method: Some("_check_unique_lot"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on name, product_id, company_id", + source_method: Some("_check_unique_lot"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_lot.py", - line_range: (24, 431), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_lot.py", line_range: (24, 431) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -4796,13 +4786,7 @@ pub const EXT_STOCK_MOVE: OdooEntity = OdooEntity { decorators: &[ OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "product_id", - "product_id.uom_id", - "product_id.uom_ids", - "product_id.seller_ids", - "product_id.seller_ids.product_uom_id", - ], + targets: &["product_id", "product_id.uom_id", "product_id.uom_ids", "product_id.seller_ids", "product_id.seller_ids.product_uom_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -4818,12 +4802,7 @@ pub const EXT_STOCK_MOVE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "has_tracking", - "picking_type_id.use_create_lots", - "picking_type_id.use_existing_lots", - "product_id", - ], + targets: &["has_tracking", "picking_type_id.use_create_lots", "picking_type_id.use_existing_lots", "product_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -4831,11 +4810,7 @@ pub const EXT_STOCK_MOVE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "move_line_ids", - "move_line_ids.result_package_id", - "move_line_ids.result_package_id.outermost_package_id", - ], + targets: &["move_line_ids", "move_line_ids.result_package_id", "move_line_ids.result_package_id.outermost_package_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -4867,13 +4842,7 @@ pub const EXT_STOCK_MOVE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "picking_id.name", - "scrap_id.name", - "location_dest_usage", - "is_inventory", - "inventory_name", - ], + targets: &["picking_id.name", "scrap_id.name", "location_dest_usage", "is_inventory", "inventory_name"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -4901,16 +4870,7 @@ pub const EXT_STOCK_MOVE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "product_id", - "product_qty", - "picking_type_id", - "quantity", - "priority", - "state", - "product_uom_qty", - "location_id", - ], + targets: &["product_id", "product_qty", "picking_type_id", "quantity", "priority", "state", "product_uom_qty", "location_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -4930,15 +4890,7 @@ pub const EXT_STOCK_MOVE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "has_tracking", - "picking_type_id.use_create_lots", - "picking_type_id.use_existing_lots", - "state", - "origin_returned_move_id", - "product_id.type", - "picking_code", - ], + targets: &["has_tracking", "picking_type_id.use_create_lots", "picking_type_id.use_existing_lots", "state", "origin_returned_move_id", "product_id.type", "picking_code"], }, OdooDecorator { kind: OdooDecoratorKind::ApiModel, @@ -4946,20 +4898,11 @@ pub const EXT_STOCK_MOVE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "picking_id", - "product_id", - "location_id", - "location_dest_id", - ], + targets: &["picking_id", "product_id", "location_id", "location_dest_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "product_id", - "picking_type_id", - "description_picking_manual", - ], + targets: &["product_id", "picking_type_id", "description_picking_manual"], }, OdooDecorator { kind: OdooDecoratorKind::ApiModelCreateMulti, @@ -4987,47 +4930,26 @@ pub const EXT_STOCK_MOVE: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { - name: "draft", - semantic: OdooStateSemantic::Draft, - }, - OdooState { - name: "waiting", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "confirmed", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "partially_available", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "assigned", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "done", - semantic: OdooStateSemantic::Completed, - }, - OdooState { - name: "cancel", - semantic: OdooStateSemantic::Cancelled, - }, - ], - transitions: &[], - }), - constraints: &[], + state_field: "state", + states: &[ + OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, + OdooState { name: "waiting", semantic: OdooStateSemantic::Active }, + OdooState { name: "confirmed", semantic: OdooStateSemantic::Active }, + OdooState { name: "partially_available", semantic: OdooStateSemantic::Active }, + OdooState { name: "assigned", semantic: OdooStateSemantic::Active }, + OdooState { name: "done", semantic: OdooStateSemantic::Completed }, + OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, + ], + transitions: &[ + ], + }), + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_move.py", - line_range: (18, 2682), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_move.py", line_range: (18, 2682) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -5740,13 +5662,7 @@ pub const EXT_STOCK_MOVE_LINE: OdooEntity = OdooEntity { decorators: &[ OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "product_id", - "product_id.uom_id", - "product_id.uom_ids", - "product_id.seller_ids", - "product_id.seller_ids.product_uom_id", - ], + targets: &["product_id", "product_id.uom_id", "product_id.uom_ids", "product_id.seller_ids", "product_id.seller_ids.product_uom_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -5766,12 +5682,7 @@ pub const EXT_STOCK_MOVE_LINE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "move_id", - "move_id.location_id", - "move_id.location_dest_id", - "picking_id", - ], + targets: &["move_id", "move_id.location_id", "move_id.location_dest_id", "picking_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -5803,12 +5714,7 @@ pub const EXT_STOCK_MOVE_LINE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiOnchange, - targets: &[ - "result_package_id", - "product_id", - "product_uom_id", - "quantity", - ], + targets: &["result_package_id", "product_id", "product_uom_id", "quantity"], }, OdooDecorator { kind: OdooDecoratorKind::ApiModelCreateMulti, @@ -5835,10 +5741,7 @@ pub const EXT_STOCK_MOVE_LINE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_move_line.py", - line_range: (15, 1239), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_move_line.py", line_range: (15, 1239) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -6456,37 +6359,15 @@ pub const EXT_STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "location_id", - "product_min_qty", - "route_id", - "product_id.route_ids", - "product_id.stock_move_ids.date", - "product_id.stock_move_ids.state", - "product_id.seller_ids", - "product_id.seller_ids.delay", - "company_id.horizon_days", - ], + targets: &["location_id", "product_min_qty", "route_id", "product_id.route_ids", "product_id.stock_move_ids.date", "product_id.stock_move_ids.state", "product_id.seller_ids", "product_id.seller_ids.delay", "company_id.horizon_days"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "rule_ids", - "product_id.seller_ids", - "product_id.seller_ids.delay", - "company_id.horizon_days", - ], + targets: &["rule_ids", "product_id.seller_ids", "product_id.seller_ids.delay", "company_id.horizon_days"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "route_id", - "product_id", - "location_id", - "company_id", - "warehouse_id", - "product_id.route_ids", - ], + targets: &["route_id", "product_id", "location_id", "company_id", "warehouse_id", "product_id.route_ids"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -6494,12 +6375,7 @@ pub const EXT_STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "route_id", - "product_id", - "product_id.seller_ids", - "product_id.seller_ids.product_uom_id", - ], + targets: &["route_id", "product_id", "product_id.seller_ids", "product_id.seller_ids.product_uom_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -6507,24 +6383,11 @@ pub const EXT_STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "product_id", - "product_id.categ_id", - "product_id.route_ids", - "product_id.categ_id.route_ids", - "location_id", - ], + targets: &["product_id", "product_id.categ_id", "product_id.route_ids", "product_id.categ_id.route_ids", "location_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "route_id", - "product_id", - "product_id.categ_id", - "product_id.route_ids", - "product_id.categ_id.route_ids", - "location_id", - ], + targets: &["route_id", "product_id", "product_id.categ_id", "product_id.route_ids", "product_id.categ_id.route_ids", "location_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -6560,15 +6423,7 @@ pub const EXT_STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "product_id", - "location_id", - "product_id.stock_move_ids", - "product_id.stock_move_ids.state", - "product_id.stock_move_ids.date", - "product_id.stock_move_ids.product_uom_qty", - "product_id.seller_ids.delay", - ], + targets: &["product_id", "location_id", "product_id.stock_move_ids", "product_id.stock_move_ids.state", "product_id.stock_move_ids.date", "product_id.stock_move_ids.product_uom_qty", "product_id.seller_ids.delay"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -6576,15 +6431,7 @@ pub const EXT_STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "replenishment_uom_id", - "product_min_qty", - "product_max_qty", - "product_id", - "location_id", - "product_id.seller_ids.delay", - "company_id.horizon_days", - ], + targets: &["replenishment_uom_id", "product_min_qty", "product_max_qty", "product_id", "location_id", "product_id.seller_ids.delay", "company_id.horizon_days"], }, OdooDecorator { kind: OdooDecoratorKind::ApiModel, @@ -6611,10 +6458,7 @@ pub const EXT_STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_orderpoint.py", - line_range: (21, 817), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_orderpoint.py", line_range: (21, 817) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7073,12 +6917,7 @@ pub const EXT_STOCK_PACKAGE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "complete_name", - "package_type_id.packaging_length", - "package_type_id.width", - "package_type_id.height", - ], + targets: &["complete_name", "package_type_id.packaging_length", "package_type_id.width", "package_type_id.height"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -7106,11 +6945,7 @@ pub const EXT_STOCK_PACKAGE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "child_package_ids", - "child_package_ids.location_id", - "quant_ids", - ], + targets: &["child_package_ids", "child_package_ids.location_id", "quant_ids"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -7134,14 +6969,13 @@ pub const EXT_STOCK_PACKAGE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_package.py", - line_range: (16, 558), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_package.py", line_range: (16, 558) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7284,16 +7118,17 @@ pub const EXT_STOCK_PACKAGE_HISTORY: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_package_history.py", - line_range: (6, 42), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_package_history.py", line_range: (6, 42) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -7561,10 +7396,7 @@ pub const EXT_STOCK_PACKAGE_TYPE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_package_type.py", - line_range: (7, 131), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_package_type.py", line_range: (7, 131) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -8286,14 +8118,13 @@ pub const EXT_STOCK_PICKING_TYPE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_picking.py", - line_range: (20, 535), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_picking.py", line_range: (20, 535) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -9421,23 +9252,11 @@ pub const EXT_STOCK_PICKING: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "state", - "picking_type_code", - "scheduled_date", - "move_ids", - "move_ids.forecast_availability", - "move_ids.forecast_expected_date", - ], + targets: &["state", "picking_type_code", "scheduled_date", "move_ids", "move_ids.forecast_availability", "move_ids.forecast_expected_date"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "move_line_ids", - "picking_type_id.use_create_lots", - "picking_type_id.use_existing_lots", - "state", - ], + targets: &["move_line_ids", "picking_type_id.use_create_lots", "picking_type_id.use_existing_lots", "state"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -9449,24 +9268,11 @@ pub const EXT_STOCK_PICKING: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "move_line_ids", - "move_line_ids.result_package_id", - "move_line_ids.product_uom_id", - "move_line_ids.quantity", - ], + targets: &["move_line_ids", "move_line_ids.result_package_id", "move_line_ids.product_uom_id", "move_line_ids.quantity"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "move_line_ids.result_package_id", - "move_line_ids.result_package_id.package_type_id", - "move_line_ids.result_package_id.shipping_weight", - "move_line_ids.result_package_id.outermost_package_id", - "move_line_ids.result_package_id.outermost_package_id.package_type_id", - "move_line_ids.result_package_id.outermost_package_id.shipping_weight", - "weight_bulk", - ], + targets: &["move_line_ids.result_package_id", "move_line_ids.result_package_id.package_type_id", "move_line_ids.result_package_id.shipping_weight", "move_line_ids.result_package_id.outermost_package_id", "move_line_ids.result_package_id.outermost_package_id.package_type_id", "move_line_ids.result_package_id.outermost_package_id.shipping_weight", "weight_bulk"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -9542,47 +9348,29 @@ pub const EXT_STOCK_PICKING: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { - name: "draft", - semantic: OdooStateSemantic::Draft, - }, - OdooState { - name: "waiting", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "confirmed", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "assigned", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "done", - semantic: OdooStateSemantic::Completed, - }, - OdooState { - name: "cancel", - semantic: OdooStateSemantic::Cancelled, - }, - ], - transitions: &[], - }), - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Reference must be unique per company!", - source_method: None, - }], + state_field: "state", + states: &[ + OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, + OdooState { name: "waiting", semantic: OdooStateSemantic::Active }, + OdooState { name: "confirmed", semantic: OdooStateSemantic::Active }, + OdooState { name: "assigned", semantic: OdooStateSemantic::Active }, + OdooState { name: "done", semantic: OdooStateSemantic::Completed }, + OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, + ], + transitions: &[ + ], + }), + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Reference must be unique per company!", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_picking.py", - line_range: (538, 2148), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_picking.py", line_range: (538, 2148) }], confidence: OdooConfidence::Extracted, regulation_iri: &["ogit:regulation/de/ustg/13"], }, @@ -10368,13 +10156,7 @@ pub const EXT_STOCK_QUANT: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiOnchange, - targets: &[ - "location_id", - "product_id", - "lot_id", - "package_id", - "owner_id", - ], + targets: &["location_id", "product_id", "lot_id", "package_id", "owner_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiOnchange, @@ -10454,10 +10236,7 @@ pub const EXT_STOCK_QUANT: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_quant.py", - line_range: (19, 1563), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_quant.py", line_range: (19, 1563) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10496,22 +10275,25 @@ pub const EXT_STOCK_REFERENCE: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[OdooMethod { - name: "_compute_picking_ids", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], - decorators: &[], + methods: &[ + OdooMethod { + name: "_compute_picking_ids", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], + decorators: &[ + + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_reference.py", - line_range: (4, 15), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_reference.py", line_range: (4, 15) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10555,19 +10337,20 @@ pub const EXT_STOCK_REPLENISH_MIXIN: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id", "product_tmpl_id"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["product_id", "product_tmpl_id"], + }, + ], state_machine: None, - constraints: &[], + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_replenish_mixin.py", - line_range: (7, 40), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_replenish_mixin.py", line_range: (7, 40) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -10984,14 +10767,7 @@ pub const EXT_STOCK_RULE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "action", - "location_dest_id", - "location_src_id", - "picking_type_id", - "procure_method", - "location_dest_from_rule", - ], + targets: &["action", "location_dest_id", "location_src_id", "picking_type_id", "procure_method", "location_dest_from_rule"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -11051,18 +10827,17 @@ pub const EXT_STOCK_RULE: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "Python constraint on company_id", - source_method: Some("_check_company_consistency"), - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "Python constraint on company_id", + source_method: Some("_check_company_consistency"), + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_rule.py", - line_range: (42, 747), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_rule.py", line_range: (42, 747) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11346,13 +11121,7 @@ pub const EXT_STOCK_SCRAP: OdooEntity = OdooEntity { decorators: &[ OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "product_id", - "product_id.uom_id", - "product_id.uom_ids", - "product_id.seller_ids", - "product_id.seller_ids.product_uom_id", - ], + targets: &["product_id", "product_id.uom_id", "product_id.uom_ids", "product_id.seller_ids", "product_id.seller_ids.product_uom_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -11376,27 +11145,21 @@ pub const EXT_STOCK_SCRAP: OdooEntity = OdooEntity { }, ], state_machine: Some(&OdooStateMachine { - state_field: "state", - states: &[ - OdooState { - name: "draft", - semantic: OdooStateSemantic::Draft, - }, - OdooState { - name: "done", - semantic: OdooStateSemantic::Completed, - }, - ], - transitions: &[], - }), - constraints: &[], + state_field: "state", + states: &[ + OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, + OdooState { name: "done", semantic: OdooStateSemantic::Completed }, + ], + transitions: &[ + ], + }), + constraints: &[ + + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_scrap.py", - line_range: (10, 234), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_scrap.py", line_range: (10, 234) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11435,21 +11198,24 @@ pub const EXT_STOCK_SCRAP_REASON_TAG: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Tag name already exists!", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Tag name already exists!", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_scrap.py", - line_range: (237, 249), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_scrap.py", line_range: (237, 249) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11568,23 +11334,24 @@ pub const EXT_STOCK_STORAGE_CATEGORY: OdooEntity = OdooEntity { triggers: &[], }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["capacity_ids"], - }], + decorators: &[ + OdooDecorator { + kind: OdooDecoratorKind::ApiDepends, + targets: &["capacity_ids"], + }, + ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "Max weight should be a positive number.", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Sql, + condition: "Max weight should be a positive number.", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_storage_category.py", - line_range: (7, 45), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_storage_category.py", line_range: (7, 45) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -11650,8 +11417,12 @@ pub const EXT_STOCK_STORAGE_CATEGORY_CAPACITY: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Other, }, ], - methods: &[], - decorators: &[], + methods: &[ + + ], + decorators: &[ + + ], state_machine: None, constraints: &[ OdooConstraint { @@ -11673,10 +11444,7 @@ pub const EXT_STOCK_STORAGE_CATEGORY_CAPACITY: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_storage_category.py", - line_range: (48, 75), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_storage_category.py", line_range: (48, 75) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, @@ -12244,11 +12012,9 @@ pub const EXT_STOCK_WAREHOUSE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/stock/models/stock_warehouse.py", - line_range: (23, 1162), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/stock/models/stock_warehouse.py", line_range: (23, 1162) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; + diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/uom.rs b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/uom.rs index 3227d6d2..709eca8f 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/extracted/uom.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/extracted/uom.rs @@ -196,11 +196,7 @@ pub const EXT_UOM_UOM: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "relative_factor", - "relative_uom_id", - "relative_uom_id.factor", - ], + targets: &["relative_factor", "relative_uom_id", "relative_uom_id.factor"], }, OdooDecorator { kind: OdooDecoratorKind::ApiOnchange, @@ -231,11 +227,9 @@ pub const EXT_UOM_UOM: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "", l_doc_lines: (0, 0), - odoo_source: &[OdooSourceRef { - path: "odoo/addons/uom/models/uom_uom.py", - line_range: (17, 230), - }], + odoo_source: &[OdooSourceRef { path: "odoo/addons/uom/models/uom_uom.py", line_range: (17, 230) }], confidence: OdooConfidence::Extracted, regulation_iri: &[], }, }; + diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l1.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l1.rs index bb1643ea..6093d2a2 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l1.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l1.rs @@ -17,49 +17,30 @@ use super::{ const MOVE_SM: OdooStateMachine = OdooStateMachine { state_field: "state", states: &[ - OdooState { - name: "draft", - semantic: OdooStateSemantic::Draft, - }, - OdooState { - name: "posted", - semantic: OdooStateSemantic::Posted, - }, - OdooState { - name: "cancel", - semantic: OdooStateSemantic::Cancelled, - }, + OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, + OdooState { name: "posted", semantic: OdooStateSemantic::Posted }, + OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, ], transitions: &[ OdooTransition { - from: "draft", - to: "posted", - trigger: "action_post", + from: "draft", to: "posted", trigger: "action_post", guards: &["_check_balanced", "_check_lock_date", "_check_draftable"], }, OdooTransition { - from: "posted", - to: "draft", - trigger: "button_draft", + from: "posted", to: "draft", trigger: "button_draft", guards: &["_check_draftable"], }, OdooTransition { - from: "posted", - to: "cancel", - trigger: "button_cancel", + from: "posted", to: "cancel", trigger: "button_cancel", guards: &["_check_draftable"], }, OdooTransition { - from: "draft", - to: "cancel", - trigger: "button_cancel", + from: "draft", to: "cancel", trigger: "button_cancel", guards: &[], }, // GoBD Storno: posted → new posted reversal; original row untouched. OdooTransition { - from: "posted", - to: "posted", - trigger: "_reverse_moves", + from: "posted", to: "posted", trigger: "_reverse_moves", guards: &["_can_be_unlinked"], }, ], @@ -73,411 +54,169 @@ pub const ACCOUNT_MOVE: OdooEntity = OdooEntity { description: "Double-entry journal entry / invoice; draft→posted→cancel state machine, \ Belegnummer sequence, GoBD K11 inalterability hash chain, storno logic.", fields: &[ - OdooField { - name: "state", - kind: OdooFieldKind::Selection, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Status, - }, + OdooField { name: "state", + kind: OdooFieldKind::Selection, target: None, required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, // Belegnummer; computed by _compute_name; frozen once posted_before=True. - OdooField { - name: "name", - kind: OdooFieldKind::Char, - target: None, - required: false, + OdooField { name: "name", + kind: OdooFieldKind::Char, target: None, required: false, computed: Some("_compute_name"), depends: &["state", "journal_id", "date", "posted_before"], - semantic_role: OdooSemanticRole::Identity, - }, + semantic_role: OdooSemanticRole::Identity }, // Set True by _post(); never reset — freezes Belegnummer permanently. - OdooField { - name: "posted_before", - kind: OdooFieldKind::Boolean, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Audit, - }, - OdooField { - name: "move_type", - kind: OdooFieldKind::Selection, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, - OdooField { - name: "journal_id", - kind: OdooFieldKind::Many2one, - target: Some("account.journal"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "company_id", - kind: OdooFieldKind::Many2one, - target: Some("res.company"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "partner_id", - kind: OdooFieldKind::Many2one, - target: Some("res.partner"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "posted_before", + kind: OdooFieldKind::Boolean, target: None, required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Audit }, + OdooField { name: "move_type", + kind: OdooFieldKind::Selection, target: None, required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { name: "journal_id", + kind: OdooFieldKind::Many2one, target: Some("account.journal"), required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "company_id", + kind: OdooFieldKind::Many2one, target: Some("res.company"), required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "partner_id", + kind: OdooFieldKind::Many2one, target: Some("res.partner"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, // Auto-advanced by _post() when falling inside a locked period (lock-date heuristic). - OdooField { - name: "date", - kind: OdooFieldKind::Date, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Date, - }, - OdooField { - name: "invoice_date", - kind: OdooFieldKind::Date, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Date, - }, + OdooField { name: "date", + kind: OdooFieldKind::Date, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Date }, + OdooField { name: "invoice_date", + kind: OdooFieldKind::Date, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Date }, // Flipped to 'at_date' by _post(soft=True) for future-dated moves. // Values: no, at_date, monthly, quarterly, yearly. - OdooField { - name: "auto_post", - kind: OdooFieldKind::Selection, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, - OdooField { - name: "auto_post_until", - kind: OdooFieldKind::Date, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, - OdooField { - name: "auto_post_origin_id", - kind: OdooFieldKind::Many2one, - target: Some("account.move"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "reversed_entry_id", - kind: OdooFieldKind::Many2one, - target: Some("account.move"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "reversal_move_id", - kind: OdooFieldKind::One2many, - target: Some("account.move"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "auto_post", + kind: OdooFieldKind::Selection, target: None, required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { name: "auto_post_until", + kind: OdooFieldKind::Date, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { name: "auto_post_origin_id", + kind: OdooFieldKind::Many2one, target: Some("account.move"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "reversed_entry_id", + kind: OdooFieldKind::Many2one, target: Some("account.move"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "reversal_move_id", + kind: OdooFieldKind::One2many, target: Some("account.move"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, // K11 Festschreibung: "$4$". Once set → immutable; must be reversed. - OdooField { - name: "inalterable_hash", - kind: OdooFieldKind::Char, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Audit, - }, - OdooField { - name: "sequence_prefix", - kind: OdooFieldKind::Char, - target: None, - required: false, - computed: Some("_compute_name"), - depends: &["name"], - semantic_role: OdooSemanticRole::Identity, - }, - OdooField { - name: "sequence_number", - kind: OdooFieldKind::Integer, - target: None, - required: false, - computed: Some("_compute_name"), - depends: &["name"], - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "line_ids", - kind: OdooFieldKind::One2many, - target: Some("account.move.line"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Document, - }, - OdooField { - name: "currency_id", - kind: OdooFieldKind::Many2one, - target: Some("res.currency"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "invoice_currency_rate", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "amount_total", - kind: OdooFieldKind::Monetary, - target: None, - required: false, + OdooField { name: "inalterable_hash", + kind: OdooFieldKind::Char, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Audit }, + OdooField { name: "sequence_prefix", + kind: OdooFieldKind::Char, target: None, required: false, + computed: Some("_compute_name"), depends: &["name"], + semantic_role: OdooSemanticRole::Identity }, + OdooField { name: "sequence_number", + kind: OdooFieldKind::Integer, target: None, required: false, + computed: Some("_compute_name"), depends: &["name"], + semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "line_ids", + kind: OdooFieldKind::One2many, target: Some("account.move.line"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Document }, + OdooField { name: "currency_id", + kind: OdooFieldKind::Many2one, target: Some("res.currency"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Money }, + OdooField { name: "invoice_currency_rate", + kind: OdooFieldKind::Float, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Money }, + OdooField { name: "amount_total", + kind: OdooFieldKind::Monetary, target: None, required: false, computed: Some("_compute_amount"), depends: &["line_ids.price_subtotal", "line_ids.tax_ids"], - semantic_role: OdooSemanticRole::Money, - }, + semantic_role: OdooSemanticRole::Money }, // l10n_de: auto-filled to invoice_date before _post() for German sale docs (§14 UStG). - OdooField { - name: "delivery_date", - kind: OdooFieldKind::Date, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Date, - }, - OdooField { - name: "fiscal_position_id", - kind: OdooFieldKind::Many2one, - target: Some("account.fiscal.position"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Tax, - }, - OdooField { - name: "partner_bank_id", - kind: OdooFieldKind::Many2one, - target: Some("res.partner.bank"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "delivery_date", + kind: OdooFieldKind::Date, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Date }, + OdooField { name: "fiscal_position_id", + kind: OdooFieldKind::Many2one, target: Some("account.fiscal.position"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Tax }, + OdooField { name: "partner_bank_id", + kind: OdooFieldKind::Many2one, target: Some("res.partner.bank"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, ], methods: &[ // Core posting flow: validate, lock-date advance, sequence, state write, reconcile. - OdooMethod { - name: "_post", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Recordset, - triggers: &[], - }, - OdooMethod { - name: "action_post", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Action, - triggers: &["action_post"], - }, - OdooMethod { - name: "button_draft", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, - triggers: &["button_draft"], - }, - OdooMethod { - name: "button_cancel", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, - triggers: &["button_cancel"], - }, + OdooMethod { name: "_post", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Recordset, triggers: &[] }, + OdooMethod { name: "action_post", + kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Action, + triggers: &["action_post"] }, + OdooMethod { name: "button_draft", + kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Unit, + triggers: &["button_draft"] }, + OdooMethod { name: "button_cancel", + kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Unit, + triggers: &["button_cancel"] }, // K11 user lock button → _hash_moves(force_hash=True). - OdooMethod { - name: "button_hash", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "button_hash", + kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Unit, triggers: &[] }, // GoBD Storno: copy + negate balance/amount_currency; two audit rows kept. - OdooMethod { - name: "_reverse_moves", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Recordset, - triggers: &["_reverse_moves"], - }, + OdooMethod { name: "_reverse_moves", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Recordset, + triggers: &["_reverse_moves"] }, // Context-manager; SQL HAVING ROUND(SUM(balance), decimal_places) != 0. - OdooMethod { - name: "_check_balanced", - kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_get_unbalanced_moves", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Recordset, - triggers: &[], - }, + OdooMethod { name: "_check_balanced", + kind: OdooMethodKind::Constrain, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_get_unbalanced_moves", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Recordset, triggers: &[] }, // posted_before=True freezes name; never resets previously-posted Belegnummer. - OdooMethod { - name: "_compute_name", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_set_next_sequence", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "_compute_name", + kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_set_next_sequence", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, // Gap-prevention: SAVEPOINT loop + UPDATE + UniqueViolation retry. - OdooMethod { - name: "_locked_increment", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "_locked_increment", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, // Detects periodicity: year_range_month→monthly→year_range→yearly→fixed. - OdooMethod { - name: "_deduce_sequence_number_reset", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, - OdooMethod { - name: "_get_last_sequence_domain", - kind: OdooMethodKind::Override, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, - OdooMethod { - name: "_get_last_sequence", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Record, - triggers: &[], - }, - OdooMethod { - name: "_get_starting_sequence", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, + OdooMethod { name: "_deduce_sequence_number_reset", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { name: "_get_last_sequence_domain", + kind: OdooMethodKind::Override, return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { name: "_get_last_sequence", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Record, triggers: &[] }, + OdooMethod { name: "_get_starting_sequence", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, // K11: SHA-256 chain per (journal_id, sequence_prefix). // Input includes name/date/journal_id/company_id + per-line fields. // Stored as "$4$"; raw hex used for chaining (version stripped). - OdooMethod { - name: "_calculate_hashes", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, - OdooMethod { - name: "_hash_moves", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "_calculate_hashes", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { name: "_hash_moves", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, // Groups by (journal_id, sequence_prefix); raises on sequence gap. - OdooMethod { - name: "_get_chains_to_hash", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, + OdooMethod { name: "_get_chains_to_hash", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, // Returns ["name","date","journal_id","company_id"] for hash_version >= 2. - OdooMethod { - name: "_get_integrity_hash_fields", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, + OdooMethod { name: "_get_integrity_hash_fields", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, // False if inalterable_hash set, or date ≤ fiscal_lock_date, or CABA/FX entry. - OdooMethod { - name: "_can_be_unlinked", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Boolean, - triggers: &[], - }, + OdooMethod { name: "_can_be_unlinked", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Boolean, triggers: &[] }, // Guards button_draft: blocks exchange-diff, CABA, and hashed entries. - OdooMethod { - name: "_check_draftable", - kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_get_violated_lock_dates", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, + OdooMethod { name: "_check_draftable", + kind: OdooMethodKind::Constrain, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_get_violated_lock_dates", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, // Returns next open accounting date after a locked period. - OdooMethod { - name: "_get_accounting_date", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Date, - triggers: &[], - }, + OdooMethod { name: "_get_accounting_date", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Date, triggers: &[] }, // Axis-2 HEURISTIC: wizard after 3+ consecutive unmodified bills from same partner. - OdooMethod { - name: "_show_autopost_bills_wizard", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Action, - triggers: &[], - }, + OdooMethod { name: "_show_autopost_bills_wizard", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Action, triggers: &[] }, // auto_post=monthly/quarterly/yearly → copy for next period after posting. - OdooMethod { - name: "_copy_recurring_entries", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Recordset, - triggers: &[], - }, - OdooMethod { - name: "_affect_tax_report", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Boolean, - triggers: &[], - }, + OdooMethod { name: "_copy_recurring_entries", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Recordset, triggers: &[] }, + OdooMethod { name: "_affect_tax_report", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Boolean, triggers: &[] }, // Raises ValidationError if posted_before AND name set. - OdooMethod { - name: "action_switch_move_type", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "action_switch_move_type", + kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Unit, triggers: &[] }, ], decorators: &[ OdooDecorator { @@ -504,8 +243,7 @@ pub const ACCOUNT_MOVE: OdooEntity = OdooEntity { }, OdooConstraint { kind: OdooConstraintKind::Sql, - condition: - "UNIQUE(journal_id, sequence_prefix, sequence_number) — gap-free Belegnummer", + condition: "UNIQUE(journal_id, sequence_prefix, sequence_number) — gap-free Belegnummer", source_method: None, }, OdooConstraint { @@ -532,299 +270,120 @@ pub const ACCOUNT_MOVE_LINE: OdooEntity = OdooEntity { amount_currency for FX; subject to off-balance, payable/receivable, \ CABA, matching-number, and deductibility constraints.", fields: &[ - OdooField { - name: "move_id", - kind: OdooFieldKind::Many2one, - target: Some("account.move"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "account_id", - kind: OdooFieldKind::Many2one, - target: Some("account.account"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "move_id", + kind: OdooFieldKind::Many2one, target: Some("account.move"), required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "account_id", + kind: OdooFieldKind::Many2one, target: Some("account.account"), required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, // Company-currency balance; >0 = debit, <0 = credit (non-storno). // Journal entries: last line auto-balanced to negative sum of others. - OdooField { - name: "balance", - kind: OdooFieldKind::Monetary, - target: None, - required: false, + OdooField { name: "balance", + kind: OdooFieldKind::Monetary, target: None, required: false, computed: Some("_compute_balance"), - depends: &[ - "price_unit", - "quantity", - "discount", - "tax_ids", - "currency_id", - "move_id.move_type", - ], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "debit", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_compute_debit_credit"), - depends: &["balance", "is_storno"], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "credit", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_compute_debit_credit"), - depends: &["balance", "is_storno"], - semantic_role: OdooSemanticRole::Money, - }, + depends: &["price_unit", "quantity", "discount", "tax_ids", + "currency_id", "move_id.move_type"], + semantic_role: OdooSemanticRole::Money }, + OdooField { name: "debit", + kind: OdooFieldKind::Monetary, target: None, required: false, + computed: Some("_compute_debit_credit"), depends: &["balance", "is_storno"], + semantic_role: OdooSemanticRole::Money }, + OdooField { name: "credit", + kind: OdooFieldKind::Monetary, target: None, required: false, + computed: Some("_compute_debit_credit"), depends: &["balance", "is_storno"], + semantic_role: OdooSemanticRole::Money }, // FX balance: currency_id.round(balance * currency_rate); equals balance when same ccy. - OdooField { - name: "amount_currency", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_compute_amount_currency"), - depends: &["currency_rate", "balance"], - semantic_role: OdooSemanticRole::Money, - }, + OdooField { name: "amount_currency", + kind: OdooFieldKind::Monetary, target: None, required: false, + computed: Some("_compute_amount_currency"), depends: &["currency_rate", "balance"], + semantic_role: OdooSemanticRole::Money }, // Invoices: header invoice_currency_rate. Journal entries: live rate at move date. - OdooField { - name: "currency_rate", - kind: OdooFieldKind::Float, - target: None, - required: false, + OdooField { name: "currency_rate", + kind: OdooFieldKind::Float, target: None, required: false, computed: Some("_compute_currency_rate"), - depends: &[ - "currency_id", - "company_id", - "move_id.invoice_currency_rate", - "move_id.date", - ], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "currency_id", - kind: OdooFieldKind::Many2one, - target: Some("res.currency"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "company_id", - kind: OdooFieldKind::Many2one, - target: Some("res.company"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "partner_id", - kind: OdooFieldKind::Many2one, - target: Some("res.partner"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "tax_ids", - kind: OdooFieldKind::Many2many, - target: Some("account.tax"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Tax, - }, + depends: &["currency_id", "company_id", + "move_id.invoice_currency_rate", "move_id.date"], + semantic_role: OdooSemanticRole::Money }, + OdooField { name: "currency_id", + kind: OdooFieldKind::Many2one, target: Some("res.currency"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Money }, + OdooField { name: "company_id", + kind: OdooFieldKind::Many2one, target: Some("res.company"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "partner_id", + kind: OdooFieldKind::Many2one, target: Some("res.partner"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "tax_ids", + kind: OdooFieldKind::Many2many, target: Some("account.tax"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Tax }, // Non-null on tax lines generated by _sync_tax_lines(); null on base lines. - OdooField { - name: "tax_line_id", - kind: OdooFieldKind::Many2one, - target: Some("account.tax"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Tax, - }, + OdooField { name: "tax_line_id", + kind: OdooFieldKind::Many2one, target: Some("account.tax"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Tax }, // Storno flag: flips debit/credit sign presentation (German accounting). - OdooField { - name: "is_storno", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, + OdooField { name: "is_storno", + kind: OdooFieldKind::Boolean, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, // Values: line_section, line_subsection, line_note, tax, non_deductible_tax, // payment_term, cogs, product, '' (normal). - OdooField { - name: "display_type", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Status, - }, + OdooField { name: "display_type", + kind: OdooFieldKind::Selection, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, // Format: ^((P?\d+)|(I.+))$. 'I'=import temp; 'P'=partial; numeric=full reconcile. - OdooField { - name: "matching_number", - kind: OdooFieldKind::Char, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Identity, - }, - OdooField { - name: "full_reconcile_id", - kind: OdooFieldKind::Many2one, - target: Some("account.full.reconcile"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "matching_number", + kind: OdooFieldKind::Char, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, + OdooField { name: "full_reconcile_id", + kind: OdooFieldKind::Many2one, target: Some("account.full.reconcile"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, // [0, 100]; non-purchase docs must equal 100. - OdooField { - name: "deductible_amount", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Tax, - }, + OdooField { name: "deductible_amount", + kind: OdooFieldKind::Float, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Tax }, // K11 hash fields (version >= 2): name included in _get_integrity_hash_fields. - OdooField { - name: "name", - kind: OdooFieldKind::Char, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Document, - }, - OdooField { - name: "price_unit", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "quantity", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Quantity, - }, + OdooField { name: "name", + kind: OdooFieldKind::Char, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Document }, + OdooField { name: "price_unit", + kind: OdooFieldKind::Monetary, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Money }, + OdooField { name: "quantity", + kind: OdooFieldKind::Float, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, ], methods: &[ - OdooMethod { - name: "_compute_balance", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_debit_credit", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_amount_currency", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_currency_rate", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "_compute_balance", + kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_debit_credit", + kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_amount_currency", + kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_currency_rate", + kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, // Called explicitly from _post(), not via decorator. Validates account active, // currency consistency, journal default/suspense account exemption. - OdooMethod { - name: "_check_constrains_account_id_journal_id", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_check_off_balance", - kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_check_payable_receivable", - kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_check_caba_non_caba_shared_tags", - kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_constrains_matching_number", - kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_constrains_deductible_amount", - kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "_check_constrains_account_id_journal_id", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_check_off_balance", + kind: OdooMethodKind::Constrain, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_check_payable_receivable", + kind: OdooMethodKind::Constrain, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_check_caba_non_caba_shared_tags", + kind: OdooMethodKind::Constrain, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_constrains_matching_number", + kind: OdooMethodKind::Constrain, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_constrains_deductible_amount", + kind: OdooMethodKind::Constrain, return_kind: OdooReturnKind::Unit, triggers: &[] }, // K11 hash fields: ["name","debit","credit","account_id","partner_id"] (version >= 2). - OdooMethod { - name: "_get_integrity_hash_fields", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, + OdooMethod { name: "_get_integrity_hash_fields", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, // Tax priority: product.taxes_id → account_id.tax_ids → fiscal_position.map_tax(). - OdooMethod { - name: "_get_computed_taxes", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Recordset, - triggers: &[], - }, - OdooMethod { - name: "_create_analytic_lines", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "remove_move_reconcile", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "_get_computed_taxes", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Recordset, triggers: &[] }, + OdooMethod { name: "_create_analytic_lines", + kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "remove_move_reconcile", + kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Unit, triggers: &[] }, ], decorators: &[ OdooDecorator { @@ -837,12 +396,8 @@ pub const ACCOUNT_MOVE_LINE: OdooEntity = OdooEntity { }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "currency_id", - "company_id", - "move_id.invoice_currency_rate", - "move_id.date", - ], + targets: &["currency_id", "company_id", + "move_id.invoice_currency_rate", "move_id.date"], }, OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, @@ -907,85 +462,37 @@ pub const ACCOUNT_JOURNAL: OdooEntity = OdooEntity { sequence_override_regex, and the (journal_id, sequence_prefix) \ K11 hash-chain anchor.", fields: &[ - OdooField { - name: "name", - kind: OdooFieldKind::Char, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Identity, - }, + OdooField { name: "name", + kind: OdooFieldKind::Char, target: None, required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, // Used as prefix in starting sequence (e.g. "INV/2024/00000"). - OdooField { - name: "code", - kind: OdooFieldKind::Char, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Identity, - }, + OdooField { name: "code", + kind: OdooFieldKind::Char, target: None, required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, // Values: sale, purchase, bank, cash, general. // Determines default sequence format: sale/bank/cash = annual; other = monthly. - OdooField { - name: "type", - kind: OdooFieldKind::Selection, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, + OdooField { name: "type", + kind: OdooFieldKind::Selection, target: None, required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, // Archived journal blocks _post() with "archived journal" validation error. - OdooField { - name: "active", - kind: OdooFieldKind::Boolean, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Status, - }, - OdooField { - name: "company_id", - kind: OdooFieldKind::Many2one, - target: Some("res.company"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "active", + kind: OdooFieldKind::Boolean, target: None, required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, + OdooField { name: "company_id", + kind: OdooFieldKind::Many2one, target: Some("res.company"), required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, // Overrides sequence_mixin's default regex table; checked first in // _get_last_sequence_domain before built-in patterns. - OdooField { - name: "sequence_override_regex", - kind: OdooFieldKind::Char, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, + OdooField { name: "sequence_override_regex", + kind: OdooFieldKind::Char, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, // Lines on default_account_id or suspense_account_id bypass account constraint. - OdooField { - name: "default_account_id", - kind: OdooFieldKind::Many2one, - target: Some("account.account"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "suspense_account_id", - kind: OdooFieldKind::Many2one, - target: Some("account.account"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "default_account_id", + kind: OdooFieldKind::Many2one, target: Some("account.account"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "suspense_account_id", + kind: OdooFieldKind::Many2one, target: Some("account.account"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, ], methods: &[], decorators: &[], diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l10.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l10.rs index 185281e9..2e75fd00 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l10.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l10.rs @@ -704,26 +704,14 @@ mod tests { let model = &ANALYTIC_DISTRIBUTION_MODEL; assert_eq!(model.model_name, "account.analytic.distribution.model"); // analytic_distribution is Char (nearest to fields.Json) with Policy role - let dist = model - .fields - .iter() - .find(|f| f.name == "analytic_distribution") - .unwrap(); + let dist = model.fields.iter().find(|f| f.name == "analytic_distribution").unwrap(); assert_eq!(dist.kind, OdooFieldKind::Char); assert_eq!(dist.semantic_role, OdooSemanticRole::Policy); // account_prefix is Policy (pattern-matching criterion) - let prefix = model - .fields - .iter() - .find(|f| f.name == "account_prefix") - .unwrap(); + let prefix = model.fields.iter().find(|f| f.name == "account_prefix").unwrap(); assert_eq!(prefix.semantic_role, OdooSemanticRole::Policy); // _get_distribution is the AXIS-B delegation point - let get_dist = model - .methods - .iter() - .find(|m| m.name == "_get_distribution") - .unwrap(); + let get_dist = model.methods.iter().find(|m| m.name == "_get_distribution").unwrap(); assert_eq!(get_dist.kind, OdooMethodKind::ApiModel); } @@ -753,10 +741,7 @@ mod tests { assert!(line.methods.iter().any(|m| m.name == "create")); assert!(line.methods.iter().any(|m| m.name == "write")); assert!(line.methods.iter().any(|m| m.name == "unlink")); - assert!(line - .methods - .iter() - .any(|m| m.name == "_get_distribution_key")); + assert!(line.methods.iter().any(|m| m.name == "_get_distribution_key")); } #[test] @@ -768,11 +753,8 @@ mod tests { "{} should be Curated", entity.model_name, ); - assert_eq!( - entity.provenance.l_doc, "L10-ANALYTIC.md", - "{} must reference L10-ANALYTIC.md", - entity.model_name - ); + assert_eq!(entity.provenance.l_doc, "L10-ANALYTIC.md", + "{} must reference L10-ANALYTIC.md", entity.model_name); } } } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l11.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l11.rs index 0e7d1a7c..9e2929ce 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l11.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l11.rs @@ -298,12 +298,14 @@ pub const ACCOUNT_ACCOUNT_TAG: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Status, }, ], - methods: &[OdooMethod { - name: "_compute_balance_negate", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }], + methods: &[ + OdooMethod { + name: "_compute_balance_negate", + kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, + triggers: &[], + }, + ], decorators: &[OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["name"], @@ -719,7 +721,8 @@ mod tests { fn all_entities_cite_l11_doc() { for entity in ENTITIES { assert_eq!( - entity.provenance.l_doc, "L11-COA-JOURNALS-LOCKDATES.md", + entity.provenance.l_doc, + "L11-COA-JOURNALS-LOCKDATES.md", "{} must reference L11-COA-JOURNALS-LOCKDATES.md", entity.model_name, ); @@ -736,11 +739,7 @@ mod tests { fn account_account_type_is_policy() { let acc = &ACCOUNT_ACCOUNT; assert_eq!(acc.model_name, "account.account"); - let t = acc - .fields - .iter() - .find(|f| f.name == "account_type") - .unwrap(); + let t = acc.fields.iter().find(|f| f.name == "account_type").unwrap(); assert_eq!(t.kind, OdooFieldKind::Selection); assert_eq!(t.semantic_role, OdooSemanticRole::Policy); } @@ -770,14 +769,15 @@ mod tests { "hard_lock_date", ]; for name in lock_fields { - let f = co - .fields - .iter() - .find(|f| f.name == name) - .unwrap_or_else(|| { - panic!("lock-date field '{}' missing on res.company entity", name) - }); - assert_eq!(f.kind, OdooFieldKind::Date, "field '{}' must be Date", name); + let f = co.fields.iter().find(|f| f.name == name).unwrap_or_else(|| { + panic!("lock-date field '{}' missing on res.company entity", name) + }); + assert_eq!( + f.kind, + OdooFieldKind::Date, + "field '{}' must be Date", + name + ); assert_eq!( f.semantic_role, OdooSemanticRole::Policy, @@ -820,8 +820,7 @@ mod tests { assert_eq!(f.semantic_role, OdooSemanticRole::Policy); assert!(tag.constraints.iter().any(|c| { c.kind == OdooConstraintKind::Sql - && c.condition - .contains("UNIQUE(name, applicability, country_id)") + && c.condition.contains("UNIQUE(name, applicability, country_id)") })); } } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l12.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l12.rs index 8471fd74..e7e8ead9 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l12.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l12.rs @@ -338,8 +338,7 @@ pub const RES_CURRENCY: OdooEntity = OdooEntity { pub const RES_CURRENCY_RATE: OdooEntity = OdooEntity { model_name: "res.currency.rate", kind: OdooEntityKind::Model, - description: - "One dated FX exchange rate: foreign units per 1 base currency (technical `rate`). \ + description: "One dated FX exchange rate: foreign units per 1 base currency (technical `rate`). \ Lookup uses root_id, not company_id — branches inherit root rates. \ Only root companies may have dedicated rate records (no branch-level rates). \ Company-specific rates win over global (company_id=NULL) ones.", @@ -778,10 +777,7 @@ mod tests { fn res_currency_identity() { assert_eq!(RES_CURRENCY.model_name, "res.currency"); assert_eq!(RES_CURRENCY.provenance.confidence, OdooConfidence::Curated); - assert_eq!( - RES_CURRENCY.provenance.l_doc, - "L12-MULTICOMPANY-CURRENCY.md" - ); + assert_eq!(RES_CURRENCY.provenance.l_doc, "L12-MULTICOMPANY-CURRENCY.md"); assert!(RES_CURRENCY.state_machine.is_none()); } @@ -800,14 +796,8 @@ mod tests { fn res_currency_has_three_rate_fields() { let names: Vec<&str> = RES_CURRENCY.fields.iter().map(|f| f.name).collect(); assert!(names.contains(&"rate"), "rate field must be present"); - assert!( - names.contains(&"company_rate"), - "company_rate field must be present" - ); - assert!( - names.contains(&"inverse_company_rate"), - "inverse_company_rate must be present" - ); + assert!(names.contains(&"company_rate"), "company_rate field must be present"); + assert!(names.contains(&"inverse_company_rate"), "inverse_company_rate must be present"); } #[test] @@ -834,10 +824,7 @@ mod tests { #[test] fn res_currency_rate_identity() { assert_eq!(RES_CURRENCY_RATE.model_name, "res.currency.rate"); - assert_eq!( - RES_CURRENCY_RATE.provenance.confidence, - OdooConfidence::Curated - ); + assert_eq!(RES_CURRENCY_RATE.provenance.confidence, OdooConfidence::Curated); } #[test] @@ -875,11 +862,7 @@ mod tests { #[test] fn res_company_multicompany_has_exchange_account_fields() { - let names: Vec<&str> = RES_COMPANY_MULTICOMPANY - .fields - .iter() - .map(|f| f.name) - .collect(); + let names: Vec<&str> = RES_COMPANY_MULTICOMPANY.fields.iter().map(|f| f.name).collect(); assert!( names.contains(&"income_currency_exchange_account_id"), "income exchange account must be present" @@ -955,7 +938,8 @@ mod tests { fn all_entities_reference_l12_l_doc() { for e in ENTITIES { assert_eq!( - e.provenance.l_doc, "L12-MULTICOMPANY-CURRENCY.md", + e.provenance.l_doc, + "L12-MULTICOMPANY-CURRENCY.md", "entity {} must reference L12 l_doc", e.model_name ); diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l13.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l13.rs index e30c0558..3aca4cc1 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l13.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l13.rs @@ -159,12 +159,14 @@ const STOCK_VALUATION_LAYER: OdooEntity = OdooEntity { ], decorators: &[], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - // value must equal quantity × unit_cost at currency rounding precision. - condition: "value = round(quantity × unit_cost, currency.decimal_places) — Decimal HALF_UP", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + // value must equal quantity × unit_cost at currency rounding precision. + condition: "value = round(quantity × unit_cost, currency.decimal_places) — Decimal HALF_UP", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "L13-STOCK-VALUATION-PROCUREMENT.md", // Specced from SVL interface contract block + R1/R2 (lines 33-36, 85-91). @@ -254,12 +256,7 @@ pub const STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { target: None, required: false, computed: Some("_compute_qty_to_order"), - depends: &[ - "product_id", - "location_id", - "product_min_qty", - "product_max_qty", - ], + depends: &["product_id", "location_id", "product_min_qty", "product_max_qty"], // Rounded UP to replenishment_uom multiple; overridden by qty_to_order_manual. semantic_role: OdooSemanticRole::Quantity, }, @@ -387,12 +384,7 @@ pub const STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { decorators: &[ OdooDecorator { kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "product_id", - "location_id", - "product_min_qty", - "product_max_qty", - ], + targets: &["product_id", "location_id", "product_min_qty", "product_max_qty"], }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, @@ -400,11 +392,13 @@ pub const STOCK_WAREHOUSE_ORDERPOINT: OdooEntity = OdooEntity { }, ], state_machine: None, - constraints: &[OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "product_min_qty <= product_max_qty", - source_method: None, - }], + constraints: &[ + OdooConstraint { + kind: OdooConstraintKind::Python, + condition: "product_min_qty <= product_max_qty", + source_method: None, + }, + ], provenance: OdooProvenance { l_doc: "L13-STOCK-VALUATION-PROCUREMENT.md", l_doc_lines: (55, 79), @@ -854,7 +848,8 @@ mod tests { fn all_entities_cite_l13_doc() { for entity in ENTITIES { assert_eq!( - entity.provenance.l_doc, "L13-STOCK-VALUATION-PROCUREMENT.md", + entity.provenance.l_doc, + "L13-STOCK-VALUATION-PROCUREMENT.md", "entity {} must cite L13 doc", entity.model_name ); @@ -951,10 +946,7 @@ mod tests { .constraints .iter() .find(|c| c.kind == OdooConstraintKind::Sql); - assert!( - sql_c.is_some(), - "stock.lot must have a SQL unique constraint" - ); + assert!(sql_c.is_some(), "stock.lot must have a SQL unique constraint"); } #[test] diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l14.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l14.rs index 40d3778e..6394b902 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l14.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l14.rs @@ -645,11 +645,7 @@ pub const HR_JOB: OdooEntity = OdooEntity { target: None, required: false, computed: Some("_compute_employees"), - depends: &[ - "employee_ids.active", - "employee_ids.job_id", - "no_of_recruitment", - ], + depends: &["employee_ids.active", "employee_ids.job_id", "no_of_recruitment"], // = no_of_employee + no_of_recruitment (R7). semantic_role: OdooSemanticRole::Quantity, }, @@ -785,16 +781,19 @@ pub const HR_CONTRACT_TYPE: OdooEntity = OdooEntity { /// [1] `hr.department` — org unit with recursive hierarchy /// [2] `hr.job` — role / position with headcount tracking /// [3] `hr.contract.type` — employment contract-type discriminant (community stub) -pub const ENTITIES: &[OdooEntity] = &[HR_EMPLOYEE, HR_DEPARTMENT, HR_JOB, HR_CONTRACT_TYPE]; +pub const ENTITIES: &[OdooEntity] = &[ + HR_EMPLOYEE, + HR_DEPARTMENT, + HR_JOB, + HR_CONTRACT_TYPE, +]; // ─── Tests ──────────────────────────────────────────────────────────────────── #[cfg(test)] mod tests { use super::*; - use crate::odoo_blueprint::{ - OdooConfidence, OdooConstraintKind, OdooFieldKind, OdooSemanticRole, - }; + use crate::odoo_blueprint::{OdooConfidence, OdooConstraintKind, OdooFieldKind, OdooSemanticRole}; #[test] fn entities_slice_has_four_entries() { @@ -817,7 +816,8 @@ mod tests { fn all_entities_reference_l14_l_doc() { for e in ENTITIES { assert_eq!( - e.provenance.l_doc, "L14-HR-BASE.md", + e.provenance.l_doc, + "L14-HR-BASE.md", "entity {} must reference L14 l_doc", e.model_name, ); @@ -834,10 +834,7 @@ mod tests { assert!(names.contains(&"department_id"), "department_id required"); assert!(names.contains(&"job_id"), "job_id required"); assert!(names.contains(&"work_email"), "work_email required"); - assert!( - names.contains(&"identification_id"), - "identification_id required" - ); + assert!(names.contains(&"identification_id"), "identification_id required"); } #[test] @@ -928,18 +925,9 @@ mod tests { #[test] fn hr_job_headcount_fields() { let field_names: Vec<&str> = HR_JOB.fields.iter().map(|f| f.name).collect(); - assert!( - field_names.contains(&"no_of_employee"), - "no_of_employee required" - ); - assert!( - field_names.contains(&"no_of_recruitment"), - "no_of_recruitment required" - ); - assert!( - field_names.contains(&"expected_employees"), - "expected_employees required" - ); + assert!(field_names.contains(&"no_of_employee"), "no_of_employee required"); + assert!(field_names.contains(&"no_of_recruitment"), "no_of_recruitment required"); + assert!(field_names.contains(&"expected_employees"), "expected_employees required"); let emp = HR_JOB .fields .iter() diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l15.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l15.rs index 6ae988ec..b24b631a 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l15.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l15.rs @@ -288,8 +288,7 @@ const TAX_EXTENSION_DECORATORS: &[OdooDecorator] = &[ const TAX_EXTENSION_CONSTRAINTS: &[OdooConstraint] = &[ OdooConstraint { kind: OdooConstraintKind::Python, - condition: - "If tax_exigibility == 'on_payment', cash_basis_transition_account_id.reconcile \ + condition: "If tax_exigibility == 'on_payment', cash_basis_transition_account_id.reconcile \ must be True (CABA transition account must allow reconciliation). \ account_tax.py L247-255.", source_method: Some("_constrains_cash_basis_transition_account"), @@ -337,7 +336,7 @@ pub const ACCOUNT_TAX_L15: OdooEntity = OdooEntity { odoo_source: &[ OdooSourceRef { path: "addons/account/models/account_tax.py", - line_range: (163, 174), // hide_tax_exigibility + exigibility fields + line_range: (163, 174), // hide_tax_exigibility + exigibility fields }, OdooSourceRef { path: "addons/account/models/account_tax.py", @@ -397,18 +396,15 @@ mod tests { fn all_entities_reference_l15_doc() { for entity in ENTITIES { assert_eq!( - entity.provenance.l_doc, "L15-TAX-REPARTITION.md", + entity.provenance.l_doc, + "L15-TAX-REPARTITION.md", "{} references wrong L-doc", entity.model_name ); let (start, end) = entity.provenance.l_doc_lines; assert!(start > 0, "{} has zero start line", entity.model_name); assert!(end >= start, "{} has end < start", entity.model_name); - assert!( - end <= 655, - "{} references line beyond doc length", - entity.model_name - ); + assert!(end <= 655, "{} references line beyond doc length", entity.model_name); } } @@ -500,7 +496,9 @@ mod tests { .find(|e| e.model_name == "account.account.tag") .unwrap(); assert!( - tag.methods.iter().any(|m| m.name == "_get_tax_tags_domain"), + tag.methods + .iter() + .any(|m| m.name == "_get_tax_tags_domain"), "_get_tax_tags_domain must be declared (strips leading '-' from tag name)" ); } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l2.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l2.rs index 26163284..3c248f69 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l2.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l2.rs @@ -12,8 +12,8 @@ use super::{ OdooConfidence, OdooConstraint, OdooConstraintKind, OdooDecorator, OdooDecoratorKind, OdooEntity, OdooEntityKind, OdooField, OdooFieldKind, OdooMethod, OdooMethodKind, - OdooProvenance, OdooReturnKind, OdooSemanticRole, OdooSourceRef, OdooState, OdooStateMachine, - OdooStateSemantic, OdooTransition, + OdooProvenance, OdooReturnKind, OdooSemanticRole, OdooSourceRef, OdooState, + OdooStateMachine, OdooStateSemantic, OdooTransition, }; // ─── account.move.line (reconciliation fields) ─────────────────────────────── @@ -27,18 +27,9 @@ use super::{ const ACCOUNT_MOVE_LINE_SM: OdooStateMachine = OdooStateMachine { state_field: "parent_state", states: &[ - OdooState { - name: "draft", - semantic: OdooStateSemantic::Draft, - }, - OdooState { - name: "posted", - semantic: OdooStateSemantic::Posted, - }, - OdooState { - name: "cancel", - semantic: OdooStateSemantic::Cancelled, - }, + OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, + OdooState { name: "posted", semantic: OdooStateSemantic::Posted }, + OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, ], transitions: &[OdooTransition { from: "draft", @@ -527,11 +518,8 @@ pub const ACCOUNT_FULL_RECONCILE: OdooEntity = OdooEntity { /// (FLAG-4 in L2 doc, lines 871-873). /// - `account.bank.statement` / `account.bank.statement.line` — not documented /// in the L2 prose; belong in a dedicated bank-statement lane. -pub const ENTITIES: &[OdooEntity] = &[ - ACCOUNT_MOVE_LINE, - ACCOUNT_PARTIAL_RECONCILE, - ACCOUNT_FULL_RECONCILE, -]; +pub const ENTITIES: &[OdooEntity] = + &[ACCOUNT_MOVE_LINE, ACCOUNT_PARTIAL_RECONCILE, ACCOUNT_FULL_RECONCILE]; #[cfg(test)] mod tests { @@ -547,11 +535,7 @@ mod tests { fn account_move_line_residual_fields_are_computed() { let aml = &ACCOUNT_MOVE_LINE; assert_eq!(aml.model_name, "account.move.line"); - let residual = aml - .fields - .iter() - .find(|f| f.name == "amount_residual") - .unwrap(); + let residual = aml.fields.iter().find(|f| f.name == "amount_residual").unwrap(); assert_eq!(residual.computed, Some("_compute_amount_residual")); assert!(residual.depends.contains(&"matched_debit_ids")); assert_eq!(residual.kind, OdooFieldKind::Monetary); @@ -562,17 +546,9 @@ mod tests { fn account_partial_reconcile_required_fields() { let pr = &ACCOUNT_PARTIAL_RECONCILE; assert_eq!(pr.model_name, "account.partial.reconcile"); - let debit = pr - .fields - .iter() - .find(|f| f.name == "debit_move_id") - .unwrap(); + let debit = pr.fields.iter().find(|f| f.name == "debit_move_id").unwrap(); assert!(debit.required); - let credit = pr - .fields - .iter() - .find(|f| f.name == "credit_move_id") - .unwrap(); + let credit = pr.fields.iter().find(|f| f.name == "credit_move_id").unwrap(); assert!(credit.required); } @@ -594,11 +570,8 @@ mod tests { "{} should be Curated", entity.model_name ); - assert!( - !entity.provenance.odoo_source.is_empty(), - "{} must have at least one odoo_source ref", - entity.model_name - ); + assert!(!entity.provenance.odoo_source.is_empty(), + "{} must have at least one odoo_source ref", entity.model_name); } } } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l3.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l3.rs index b20bb0e8..6428db9d 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l3.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l3.rs @@ -422,13 +422,7 @@ const ACCOUNT_TAX_METHODS: &[OdooMethod] = &[ const ACCOUNT_TAX_DECORATORS: &[OdooDecorator] = &[ OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, - targets: &[ - "company_id", - "name", - "type_tax_use", - "tax_scope", - "country_id", - ], + targets: &["company_id", "name", "type_tax_use", "tax_scope", "country_id"], }, OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, @@ -1127,20 +1121,13 @@ mod tests { let (start, end) = entity.provenance.l_doc_lines; assert!(start > 0, "{} has zero start line", entity.model_name); assert!(end >= start, "{} has end < start", entity.model_name); - assert!( - end <= 1120, - "{} references line beyond doc length", - entity.model_name - ); + assert!(end <= 1120, "{} references line beyond doc length", entity.model_name); } } #[test] fn tax_exigibility_field_is_selection_with_tax_role() { - let tax_entity = ENTITIES - .iter() - .find(|e| e.model_name == "account.tax") - .unwrap(); + let tax_entity = ENTITIES.iter().find(|e| e.model_name == "account.tax").unwrap(); let exig = tax_entity .fields .iter() @@ -1179,14 +1166,8 @@ mod tests { .find(|e| e.model_name == "account.tax.group") .unwrap(); assert!(tg.fields.iter().any(|f| f.name == "tax_payable_account_id")); - assert!(tg - .fields - .iter() - .any(|f| f.name == "tax_receivable_account_id")); - assert!(tg - .fields - .iter() - .any(|f| f.name == "advance_tax_payment_account_id")); + assert!(tg.fields.iter().any(|f| f.name == "tax_receivable_account_id")); + assert!(tg.fields.iter().any(|f| f.name == "advance_tax_payment_account_id")); } #[test] diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l4.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l4.rs index fe52a7a6..9fceea5e 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l4.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l4.rs @@ -168,15 +168,17 @@ pub const ACCOUNT_ACCOUNT_DE: OdooEntity = OdooEntity { semantic_role: OdooSemanticRole::Policy, }, ], - methods: &[OdooMethod { - // l10n_de override: raises UserError if any of the four conditions - // trigger (code in vals AND DE company AND code differs AND move - // lines exist). Application-layer only — no DB constraint. - name: "write", - kind: OdooMethodKind::Override, - return_kind: OdooReturnKind::Boolean, - triggers: &[], - }], + methods: &[ + OdooMethod { + // l10n_de override: raises UserError if any of the four conditions + // trigger (code in vals AND DE company AND code differs AND move + // lines exist). Application-layer only — no DB constraint. + name: "write", + kind: OdooMethodKind::Override, + return_kind: OdooReturnKind::Boolean, + triggers: &[], + }, + ], decorators: &[], state_machine: None, constraints: &[OdooConstraint { @@ -546,14 +548,8 @@ mod tests { #[test] fn account_account_tag_identity() { assert_eq!(ACCOUNT_ACCOUNT_TAG.model_name, "account.account.tag"); - assert_eq!( - ACCOUNT_ACCOUNT_TAG.provenance.confidence, - OdooConfidence::Curated - ); - assert_eq!( - ACCOUNT_ACCOUNT_TAG.provenance.l_doc, - "L4-K8K9-REPORTS-DATEV.md" - ); + assert_eq!(ACCOUNT_ACCOUNT_TAG.provenance.confidence, OdooConfidence::Curated); + assert_eq!(ACCOUNT_ACCOUNT_TAG.provenance.l_doc, "L4-K8K9-REPORTS-DATEV.md"); // applicability field governs report-line routing vs tax-label role let applicability = ACCOUNT_ACCOUNT_TAG .fields @@ -639,7 +635,8 @@ mod tests { fn all_entities_reference_l4_l_doc() { for e in ENTITIES { assert_eq!( - e.provenance.l_doc, "L4-K8K9-REPORTS-DATEV.md", + e.provenance.l_doc, + "L4-K8K9-REPORTS-DATEV.md", "entity {} must reference L4 l_doc", e.model_name ); diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l5.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l5.rs index 2ab8c3de..07ffbd0e 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l5.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l5.rs @@ -21,8 +21,8 @@ use super::{ OdooConfidence, OdooConstraint, OdooConstraintKind, OdooDecorator, OdooDecoratorKind, OdooEntity, OdooEntityKind, OdooField, OdooFieldKind, OdooMethod, OdooMethodKind, - OdooProvenance, OdooReturnKind, OdooSemanticRole, OdooSourceRef, OdooState, OdooStateMachine, - OdooStateSemantic, OdooTransition, + OdooProvenance, OdooReturnKind, OdooSemanticRole, OdooSourceRef, OdooState, + OdooStateMachine, OdooStateSemantic, OdooTransition, }; // ─── account.payment ───────────────────────────────────────────────────────── @@ -30,26 +30,11 @@ use super::{ const PAYMENT_STATE_MACHINE: OdooStateMachine = OdooStateMachine { state_field: "state", states: &[ - OdooState { - name: "draft", - semantic: OdooStateSemantic::Draft, - }, - OdooState { - name: "in_process", - semantic: OdooStateSemantic::InProgress, - }, - OdooState { - name: "paid", - semantic: OdooStateSemantic::Completed, - }, - OdooState { - name: "canceled", - semantic: OdooStateSemantic::Cancelled, - }, - OdooState { - name: "rejected", - semantic: OdooStateSemantic::Terminal, - }, + OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, + OdooState { name: "in_process", semantic: OdooStateSemantic::InProgress }, + OdooState { name: "paid", semantic: OdooStateSemantic::Completed }, + OdooState { name: "canceled", semantic: OdooStateSemantic::Cancelled }, + OdooState { name: "rejected", semantic: OdooStateSemantic::Terminal }, ], transitions: &[ OdooTransition { @@ -188,10 +173,7 @@ pub const PAYMENT: OdooEntity = OdooEntity { target: Some("res.currency"), required: false, computed: Some("_compute_currency_id"), - depends: &[ - "journal_id.currency_id", - "journal_id.company_id.currency_id", - ], + depends: &["journal_id.currency_id", "journal_id.company_id.currency_id"], semantic_role: OdooSemanticRole::Reference, }, OdooField { @@ -1075,9 +1057,7 @@ mod tests { #[test] fn payment_state_machine_is_populated() { - let sm = PAYMENT - .state_machine - .expect("account.payment must have a state machine"); + let sm = PAYMENT.state_machine.expect("account.payment must have a state machine"); assert_eq!(sm.state_field, "state"); assert_eq!(sm.states.len(), 5); assert!(!sm.transitions.is_empty()); @@ -1087,10 +1067,7 @@ mod tests { fn payment_has_both_reconciliation_flags() { let is_reconciled = PAYMENT.fields.iter().find(|f| f.name == "is_reconciled"); let is_matched = PAYMENT.fields.iter().find(|f| f.name == "is_matched"); - assert!( - is_reconciled.is_some(), - "is_reconciled field must be present" - ); + assert!(is_reconciled.is_some(), "is_reconciled field must be present"); assert!(is_matched.is_some(), "is_matched field must be present"); } @@ -1149,7 +1126,8 @@ mod tests { fn all_entities_cite_l5_doc() { for entity in ENTITIES { assert_eq!( - entity.provenance.l_doc, "L5-PAY-TERMS-MATCH.md", + entity.provenance.l_doc, + "L5-PAY-TERMS-MATCH.md", "entity {} must cite L5 doc", entity.model_name ); diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l6.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l6.rs index 15011028..18b0187f 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l6.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l6.rs @@ -32,76 +32,42 @@ use super::{ const SALE_ORDER_SM: OdooStateMachine = OdooStateMachine { state_field: "state", states: &[ - OdooState { - name: "draft", - semantic: OdooStateSemantic::Draft, - }, - OdooState { - name: "sent", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "sale", - semantic: OdooStateSemantic::InProgress, - }, - OdooState { - name: "cancel", - semantic: OdooStateSemantic::Cancelled, - }, + OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, + OdooState { name: "sent", semantic: OdooStateSemantic::Active }, + OdooState { name: "sale", semantic: OdooStateSemantic::InProgress }, + OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, ], transitions: &[ OdooTransition { - from: "draft", - to: "sent", - trigger: "action_quotation_sent", - guards: &[], + from: "draft", to: "sent", trigger: "action_quotation_sent", guards: &[], }, OdooTransition { - from: "draft", - to: "sale", - trigger: "action_confirm", + from: "draft", to: "sale", trigger: "action_confirm", guards: &["_confirmation_error_message"], // Full flow L1166-1196: analytics validate → write state+date_order → // _action_confirm hook → optional auto-lock → optional confirm email. }, OdooTransition { - from: "sent", - to: "sale", - trigger: "action_confirm", + from: "sent", to: "sale", trigger: "action_confirm", guards: &["_confirmation_error_message"], }, OdooTransition { - from: "cancel", - to: "draft", - trigger: "action_draft", - guards: &[], + from: "cancel", to: "draft", trigger: "action_draft", guards: &[], // Also clears signature/signed_by/signed_on (L1058-1065). }, OdooTransition { - from: "sent", - to: "draft", - trigger: "action_draft", - guards: &[], + from: "sent", to: "draft", trigger: "action_draft", guards: &[], }, OdooTransition { - from: "sale", - to: "cancel", - trigger: "action_cancel", - guards: &[], + from: "sale", to: "cancel", trigger: "action_cancel", guards: &[], // Guard: raises UserError if locked; _action_cancel cancels draft invoices // first, then writes state='cancel' (L1324-1333). }, OdooTransition { - from: "draft", - to: "cancel", - trigger: "action_cancel", - guards: &[], + from: "draft", to: "cancel", trigger: "action_cancel", guards: &[], }, OdooTransition { - from: "sent", - to: "cancel", - trigger: "action_cancel", - guards: &[], + from: "sent", to: "cancel", trigger: "action_cancel", guards: &[], }, ], }; @@ -113,324 +79,110 @@ pub const SALE_ORDER: OdooEntity = OdooEntity { generates account.move via _create_invoices. \ Proposed OWL pivot: ubl:Order → SmbFoundryInvoice (0x81) → DOLCE Perdurant.", fields: &[ - OdooField { - name: "name", - kind: OdooFieldKind::Char, - target: None, - required: false, - computed: Some("_compute_name"), - depends: &[], - semantic_role: OdooSemanticRole::Identity, - }, - OdooField { - name: "state", - kind: OdooFieldKind::Selection, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Status, - }, - OdooField { - name: "locked", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, + OdooField { name: "name", kind: OdooFieldKind::Char, target: None, required: false, + computed: Some("_compute_name"), depends: &[], semantic_role: OdooSemanticRole::Identity }, + OdooField { name: "state", kind: OdooFieldKind::Selection, target: None, required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, + OdooField { name: "locked", kind: OdooFieldKind::Boolean, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy, // Replaces old 'done' state; set by action_lock. }, - OdooField { - name: "date_order", - kind: OdooFieldKind::Datetime, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Date, + OdooField { name: "date_order", kind: OdooFieldKind::Datetime, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Date, // OVERWRITTEN to now() on action_confirm (L1166). DB CHECK: non-null when state='sale'. }, - OdooField { - name: "partner_id", - kind: OdooFieldKind::Many2one, - target: Some("res.partner"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "partner_invoice_id", - kind: OdooFieldKind::Many2one, - target: Some("res.partner"), - required: true, - computed: Some("_compute_partner_invoice_id"), - depends: &["partner_id"], - semantic_role: OdooSemanticRole::Address, - }, - OdooField { - name: "partner_shipping_id", - kind: OdooFieldKind::Many2one, - target: Some("res.partner"), - required: true, - computed: Some("_compute_partner_shipping_id"), - depends: &["partner_id"], - semantic_role: OdooSemanticRole::Address, - }, - OdooField { - name: "pricelist_id", - kind: OdooFieldKind::Many2one, - target: Some("product.pricelist"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, + OdooField { name: "partner_id", kind: OdooFieldKind::Many2one, target: Some("res.partner"), + required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "partner_invoice_id", kind: OdooFieldKind::Many2one, target: Some("res.partner"), + required: true, computed: Some("_compute_partner_invoice_id"), depends: &["partner_id"], + semantic_role: OdooSemanticRole::Address }, + OdooField { name: "partner_shipping_id", kind: OdooFieldKind::Many2one, target: Some("res.partner"), + required: true, computed: Some("_compute_partner_shipping_id"), depends: &["partner_id"], + semantic_role: OdooSemanticRole::Address }, + OdooField { name: "pricelist_id", kind: OdooFieldKind::Many2one, target: Some("product.pricelist"), + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy, // Cannot change on confirmed order (write() guard L1040-1043). // Primary model: L8-PRODUCT-UOM-PRICELIST. }, - OdooField { - name: "currency_id", - kind: OdooFieldKind::Many2one, - target: Some("res.currency"), - required: false, - computed: Some("_compute_currency_id"), + OdooField { name: "currency_id", kind: OdooFieldKind::Many2one, target: Some("res.currency"), + required: false, computed: Some("_compute_currency_id"), depends: &["pricelist_id.currency_id", "company_id.currency_id"], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "order_line", - kind: OdooFieldKind::One2many, - target: Some("sale.order.line"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "invoice_ids", - kind: OdooFieldKind::Many2many, - target: Some("account.move"), - required: false, - computed: Some("_compute_invoice_ids"), + semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "order_line", kind: OdooFieldKind::One2many, target: Some("sale.order.line"), + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "invoice_ids", kind: OdooFieldKind::Many2many, target: Some("account.move"), + required: false, computed: Some("_compute_invoice_ids"), depends: &["order_line.invoice_lines.move_id"], - semantic_role: OdooSemanticRole::Document, - }, - OdooField { - name: "invoice_status", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: Some("_compute_invoice_status"), + semantic_role: OdooSemanticRole::Document }, + OdooField { name: "invoice_status", kind: OdooFieldKind::Selection, target: None, + required: false, computed: Some("_compute_invoice_status"), depends: &["state", "order_line.invoice_status"], // Values: 'upselling' | 'invoiced' | 'to invoice' | 'no'. // upselling → creates TODO activity for salesperson (L1964-1975). - semantic_role: OdooSemanticRole::Status, - }, - OdooField { - name: "amount_untaxed", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_compute_amounts"), - depends: &[ - "order_line.price_subtotal", - "currency_id", - "company_id", - "payment_term_id", - ], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "amount_tax", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_compute_amounts"), - depends: &[ - "order_line.price_subtotal", - "currency_id", - "company_id", - "payment_term_id", - ], - semantic_role: OdooSemanticRole::Tax, - }, - OdooField { - name: "amount_total", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_compute_amounts"), - depends: &[ - "order_line.price_subtotal", - "currency_id", - "company_id", - "payment_term_id", - ], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "payment_term_id", - kind: OdooFieldKind::Many2one, - target: Some("account.payment.term"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, - OdooField { - name: "fiscal_position_id", - kind: OdooFieldKind::Many2one, - target: Some("account.fiscal.position"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Tax, - }, - OdooField { - name: "user_id", - kind: OdooFieldKind::Many2one, - target: Some("res.users"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "team_id", - kind: OdooFieldKind::Many2one, - target: Some("crm.team"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "company_id", - kind: OdooFieldKind::Many2one, - target: Some("res.company"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "client_order_ref", - kind: OdooFieldKind::Char, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Identity, - }, - OdooField { - name: "note", - kind: OdooFieldKind::Html, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Document, - }, + semantic_role: OdooSemanticRole::Status }, + OdooField { name: "amount_untaxed", kind: OdooFieldKind::Monetary, target: None, + required: false, computed: Some("_compute_amounts"), + depends: &["order_line.price_subtotal", "currency_id", "company_id", "payment_term_id"], + semantic_role: OdooSemanticRole::Money }, + OdooField { name: "amount_tax", kind: OdooFieldKind::Monetary, target: None, + required: false, computed: Some("_compute_amounts"), + depends: &["order_line.price_subtotal", "currency_id", "company_id", "payment_term_id"], + semantic_role: OdooSemanticRole::Tax }, + OdooField { name: "amount_total", kind: OdooFieldKind::Monetary, target: None, + required: false, computed: Some("_compute_amounts"), + depends: &["order_line.price_subtotal", "currency_id", "company_id", "payment_term_id"], + semantic_role: OdooSemanticRole::Money }, + OdooField { name: "payment_term_id", kind: OdooFieldKind::Many2one, + target: Some("account.payment.term"), required: false, computed: None, depends: &[], + semantic_role: OdooSemanticRole::Policy }, + OdooField { name: "fiscal_position_id", kind: OdooFieldKind::Many2one, + target: Some("account.fiscal.position"), required: false, computed: None, depends: &[], + semantic_role: OdooSemanticRole::Tax }, + OdooField { name: "user_id", kind: OdooFieldKind::Many2one, target: Some("res.users"), + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "team_id", kind: OdooFieldKind::Many2one, target: Some("crm.team"), + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "company_id", kind: OdooFieldKind::Many2one, target: Some("res.company"), + required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "client_order_ref", kind: OdooFieldKind::Char, target: None, + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, + OdooField { name: "note", kind: OdooFieldKind::Html, target: None, + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Document }, ], methods: &[ - OdooMethod { - name: "action_quotation_sent", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, - triggers: &["sent"], - }, - OdooMethod { - name: "action_confirm", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Boolean, - triggers: &["sale"], - }, - OdooMethod { - name: "action_draft", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, - triggers: &["draft"], - }, - OdooMethod { - name: "action_cancel", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, - triggers: &["cancel"], - }, - OdooMethod { - name: "action_lock", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_action_cancel", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_amounts", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_invoice_status", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_prepare_invoice", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, - OdooMethod { - name: "_get_invoiceable_lines", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Recordset, - triggers: &[], - }, - OdooMethod { - name: "_create_invoices", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Recordset, - triggers: &[], - }, - OdooMethod { - name: "_confirmation_error_message", - kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Boolean, - triggers: &[], - }, - OdooMethod { - name: "_unlink_except_draft_or_cancel", - kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "action_quotation_sent", kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, triggers: &["sent"] }, + OdooMethod { name: "action_confirm", kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Boolean, triggers: &["sale"] }, + OdooMethod { name: "action_draft", kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, triggers: &["draft"] }, + OdooMethod { name: "action_cancel", kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, triggers: &["cancel"] }, + OdooMethod { name: "action_lock", kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_action_cancel", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_amounts", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_invoice_status", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_prepare_invoice", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { name: "_get_invoiceable_lines", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Recordset, triggers: &[] }, + OdooMethod { name: "_create_invoices", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Recordset, triggers: &[] }, + OdooMethod { name: "_confirmation_error_message", kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Boolean, triggers: &[] }, + OdooMethod { name: "_unlink_except_draft_or_cancel", kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Unit, triggers: &[] }, ], decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "order_line.price_subtotal", - "currency_id", - "company_id", - "payment_term_id", - ], - }, - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["state", "order_line.invoice_status"], - }, - OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["state"], - }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, + targets: &["order_line.price_subtotal", "currency_id", "company_id", "payment_term_id"] }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, + targets: &["state", "order_line.invoice_status"] }, + OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, targets: &["state"] }, ], state_machine: Some(&SALE_ORDER_SM), constraints: &[ @@ -468,314 +220,119 @@ pub const SALE_ORDER_LINE: OdooEntity = OdooEntity { partial invoicing state (qty_invoiced/qty_to_invoice/invoice_status). \ Proposed OWL pivot: ubl:OrderLine → SmbFoundryInvoice (0x81) → DOLCE Perdurant.", fields: &[ - OdooField { - name: "order_id", - kind: OdooFieldKind::Many2one, - target: Some("sale.order"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "product_id", - kind: OdooFieldKind::Many2one, - target: Some("product.product"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "name", - kind: OdooFieldKind::Char, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Identity, - }, - OdooField { - name: "product_uom_qty", - kind: OdooFieldKind::Float, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "product_uom_id", - kind: OdooFieldKind::Many2one, - target: Some("uom.uom"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "price_unit", - kind: OdooFieldKind::Float, - target: None, - required: true, - computed: Some("_compute_price_unit"), + OdooField { name: "order_id", kind: OdooFieldKind::Many2one, target: Some("sale.order"), + required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "product_id", kind: OdooFieldKind::Many2one, target: Some("product.product"), + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "name", kind: OdooFieldKind::Char, target: None, + required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, + OdooField { name: "product_uom_qty", kind: OdooFieldKind::Float, target: None, + required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "product_uom_id", kind: OdooFieldKind::Many2one, target: Some("uom.uom"), + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "price_unit", kind: OdooFieldKind::Float, target: None, + required: true, computed: Some("_compute_price_unit"), depends: &["product_id", "product_uom_id", "product_uom_qty"], // Frozen once qty_invoiced>0. Manual edit detected via technical_price_unit. - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "technical_price_unit", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, + semantic_role: OdooSemanticRole::Money }, + OdooField { name: "technical_price_unit", kind: OdooFieldKind::Float, target: None, + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Other, // Shadow field: system-computed price; diff from price_unit → manual edit. }, - OdooField { - name: "discount", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: Some("_compute_discount"), + OdooField { name: "discount", kind: OdooFieldKind::Float, target: None, + required: false, computed: Some("_compute_discount"), depends: &["product_id", "product_uom_id", "product_uom_qty"], // (base_price - pricelist_price) / base_price * 100; shows only if > 0. - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "tax_ids", - kind: OdooFieldKind::Many2many, - target: Some("account.tax"), - required: false, - computed: Some("_compute_tax_ids"), + semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "tax_ids", kind: OdooFieldKind::Many2many, target: Some("account.tax"), + required: false, computed: Some("_compute_tax_ids"), depends: &["product_id", "company_id"], // Mapped through fiscal_position; combo products → tax_ids=False. - semantic_role: OdooSemanticRole::Tax, - }, - OdooField { - name: "price_subtotal", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_compute_amount"), + semantic_role: OdooSemanticRole::Tax }, + OdooField { name: "price_subtotal", kind: OdooFieldKind::Monetary, target: None, + required: false, computed: Some("_compute_amount"), depends: &["product_uom_qty", "discount", "price_unit", "tax_ids"], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "price_total", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_compute_amount"), + semantic_role: OdooSemanticRole::Money }, + OdooField { name: "price_total", kind: OdooFieldKind::Monetary, target: None, + required: false, computed: Some("_compute_amount"), depends: &["product_uom_qty", "discount", "price_unit", "tax_ids"], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "price_tax", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: Some("_compute_amount"), + semantic_role: OdooSemanticRole::Money }, + OdooField { name: "price_tax", kind: OdooFieldKind::Float, target: None, + required: false, computed: Some("_compute_amount"), depends: &["product_uom_qty", "discount", "price_unit", "tax_ids"], - semantic_role: OdooSemanticRole::Tax, - }, - OdooField { - name: "qty_delivered", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: Some("_compute_qty_delivered"), - depends: &[], - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "qty_invoiced", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: Some("_compute_qty_invoiced"), + semantic_role: OdooSemanticRole::Tax }, + OdooField { name: "qty_delivered", kind: OdooFieldKind::Float, target: None, + required: false, computed: Some("_compute_qty_delivered"), depends: &[], + semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "qty_invoiced", kind: OdooFieldKind::Float, target: None, + required: false, computed: Some("_compute_qty_invoiced"), depends: &["invoice_lines.move_id.state", "invoice_lines.quantity"], // out_refund DECREASES this; cancelled invoices excluded; round=False. - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "qty_to_invoice", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: Some("_compute_qty_to_invoice"), + semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "qty_to_invoice", kind: OdooFieldKind::Float, target: None, + required: false, computed: Some("_compute_qty_to_invoice"), depends: &["qty_invoiced", "qty_delivered", "product_uom_qty", "state"], // invoice_policy='order': product_uom_qty - qty_invoiced. // invoice_policy='delivery': qty_delivered - qty_invoiced. 0 when state!='sale'. - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "invoice_status", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: Some("_compute_invoice_status"), - depends: &[ - "state", - "product_uom_qty", - "qty_delivered", - "qty_to_invoice", - "qty_invoiced", - ], + semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "invoice_status", kind: OdooFieldKind::Selection, target: None, + required: false, computed: Some("_compute_invoice_status"), + depends: &["state", "product_uom_qty", "qty_delivered", "qty_to_invoice", "qty_invoiced"], // Decision tree: no → invoiced → to invoice → upselling → invoiced → no. - semantic_role: OdooSemanticRole::Status, - }, - OdooField { - name: "invoice_lines", - kind: OdooFieldKind::Many2many, - target: Some("account.move.line"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Document, - }, - OdooField { - name: "is_downpayment", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, - OdooField { - name: "display_type", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - OdooField { - name: "untaxed_amount_to_invoice", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_compute_untaxed_amount_to_invoice"), - depends: &[ - "state", - "product_id", - "untaxed_amount_invoiced", - "qty_delivered", - "product_uom_qty", - "price_unit", - ], + semantic_role: OdooSemanticRole::Status }, + OdooField { name: "invoice_lines", kind: OdooFieldKind::Many2many, + target: Some("account.move.line"), required: false, computed: None, depends: &[], + semantic_role: OdooSemanticRole::Document }, + OdooField { name: "is_downpayment", kind: OdooFieldKind::Boolean, target: None, + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { name: "display_type", kind: OdooFieldKind::Selection, target: None, + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Other }, + OdooField { name: "untaxed_amount_to_invoice", kind: OdooFieldKind::Monetary, target: None, + required: false, computed: Some("_compute_untaxed_amount_to_invoice"), + depends: &["state", "product_id", "untaxed_amount_invoiced", + "qty_delivered", "product_uom_qty", "price_unit"], // Floored at max(..., 0). Handles discount drift in re-invoicing. - semantic_role: OdooSemanticRole::Money, - }, + semantic_role: OdooSemanticRole::Money }, ], methods: &[ - OdooMethod { - name: "_compute_tax_ids", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_price_unit", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_reset_price_unit", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_discount", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_amount", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_qty_invoiced", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_qty_to_invoice", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_invoice_status", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_untaxed_amount_to_invoice", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_prepare_invoice_line", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, - OdooMethod { - name: "_prepare_base_line_for_taxes_computation", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, - OdooMethod { - name: "_validate_analytic_distribution", - kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "_compute_tax_ids", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_price_unit", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_reset_price_unit", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_discount", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_amount", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_qty_invoiced", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_qty_to_invoice", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_invoice_status", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_untaxed_amount_to_invoice", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_prepare_invoice_line", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { name: "_prepare_base_line_for_taxes_computation", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { name: "_validate_analytic_distribution", kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Unit, triggers: &[] }, ], decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id", "company_id"], - }, - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["product_id", "product_uom_id", "product_uom_qty"], - }, - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["product_uom_qty", "discount", "price_unit", "tax_ids"], - }, - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["invoice_lines.move_id.state", "invoice_lines.quantity"], - }, - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["qty_invoiced", "qty_delivered", "product_uom_qty", "state"], - }, - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &[ - "state", - "product_uom_qty", - "qty_delivered", - "qty_to_invoice", - "qty_invoiced", - ], - }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, + targets: &["product_id", "company_id"] }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, + targets: &["product_id", "product_uom_id", "product_uom_qty"] }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, + targets: &["product_uom_qty", "discount", "price_unit", "tax_ids"] }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, + targets: &["invoice_lines.move_id.state", "invoice_lines.quantity"] }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, + targets: &["qty_invoiced", "qty_delivered", "product_uom_qty", "state"] }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, + targets: &["state", "product_uom_qty", "qty_delivered", "qty_to_invoice", "qty_invoiced"] }, ], state_machine: None, constraints: &[OdooConstraint { @@ -800,92 +357,52 @@ pub const SALE_ORDER_LINE: OdooEntity = OdooEntity { const PURCHASE_ORDER_SM: OdooStateMachine = OdooStateMachine { state_field: "state", states: &[ - OdooState { - name: "draft", - semantic: OdooStateSemantic::Draft, - }, - OdooState { - name: "sent", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "to approve", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "purchase", - semantic: OdooStateSemantic::InProgress, - }, - OdooState { - name: "cancel", - semantic: OdooStateSemantic::Cancelled, - }, + OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, + OdooState { name: "sent", semantic: OdooStateSemantic::Active }, + OdooState { name: "to approve", semantic: OdooStateSemantic::Active }, + OdooState { name: "purchase", semantic: OdooStateSemantic::InProgress }, + OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, ], transitions: &[ OdooTransition { - from: "draft", - to: "to approve", - trigger: "button_confirm", + from: "draft", to: "to approve", trigger: "button_confirm", guards: &["_confirmation_error_message", "_approval_allowed"], // Two-step path: po_double_validation='two_step' AND amount>=threshold // AND user NOT in purchase.group_purchase_manager. }, OdooTransition { - from: "sent", - to: "to approve", - trigger: "button_confirm", + from: "sent", to: "to approve", trigger: "button_confirm", guards: &["_confirmation_error_message", "_approval_allowed"], }, OdooTransition { - from: "draft", - to: "purchase", - trigger: "button_confirm", + from: "draft", to: "purchase", trigger: "button_confirm", guards: &["_confirmation_error_message", "_approval_allowed"], // One-step path. Side effect: _add_supplier_to_product() (max 10 vendors). }, OdooTransition { - from: "sent", - to: "purchase", - trigger: "button_confirm", + from: "sent", to: "purchase", trigger: "button_confirm", guards: &["_confirmation_error_message", "_approval_allowed"], }, OdooTransition { - from: "to approve", - to: "purchase", - trigger: "button_approve", + from: "to approve", to: "purchase", trigger: "button_approve", guards: &[], // Writes state='purchase' + date_approve=now(); optional lock. }, OdooTransition { - from: "draft", - to: "cancel", - trigger: "button_cancel", - guards: &[], + from: "draft", to: "cancel", trigger: "button_cancel", guards: &[], }, OdooTransition { - from: "sent", - to: "cancel", - trigger: "button_cancel", - guards: &[], + from: "sent", to: "cancel", trigger: "button_cancel", guards: &[], }, OdooTransition { - from: "to approve", - to: "cancel", - trigger: "button_cancel", - guards: &[], + from: "to approve", to: "cancel", trigger: "button_cancel", guards: &[], }, OdooTransition { - from: "purchase", - to: "cancel", - trigger: "button_cancel", - guards: &[], + from: "purchase", to: "cancel", trigger: "button_cancel", guards: &[], // Guard: raises UserError if locked or has non-draft/non-cancel invoices. }, OdooTransition { - from: "cancel", - to: "draft", - trigger: "button_draft", - guards: &[], + from: "cancel", to: "draft", trigger: "button_draft", guards: &[], }, ], }; @@ -898,250 +415,92 @@ pub const PURCHASE_ORDER: OdooEntity = OdooEntity { via action_create_invoice. \ Proposed OWL pivot: ubl:Order → SmbFoundryInvoice (0x81) → DOLCE Perdurant.", fields: &[ - OdooField { - name: "name", - kind: OdooFieldKind::Char, - target: None, - required: false, - computed: Some("_compute_name"), - depends: &[], - semantic_role: OdooSemanticRole::Identity, - }, - OdooField { - name: "state", - kind: OdooFieldKind::Selection, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Status, - }, - OdooField { - name: "partner_id", - kind: OdooFieldKind::Many2one, - target: Some("res.partner"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "currency_id", - kind: OdooFieldKind::Many2one, - target: Some("res.currency"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "date_order", - kind: OdooFieldKind::Datetime, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Date, - }, - OdooField { - name: "date_approve", - kind: OdooFieldKind::Datetime, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Date, + OdooField { name: "name", kind: OdooFieldKind::Char, target: None, + required: false, computed: Some("_compute_name"), depends: &[], + semantic_role: OdooSemanticRole::Identity }, + OdooField { name: "state", kind: OdooFieldKind::Selection, target: None, + required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, + OdooField { name: "partner_id", kind: OdooFieldKind::Many2one, target: Some("res.partner"), + required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "currency_id", kind: OdooFieldKind::Many2one, target: Some("res.currency"), + required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "date_order", kind: OdooFieldKind::Datetime, target: None, + required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Date }, + OdooField { name: "date_approve", kind: OdooFieldKind::Datetime, target: None, + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Date, // Set to now() by button_approve. }, - OdooField { - name: "order_line", - kind: OdooFieldKind::One2many, - target: Some("purchase.order.line"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "invoice_ids", - kind: OdooFieldKind::Many2many, - target: Some("account.move"), - required: false, - computed: Some("_compute_invoice"), - depends: &[], - semantic_role: OdooSemanticRole::Document, - }, - OdooField { - name: "invoice_status", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: Some("_get_invoiced"), + OdooField { name: "order_line", kind: OdooFieldKind::One2many, + target: Some("purchase.order.line"), required: false, computed: None, depends: &[], + semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "invoice_ids", kind: OdooFieldKind::Many2many, + target: Some("account.move"), required: false, computed: Some("_compute_invoice"), + depends: &[], semantic_role: OdooSemanticRole::Document }, + OdooField { name: "invoice_status", kind: OdooFieldKind::Selection, target: None, + required: false, computed: Some("_get_invoiced"), depends: &["state", "order_line.qty_to_invoice"], // Values: 'no' | 'to invoice' | 'invoiced'. NO 'upselling' (purchase only). // 'invoiced' requires invoice_ids non-empty (L46-68). - semantic_role: OdooSemanticRole::Status, - }, - OdooField { - name: "amount_untaxed", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_amount_all"), + semantic_role: OdooSemanticRole::Status }, + OdooField { name: "amount_untaxed", kind: OdooFieldKind::Monetary, target: None, + required: false, computed: Some("_amount_all"), depends: &["order_line.price_subtotal", "company_id", "currency_id"], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "amount_tax", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_amount_all"), + semantic_role: OdooSemanticRole::Money }, + OdooField { name: "amount_tax", kind: OdooFieldKind::Monetary, target: None, + required: false, computed: Some("_amount_all"), depends: &["order_line.price_subtotal", "company_id", "currency_id"], - semantic_role: OdooSemanticRole::Tax, - }, - OdooField { - name: "amount_total", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_amount_all"), + semantic_role: OdooSemanticRole::Tax }, + OdooField { name: "amount_total", kind: OdooFieldKind::Monetary, target: None, + required: false, computed: Some("_amount_all"), depends: &["order_line.price_subtotal", "company_id", "currency_id"], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "amount_total_cc", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_amount_all"), + semantic_role: OdooSemanticRole::Money }, + OdooField { name: "amount_total_cc", kind: OdooFieldKind::Monetary, target: None, + required: false, computed: Some("_amount_all"), depends: &["order_line.price_subtotal", "company_id", "currency_id"], // Company-currency total; purchase-only (not in sale variant). - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "fiscal_position_id", - kind: OdooFieldKind::Many2one, - target: Some("account.fiscal.position"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Tax, - }, - OdooField { - name: "payment_term_id", - kind: OdooFieldKind::Many2one, - target: Some("account.payment.term"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, - OdooField { - name: "company_id", - kind: OdooFieldKind::Many2one, - target: Some("res.company"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "locked", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, - OdooField { - name: "note", - kind: OdooFieldKind::Html, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Document, - }, + semantic_role: OdooSemanticRole::Money }, + OdooField { name: "fiscal_position_id", kind: OdooFieldKind::Many2one, + target: Some("account.fiscal.position"), required: false, computed: None, depends: &[], + semantic_role: OdooSemanticRole::Tax }, + OdooField { name: "payment_term_id", kind: OdooFieldKind::Many2one, + target: Some("account.payment.term"), required: false, computed: None, depends: &[], + semantic_role: OdooSemanticRole::Policy }, + OdooField { name: "company_id", kind: OdooFieldKind::Many2one, target: Some("res.company"), + required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "locked", kind: OdooFieldKind::Boolean, target: None, + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { name: "note", kind: OdooFieldKind::Html, target: None, + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Document }, ], methods: &[ - OdooMethod { - name: "button_confirm", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Boolean, - triggers: &["purchase", "to approve"], - }, - OdooMethod { - name: "button_approve", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, - triggers: &["purchase"], - }, - OdooMethod { - name: "button_cancel", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, - triggers: &["cancel"], - }, - OdooMethod { - name: "button_draft", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, - triggers: &["draft"], - }, - OdooMethod { - name: "_amount_all", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_get_invoiced", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "action_create_invoice", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Action, - triggers: &[], - }, - OdooMethod { - name: "_prepare_invoice", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, - OdooMethod { - name: "_approval_allowed", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Boolean, - triggers: &[], - }, - OdooMethod { - name: "_add_supplier_to_product", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_confirmation_error_message", - kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Boolean, - triggers: &[], - }, + OdooMethod { name: "button_confirm", kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Boolean, triggers: &["purchase", "to approve"] }, + OdooMethod { name: "button_approve", kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, triggers: &["purchase"] }, + OdooMethod { name: "button_cancel", kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, triggers: &["cancel"] }, + OdooMethod { name: "button_draft", kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Unit, triggers: &["draft"] }, + OdooMethod { name: "_amount_all", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_get_invoiced", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "action_create_invoice", kind: OdooMethodKind::Action, + return_kind: OdooReturnKind::Action, triggers: &[] }, + OdooMethod { name: "_prepare_invoice", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { name: "_approval_allowed", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Boolean, triggers: &[] }, + OdooMethod { name: "_add_supplier_to_product", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_confirmation_error_message", kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Boolean, triggers: &[] }, ], decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["order_line.price_subtotal", "company_id", "currency_id"], - }, - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["state", "order_line.qty_to_invoice"], - }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, + targets: &["order_line.price_subtotal", "company_id", "currency_id"] }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, + targets: &["state", "order_line.qty_to_invoice"] }, ], state_machine: Some(&PURCHASE_ORDER_SM), constraints: &[ @@ -1174,173 +533,58 @@ pub const PURCHASE_ORDER_LINE: OdooEntity = OdooEntity { _get_invoiced computation (L46-68). \ Proposed OWL pivot: ubl:OrderLine → SmbFoundryInvoice (0x81) → DOLCE Perdurant.", fields: &[ - OdooField { - name: "order_id", - kind: OdooFieldKind::Many2one, - target: Some("purchase.order"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "product_id", - kind: OdooFieldKind::Many2one, - target: Some("product.product"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "name", - kind: OdooFieldKind::Char, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Identity, - }, - OdooField { - name: "product_qty", - kind: OdooFieldKind::Float, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "product_uom", - kind: OdooFieldKind::Many2one, - target: Some("uom.uom"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "price_unit", - kind: OdooFieldKind::Float, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "taxes_id", - kind: OdooFieldKind::Many2many, - target: Some("account.tax"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Tax, - }, - OdooField { - name: "price_subtotal", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_compute_amount"), + OdooField { name: "order_id", kind: OdooFieldKind::Many2one, target: Some("purchase.order"), + required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "product_id", kind: OdooFieldKind::Many2one, target: Some("product.product"), + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "name", kind: OdooFieldKind::Char, target: None, + required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, + OdooField { name: "product_qty", kind: OdooFieldKind::Float, target: None, + required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "product_uom", kind: OdooFieldKind::Many2one, target: Some("uom.uom"), + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "price_unit", kind: OdooFieldKind::Float, target: None, + required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Money }, + OdooField { name: "taxes_id", kind: OdooFieldKind::Many2many, target: Some("account.tax"), + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Tax }, + OdooField { name: "price_subtotal", kind: OdooFieldKind::Monetary, target: None, + required: false, computed: Some("_compute_amount"), depends: &["product_qty", "price_unit", "taxes_id"], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "qty_received", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: Some("_compute_qty_received"), - depends: &[], - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "qty_invoiced", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: Some("_compute_qty_invoiced"), + semantic_role: OdooSemanticRole::Money }, + OdooField { name: "qty_received", kind: OdooFieldKind::Float, target: None, + required: false, computed: Some("_compute_qty_received"), depends: &[], + semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "qty_invoiced", kind: OdooFieldKind::Float, target: None, + required: false, computed: Some("_compute_qty_invoiced"), depends: &["invoice_lines.move_id.state", "invoice_lines.quantity"], - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "qty_to_invoice", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: Some("_compute_qty_to_invoice"), - depends: &[ - "qty_invoiced", - "qty_received", - "product_qty", - "order_id.state", - ], - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "invoice_lines", - kind: OdooFieldKind::Many2many, - target: Some("account.move.line"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Document, - }, - OdooField { - name: "display_type", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Other, - }, - OdooField { - name: "date_planned", - kind: OdooFieldKind::Datetime, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Date, - }, + semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "qty_to_invoice", kind: OdooFieldKind::Float, target: None, + required: false, computed: Some("_compute_qty_to_invoice"), + depends: &["qty_invoiced", "qty_received", "product_qty", "order_id.state"], + semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "invoice_lines", kind: OdooFieldKind::Many2many, + target: Some("account.move.line"), required: false, computed: None, depends: &[], + semantic_role: OdooSemanticRole::Document }, + OdooField { name: "display_type", kind: OdooFieldKind::Selection, target: None, + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Other }, + OdooField { name: "date_planned", kind: OdooFieldKind::Datetime, target: None, + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Date }, ], methods: &[ - OdooMethod { - name: "_compute_amount", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_qty_invoiced", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_qty_to_invoice", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_qty_received", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "_compute_amount", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_qty_invoiced", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_qty_to_invoice", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_qty_received", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, ], decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["product_qty", "price_unit", "taxes_id"], - }, - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["invoice_lines.move_id.state", "invoice_lines.quantity"], - }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, + targets: &["product_qty", "price_unit", "taxes_id"] }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, + targets: &["invoice_lines.move_id.state", "invoice_lines.quantity"] }, ], state_machine: None, constraints: &[], @@ -1389,64 +633,41 @@ mod tests { #[test] fn all_entities_cite_l6_doc() { for entity in ENTITIES { - assert_eq!( - entity.provenance.l_doc, "L6-SALE-PURCHASE.md", - "entity {} must cite L6 doc", - entity.model_name - ); + assert_eq!(entity.provenance.l_doc, "L6-SALE-PURCHASE.md", + "entity {} must cite L6 doc", entity.model_name); } } #[test] fn all_entities_are_curated() { for entity in ENTITIES { - assert_eq!( - entity.provenance.confidence, - OdooConfidence::Curated, - "entity {} must be Curated", - entity.model_name - ); + assert_eq!(entity.provenance.confidence, OdooConfidence::Curated, + "entity {} must be Curated", entity.model_name); } } #[test] fn sale_order_state_machine_no_done_state() { - let sm = SALE_ORDER - .state_machine - .expect("sale.order must have a state machine"); + let sm = SALE_ORDER.state_machine.expect("sale.order must have a state machine"); assert_eq!(sm.state_field, "state"); // Community Odoo 17: no 'done' state — locked boolean replaces it. - assert!( - sm.states.iter().all(|s| s.name != "done"), - "sale.order must NOT have a 'done' state in Odoo 17 community" - ); + assert!(sm.states.iter().all(|s| s.name != "done"), + "sale.order must NOT have a 'done' state in Odoo 17 community"); let names: Vec<&str> = sm.states.iter().map(|s| s.name).collect(); - assert!( - names.contains(&"draft") - && names.contains(&"sent") - && names.contains(&"sale") - && names.contains(&"cancel") - ); + assert!(names.contains(&"draft") && names.contains(&"sent") + && names.contains(&"sale") && names.contains(&"cancel")); } #[test] fn sale_order_action_confirm_transitions_to_sale() { - let sm = SALE_ORDER - .state_machine - .expect("sale.order must have a state machine"); - assert!( - sm.transitions - .iter() - .any(|t| t.trigger == "action_confirm" && t.to == "sale"), - "action_confirm must have a transition to 'sale'" - ); + let sm = SALE_ORDER.state_machine.expect("sale.order must have a state machine"); + assert!(sm.transitions.iter().any(|t| t.trigger == "action_confirm" && t.to == "sale"), + "action_confirm must have a transition to 'sale'"); } #[test] fn purchase_order_has_to_approve_state() { - let sm = PURCHASE_ORDER - .state_machine - .expect("purchase.order must have a state machine"); + let sm = PURCHASE_ORDER.state_machine.expect("purchase.order must have a state machine"); let to_approve = sm.states.iter().find(|s| s.name == "to approve"); assert!(to_approve.is_some(), "'to approve' state must be present"); assert_eq!(to_approve.unwrap().semantic, OdooStateSemantic::Active); @@ -1454,36 +675,23 @@ mod tests { #[test] fn purchase_order_invoice_status_computed_by_get_invoiced() { - let f = PURCHASE_ORDER - .fields - .iter() - .find(|f| f.name == "invoice_status") + let f = PURCHASE_ORDER.fields.iter().find(|f| f.name == "invoice_status") .expect("invoice_status must be present on purchase.order"); assert_eq!(f.computed, Some("_get_invoiced")); } #[test] fn sale_order_line_qty_to_invoice_depends_on_state() { - let f = SALE_ORDER_LINE - .fields - .iter() - .find(|f| f.name == "qty_to_invoice") + let f = SALE_ORDER_LINE.fields.iter().find(|f| f.name == "qty_to_invoice") .expect("qty_to_invoice must be present"); - assert!( - f.depends.contains(&"state"), - "qty_to_invoice must depend on state" - ); + assert!(f.depends.contains(&"state"), "qty_to_invoice must depend on state"); assert_eq!(f.computed, Some("_compute_qty_to_invoice")); } #[test] fn sale_order_has_sql_constraint_on_date_order() { - assert!( - SALE_ORDER - .constraints - .iter() - .any(|c| c.kind == OdooConstraintKind::Sql), - "sale.order must have at least one SQL constraint (date_order check)" - ); + assert!(SALE_ORDER.constraints.iter() + .any(|c| c.kind == OdooConstraintKind::Sql), + "sale.order must have at least one SQL constraint (date_order check)"); } } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l7.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l7.rs index eb55a5bf..8518bc4b 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l7.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l7.rs @@ -18,8 +18,8 @@ use super::{ OdooConfidence, OdooConstraint, OdooConstraintKind, OdooDecorator, OdooDecoratorKind, OdooEntity, OdooEntityKind, OdooField, OdooFieldKind, OdooMethod, OdooMethodKind, - OdooProvenance, OdooReturnKind, OdooSemanticRole, OdooSourceRef, OdooState, OdooStateMachine, - OdooStateSemantic, OdooTransition, + OdooProvenance, OdooReturnKind, OdooSemanticRole, OdooSourceRef, OdooState, + OdooStateMachine, OdooStateSemantic, OdooTransition, }; // ─── stock.move state machine ───────────────────────────────────────────────── @@ -27,108 +27,27 @@ use super::{ const STOCK_MOVE_STATE_MACHINE: OdooStateMachine = OdooStateMachine { state_field: "state", states: &[ - OdooState { - name: "draft", - semantic: OdooStateSemantic::Draft, - }, - OdooState { - name: "waiting", - semantic: OdooStateSemantic::InProgress, - }, - OdooState { - name: "confirmed", - semantic: OdooStateSemantic::InProgress, - }, - OdooState { - name: "partially_available", - semantic: OdooStateSemantic::InProgress, - }, - OdooState { - name: "assigned", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "done", - semantic: OdooStateSemantic::Completed, - }, - OdooState { - name: "cancel", - semantic: OdooStateSemantic::Cancelled, - }, + OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, + OdooState { name: "waiting", semantic: OdooStateSemantic::InProgress }, + OdooState { name: "confirmed", semantic: OdooStateSemantic::InProgress }, + OdooState { name: "partially_available", semantic: OdooStateSemantic::InProgress }, + OdooState { name: "assigned", semantic: OdooStateSemantic::Active }, + OdooState { name: "done", semantic: OdooStateSemantic::Completed }, + OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, ], transitions: &[ - OdooTransition { - from: "draft", - to: "waiting", - trigger: "_action_confirm", - guards: &[], - }, - OdooTransition { - from: "draft", - to: "confirmed", - trigger: "_action_confirm", - guards: &[], - }, - OdooTransition { - from: "confirmed", - to: "partially_available", - trigger: "_action_assign", - guards: &[], - }, - OdooTransition { - from: "confirmed", - to: "assigned", - trigger: "_action_assign", - guards: &[], - }, - OdooTransition { - from: "waiting", - to: "assigned", - trigger: "_action_assign", - guards: &[], - }, - OdooTransition { - from: "partially_available", - to: "assigned", - trigger: "_action_assign", - guards: &[], - }, - OdooTransition { - from: "assigned", - to: "done", - trigger: "_action_done", - guards: &[], - }, - OdooTransition { - from: "partially_available", - to: "done", - trigger: "_action_done", - guards: &[], - }, - OdooTransition { - from: "confirmed", - to: "cancel", - trigger: "_action_cancel", - guards: &[], - }, - OdooTransition { - from: "waiting", - to: "cancel", - trigger: "_action_cancel", - guards: &[], - }, - OdooTransition { - from: "assigned", - to: "cancel", - trigger: "_action_cancel", - guards: &[], - }, - OdooTransition { - from: "partially_available", - to: "cancel", - trigger: "_action_cancel", - guards: &[], - }, + OdooTransition { from: "draft", to: "waiting", trigger: "_action_confirm", guards: &[] }, + OdooTransition { from: "draft", to: "confirmed", trigger: "_action_confirm", guards: &[] }, + OdooTransition { from: "confirmed", to: "partially_available", trigger: "_action_assign", guards: &[] }, + OdooTransition { from: "confirmed", to: "assigned", trigger: "_action_assign", guards: &[] }, + OdooTransition { from: "waiting", to: "assigned", trigger: "_action_assign", guards: &[] }, + OdooTransition { from: "partially_available", to: "assigned", trigger: "_action_assign", guards: &[] }, + OdooTransition { from: "assigned", to: "done", trigger: "_action_done", guards: &[] }, + OdooTransition { from: "partially_available", to: "done", trigger: "_action_done", guards: &[] }, + OdooTransition { from: "confirmed", to: "cancel", trigger: "_action_cancel", guards: &[] }, + OdooTransition { from: "waiting", to: "cancel", trigger: "_action_cancel", guards: &[] }, + OdooTransition { from: "assigned", to: "cancel", trigger: "_action_cancel", guards: &[] }, + OdooTransition { from: "partially_available", to: "cancel", trigger: "_action_cancel", guards: &[] }, ], }; @@ -143,338 +62,66 @@ pub const STOCK_MOVE: OdooEntity = OdooEntity { (K10, DOLCE Perdurant, FLAG-1). _recompute_state re-derives state \ live from quantity vs product_uom_qty — NOT a simple FSM.", fields: &[ - OdooField { - name: "name", - kind: OdooFieldKind::Char, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Identity, - }, - OdooField { - name: "state", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: Some("_recompute_state"), - depends: &["quantity", "product_uom_qty", "move_orig_ids.state"], - semantic_role: OdooSemanticRole::Status, - }, - OdooField { - name: "product_id", - kind: OdooFieldKind::Many2one, - target: Some("product.product"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "name", kind: OdooFieldKind::Char, target: None, required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, + OdooField { name: "state", kind: OdooFieldKind::Selection, target: None, required: false, computed: Some("_recompute_state"), depends: &["quantity", "product_uom_qty", "move_orig_ids.state"], semantic_role: OdooSemanticRole::Status }, + OdooField { name: "product_id", kind: OdooFieldKind::Many2one, target: Some("product.product"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, // Demand qty in move UoM. Always write product_uom_qty, not product_qty. - OdooField { - name: "product_uom_qty", - kind: OdooFieldKind::Float, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Quantity, - }, + OdooField { name: "product_uom_qty", kind: OdooFieldKind::Float, target: None, required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, // READ-ONLY computed — writes raise UserError. product_uom._compute_quantity(HALF-UP). - OdooField { - name: "product_qty", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: Some("_compute_product_qty"), - depends: &["product_uom_qty", "product_uom", "product_id.uom_id"], - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "quantity", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "product_uom", - kind: OdooFieldKind::Many2one, - target: Some("uom.uom"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "location_id", - kind: OdooFieldKind::Many2one, - target: Some("stock.location"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "location_dest_id", - kind: OdooFieldKind::Many2one, - target: Some("stock.location"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "picking_id", - kind: OdooFieldKind::Many2one, - target: Some("stock.picking"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "move_line_ids", - kind: OdooFieldKind::One2many, - target: Some("stock.move.line"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "move_orig_ids", - kind: OdooFieldKind::Many2many, - target: Some("stock.move"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "move_dest_ids", - kind: OdooFieldKind::Many2many, - target: Some("stock.move"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "product_qty", kind: OdooFieldKind::Float, target: None, required: false, computed: Some("_compute_product_qty"), depends: &["product_uom_qty", "product_uom", "product_id.uom_id"], semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "quantity", kind: OdooFieldKind::Float, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "product_uom", kind: OdooFieldKind::Many2one, target: Some("uom.uom"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "location_id", kind: OdooFieldKind::Many2one, target: Some("stock.location"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "location_dest_id", kind: OdooFieldKind::Many2one, target: Some("stock.location"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "picking_id", kind: OdooFieldKind::Many2one, target: Some("stock.picking"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "move_line_ids", kind: OdooFieldKind::One2many, target: Some("stock.move.line"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "move_orig_ids", kind: OdooFieldKind::Many2many, target: Some("stock.move"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "move_dest_ids", kind: OdooFieldKind::Many2many, target: Some("stock.move"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, // 'make_to_stock'|'make_to_order'|'mts_else_mto'. Branch selector in _action_confirm/_action_assign. - OdooField { - name: "procure_method", - kind: OdooFieldKind::Selection, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, + OdooField { name: "procure_method", kind: OdooFieldKind::Selection, target: None, required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, // 'at_confirm'|'manual'|'by_date'. Gate for _should_assign_at_confirm. - OdooField { - name: "reservation_method", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, - OdooField { - name: "reservation_date", - kind: OdooFieldKind::Date, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Date, - }, + OdooField { name: "reservation_method", kind: OdooFieldKind::Selection, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { name: "reservation_date", kind: OdooFieldKind::Date, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Date }, // '0' normal | '1' urgent. action_assign sorts by -int(priority) first. - OdooField { - name: "priority", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, - OdooField { - name: "date_deadline", - kind: OdooFieldKind::Datetime, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Date, - }, + OdooField { name: "priority", kind: OdooFieldKind::Selection, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { name: "date_deadline", kind: OdooFieldKind::Datetime, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Date }, // True: cancel propagates to move_dest_ids when ALL siblings cancelled. - OdooField { - name: "propagate_cancel", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, - OdooField { - name: "picked", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Status, - }, - OdooField { - name: "price_unit", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Money, - }, + OdooField { name: "propagate_cancel", kind: OdooFieldKind::Boolean, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { name: "picked", kind: OdooFieldKind::Boolean, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, + OdooField { name: "price_unit", kind: OdooFieldKind::Float, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Money }, // min(product_qty, quant.available_qty) or product_qty when state=done. - OdooField { - name: "availability", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: Some("_compute_product_availability"), - depends: &["state", "product_id", "product_uom_qty", "location_id"], - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "rule_id", - kind: OdooFieldKind::Many2one, - target: Some("stock.rule"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "availability", kind: OdooFieldKind::Float, target: None, required: false, computed: Some("_compute_product_availability"), depends: &["state", "product_id", "product_uom_qty", "location_id"], semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "rule_id", kind: OdooFieldKind::Many2one, target: Some("stock.rule"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, ], methods: &[ - OdooMethod { - name: "_action_confirm", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Self_, - triggers: &["waiting", "confirmed"], - }, - OdooMethod { - name: "_action_assign", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, - triggers: &["partially_available", "assigned"], - }, - OdooMethod { - name: "_action_done", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Recordset, - triggers: &["done"], - }, - OdooMethod { - name: "_action_cancel", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Self_, - triggers: &["cancel"], - }, - OdooMethod { - name: "_recompute_state", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_product_qty", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_product_availability", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_create_backorder", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Self_, - triggers: &[], - }, - OdooMethod { - name: "_split", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Record, - triggers: &[], - }, - OdooMethod { - name: "_get_available_quantity", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Number, - triggers: &[], - }, - OdooMethod { - name: "_update_reserved_quantity", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_should_bypass_reservation", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Boolean, - triggers: &[], - }, - OdooMethod { - name: "_trigger_assign", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_push_apply", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "_action_confirm", kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Self_, triggers: &["waiting", "confirmed"] }, + OdooMethod { name: "_action_assign", kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Unit, triggers: &["partially_available", "assigned"] }, + OdooMethod { name: "_action_done", kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Recordset, triggers: &["done"] }, + OdooMethod { name: "_action_cancel", kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Self_, triggers: &["cancel"] }, + OdooMethod { name: "_recompute_state", kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_product_qty", kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_product_availability", kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_create_backorder", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Self_, triggers: &[] }, + OdooMethod { name: "_split", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Record, triggers: &[] }, + OdooMethod { name: "_get_available_quantity", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Number, triggers: &[] }, + OdooMethod { name: "_update_reserved_quantity", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_should_bypass_reservation", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Boolean, triggers: &[] }, + OdooMethod { name: "_trigger_assign", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_push_apply", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, ], decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["product_uom_qty", "product_uom", "product_id.uom_id"], - }, - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["quantity", "product_uom_qty", "move_orig_ids.state"], - }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["product_uom_qty", "product_uom", "product_id.uom_id"] }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["quantity", "product_uom_qty", "move_orig_ids.state"] }, ], state_machine: Some(&STOCK_MOVE_STATE_MACHINE), constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: - "product_qty is read-only; writing raises UserError — always write product_uom_qty", - source_method: None, - }, - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: "cancel blocked when state=done and location_dest_usage != 'inventory'", - source_method: Some("_action_cancel"), - }, + OdooConstraint { kind: OdooConstraintKind::Python, condition: "product_qty is read-only; writing raises UserError — always write product_uom_qty", source_method: None }, + OdooConstraint { kind: OdooConstraintKind::Python, condition: "cancel blocked when state=done and location_dest_usage != 'inventory'", source_method: Some("_action_cancel") }, ], provenance: OdooProvenance { l_doc: "L7-STOCK.md", l_doc_lines: (31, 108), - odoo_source: &[OdooSourceRef { - path: "addons/stock/models/stock_move.py", - line_range: (107, 2503), - }], + odoo_source: &[OdooSourceRef { path: "addons/stock/models/stock_move.py", line_range: (107, 2503) }], confidence: OdooConfidence::Curated, regulation_iri: &[], }, @@ -489,119 +136,21 @@ pub const STOCK_MOVE_LINE: OdooEntity = OdooEntity { _action_done drives quant mutation via stock.quant._update_available_quantity; \ serial products get one move line per unit (K10, DOLCE Perdurant).", fields: &[ - OdooField { - name: "move_id", - kind: OdooFieldKind::Many2one, - target: Some("stock.move"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "picking_id", - kind: OdooFieldKind::Many2one, - target: Some("stock.picking"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "product_id", - kind: OdooFieldKind::Many2one, - target: Some("product.product"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "location_id", - kind: OdooFieldKind::Many2one, - target: Some("stock.location"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "location_dest_id", - kind: OdooFieldKind::Many2one, - target: Some("stock.location"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "lot_id", - kind: OdooFieldKind::Many2one, - target: Some("stock.lot"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "package_id", - kind: OdooFieldKind::Many2one, - target: Some("stock.quant.package"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "owner_id", - kind: OdooFieldKind::Many2one, - target: Some("res.partner"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "quantity", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "reserved_qty", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "picked", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Status, - }, + OdooField { name: "move_id", kind: OdooFieldKind::Many2one, target: Some("stock.move"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "picking_id", kind: OdooFieldKind::Many2one, target: Some("stock.picking"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "product_id", kind: OdooFieldKind::Many2one, target: Some("product.product"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "location_id", kind: OdooFieldKind::Many2one, target: Some("stock.location"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "location_dest_id", kind: OdooFieldKind::Many2one, target: Some("stock.location"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "lot_id", kind: OdooFieldKind::Many2one, target: Some("stock.lot"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "package_id", kind: OdooFieldKind::Many2one, target: Some("stock.quant.package"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "owner_id", kind: OdooFieldKind::Many2one, target: Some("res.partner"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "quantity", kind: OdooFieldKind::Float, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "reserved_qty", kind: OdooFieldKind::Float, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "picked", kind: OdooFieldKind::Boolean, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, ], methods: &[ - OdooMethod { - name: "_action_done", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_apply_putaway_strategy", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "_action_done", kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_apply_putaway_strategy", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, ], decorators: &[], state_machine: None, @@ -613,10 +162,7 @@ pub const STOCK_MOVE_LINE: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "L7-STOCK.md", l_doc_lines: (77, 108), - odoo_source: &[OdooSourceRef { - path: "addons/stock/models/stock_move.py", - line_range: (1763, 1820), - }], + odoo_source: &[OdooSourceRef { path: "addons/stock/models/stock_move.py", line_range: (1763, 1820) }], confidence: OdooConfidence::Curated, regulation_iri: &[], }, @@ -634,60 +180,12 @@ pub const STOCK_QUANT: OdooEntity = OdooEntity { in_date = min(incoming_dates) — FIFO invariant at quant level \ (K10, DOLCE Endurant, FLAG-3).", fields: &[ - OdooField { - name: "product_id", - kind: OdooFieldKind::Many2one, - target: Some("product.product"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "location_id", - kind: OdooFieldKind::Many2one, - target: Some("stock.location"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "lot_id", - kind: OdooFieldKind::Many2one, - target: Some("stock.lot"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "package_id", - kind: OdooFieldKind::Many2one, - target: Some("stock.quant.package"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "owner_id", - kind: OdooFieldKind::Many2one, - target: Some("res.partner"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "quantity", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Quantity, - }, + OdooField { name: "product_id", kind: OdooFieldKind::Many2one, target: Some("product.product"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "location_id", kind: OdooFieldKind::Many2one, target: Some("stock.location"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "lot_id", kind: OdooFieldKind::Many2one, target: Some("stock.lot"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "package_id", kind: OdooFieldKind::Many2one, target: Some("stock.quant.package"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "owner_id", kind: OdooFieldKind::Many2one, target: Some("res.partner"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "quantity", kind: OdooFieldKind::Float, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, OdooField { name: "reserved_quantity", kind: OdooFieldKind::Float, @@ -718,118 +216,32 @@ pub const STOCK_QUANT: OdooEntity = OdooEntity { // FEFO: domain filter removal_date >= threshold OR NULL in _get_gather_domain. semantic_role: OdooSemanticRole::Date, }, - OdooField { - name: "inventory_quantity", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "inventory_quantity_set", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Status, - }, + OdooField { name: "inventory_quantity", kind: OdooFieldKind::Float, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "inventory_quantity_set", kind: OdooFieldKind::Boolean, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, ], methods: &[ - OdooMethod { - name: "_get_available_quantity", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Number, - triggers: &[], - }, - OdooMethod { - name: "_gather", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Recordset, - triggers: &[], - }, - OdooMethod { - name: "_get_removal_strategy", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, - OdooMethod { - name: "_get_gather_domain", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, - OdooMethod { - name: "_get_reserve_quantity", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, - OdooMethod { - name: "_update_available_quantity", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, - OdooMethod { - name: "_apply_inventory", - kind: OdooMethodKind::Action, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_merge_quants", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_unlink_zero_quants", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_run_least_packages_removal_strategy_astar", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Recordset, - triggers: &[], - }, + OdooMethod { name: "_get_available_quantity", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Number, triggers: &[] }, + OdooMethod { name: "_gather", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Recordset, triggers: &[] }, + OdooMethod { name: "_get_removal_strategy", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { name: "_get_gather_domain", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { name: "_get_reserve_quantity", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { name: "_update_available_quantity", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { name: "_apply_inventory", kind: OdooMethodKind::Action, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_merge_quants", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_unlink_zero_quants", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_run_least_packages_removal_strategy_astar", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Recordset, triggers: &[] }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiAutovacuum, - targets: &[], - }], + decorators: &[OdooDecorator { kind: OdooDecoratorKind::ApiAutovacuum, targets: &[] }], state_machine: None, constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "UNIQUE(product_id, location_id, lot_id, package_id, owner_id)", - source_method: None, - }, - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: - "reserved_quantity >= 0 (max(0, reserved + delta) in _update_available_quantity)", - source_method: Some("_update_available_quantity"), - }, - OdooConstraint { - kind: OdooConstraintKind::Python, - condition: - "serial tracking: fractional reserve qty clamped to 0 (_get_reserve_quantity)", - source_method: Some("_get_reserve_quantity"), - }, + OdooConstraint { kind: OdooConstraintKind::Sql, condition: "UNIQUE(product_id, location_id, lot_id, package_id, owner_id)", source_method: None }, + OdooConstraint { kind: OdooConstraintKind::Python, condition: "reserved_quantity >= 0 (max(0, reserved + delta) in _update_available_quantity)", source_method: Some("_update_available_quantity") }, + OdooConstraint { kind: OdooConstraintKind::Python, condition: "serial tracking: fractional reserve qty clamped to 0 (_get_reserve_quantity)", source_method: Some("_get_reserve_quantity") }, ], provenance: OdooProvenance { l_doc: "L7-STOCK.md", l_doc_lines: (110, 415), - odoo_source: &[OdooSourceRef { - path: "addons/stock/models/stock_quant.py", - line_range: (617, 1138), - }], + odoo_source: &[OdooSourceRef { path: "addons/stock/models/stock_quant.py", line_range: (617, 1138) }], confidence: OdooConfidence::Curated, regulation_iri: &[], }, @@ -840,57 +252,19 @@ pub const STOCK_QUANT: OdooEntity = OdooEntity { const STOCK_PICKING_STATE_MACHINE: OdooStateMachine = OdooStateMachine { state_field: "state", states: &[ - OdooState { - name: "draft", - semantic: OdooStateSemantic::Draft, - }, - OdooState { - name: "waiting", - semantic: OdooStateSemantic::InProgress, - }, - OdooState { - name: "confirmed", - semantic: OdooStateSemantic::InProgress, - }, + OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, + OdooState { name: "waiting", semantic: OdooStateSemantic::InProgress }, + OdooState { name: "confirmed", semantic: OdooStateSemantic::InProgress }, // partially_available move → 'assigned' picking when move_type='direct' (_compute_state L858). - OdooState { - name: "assigned", - semantic: OdooStateSemantic::Active, - }, - OdooState { - name: "done", - semantic: OdooStateSemantic::Completed, - }, - OdooState { - name: "cancel", - semantic: OdooStateSemantic::Cancelled, - }, + OdooState { name: "assigned", semantic: OdooStateSemantic::Active }, + OdooState { name: "done", semantic: OdooStateSemantic::Completed }, + OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, ], transitions: &[ - OdooTransition { - from: "draft", - to: "confirmed", - trigger: "action_confirm", - guards: &[], - }, - OdooTransition { - from: "confirmed", - to: "assigned", - trigger: "action_assign", - guards: &[], - }, - OdooTransition { - from: "assigned", - to: "done", - trigger: "button_validate", - guards: &["_sanity_check"], - }, - OdooTransition { - from: "confirmed", - to: "done", - trigger: "button_validate", - guards: &["_sanity_check"], - }, + OdooTransition { from: "draft", to: "confirmed", trigger: "action_confirm", guards: &[] }, + OdooTransition { from: "confirmed", to: "assigned", trigger: "action_assign", guards: &[] }, + OdooTransition { from: "assigned", to: "done", trigger: "button_validate", guards: &["_sanity_check"] }, + OdooTransition { from: "confirmed", to: "done", trigger: "button_validate", guards: &["_sanity_check"] }, ], }; @@ -987,15 +361,7 @@ pub const STOCK_LOCATION: OdooEntity = OdooEntity { should_bypass_reservation() short-circuits quant ops for \ virtual/supplier/customer locations (K10, DOLCE Endurant).", fields: &[ - OdooField { - name: "name", - kind: OdooFieldKind::Char, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Identity, - }, + OdooField { name: "name", kind: OdooFieldKind::Char, target: None, required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, OdooField { name: "complete_name", kind: OdooFieldKind::Char, @@ -1006,15 +372,7 @@ pub const STOCK_LOCATION: OdooEntity = OdooEntity { depends: &["name", "location_id.complete_name"], semantic_role: OdooSemanticRole::Identity, }, - OdooField { - name: "location_id", - kind: OdooFieldKind::Many2one, - target: Some("stock.location"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "location_id", kind: OdooFieldKind::Many2one, target: Some("stock.location"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, OdooField { name: "usage", kind: OdooFieldKind::Selection, @@ -1035,43 +393,14 @@ pub const STOCK_LOCATION: OdooEntity = OdooEntity { // RemovalStrategySelector dispatch. product.categ wins; walk hierarchy; default fifo. semantic_role: OdooSemanticRole::Policy, }, - OdooField { - name: "active", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Status, - }, - OdooField { - name: "last_inventory_date", - kind: OdooFieldKind::Date, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Audit, - }, + OdooField { name: "active", kind: OdooFieldKind::Boolean, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, + OdooField { name: "last_inventory_date", kind: OdooFieldKind::Date, target: None, required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Audit }, ], methods: &[ - OdooMethod { - name: "should_bypass_reservation", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Boolean, - triggers: &[], - }, - OdooMethod { - name: "_compute_complete_name", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "should_bypass_reservation", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Boolean, triggers: &[] }, + OdooMethod { name: "_compute_complete_name", kind: OdooMethodKind::Compute, return_kind: OdooReturnKind::Unit, triggers: &[] }, ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["name", "location_id.complete_name"], - }], + decorators: &[OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["name", "location_id.complete_name"] }], state_machine: None, constraints: &[OdooConstraint { kind: OdooConstraintKind::Domain, @@ -1081,10 +410,7 @@ pub const STOCK_LOCATION: OdooEntity = OdooEntity { provenance: OdooProvenance { l_doc: "L7-STOCK.md", l_doc_lines: (155, 207), - odoo_source: &[OdooSourceRef { - path: "addons/stock/models/stock_quant.py", - line_range: (617, 791), - }], + odoo_source: &[OdooSourceRef { path: "addons/stock/models/stock_quant.py", line_range: (617, 791) }], confidence: OdooConfidence::Curated, regulation_iri: &[], }, @@ -1100,42 +426,10 @@ pub const STOCK_WAREHOUSE: OdooEntity = OdooEntity { proposed gs1:Location (K10, DOLCE Endurant, FLAG-4). \ TODO: alignment row needed before OGIT hydration.", fields: &[ - OdooField { - name: "name", - kind: OdooFieldKind::Char, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Identity, - }, - OdooField { - name: "code", - kind: OdooFieldKind::Char, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Identity, - }, - OdooField { - name: "partner_id", - kind: OdooFieldKind::Many2one, - target: Some("res.partner"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Address, - }, - OdooField { - name: "lot_stock_id", - kind: OdooFieldKind::Many2one, - target: Some("stock.location"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "name", kind: OdooFieldKind::Char, target: None, required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, + OdooField { name: "code", kind: OdooFieldKind::Char, target: None, required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, + OdooField { name: "partner_id", kind: OdooFieldKind::Many2one, target: Some("res.partner"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Address }, + OdooField { name: "lot_stock_id", kind: OdooFieldKind::Many2one, target: Some("stock.location"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, OdooField { name: "reception_steps", kind: OdooFieldKind::Selection, @@ -1156,38 +450,12 @@ pub const STOCK_WAREHOUSE: OdooEntity = OdooEntity { // 'ship_only'|'pick_ship'|'pick_pack_ship'. semantic_role: OdooSemanticRole::Policy, }, - OdooField { - name: "route_ids", - kind: OdooFieldKind::Many2many, - target: Some("stock.route"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "company_id", - kind: OdooFieldKind::Many2one, - target: Some("res.company"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "route_ids", kind: OdooFieldKind::Many2many, target: Some("stock.route"), required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "company_id", kind: OdooFieldKind::Many2one, target: Some("res.company"), required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, ], methods: &[ - OdooMethod { - name: "_get_picking_type_create_edit", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, - OdooMethod { - name: "_update_reception_delivery", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "_get_picking_type_create_edit", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { name: "_update_reception_delivery", kind: OdooMethodKind::Helper, return_kind: OdooReturnKind::Unit, triggers: &[] }, ], decorators: &[], state_machine: None, @@ -1250,9 +518,7 @@ mod tests { #[test] fn stock_move_has_state_machine() { - let sm = STOCK_MOVE - .state_machine - .expect("stock.move must have a state machine"); + let sm = STOCK_MOVE.state_machine.expect("stock.move must have a state machine"); assert_eq!(sm.state_field, "state"); assert_eq!(sm.states.len(), 7); assert!(!sm.transitions.is_empty()); @@ -1269,86 +535,53 @@ mod tests { #[test] fn stock_move_product_qty_is_computed() { - let f = STOCK_MOVE - .fields - .iter() - .find(|f| f.name == "product_qty") - .unwrap(); + let f = STOCK_MOVE.fields.iter().find(|f| f.name == "product_qty").unwrap(); assert_eq!(f.computed, Some("_compute_product_qty")); assert_eq!(f.kind, OdooFieldKind::Float); } #[test] fn stock_move_reservation_policy_fields_present() { let ns: Vec<&str> = STOCK_MOVE.fields.iter().map(|f| f.name).collect(); - assert!( - ns.contains(&"reservation_method") - && ns.contains(&"reservation_date") - && ns.contains(&"procure_method") - && ns.contains(&"priority") - ); + assert!(ns.contains(&"reservation_method") && ns.contains(&"reservation_date") + && ns.contains(&"procure_method") && ns.contains(&"priority")); } #[test] fn stock_quant_reservation_invariant_captured() { - let f = STOCK_QUANT - .fields - .iter() - .find(|f| f.name == "reserved_quantity") - .unwrap(); + let f = STOCK_QUANT.fields.iter().find(|f| f.name == "reserved_quantity").unwrap(); assert_eq!(f.semantic_role, OdooSemanticRole::Quantity); assert!(!STOCK_QUANT.constraints.is_empty()); } #[test] fn stock_quant_has_removal_strategy_methods() { let ns: Vec<&str> = STOCK_QUANT.methods.iter().map(|m| m.name).collect(); - assert!( - ns.contains(&"_gather") - && ns.contains(&"_get_removal_strategy") - && ns.contains(&"_get_reserve_quantity") - && ns.contains(&"_update_available_quantity") - ); + assert!(ns.contains(&"_gather") && ns.contains(&"_get_removal_strategy") + && ns.contains(&"_get_reserve_quantity") && ns.contains(&"_update_available_quantity")); } #[test] fn stock_picking_state_is_computed() { - let f = STOCK_PICKING - .fields - .iter() - .find(|f| f.name == "state") - .unwrap(); + let f = STOCK_PICKING.fields.iter().find(|f| f.name == "state").unwrap(); assert_eq!(f.computed, Some("_compute_state")); } #[test] fn stock_picking_has_state_machine() { - let sm = STOCK_PICKING - .state_machine - .expect("stock.picking must have a state machine"); + let sm = STOCK_PICKING.state_machine.expect("stock.picking must have a state machine"); assert_eq!(sm.state_field, "state"); assert_eq!(sm.states.len(), 6); } #[test] fn stock_picking_move_type_is_policy() { - let f = STOCK_PICKING - .fields - .iter() - .find(|f| f.name == "move_type") - .unwrap(); + let f = STOCK_PICKING.fields.iter().find(|f| f.name == "move_type").unwrap(); assert_eq!(f.semantic_role, OdooSemanticRole::Policy); } #[test] fn stock_location_removal_strategy_is_policy() { - let f = STOCK_LOCATION - .fields - .iter() - .find(|f| f.name == "removal_strategy_id") - .unwrap(); + let f = STOCK_LOCATION.fields.iter().find(|f| f.name == "removal_strategy_id").unwrap(); assert_eq!(f.kind, OdooFieldKind::Many2one); assert_eq!(f.semantic_role, OdooSemanticRole::Policy); } #[test] fn stock_location_has_bypass_method() { - assert!(STOCK_LOCATION - .methods - .iter() - .any(|m| m.name == "should_bypass_reservation")); + assert!(STOCK_LOCATION.methods.iter().any(|m| m.name == "should_bypass_reservation")); } #[test] fn stock_warehouse_has_steps_policy_fields() { @@ -1358,22 +591,13 @@ mod tests { #[test] fn all_entities_are_curated() { for e in ENTITIES { - assert_eq!( - e.provenance.confidence, - OdooConfidence::Curated, - "{} must be Curated", - e.model_name - ); + assert_eq!(e.provenance.confidence, OdooConfidence::Curated, "{} must be Curated", e.model_name); } } #[test] fn all_entities_cite_l7_doc() { for e in ENTITIES { - assert_eq!( - e.provenance.l_doc, "L7-STOCK.md", - "{} must cite L7 doc", - e.model_name - ); + assert_eq!(e.provenance.l_doc, "L7-STOCK.md", "{} must cite L7 doc", e.model_name); } } } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l8.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l8.rs index 7dbafea4..cb493ef1 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l8.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l8.rs @@ -35,12 +35,7 @@ macro_rules! f { macro_rules! m { ($name:expr, $kind:expr, $ret:expr) => { - OdooMethod { - name: $name, - kind: $kind, - return_kind: $ret, - triggers: &[], - } + OdooMethod { name: $name, kind: $kind, return_kind: $ret, triggers: &[] } }; } @@ -53,93 +48,33 @@ pub const PRODUCT_CATEGORY: OdooEntity = OdooEntity { pricelist categ ancestor check; company-dependent income/expense GL accounts \ (account resolution waterfall R7).", fields: &[ - f!( - "name", - OdooFieldKind::Char, - None, - true, - None, - &[], - OdooSemanticRole::Identity - ), + f!("name", OdooFieldKind::Char, None, true, None, &[], OdooSemanticRole::Identity), // Recursive breadcrumb "All / Consumable / Electronic". - f!( - "complete_name", - OdooFieldKind::Computed, - None, - false, - Some("_compute_complete_name"), - &["name", "parent_id.complete_name"], - OdooSemanticRole::Identity - ), + f!("complete_name", OdooFieldKind::Computed, None, false, + Some("_compute_complete_name"), &["name", "parent_id.complete_name"], + OdooSemanticRole::Identity), // Cascade delete; DFS cycle guard _check_category_recursion. - f!( - "parent_id", - OdooFieldKind::Many2one, - Some("product.category"), - false, - None, - &[], - OdooSemanticRole::Reference - ), + f!("parent_id", OdooFieldKind::Many2one, Some("product.category"), false, + None, &[], OdooSemanticRole::Reference), // Materialized closure "1/4/7/" — pricelist rule categ prefix check. - f!( - "parent_path", - OdooFieldKind::Char, - None, - false, - None, - &[], - OdooSemanticRole::Reference - ), - f!( - "child_id", - OdooFieldKind::One2many, - Some("product.category"), - false, - None, - &[], - OdooSemanticRole::Reference - ), + f!("parent_path", OdooFieldKind::Char, None, false, None, &[], + OdooSemanticRole::Reference), + f!("child_id", OdooFieldKind::One2many, Some("product.category"), false, + None, &[], OdooSemanticRole::Reference), // company_dependent; income account for customer invoices (R6/R7). - f!( - "property_account_income_categ_id", - OdooFieldKind::Many2one, - Some("account.account"), - false, - None, - &[], - OdooSemanticRole::Tax - ), + f!("property_account_income_categ_id", OdooFieldKind::Many2one, + Some("account.account"), false, None, &[], OdooSemanticRole::Tax), // company_dependent; expense/COGS account for vendor bills. - f!( - "property_account_expense_categ_id", - OdooFieldKind::Many2one, - Some("account.account"), - false, - None, - &[], - OdooSemanticRole::Tax - ), + f!("property_account_expense_categ_id", OdooFieldKind::Many2one, + Some("account.account"), false, None, &[], OdooSemanticRole::Tax), ], methods: &[ - m!( - "_check_category_recursion", - OdooMethodKind::Constrain, - OdooReturnKind::Unit - ), + m!("_check_category_recursion", OdooMethodKind::Constrain, OdooReturnKind::Unit), // Account resolution waterfall (R7): product prop → categ walk → company default. - m!( - "_get_product_accounts", - OdooMethodKind::Helper, - OdooReturnKind::Dict - ), + m!("_get_product_accounts", OdooMethodKind::Helper, OdooReturnKind::Dict), ], decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["parent_id"], - }, + OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, targets: &["parent_id"] }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["name", "parent_id.complete_name"], @@ -155,14 +90,8 @@ pub const PRODUCT_CATEGORY: OdooEntity = OdooEntity { l_doc: "L8-PRODUCT-UOM-PRICELIST.md", l_doc_lines: (180, 238), odoo_source: &[ - OdooSourceRef { - path: "addons/product/models/product_category.py", - line_range: (1, 69), - }, - OdooSourceRef { - path: "addons/account/models/product.py", - line_range: (13, 29), - }, + OdooSourceRef { path: "addons/product/models/product_category.py", line_range: (1, 69) }, + OdooSourceRef { path: "addons/account/models/product.py", line_range: (13, 29) }, ], confidence: OdooConfidence::Curated, regulation_iri: &[], @@ -180,136 +109,53 @@ pub const UOM_UOM: OdooEntity = OdooEntity { SQL constraints: factor!=0, rounding>0. \ Stock guard: blocks factor change when open moves/quants (R21).", fields: &[ - f!( - "name", - OdooFieldKind::Char, - None, - true, - None, - &[], - OdooSemanticRole::Identity - ), - f!( - "category_id", - OdooFieldKind::Many2one, - Some("uom.category"), - true, - None, - &[], - OdooSemanticRole::Reference - ), + f!("name", OdooFieldKind::Char, None, true, None, &[], OdooSemanticRole::Identity), + f!("category_id", OdooFieldKind::Many2one, Some("uom.category"), true, + None, &[], OdooSemanticRole::Reference), // Ratio vs reference. Bigger UoM: factor<1 (dozen≈0.0833); smaller: factor>1. - f!( - "factor", - OdooFieldKind::Float, - None, - true, - None, - &[], - OdooSemanticRole::Quantity - ), - f!( - "factor_inv", - OdooFieldKind::Computed, - None, - false, - Some("_compute_factor_inv"), - &["factor"], - OdooSemanticRole::Quantity - ), + f!("factor", OdooFieldKind::Float, None, true, None, &[], OdooSemanticRole::Quantity), + f!("factor_inv", OdooFieldKind::Computed, None, false, + Some("_compute_factor_inv"), &["factor"], OdooSemanticRole::Quantity), // Precision step e.g. 0.01, 1.0. SQL constraint: rounding>0. - f!( - "rounding", - OdooFieldKind::Float, - None, - true, - None, - &[], - OdooSemanticRole::Quantity - ), + f!("rounding", OdooFieldKind::Float, None, true, None, &[], OdooSemanticRole::Quantity), // bigger | reference | smaller; each category has exactly one 'reference'. - f!( - "uom_type", - OdooFieldKind::Selection, - None, - true, - None, - &[], - OdooSemanticRole::Policy - ), - f!( - "active", - OdooFieldKind::Boolean, - None, - true, - None, - &[], - OdooSemanticRole::Status - ), + f!("uom_type", OdooFieldKind::Selection, None, true, None, &[], OdooSemanticRole::Policy), + f!("active", OdooFieldKind::Boolean, None, true, None, &[], OdooSemanticRole::Status), ], methods: &[ // Core qty conversion (R5); rounding_method defaults 'UP', stock uses 'HALF-UP'. - m!( - "_compute_quantity", - OdooMethodKind::Helper, - OdooReturnKind::Number - ), + m!("_compute_quantity", OdooMethodKind::Helper, OdooReturnKind::Number), // Price conversion (R5): no rounding; called from lst_price + pricelist fixed (R2, R13). - m!( - "_compute_price", - OdooMethodKind::Helper, - OdooReturnKind::Number - ), - m!( - "_compute_factor_inv", - OdooMethodKind::Compute, - OdooReturnKind::Unit - ), + m!("_compute_price", OdooMethodKind::Helper, OdooReturnKind::Number), + m!("_compute_factor_inv", OdooMethodKind::Compute, OdooReturnKind::Unit), // Stock guard (R21): blocks factor write when open stock.move/quant uses this UoM. m!("write", OdooMethodKind::Override, OdooReturnKind::Boolean), ], - decorators: &[OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["factor"], - }], + decorators: &[ + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["factor"] }, + ], state_machine: None, constraints: &[ - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "factor != 0", - source_method: None, - }, - OdooConstraint { - kind: OdooConstraintKind::Sql, - condition: "rounding > 0", - source_method: None, - }, + OdooConstraint { kind: OdooConstraintKind::Sql, condition: "factor != 0", + source_method: None }, + OdooConstraint { kind: OdooConstraintKind::Sql, condition: "rounding > 0", + source_method: None }, // Each category has exactly one uom_type='reference' with factor=1.0 (data-seed level). - OdooConstraint { - kind: OdooConstraintKind::Domain, + OdooConstraint { kind: OdooConstraintKind::Domain, condition: "Each uom.category has exactly one reference unit (factor=1.0)", - source_method: None, - }, - OdooConstraint { - kind: OdooConstraintKind::Python, + source_method: None }, + OdooConstraint { kind: OdooConstraintKind::Python, condition: "Cannot change factor when open stock.move or non-zero stock.quant \ references this UoM", - source_method: Some("write"), - }, + source_method: Some("write") }, ], provenance: OdooProvenance { l_doc: "L8-PRODUCT-UOM-PRICELIST.md", l_doc_lines: (119, 177), odoo_source: &[ // Core uom module absent from clone; reconstructed via GitHub WebFetch (R5). - OdooSourceRef { - path: "addons/uom/models/uom_uom.py", - line_range: (1, 200), - }, - OdooSourceRef { - path: "addons/stock/models/product.py", - line_range: (1344, 1375), - }, + OdooSourceRef { path: "addons/uom/models/uom_uom.py", line_range: (1, 200) }, + OdooSourceRef { path: "addons/stock/models/product.py", line_range: (1344, 1375) }, ], confidence: OdooConfidence::Curated, regulation_iri: &[], @@ -326,256 +172,77 @@ pub const PRODUCT_TEMPLATE: OdooEntity = OdooEntity { Holds list_price, company-dependent standard_price, currency_id. \ _price_compute + _get_contextual_price are the pricing entry points (R16, R22).", fields: &[ - f!( - "name", - OdooFieldKind::Char, - None, - true, - None, - &[], - OdooSemanticRole::Identity - ), + f!("name", OdooFieldKind::Char, None, true, None, &[], OdooSemanticRole::Identity), // consu | service | combo. combo: combo_ids required, attribute_line_ids forbidden. - f!( - "type", - OdooFieldKind::Selection, - None, - true, - None, - &[], - OdooSemanticRole::Policy - ), - f!( - "active", - OdooFieldKind::Boolean, - None, - true, - None, - &[], - OdooSemanticRole::Status - ), + f!("type", OdooFieldKind::Selection, None, true, None, &[], OdooSemanticRole::Policy), + f!("active", OdooFieldKind::Boolean, None, true, None, &[], OdooSemanticRole::Status), // Base sale price per default UoM; variant lst_price adds price_extra (R2). - f!( - "list_price", - OdooFieldKind::Float, - None, - false, - None, - &[], - OdooSemanticRole::Money - ), + f!("list_price", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Money), // company_dependent; delegated compute from single variant when one variant exists (R3). - f!( - "standard_price", - OdooFieldKind::Computed, - None, - false, - Some("_compute_template_field_from_variant_field"), - &["product_variant_ids", "product_variant_ids.standard_price"], - OdooSemanticRole::Money - ), + f!("standard_price", OdooFieldKind::Computed, None, false, + Some("_compute_template_field_from_variant_field"), + &["product_variant_ids", "product_variant_ids.standard_price"], + OdooSemanticRole::Money), // company_id.currency_id OR main_company.currency_id (R4). - f!( - "currency_id", - OdooFieldKind::Computed, - Some("res.currency"), - false, - Some("_compute_currency_id"), - &["company_id"], - OdooSemanticRole::Money - ), + f!("currency_id", OdooFieldKind::Computed, Some("res.currency"), false, + Some("_compute_currency_id"), &["company_id"], OdooSemanticRole::Money), // env.company.currency_id; depends_context('company') (R4). - f!( - "cost_currency_id", - OdooFieldKind::Computed, - Some("res.currency"), - false, - Some("_compute_cost_currency_id"), - &[], - OdooSemanticRole::Money - ), - f!( - "uom_id", - OdooFieldKind::Many2one, - Some("uom.uom"), - true, - None, - &[], - OdooSemanticRole::Reference - ), - f!( - "uom_po_id", - OdooFieldKind::Many2one, - Some("uom.uom"), - true, - None, - &[], - OdooSemanticRole::Reference - ), - f!( - "categ_id", - OdooFieldKind::Many2one, - Some("product.category"), - true, - None, - &[], - OdooSemanticRole::Reference - ), - f!( - "company_id", - OdooFieldKind::Many2one, - Some("res.company"), - false, - None, - &[], - OdooSemanticRole::Reference - ), - f!( - "sale_ok", - OdooFieldKind::Boolean, - None, - true, - None, - &[], - OdooSemanticRole::Policy - ), + f!("cost_currency_id", OdooFieldKind::Computed, Some("res.currency"), false, + Some("_compute_cost_currency_id"), &[], OdooSemanticRole::Money), + f!("uom_id", OdooFieldKind::Many2one, Some("uom.uom"), true, + None, &[], OdooSemanticRole::Reference), + f!("uom_po_id", OdooFieldKind::Many2one, Some("uom.uom"), true, + None, &[], OdooSemanticRole::Reference), + f!("categ_id", OdooFieldKind::Many2one, Some("product.category"), true, + None, &[], OdooSemanticRole::Reference), + f!("company_id", OdooFieldKind::Many2one, Some("res.company"), false, + None, &[], OdooSemanticRole::Reference), + f!("sale_ok", OdooFieldKind::Boolean, None, true, None, &[], OdooSemanticRole::Policy), // stored+recomputable; no-op base; overridden by purchase module. - f!( - "purchase_ok", - OdooFieldKind::Boolean, - None, - true, - None, - &[], - OdooSemanticRole::Policy - ), + f!("purchase_ok", OdooFieldKind::Boolean, None, true, None, &[], OdooSemanticRole::Policy), // Drives variant matrix Cartesian product. - f!( - "attribute_line_ids", - OdooFieldKind::One2many, - Some("product.template.attribute.line"), - false, - None, - &[], - OdooSemanticRole::Reference - ), - f!( - "product_variant_ids", - OdooFieldKind::One2many, - Some("product.product"), - false, - None, - &[], - OdooSemanticRole::Reference - ), + f!("attribute_line_ids", OdooFieldKind::One2many, + Some("product.template.attribute.line"), false, None, &[], OdooSemanticRole::Reference), + f!("product_variant_ids", OdooFieldKind::One2many, Some("product.product"), false, + None, &[], OdooSemanticRole::Reference), // Non-empty only when type='combo'. - f!( - "combo_ids", - OdooFieldKind::Many2many, - Some("product.combo"), - false, - None, - &[], - OdooSemanticRole::Reference - ), + f!("combo_ids", OdooFieldKind::Many2many, Some("product.combo"), false, + None, &[], OdooSemanticRole::Reference), // company_dependent product-level income account override (R7). - f!( - "property_account_income_id", - OdooFieldKind::Many2one, - Some("account.account"), - false, - None, - &[], - OdooSemanticRole::Tax - ), - f!( - "property_account_expense_id", - OdooFieldKind::Many2one, - Some("account.account"), - false, - None, - &[], - OdooSemanticRole::Tax - ), + f!("property_account_income_id", OdooFieldKind::Many2one, Some("account.account"), + false, None, &[], OdooSemanticRole::Tax), + f!("property_account_expense_id", OdooFieldKind::Many2one, Some("account.account"), + false, None, &[], OdooSemanticRole::Tax), ], methods: &[ // Returns {product_id: float}: raw price → attr extra → UoM → currency (R16). - m!( - "_price_compute", - OdooMethodKind::Helper, - OdooReturnKind::Dict - ), + m!("_price_compute", OdooMethodKind::Helper, OdooReturnKind::Dict), // Reads context pricelist/qty/uom/date; calls pricelist._get_product_price (R22). - m!( - "_get_contextual_price", - OdooMethodKind::Helper, - OdooReturnKind::Number - ), - m!( - "_get_contextual_pricelist", - OdooMethodKind::Helper, - OdooReturnKind::Record - ), - m!( - "_compute_currency_id", - OdooMethodKind::Compute, - OdooReturnKind::Unit - ), - m!( - "_compute_cost_currency_id", - OdooMethodKind::Compute, - OdooReturnKind::Unit - ), - m!( - "_compute_template_field_from_variant_field", - OdooMethodKind::Compute, - OdooReturnKind::Unit - ), + m!("_get_contextual_price", OdooMethodKind::Helper, OdooReturnKind::Number), + m!("_get_contextual_pricelist", OdooMethodKind::Helper, OdooReturnKind::Record), + m!("_compute_currency_id", OdooMethodKind::Compute, OdooReturnKind::Unit), + m!("_compute_cost_currency_id", OdooMethodKind::Compute, OdooReturnKind::Unit), + m!("_compute_template_field_from_variant_field", OdooMethodKind::Compute, + OdooReturnKind::Unit), // Recomputes Cartesian product after attribute line changes (R18). // Limit: ir.config_parameter product.dynamic_variant_limit (default 1000). - m!( - "_create_variant_ids", - OdooMethodKind::Helper, - OdooReturnKind::Unit - ), + m!("_create_variant_ids", OdooMethodKind::Helper, OdooReturnKind::Unit), // Account resolution: product prop → categ walk → company default (R7). - m!( - "_get_product_accounts", - OdooMethodKind::Helper, - OdooReturnKind::Dict - ), + m!("_get_product_accounts", OdooMethodKind::Helper, OdooReturnKind::Dict), // Invoice line unit price: lst_price → UoM → fiscal-pos tax adapt → currency (R23). - m!( - "_get_tax_included_unit_price", - OdooMethodKind::Helper, - OdooReturnKind::Number - ), + m!("_get_tax_included_unit_price", OdooMethodKind::Helper, OdooReturnKind::Number), // type='combo': combo_ids >= 1 and attribute_line_ids empty (R1). - m!( - "_check_combo_constraints", - OdooMethodKind::Constrain, - OdooReturnKind::Unit - ), + m!("_check_combo_constraints", OdooMethodKind::Constrain, OdooReturnKind::Unit), // Cross-model: blocks uom_id change if posted account_move_line has different UoM (R20). - m!( - "_check_uom_id", - OdooMethodKind::Constrain, - OdooReturnKind::Unit - ), + m!("_check_uom_id", OdooMethodKind::Constrain, OdooReturnKind::Unit), ], decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["company_id"], - }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["company_id"] }, OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["product_variant_ids", "product_variant_ids.standard_price"], }, - OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["uom_id"], - }, + OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, targets: &["uom_id"] }, OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, targets: &["type", "attribute_line_ids", "combo_ids"], @@ -603,10 +270,7 @@ pub const PRODUCT_TEMPLATE: OdooEntity = OdooEntity { path: "addons/product/models/product_template.py", line_range: (1, 1598), }, - OdooSourceRef { - path: "addons/account/models/product.py", - line_range: (67, 293), - }, + OdooSourceRef { path: "addons/account/models/product.py", line_range: (67, 293) }, ], confidence: OdooConfidence::Curated, regulation_iri: &[], @@ -622,102 +286,36 @@ pub const PRODUCT_PRODUCT: OdooEntity = OdooEntity { price_extra ± UoM conversion (R2). company_dependent standard_price ≥ 0 \ (R3). combination_indices unique index within template (R18).", fields: &[ - f!( - "product_tmpl_id", - OdooFieldKind::Many2one, - Some("product.template"), - true, - None, - &[], - OdooSemanticRole::Reference - ), + f!("product_tmpl_id", OdooFieldKind::Many2one, Some("product.template"), true, + None, &[], OdooSemanticRole::Reference), // list_price + price_extra; context 'uom' triggers uom._compute_price (R2). - f!( - "lst_price", - OdooFieldKind::Computed, - None, - false, - Some("_compute_product_lst_price"), - &["list_price", "price_extra"], - OdooSemanticRole::Money - ), + f!("lst_price", OdooFieldKind::Computed, None, false, + Some("_compute_product_lst_price"), &["list_price", "price_extra"], + OdooSemanticRole::Money), // Sum of product_template_attribute_value.price_extra for this variant's PTAVs. - f!( - "price_extra", - OdooFieldKind::Computed, - None, - false, - Some("_compute_product_price_extra"), - &["product_template_attribute_value_ids.price_extra"], - OdooSemanticRole::Money - ), + f!("price_extra", OdooFieldKind::Computed, None, false, + Some("_compute_product_price_extra"), + &["product_template_attribute_value_ids.price_extra"], + OdooSemanticRole::Money), // company_dependent; constraint: standard_price >= 0 (R3). - f!( - "standard_price", - OdooFieldKind::Float, - None, - false, - None, - &[], - OdooSemanticRole::Money - ), + f!("standard_price", OdooFieldKind::Float, None, false, None, &[], + OdooSemanticRole::Money), // Dedup key: ",".join(sorted ptav ids). Unique index: (tmpl_id, combo_indices) active. - f!( - "combination_indices", - OdooFieldKind::Char, - None, - false, - None, - &[], - OdooSemanticRole::Identity - ), - f!( - "product_template_attribute_value_ids", - OdooFieldKind::Many2many, - Some("product.template.attribute.value"), - false, - None, - &[], - OdooSemanticRole::Reference - ), - f!( - "active", - OdooFieldKind::Boolean, - None, - true, - None, - &[], - OdooSemanticRole::Status - ), + f!("combination_indices", OdooFieldKind::Char, None, false, None, &[], + OdooSemanticRole::Identity), + f!("product_template_attribute_value_ids", OdooFieldKind::Many2many, + Some("product.template.attribute.value"), false, None, &[], + OdooSemanticRole::Reference), + f!("active", OdooFieldKind::Boolean, None, true, None, &[], OdooSemanticRole::Status), ], methods: &[ - m!( - "_compute_product_lst_price", - OdooMethodKind::Compute, - OdooReturnKind::Unit - ), + m!("_compute_product_lst_price", OdooMethodKind::Compute, OdooReturnKind::Unit), // Inverse: value = convert(lst_price) - price_extra → write({'list_price': value}). - m!( - "_set_product_lst_price", - OdooMethodKind::Inverse, - OdooReturnKind::Unit - ), - m!( - "_compute_product_price_extra", - OdooMethodKind::Compute, - OdooReturnKind::Unit - ), + m!("_set_product_lst_price", OdooMethodKind::Inverse, OdooReturnKind::Unit), + m!("_compute_product_price_extra", OdooMethodKind::Compute, OdooReturnKind::Unit), // Adds no_variant_attributes_price_extra from context key (R16). - m!( - "_price_compute", - OdooMethodKind::Override, - OdooReturnKind::Dict - ), - m!( - "_onchange_standard_price", - OdooMethodKind::Onchange, - OdooReturnKind::Unit - ), + m!("_price_compute", OdooMethodKind::Override, OdooReturnKind::Dict), + m!("_onchange_standard_price", OdooMethodKind::Onchange, OdooReturnKind::Unit), ], decorators: &[ OdooDecorator { @@ -728,10 +326,7 @@ pub const PRODUCT_PRODUCT: OdooEntity = OdooEntity { kind: OdooDecoratorKind::ApiDepends, targets: &["product_template_attribute_value_ids.price_extra"], }, - OdooDecorator { - kind: OdooDecoratorKind::ApiOnchange, - targets: &["standard_price"], - }, + OdooDecorator { kind: OdooDecoratorKind::ApiOnchange, targets: &["standard_price"] }, ], state_machine: None, constraints: &[ @@ -770,103 +365,31 @@ pub const PRODUCT_PRICELIST: OdooEntity = OdooEntity { L6 overlap: partner assignment (_get_partner_pricelist_multi AXIS-B \ → PricelistAssignmentAgent) is L6 territory.", fields: &[ - f!( - "name", - OdooFieldKind::Char, - None, - true, - None, - &[], - OdooSemanticRole::Identity - ), - f!( - "currency_id", - OdooFieldKind::Many2one, - Some("res.currency"), - true, - None, - &[], - OdooSemanticRole::Money - ), - f!( - "company_id", - OdooFieldKind::Many2one, - Some("res.company"), - false, - None, - &[], - OdooSemanticRole::Reference - ), - f!( - "country_group_ids", - OdooFieldKind::Many2many, - Some("res.country.group"), - false, - None, - &[], - OdooSemanticRole::Reference - ), - f!( - "item_ids", - OdooFieldKind::One2many, - Some("product.pricelist.item"), - false, - None, - &[], - OdooSemanticRole::Document - ), + f!("name", OdooFieldKind::Char, None, true, None, &[], OdooSemanticRole::Identity), + f!("currency_id", OdooFieldKind::Many2one, Some("res.currency"), true, + None, &[], OdooSemanticRole::Money), + f!("company_id", OdooFieldKind::Many2one, Some("res.company"), false, + None, &[], OdooSemanticRole::Reference), + f!("country_group_ids", OdooFieldKind::Many2many, Some("res.country.group"), false, + None, &[], OdooSemanticRole::Reference), + f!("item_ids", OdooFieldKind::One2many, Some("product.pricelist.item"), false, + None, &[], OdooSemanticRole::Document), // Lower sequence = higher priority when multiple pricelists qualify. - f!( - "sequence", - OdooFieldKind::Integer, - None, - false, - None, - &[], - OdooSemanticRole::Policy - ), - f!( - "active", - OdooFieldKind::Boolean, - None, - true, - None, - &[], - OdooSemanticRole::Status - ), + f!("sequence", OdooFieldKind::Integer, None, false, None, &[], OdooSemanticRole::Policy), + f!("active", OdooFieldKind::Boolean, None, true, None, &[], OdooSemanticRole::Status), ], methods: &[ // Core engine (R12): {product_id: (price, rule_id)}. Pre-fetches applicable rules, // iterates per product, first match → _compute_price; no match → list_price fallback. - m!( - "_compute_price_rule", - OdooMethodKind::Helper, - OdooReturnKind::Dict - ), - m!( - "_get_product_price", - OdooMethodKind::Helper, - OdooReturnKind::Number - ), + m!("_compute_price_rule", OdooMethodKind::Helper, OdooReturnKind::Dict), + m!("_get_product_price", OdooMethodKind::Helper, OdooReturnKind::Number), // Rule candidate fetch (R10): filter by pricelist_id, products, date, categ ancestry. // ORDER BY applied_on ASC, min_quantity DESC, categ_id DESC, id DESC. - m!( - "_get_applicable_rules_domain", - OdooMethodKind::Helper, - OdooReturnKind::Dict - ), + m!("_get_applicable_rules_domain", OdooMethodKind::Helper, OdooReturnKind::Dict), // Partner assignment (R15, AXIS-B): explicit property → country-group → fallback // waterfall. Fallback ordering is business-policy judgment → PricelistAssignmentAgent. - m!( - "_get_partner_pricelist_multi", - OdooMethodKind::Helper, - OdooReturnKind::Dict - ), - m!( - "_unlink_except_used_as_rule_base", - OdooMethodKind::Override, - OdooReturnKind::Boolean - ), + m!("_get_partner_pricelist_multi", OdooMethodKind::Helper, OdooReturnKind::Dict), + m!("_unlink_except_used_as_rule_base", OdooMethodKind::Override, OdooReturnKind::Boolean), ], decorators: &[], state_machine: None, @@ -897,233 +420,64 @@ pub const PRODUCT_PRICELIST_ITEM: OdooEntity = OdooEntity { Base resolvers: list_price/standard_price/pricelist (R14). \ DFS cycle guard prevents recursive pricelist chaining (R19).", fields: &[ - f!( - "pricelist_id", - OdooFieldKind::Many2one, - Some("product.pricelist"), - true, - None, - &[], - OdooSemanticRole::Reference - ), + f!("pricelist_id", OdooFieldKind::Many2one, Some("product.pricelist"), true, + None, &[], OdooSemanticRole::Reference), // 3_global | 2_product_category | 1_product | 0_product_variant. - f!( - "applied_on", - OdooFieldKind::Selection, - None, - true, - None, - &[], - OdooSemanticRole::Policy - ), - f!( - "categ_id", - OdooFieldKind::Many2one, - Some("product.category"), - false, - None, - &[], - OdooSemanticRole::Reference - ), - f!( - "product_tmpl_id", - OdooFieldKind::Many2one, - Some("product.template"), - false, - None, - &[], - OdooSemanticRole::Reference - ), - f!( - "product_id", - OdooFieldKind::Many2one, - Some("product.product"), - false, - None, - &[], - OdooSemanticRole::Reference - ), + f!("applied_on", OdooFieldKind::Selection, None, true, None, &[], OdooSemanticRole::Policy), + f!("categ_id", OdooFieldKind::Many2one, Some("product.category"), false, + None, &[], OdooSemanticRole::Reference), + f!("product_tmpl_id", OdooFieldKind::Many2one, Some("product.template"), false, + None, &[], OdooSemanticRole::Reference), + f!("product_id", OdooFieldKind::Many2one, Some("product.product"), false, + None, &[], OdooSemanticRole::Reference), // In product default UoM; qty already converted before _is_applicable_for check. - f!( - "min_quantity", - OdooFieldKind::Float, - None, - false, - None, - &[], - OdooSemanticRole::Quantity - ), - f!( - "date_start", - OdooFieldKind::Datetime, - None, - false, - None, - &[], - OdooSemanticRole::Date - ), - f!( - "date_end", - OdooFieldKind::Datetime, - None, - false, - None, - &[], - OdooSemanticRole::Date - ), + f!("min_quantity", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Quantity), + f!("date_start", OdooFieldKind::Datetime, None, false, None, &[], OdooSemanticRole::Date), + f!("date_end", OdooFieldKind::Datetime, None, false, None, &[], OdooSemanticRole::Date), // fixed | percentage | formula. - f!( - "compute_price", - OdooFieldKind::Selection, - None, - true, - None, - &[], - OdooSemanticRole::Policy - ), + f!("compute_price", OdooFieldKind::Selection, None, true, None, &[], OdooSemanticRole::Policy), // list_price | standard_price | pricelist. - f!( - "base", - OdooFieldKind::Selection, - None, - false, - None, - &[], - OdooSemanticRole::Policy - ), + f!("base", OdooFieldKind::Selection, None, false, None, &[], OdooSemanticRole::Policy), // Only when base='pricelist'; DFS cycle check on write (R19). - f!( - "base_pricelist_id", - OdooFieldKind::Many2one, - Some("product.pricelist"), - false, - None, - &[], - OdooSemanticRole::Reference - ), + f!("base_pricelist_id", OdooFieldKind::Many2one, Some("product.pricelist"), false, + None, &[], OdooSemanticRole::Reference), // fixed: stored in product UoM; UoM-converted on retrieval (R13-A). - f!( - "fixed_price", - OdooFieldKind::Float, - None, - false, - None, - &[], - OdooSemanticRole::Money - ), + f!("fixed_price", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Money), // percentage: discount %; negative = markup (R13-B). - f!( - "percent_price", - OdooFieldKind::Float, - None, - false, - None, - &[], - OdooSemanticRole::Money - ), + f!("percent_price", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Money), // formula: discount % on base; base=standard_price → label shows "Markup" (R13-C). - f!( - "price_discount", - OdooFieldKind::Float, - None, - false, - None, - &[], - OdooSemanticRole::Money - ), + f!("price_discount", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Money), // price_markup = -price_discount (computed inverse for standard_price display). - f!( - "price_markup", - OdooFieldKind::Computed, - None, - false, - Some("_compute_price_markup"), - &["price_discount"], - OdooSemanticRole::Money - ), + f!("price_markup", OdooFieldKind::Computed, None, false, + Some("_compute_price_markup"), &["price_discount"], OdooSemanticRole::Money), // Rounding step (precision_rounding e.g. 0.05 = nearest 5c), NOT decimal digits. - f!( - "price_round", - OdooFieldKind::Float, - None, - false, - None, - &[], - OdooSemanticRole::Money - ), + f!("price_round", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Money), // Additive surcharge in product UoM; UoM-converted before adding to formula price. - f!( - "price_surcharge", - OdooFieldKind::Float, - None, - false, - None, - &[], - OdooSemanticRole::Money - ), + f!("price_surcharge", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Money), // Min margin over base (not absolute floor): price >= base + price_min_margin. - f!( - "price_min_margin", - OdooFieldKind::Float, - None, - false, - None, - &[], - OdooSemanticRole::Money - ), - f!( - "price_max_margin", - OdooFieldKind::Float, - None, - false, - None, - &[], - OdooSemanticRole::Money - ), + f!("price_min_margin", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Money), + f!("price_max_margin", OdooFieldKind::Float, None, false, None, &[], OdooSemanticRole::Money), ], methods: &[ // Inner-loop applicability check (R11): min_quantity, categ parent_path prefix, // tmpl/variant id match. Called after candidate fetch in _compute_price_rule. - m!( - "_is_applicable_for", - OdooMethodKind::Helper, - OdooReturnKind::Boolean - ), + m!("_is_applicable_for", OdooMethodKind::Helper, OdooReturnKind::Boolean), // Three-way branch (R13): fixed→uom_cvt; percentage→base*(1-p/100); // formula→discount→round→surcharge→margin clamp. Empty self → list_price fallback. - m!( - "_compute_price", - OdooMethodKind::Helper, - OdooReturnKind::Number - ), + m!("_compute_price", OdooMethodKind::Helper, OdooReturnKind::Number), // Base resolver (R14): pricelist→recursive call; standard_price→cost_currency; // list_price→currency. Then currency_convert(src→pl.currency, round=False). - m!( - "_compute_base_price", - OdooMethodKind::Helper, - OdooReturnKind::Number - ), + m!("_compute_base_price", OdooMethodKind::Helper, OdooReturnKind::Number), // DFS cycle detection on write when base='pricelist' (R19). - m!( - "_check_pricelist_recursion", - OdooMethodKind::Constrain, - OdooReturnKind::Unit - ), - m!( - "_compute_price_markup", - OdooMethodKind::Compute, - OdooReturnKind::Unit - ), + m!("_check_pricelist_recursion", OdooMethodKind::Constrain, OdooReturnKind::Unit), + m!("_compute_price_markup", OdooMethodKind::Compute, OdooReturnKind::Unit), ], decorators: &[ OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, targets: &["base_pricelist_id", "pricelist_id"], }, - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["price_discount"], - }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["price_discount"] }, ], state_machine: None, constraints: &[ @@ -1181,19 +535,13 @@ mod tests { #[test] fn product_category_has_parent_path() { - let f = PRODUCT_CATEGORY - .fields - .iter() - .find(|f| f.name == "parent_path") - .unwrap(); + let f = PRODUCT_CATEGORY.fields.iter().find(|f| f.name == "parent_path").unwrap(); assert_eq!(f.kind, OdooFieldKind::Char); } #[test] fn uom_uom_sql_constraints() { - let sql: Vec<_> = UOM_UOM - .constraints - .iter() + let sql: Vec<_> = UOM_UOM.constraints.iter() .filter(|c| c.kind == OdooConstraintKind::Sql) .collect(); assert_eq!(sql.len(), 2, "factor!=0 and rounding>0"); @@ -1201,32 +549,20 @@ mod tests { #[test] fn product_template_curated() { - assert_eq!( - PRODUCT_TEMPLATE.provenance.confidence, - OdooConfidence::Curated - ); - assert_eq!( - PRODUCT_TEMPLATE.provenance.l_doc, - "L8-PRODUCT-UOM-PRICELIST.md" - ); + assert_eq!(PRODUCT_TEMPLATE.provenance.confidence, OdooConfidence::Curated); + assert_eq!(PRODUCT_TEMPLATE.provenance.l_doc, "L8-PRODUCT-UOM-PRICELIST.md"); } #[test] fn product_product_lst_price_computed() { - let lst = PRODUCT_PRODUCT - .fields - .iter() - .find(|f| f.name == "lst_price") - .unwrap(); + let lst = PRODUCT_PRODUCT.fields.iter().find(|f| f.name == "lst_price").unwrap(); assert_eq!(lst.kind, OdooFieldKind::Computed); assert_eq!(lst.computed, Some("_compute_product_lst_price")); } #[test] fn pricelist_item_has_applicable_check() { - let m = PRODUCT_PRICELIST_ITEM - .methods - .iter() + let m = PRODUCT_PRICELIST_ITEM.methods.iter() .find(|m| m.name == "_is_applicable_for") .unwrap(); assert_eq!(m.return_kind, OdooReturnKind::Boolean); @@ -1235,17 +571,10 @@ mod tests { #[test] fn all_entities_have_l8_ldoc() { for e in ENTITIES { - assert_eq!( - e.provenance.l_doc, "L8-PRODUCT-UOM-PRICELIST.md", - "{} has wrong l_doc", - e.model_name - ); - assert_eq!( - e.provenance.confidence, - OdooConfidence::Curated, - "{} not Curated", - e.model_name - ); + assert_eq!(e.provenance.l_doc, "L8-PRODUCT-UOM-PRICELIST.md", + "{} has wrong l_doc", e.model_name); + assert_eq!(e.provenance.confidence, OdooConfidence::Curated, + "{} not Curated", e.model_name); } } } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/l9.rs b/crates/lance-graph-ontology/src/odoo_blueprint/l9.rs index 0c916d32..ef35246c 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l9.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l9.rs @@ -41,272 +41,102 @@ pub const ACCOUNT_FISCAL_POSITION: OdooEntity = OdooEntity { description: "Named tax-and-account mapping applied to a partner; selected by \ _get_fiscal_position (FiscalPositionResolver savant) or manual override.", fields: &[ - OdooField { - name: "name", - kind: OdooFieldKind::Char, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Identity, - }, + OdooField { name: "name", kind: OdooFieldKind::Char, target: None, required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, // Sort key: company-specificity first (-len(parent_ids)), then sequence ASC. - OdooField { - name: "sequence", - kind: OdooFieldKind::Integer, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, - OdooField { - name: "active", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Status, - }, - OdooField { - name: "company_id", - kind: OdooFieldKind::Many2one, - target: Some("res.company"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "sequence", kind: OdooFieldKind::Integer, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { name: "active", kind: OdooFieldKind::Boolean, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, + OdooField { name: "company_id", kind: OdooFieldKind::Many2one, target: Some("res.company"), + required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, // auto_apply=True → candidate for _get_fiscal_position auto-detection (R8). - OdooField { - name: "auto_apply", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, + OdooField { name: "auto_apply", kind: OdooFieldKind::Boolean, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, // Predicate 1 in _get_fpos_validation_functions: partner must have VAT. - OdooField { - name: "vat_required", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, + OdooField { name: "vat_required", kind: OdooFieldKind::Boolean, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, // Predicate 4: partner.country_id == this (absent → any country). - OdooField { - name: "country_id", - kind: OdooFieldKind::Many2one, - target: Some("res.country"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "country_id", kind: OdooFieldKind::Many2one, target: Some("res.country"), + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, // Predicate 5: partner.country_id in group.country_ids AND state not excluded. - OdooField { - name: "country_group_id", - kind: OdooFieldKind::Many2one, - target: Some("res.country.group"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "country_group_id", kind: OdooFieldKind::Many2one, + target: Some("res.country.group"), required: false, computed: None, depends: &[], + semantic_role: OdooSemanticRole::Reference }, // Predicate 3: partner.state_id in this set (empty → any state). - OdooField { - name: "state_ids", - kind: OdooFieldKind::Many2many, - target: Some("res.country.state"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "state_ids", kind: OdooFieldKind::Many2many, + target: Some("res.country.state"), required: false, computed: None, depends: &[], + semantic_role: OdooSemanticRole::Reference }, // Predicate 2: padded with leading zeros by _convert_zip_values (R11). - OdooField { - name: "zip_from", - kind: OdooFieldKind::Char, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, - OdooField { - name: "zip_to", - kind: OdooFieldKind::Char, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, - OdooField { - name: "foreign_vat", - kind: OdooFieldKind::Char, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Identity, - }, + OdooField { name: "zip_from", kind: OdooFieldKind::Char, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { name: "zip_to", kind: OdooFieldKind::Char, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { name: "foreign_vat", kind: OdooFieldKind::Char, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, // True if this fpos == company.domestic_fiscal_position_id (R12). - OdooField { - name: "is_domestic", - kind: OdooFieldKind::Boolean, - target: None, - required: false, + OdooField { name: "is_domestic", kind: OdooFieldKind::Boolean, target: None, required: false, computed: Some("_compute_is_domestic"), depends: &["company_id.domestic_fiscal_position_id"], - semantic_role: OdooSemanticRole::Status, - }, + semantic_role: OdooSemanticRole::Status }, // {src_tax_id: [dest_tax_id, ...]} — used by map_tax (R9, R20). // L3 overlap: content is tax repartition data; the MAP structure is L9-authoritative. - OdooField { - name: "tax_map", - kind: OdooFieldKind::Computed, - target: None, - required: false, - computed: Some("_compute_tax_map"), - depends: &["tax_ids"], - semantic_role: OdooSemanticRole::Tax, - }, + OdooField { name: "tax_map", kind: OdooFieldKind::Computed, target: None, required: false, + computed: Some("_compute_tax_map"), depends: &["tax_ids"], + semantic_role: OdooSemanticRole::Tax }, // {src_account_id: dest_account_id} — used by map_account (R10, R20). - OdooField { - name: "account_map", - kind: OdooFieldKind::Computed, - target: None, - required: false, + OdooField { name: "account_map", kind: OdooFieldKind::Computed, target: None, required: false, computed: Some("_compute_account_map"), depends: &["account_ids.account_src_id", "account_ids.account_dest_id"], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "account_ids", - kind: OdooFieldKind::One2many, - target: Some("account.fiscal.position.account"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "note", - kind: OdooFieldKind::Html, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Document, - }, + semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "account_ids", kind: OdooFieldKind::One2many, + target: Some("account.fiscal.position.account"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "note", kind: OdooFieldKind::Html, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Document }, ], methods: &[ // R8 / FiscalPositionResolver savant boundary ──────────────────── // @api.model: precedence → (1) manual property wins; (2) no country → empty; // (3) auto-detect via _get_first_matching_fpos (AXIS-B). - OdooMethod { - name: "_get_fiscal_position", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Record, - triggers: &[], - }, + OdooMethod { name: "_get_fiscal_position", kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Record, triggers: &[] }, // Company-specific first, then sequence ASC; runs all 5 predicates. - OdooMethod { - name: "_get_first_matching_fpos", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Record, - triggers: &[], - }, + OdooMethod { name: "_get_first_matching_fpos", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Record, triggers: &[] }, // Returns 5 lambdas: vat_required, zip_range, state, country, country_group. - OdooMethod { - name: "_get_fpos_validation_functions", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, + OdooMethod { name: "_get_fpos_validation_functions", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, triggers: &[] }, // R9: taxes → mapped taxes; special: empty fpos + fpos-aware taxes → remove all. - OdooMethod { - name: "map_tax", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Recordset, - triggers: &[], - }, + OdooMethod { name: "map_tax", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Recordset, triggers: &[] }, // R10: account_id → mapped account via account_map; identity if no mapping. - OdooMethod { - name: "map_account", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Record, - triggers: &[], - }, + OdooMethod { name: "map_account", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Record, triggers: &[] }, // R11: pads digit-only zips to equal length for correct lexicographic range match. - OdooMethod { - name: "_convert_zip_values", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, - OdooMethod { - name: "create", - kind: OdooMethodKind::ApiModelCreateMulti, - return_kind: OdooReturnKind::Recordset, - triggers: &[], - }, - OdooMethod { - name: "write", - kind: OdooMethodKind::Override, - return_kind: OdooReturnKind::Boolean, - triggers: &[], - }, - OdooMethod { - name: "_compute_is_domestic", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_tax_map", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_account_map", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "_convert_zip_values", kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { name: "create", kind: OdooMethodKind::ApiModelCreateMulti, + return_kind: OdooReturnKind::Recordset, triggers: &[] }, + OdooMethod { name: "write", kind: OdooMethodKind::Override, + return_kind: OdooReturnKind::Boolean, triggers: &[] }, + OdooMethod { name: "_compute_is_domestic", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_tax_map", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_account_map", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, ], decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["company_id.domestic_fiscal_position_id"], - }, - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["tax_ids"], - }, - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["account_ids.account_src_id", "account_ids.account_dest_id"], - }, - OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["zip_from", "zip_to"], - }, - OdooDecorator { - kind: OdooDecoratorKind::ApiConstrains, - targets: &["country_id", "country_group_id", "state_ids", "foreign_vat"], - }, - OdooDecorator { - kind: OdooDecoratorKind::ApiModel, - targets: &[], - }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, + targets: &["company_id.domestic_fiscal_position_id"] }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["tax_ids"] }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, + targets: &["account_ids.account_src_id", "account_ids.account_dest_id"] }, + OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, targets: &["zip_from", "zip_to"] }, + OdooDecorator { kind: OdooDecoratorKind::ApiConstrains, + targets: &["country_id", "country_group_id", "state_ids", "foreign_vat"] }, + OdooDecorator { kind: OdooDecoratorKind::ApiModel, targets: &[] }, ], state_machine: None, constraints: &[ @@ -346,43 +176,18 @@ pub const ACCOUNT_FISCAL_POS_ACCOUNT: OdooEntity = OdooEntity { description: "One account-substitution rule inside a fiscal position: \ account_src_id → account_dest_id when the position is active (map_account).", fields: &[ - OdooField { - name: "position_id", - kind: OdooFieldKind::Many2one, - target: Some("account.fiscal.position"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "company_id", - kind: OdooFieldKind::Many2one, - target: Some("res.company"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "position_id", kind: OdooFieldKind::Many2one, + target: Some("account.fiscal.position"), required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "company_id", kind: OdooFieldKind::Many2one, target: Some("res.company"), + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, // Lookup key in account_map at posting time. - OdooField { - name: "account_src_id", - kind: OdooFieldKind::Many2one, - target: Some("account.account"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "account_dest_id", - kind: OdooFieldKind::Many2one, - target: Some("account.account"), - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "account_src_id", kind: OdooFieldKind::Many2one, + target: Some("account.account"), required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "account_dest_id", kind: OdooFieldKind::Many2one, + target: Some("account.account"), required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, ], methods: &[], decorators: &[], @@ -424,286 +229,109 @@ pub const ACCOUNT_FISCAL_POS_ACCOUNT: OdooEntity = OdooEntity { pub const RES_PARTNER_ACCOUNTING: OdooEntity = OdooEntity { model_name: "res.partner", kind: OdooEntityKind::Model, - description: - "Partner extended by account module: AR/AP property accounts, payment terms, \ + description: "Partner extended by account module: AR/AP property accounts, payment terms, \ fiscal-position override, trust/dunning signal, rank counters, credit-limit, EDI.", fields: &[ // R1: company_dependent AR/AP accounts; ondelete=restrict; synced via commercial rollup (R5). - OdooField { - name: "property_account_receivable_id", - kind: OdooFieldKind::Property, - target: Some("account.account"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, - OdooField { - name: "property_account_payable_id", - kind: OdooFieldKind::Property, - target: Some("account.account"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "property_account_receivable_id", kind: OdooFieldKind::Property, + target: Some("account.account"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, + OdooField { name: "property_account_payable_id", kind: OdooFieldKind::Property, + target: Some("account.account"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, // R2: company_dependent payment terms; None = immediate / journal fallback. - OdooField { - name: "property_payment_term_id", - kind: OdooFieldKind::Property, - target: Some("account.payment.term"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, - OdooField { - name: "property_supplier_payment_term_id", - kind: OdooFieldKind::Property, - target: Some("account.payment.term"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, + OdooField { name: "property_payment_term_id", kind: OdooFieldKind::Property, + target: Some("account.payment.term"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, + OdooField { name: "property_supplier_payment_term_id", kind: OdooFieldKind::Property, + target: Some("account.payment.term"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, // R3: company_dependent manual override; ALWAYS wins over auto-detection in R8. - OdooField { - name: "property_account_position_id", - kind: OdooFieldKind::Property, - target: Some("account.fiscal.position"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Tax, - }, + OdooField { name: "property_account_position_id", kind: OdooFieldKind::Property, + target: Some("account.fiscal.position"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Tax }, // R4: incremented via _increase_rank on invoice/purchase confirm (deferred when rank > 0). - OdooField { - name: "customer_rank", - kind: OdooFieldKind::Integer, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Quantity, - }, - OdooField { - name: "supplier_rank", - kind: OdooFieldKind::Integer, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Quantity, - }, + OdooField { name: "customer_rank", kind: OdooFieldKind::Integer, target: None, + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, + OdooField { name: "supplier_rank", kind: OdooFieldKind::Integer, target: None, + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Quantity }, // R6: SUM(amount_residual) on posted receivable/payable lines (raw SQL, PG SPLIT_PART). - OdooField { - name: "credit", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_credit_debit_get"), - depends: &[], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "debit", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_credit_debit_get"), - depends: &[], - semantic_role: OdooSemanticRole::Money, - }, + OdooField { name: "credit", kind: OdooFieldKind::Monetary, target: None, required: false, + computed: Some("_credit_debit_get"), depends: &[], semantic_role: OdooSemanticRole::Money }, + OdooField { name: "debit", kind: OdooFieldKind::Monetary, target: None, required: false, + computed: Some("_credit_debit_get"), depends: &[], semantic_role: OdooSemanticRole::Money }, // R7: (credit / total_invoiced) * days_since_oldest_invoice; 0 when no invoices. - OdooField { - name: "days_sales_outstanding", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: Some("_compute_days_sales_outstanding"), - depends: &["credit"], - semantic_role: OdooSemanticRole::Quantity, - }, + OdooField { name: "days_sales_outstanding", kind: OdooFieldKind::Float, target: None, + required: false, computed: Some("_compute_days_sales_outstanding"), + depends: &["credit"], semantic_role: OdooSemanticRole::Quantity }, // R14: 'always' | 'ask' | 'never'; ask triggers wizard after 3 unmodified validations. - OdooField { - name: "autopost_bills", - kind: OdooFieldKind::Selection, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, + OdooField { name: "autopost_bills", kind: OdooFieldKind::Selection, target: None, + required: true, computed: None, depends: &[], semantic_role: OdooSemanticRole::Policy }, // R15: company_dependent; enforcement (blocking invoice) is in the sale/invoice flow. - OdooField { - name: "credit_limit", - kind: OdooFieldKind::Float, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Money, - }, - OdooField { - name: "use_partner_credit_limit", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: Some("_compute_use_partner_credit_limit"), - depends: &[], - semantic_role: OdooSemanticRole::Policy, - }, + OdooField { name: "credit_limit", kind: OdooFieldKind::Float, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Money }, + OdooField { name: "use_partner_credit_limit", kind: OdooFieldKind::Boolean, target: None, + required: false, computed: Some("_compute_use_partner_credit_limit"), depends: &[], + semantic_role: OdooSemanticRole::Policy }, // R16: 'good' | 'normal' | 'bad'; company_dependent; PartnerTrustAdvisor savant input. - OdooField { - name: "trust", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Status, - }, + OdooField { name: "trust", kind: OdooFieldKind::Selection, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, // R17: computed from commercial_partner_id.invoice_edi_format_store; // l10n_de overrides _get_suggested_invoice_edi_format to return 'xrechnung'. - OdooField { - name: "invoice_edi_format", - kind: OdooFieldKind::Selection, - target: None, - required: false, - computed: Some("_compute_invoice_edi_format"), - depends: &[], - semantic_role: OdooSemanticRole::Document, - }, - OdooField { - name: "invoice_edi_format_store", - kind: OdooFieldKind::Char, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Document, - }, + OdooField { name: "invoice_edi_format", kind: OdooFieldKind::Selection, target: None, + required: false, computed: Some("_compute_invoice_edi_format"), depends: &[], + semantic_role: OdooSemanticRole::Document }, + OdooField { name: "invoice_edi_format_store", kind: OdooFieldKind::Char, target: None, + required: false, computed: None, depends: &[], semantic_role: OdooSemanticRole::Document }, // DSO denominator: SUM(price_subtotal) on posted sale invoices for commercial partner. - OdooField { - name: "total_invoiced", - kind: OdooFieldKind::Monetary, - target: None, - required: false, - computed: Some("_invoice_total"), - depends: &[], - semantic_role: OdooSemanticRole::Money, - }, + OdooField { name: "total_invoiced", kind: OdooFieldKind::Monetary, target: None, + required: false, computed: Some("_invoice_total"), depends: &[], + semantic_role: OdooSemanticRole::Money }, ], methods: &[ // R4: deferred post-commit when rank > 0; immediate when rank == 0. - OdooMethod { - name: "_increase_rank", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "_increase_rank", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Unit, triggers: &[] }, // R5: returns partner.commercial_partner_id — accounting entries post to commercial parent. - OdooMethod { - name: "_find_accounting_partner", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Record, - triggers: &[], - }, + OdooMethod { name: "_find_accounting_partner", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Record, triggers: &[] }, // R5: extends base list with the 5 property fields synced from parent → children. - OdooMethod { - name: "_commercial_fields", - kind: OdooMethodKind::Override, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, - OdooMethod { - name: "_credit_debit_get", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_days_sales_outstanding", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "_commercial_fields", kind: OdooMethodKind::Override, + return_kind: OdooReturnKind::Dict, triggers: &[] }, + OdooMethod { name: "_credit_debit_get", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_days_sales_outstanding", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, // R13: community stub returns (vat, country_code) unchanged; VIES is Enterprise-only. - OdooMethod { - name: "_run_vat_checks", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, + OdooMethod { name: "_run_vat_checks", kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Dict, triggers: &[] }, // Returns bool(partner.vat) in community; fpos predicate 1 input. - OdooMethod { - name: "_get_vat_required_valid", - kind: OdooMethodKind::ApiModel, - return_kind: OdooReturnKind::Boolean, - triggers: &[], - }, - OdooMethod { - name: "_compute_use_partner_credit_limit", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_inverse_use_partner_credit_limit", - kind: OdooMethodKind::Inverse, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_compute_invoice_edi_format", - kind: OdooMethodKind::Compute, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, - OdooMethod { - name: "_inverse_invoice_edi_format", - kind: OdooMethodKind::Inverse, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "_get_vat_required_valid", kind: OdooMethodKind::ApiModel, + return_kind: OdooReturnKind::Boolean, triggers: &[] }, + OdooMethod { name: "_compute_use_partner_credit_limit", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_inverse_use_partner_credit_limit", kind: OdooMethodKind::Inverse, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_compute_invoice_edi_format", kind: OdooMethodKind::Compute, + return_kind: OdooReturnKind::Unit, triggers: &[] }, + OdooMethod { name: "_inverse_invoice_edi_format", kind: OdooMethodKind::Inverse, + return_kind: OdooReturnKind::Unit, triggers: &[] }, // Stub; overridden in l10n_de to return 'xrechnung'. - OdooMethod { - name: "_get_suggested_invoice_edi_format", - kind: OdooMethodKind::Helper, - return_kind: OdooReturnKind::Dict, - triggers: &[], - }, + OdooMethod { name: "_get_suggested_invoice_edi_format", kind: OdooMethodKind::Helper, + return_kind: OdooReturnKind::Dict, triggers: &[] }, // R18: @api.ondelete — blocks deletion when any draft/posted account.move references partner. - OdooMethod { - name: "_unlink_if_partner_in_account_move", - kind: OdooMethodKind::Constrain, - return_kind: OdooReturnKind::Unit, - triggers: &[], - }, + OdooMethod { name: "_unlink_if_partner_in_account_move", kind: OdooMethodKind::Constrain, + return_kind: OdooReturnKind::Unit, triggers: &[] }, // R19: VAT guard on reparent + re-points move lines to new commercial_partner_id // with bypass_lock_check (K11 GoBD consideration). - OdooMethod { - name: "write", - kind: OdooMethodKind::Override, - return_kind: OdooReturnKind::Boolean, - triggers: &[], - }, - OdooMethod { - name: "create", - kind: OdooMethodKind::ApiModelCreateMulti, - return_kind: OdooReturnKind::Recordset, - triggers: &[], - }, + OdooMethod { name: "write", kind: OdooMethodKind::Override, + return_kind: OdooReturnKind::Boolean, triggers: &[] }, + OdooMethod { name: "create", kind: OdooMethodKind::ApiModelCreateMulti, + return_kind: OdooReturnKind::Recordset, triggers: &[] }, ], decorators: &[ - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["credit"], - }, - OdooDecorator { - kind: OdooDecoratorKind::ApiDepends, - targets: &["company_id", "country_code"], - }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["credit"] }, + OdooDecorator { kind: OdooDecoratorKind::ApiDepends, targets: &["company_id", "country_code"] }, ], state_machine: None, constraints: &[OdooConstraint { @@ -778,35 +406,16 @@ pub const RES_COUNTRY_GROUP: OdooEntity = OdooEntity { description: "Named set of countries for fpos matching predicate 5: \ partner.country_id ∈ country_ids AND partner.state_id ∉ exclude_state_ids.", fields: &[ - OdooField { - name: "name", - kind: OdooFieldKind::Char, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Identity, - }, + OdooField { name: "name", kind: OdooFieldKind::Char, target: None, required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, // Inclusion set: partner.country_id must be in this M2M. - OdooField { - name: "country_ids", - kind: OdooFieldKind::Many2many, - target: Some("res.country"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "country_ids", kind: OdooFieldKind::Many2many, + target: Some("res.country"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, // Exclusion set: partner's state (if any) must NOT appear here. - OdooField { - name: "exclude_state_ids", - kind: OdooFieldKind::Many2many, - target: Some("res.country.state"), - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Reference, - }, + OdooField { name: "exclude_state_ids", kind: OdooFieldKind::Many2many, + target: Some("res.country.state"), required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Reference }, ], methods: &[], decorators: &[], @@ -836,28 +445,13 @@ pub const RES_COUNTRY_GROUP: OdooEntity = OdooEntity { pub const ACCOUNT_PAYMENT_TERM_REF: OdooEntity = OdooEntity { model_name: "account.payment.term", kind: OdooEntityKind::Model, - description: - "Payment terms (L5 authoritative); projected in L9 only as target of \ + description: "Payment terms (L5 authoritative); projected in L9 only as target of \ property_payment_term_id / property_supplier_payment_term_id on res.partner (R2).", fields: &[ - OdooField { - name: "name", - kind: OdooFieldKind::Char, - target: None, - required: true, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Identity, - }, - OdooField { - name: "active", - kind: OdooFieldKind::Boolean, - target: None, - required: false, - computed: None, - depends: &[], - semantic_role: OdooSemanticRole::Status, - }, + OdooField { name: "name", kind: OdooFieldKind::Char, target: None, required: true, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Identity }, + OdooField { name: "active", kind: OdooFieldKind::Boolean, target: None, required: false, + computed: None, depends: &[], semantic_role: OdooSemanticRole::Status }, ], methods: &[], decorators: &[], @@ -900,9 +494,7 @@ pub const ENTITIES: &[OdooEntity] = &[ #[cfg(test)] mod tests { use super::*; - use crate::odoo_blueprint::{ - OdooConfidence, OdooConstraintKind, OdooFieldKind, OdooSemanticRole, - }; + use crate::odoo_blueprint::{OdooConfidence, OdooConstraintKind, OdooFieldKind, OdooSemanticRole}; #[test] fn entities_slice_has_six_entries() { @@ -911,27 +503,16 @@ mod tests { #[test] fn fiscal_position_identity() { - assert_eq!( - ACCOUNT_FISCAL_POSITION.model_name, - "account.fiscal.position" - ); - assert_eq!( - ACCOUNT_FISCAL_POSITION.provenance.confidence, - OdooConfidence::Curated - ); - assert_eq!( - ACCOUNT_FISCAL_POSITION.provenance.l_doc, - "L9-PARTNER-FISCALPOS.md" - ); + assert_eq!(ACCOUNT_FISCAL_POSITION.model_name, "account.fiscal.position"); + assert_eq!(ACCOUNT_FISCAL_POSITION.provenance.confidence, OdooConfidence::Curated); + assert_eq!(ACCOUNT_FISCAL_POSITION.provenance.l_doc, "L9-PARTNER-FISCALPOS.md"); assert!(ACCOUNT_FISCAL_POSITION.state_machine.is_none()); } #[test] fn fiscal_position_has_auto_apply_policy_field() { let f = ACCOUNT_FISCAL_POSITION - .fields - .iter() - .find(|f| f.name == "auto_apply") + .fields.iter().find(|f| f.name == "auto_apply") .expect("auto_apply must be present"); assert_eq!(f.kind, OdooFieldKind::Boolean); assert_eq!(f.semantic_role, OdooSemanticRole::Policy); @@ -940,9 +521,7 @@ mod tests { #[test] fn fiscal_position_has_get_fiscal_position_method() { let m = ACCOUNT_FISCAL_POSITION - .methods - .iter() - .find(|m| m.name == "_get_fiscal_position") + .methods.iter().find(|m| m.name == "_get_fiscal_position") .expect("_get_fiscal_position must be present"); assert_eq!(m.kind, OdooMethodKind::ApiModel); assert_eq!(m.return_kind, OdooReturnKind::Record); @@ -950,23 +529,14 @@ mod tests { #[test] fn fiscal_position_has_map_tax_and_map_account() { - let names: Vec<&str> = ACCOUNT_FISCAL_POSITION - .methods - .iter() - .map(|m| m.name) - .collect(); + let names: Vec<&str> = ACCOUNT_FISCAL_POSITION.methods.iter().map(|m| m.name).collect(); assert!(names.contains(&"map_tax"), "map_tax must be present"); - assert!( - names.contains(&"map_account"), - "map_account must be present" - ); + assert!(names.contains(&"map_account"), "map_account must be present"); } #[test] fn fiscal_position_zip_constraint_present() { - let c = ACCOUNT_FISCAL_POSITION - .constraints - .iter() + let c = ACCOUNT_FISCAL_POSITION.constraints.iter() .find(|c| c.source_method == Some("_check_zip")) .expect("_check_zip constraint must be present"); assert_eq!(c.kind, OdooConstraintKind::Python); @@ -974,13 +544,8 @@ mod tests { #[test] fn fiscal_position_account_unique_constraint() { - assert_eq!( - ACCOUNT_FISCAL_POS_ACCOUNT.model_name, - "account.fiscal.position.account" - ); - let c = ACCOUNT_FISCAL_POS_ACCOUNT - .constraints - .first() + assert_eq!(ACCOUNT_FISCAL_POS_ACCOUNT.model_name, "account.fiscal.position.account"); + let c = ACCOUNT_FISCAL_POS_ACCOUNT.constraints.first() .expect("SQL unique constraint must be present"); assert_eq!(c.kind, OdooConstraintKind::Sql); } @@ -988,10 +553,7 @@ mod tests { #[test] fn res_partner_accounting_trust_field() { assert_eq!(RES_PARTNER_ACCOUNTING.model_name, "res.partner"); - let f = RES_PARTNER_ACCOUNTING - .fields - .iter() - .find(|f| f.name == "trust") + let f = RES_PARTNER_ACCOUNTING.fields.iter().find(|f| f.name == "trust") .expect("trust field must be present"); assert_eq!(f.kind, OdooFieldKind::Selection); assert_eq!(f.semantic_role, OdooSemanticRole::Status); @@ -999,11 +561,7 @@ mod tests { #[test] fn res_partner_accounting_has_ar_ap_property_fields() { - let names: Vec<&str> = RES_PARTNER_ACCOUNTING - .fields - .iter() - .map(|f| f.name) - .collect(); + let names: Vec<&str> = RES_PARTNER_ACCOUNTING.fields.iter().map(|f| f.name).collect(); assert!(names.contains(&"property_account_receivable_id")); assert!(names.contains(&"property_account_payable_id")); assert!(names.contains(&"property_account_position_id")); @@ -1013,11 +571,7 @@ mod tests { #[test] fn res_partner_accounting_has_fiscal_position_resolver_inputs() { // FiscalPositionResolver savant inputs: manual override, AR balance, trust signal. - let names: Vec<&str> = RES_PARTNER_ACCOUNTING - .fields - .iter() - .map(|f| f.name) - .collect(); + let names: Vec<&str> = RES_PARTNER_ACCOUNTING.fields.iter().map(|f| f.name).collect(); assert!(names.contains(&"property_account_position_id")); assert!(names.contains(&"credit")); assert!(names.contains(&"trust")); @@ -1025,9 +579,7 @@ mod tests { #[test] fn res_partner_accounting_has_deletion_guard() { - let c = RES_PARTNER_ACCOUNTING - .constraints - .first() + let c = RES_PARTNER_ACCOUNTING.constraints.first() .expect("deletion guard constraint must be present"); assert_eq!(c.kind, OdooConstraintKind::Python); assert_eq!(c.source_method, Some("_unlink_if_partner_in_account_move")); @@ -1036,10 +588,7 @@ mod tests { #[test] fn res_country_has_code_identity_field() { assert_eq!(RES_COUNTRY.model_name, "res.country"); - let f = RES_COUNTRY - .fields - .iter() - .find(|f| f.name == "code") + let f = RES_COUNTRY.fields.iter().find(|f| f.name == "code") .expect("code field must be present"); assert_eq!(f.kind, OdooFieldKind::Char); assert_eq!(f.semantic_role, OdooSemanticRole::Identity); @@ -1048,10 +597,7 @@ mod tests { #[test] fn res_country_group_has_exclude_state_ids() { assert_eq!(RES_COUNTRY_GROUP.model_name, "res.country.group"); - let f = RES_COUNTRY_GROUP - .fields - .iter() - .find(|f| f.name == "exclude_state_ids") + let f = RES_COUNTRY_GROUP.fields.iter().find(|f| f.name == "exclude_state_ids") .expect("exclude_state_ids must be present"); assert_eq!(f.kind, OdooFieldKind::Many2many); } @@ -1066,23 +612,16 @@ mod tests { #[test] fn all_entities_have_curated_confidence() { for e in ENTITIES { - assert_eq!( - e.provenance.confidence, - OdooConfidence::Curated, - "entity {} must be Curated", - e.model_name - ); + assert_eq!(e.provenance.confidence, OdooConfidence::Curated, + "entity {} must be Curated", e.model_name); } } #[test] fn all_entities_reference_l9_l_doc() { for e in ENTITIES { - assert_eq!( - e.provenance.l_doc, "L9-PARTNER-FISCALPOS.md", - "entity {} must reference L9 l_doc", - e.model_name - ); + assert_eq!(e.provenance.l_doc, "L9-PARTNER-FISCALPOS.md", + "entity {} must reference L9 l_doc", e.model_name); } } } diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/mod.rs b/crates/lance-graph-ontology/src/odoo_blueprint/mod.rs index 0447b7a5..ebf1f272 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/mod.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/mod.rs @@ -54,12 +54,6 @@ pub mod class_signature; pub mod l1; -pub mod l10; -pub mod l11; -pub mod l12; -pub mod l13; -pub mod l14; -pub mod l15; pub mod l2; pub mod l3; pub mod l4; @@ -68,6 +62,12 @@ pub mod l6; pub mod l7; pub mod l8; pub mod l9; +pub mod l10; +pub mod l11; +pub mod l12; +pub mod l13; +pub mod l14; +pub mod l15; // ─── Source-extracted sub-modules (D-ODOO-EXT-2) ───────────────────────── // @@ -530,18 +530,9 @@ mod tests { const INVOICE_STATE: OdooStateMachine = OdooStateMachine { state_field: "state", states: &[ - OdooState { - name: "draft", - semantic: OdooStateSemantic::Draft, - }, - OdooState { - name: "posted", - semantic: OdooStateSemantic::Posted, - }, - OdooState { - name: "cancel", - semantic: OdooStateSemantic::Cancelled, - }, + OdooState { name: "draft", semantic: OdooStateSemantic::Draft }, + OdooState { name: "posted", semantic: OdooStateSemantic::Posted }, + OdooState { name: "cancel", semantic: OdooStateSemantic::Cancelled }, ], transitions: &[OdooTransition { from: "draft", diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/op_emitter.rs b/crates/lance-graph-ontology/src/odoo_blueprint/op_emitter.rs index 1fe9c4cc..1e20a442 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/op_emitter.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/op_emitter.rs @@ -66,8 +66,8 @@ use std::collections::BTreeMap; use std::fmt::Write as FmtWrite; -use crate::odoo_blueprint::style_recipe::{derive_style_recipe, OdooStyleRecipe}; use crate::odoo_blueprint::{OdooEntity, OdooMethodKind}; +use crate::odoo_blueprint::style_recipe::{OdooStyleRecipe, derive_style_recipe}; // --------------------------------------------------------------------------- // Public types @@ -148,16 +148,8 @@ pub fn emit_op_dispatch(buckets: &[BucketedRecipe]) -> (String, EmitStats) { let mut src = String::new(); // Header - writeln!( - src, - "// --- auto-generated by odoo_blueprint::op_emitter ---" - ) - .unwrap(); - writeln!( - src, - "// DO NOT EDIT: regenerate via `bucket_corpus` + `emit_op_dispatch`" - ) - .unwrap(); + writeln!(src, "// --- auto-generated by odoo_blueprint::op_emitter ---").unwrap(); + writeln!(src, "// DO NOT EDIT: regenerate via `bucket_corpus` + `emit_op_dispatch`").unwrap(); writeln!(src, "//").unwrap(); writeln!(src, "// Buckets : {}", groups.len()).unwrap(); writeln!(src, "// Unique recipes : {}", recipe_map.len()).unwrap(); @@ -189,8 +181,7 @@ pub fn emit_op_dispatch(buckets: &[BucketedRecipe]) -> (String, EmitStats) { // Sort for determinism: recipe_id asc, then method_id asc. let mut sorted: Vec<&BucketedRecipe> = entries.iter().copied().collect(); sorted.sort_by(|a, b| { - a.recipe - .recipe_id + a.recipe.recipe_id .cmp(&b.recipe.recipe_id) .then_with(|| a.method_id.cmp(&b.method_id)) }); @@ -339,11 +330,12 @@ fn atom_comment(recipe: &OdooStyleRecipe) -> String { #[cfg(test)] mod tests { use super::*; - use crate::odoo_blueprint::style_recipe::DAtom; use crate::odoo_blueprint::{ - OdooConfidence, OdooEntity, OdooEntityKind, OdooField, OdooFieldKind, OdooMethod, - OdooMethodKind, OdooProvenance, OdooReturnKind, OdooSemanticRole, + OdooConfidence, OdooEntity, OdooEntityKind, OdooField, + OdooFieldKind, OdooMethod, OdooMethodKind, OdooProvenance, OdooReturnKind, + OdooSemanticRole, }; + use crate::odoo_blueprint::style_recipe::DAtom; // ── Minimal fixture ────────────────────────────────────────────────────── @@ -452,10 +444,7 @@ mod tests { #[test] fn bucket_corpus_method_id_matches_entity_dot_method() { let buckets = bucket_corpus(&[&TEST_ENTITY]); - let compute = buckets - .iter() - .find(|b| b.kind == OdooMethodKind::Compute) - .unwrap(); + let compute = buckets.iter().find(|b| b.kind == OdooMethodKind::Compute).unwrap(); assert_eq!(compute.method_id, "test.move._compute_amount"); } @@ -479,20 +468,11 @@ mod tests { // Three kinds present → three structs + three statics assert!(src.contains("pub struct ComputeOp {"), "ComputeOp struct"); - assert!( - src.contains("pub static COMPUTE_OPS:"), - "COMPUTE_OPS static" - ); + assert!(src.contains("pub static COMPUTE_OPS:"), "COMPUTE_OPS static"); assert!(src.contains("pub struct ActionOp {"), "ActionOp struct"); assert!(src.contains("pub static ACTION_OPS:"), "ACTION_OPS static"); - assert!( - src.contains("pub struct ConstrainOp {"), - "ConstrainOp struct" - ); - assert!( - src.contains("pub static CONSTRAIN_OPS:"), - "CONSTRAIN_OPS static" - ); + assert!(src.contains("pub struct ConstrainOp {"), "ConstrainOp struct"); + assert!(src.contains("pub static CONSTRAIN_OPS:"), "CONSTRAIN_OPS static"); // Helper / Override / Onchange / etc. absent (not in TEST_ENTITY) assert!(!src.contains("pub struct HelperOp"), "no HelperOp"); @@ -571,10 +551,7 @@ mod tests { assert!(src.contains("_prepare_b"), "_prepare_b in HELPER_OPS"); // Only one RECIPE_* const emitted let recipe_count = src.matches("pub const RECIPE_").count(); - assert_eq!( - recipe_count, 1, - "exactly one RECIPE_* const for the collapsed pair" - ); + assert_eq!(recipe_count, 1, "exactly one RECIPE_* const for the collapsed pair"); } #[test] @@ -587,10 +564,7 @@ mod tests { // the source (bucket declaration order: Compute=0, Action=4). let compute_pos = src.find("pub static COMPUTE_OPS").unwrap(); let action_pos = src.find("pub static ACTION_OPS").unwrap(); - assert!( - compute_pos < action_pos, - "Compute bucket before Action bucket" - ); + assert!(compute_pos < action_pos, "Compute bucket before Action bucket"); } #[test] diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/structural.rs b/crates/lance-graph-ontology/src/odoo_blueprint/structural.rs index a9044cec..558d45dc 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/structural.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/structural.rs @@ -139,11 +139,7 @@ pub fn project_inherits_from(table: &[OdooInherits]) -> Vec { for row in table { let child = format!("odoo:{}", underscore(row.model)); for base in row.bases { - out.push(( - child.clone(), - "inherits_from", - format!("odoo:{}", underscore(base)), - )); + out.push((child.clone(), "inherits_from", format!("odoo:{}", underscore(base)))); } } out @@ -200,10 +196,7 @@ mod tests { .filter(|(s, _, _)| s == "odoo:account_move") .map(|(_, _, o)| o.as_str()) .collect(); - assert_eq!( - am_bases, - vec!["odoo:mail_activity_mixin", "odoo:sequence_mixin"] - ); + assert_eq!(am_bases, vec!["odoo:mail_activity_mixin", "odoo:sequence_mixin"]); } #[test] diff --git a/crates/lance-graph-ontology/src/odoo_blueprint/style_recipe.rs b/crates/lance-graph-ontology/src/odoo_blueprint/style_recipe.rs index e1aef4cd..ac4d11e2 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/style_recipe.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/style_recipe.rs @@ -352,10 +352,9 @@ pub fn derive_style_recipe(entity: &OdooEntity, method: &OdooMethod) -> OdooStyl // 7. State-machine participation if let Some(sm) = entity.state_machine { - let participates = sm - .transitions - .iter() - .any(|t| t.trigger == method.name || t.guards.contains(&method.name)); + let participates = sm.transitions.iter().any(|t| { + t.trigger == method.name || t.guards.contains(&method.name) + }); if participates { bump(&mut weights, DAtom::FiscalCtx, 6); bump(&mut weights, DAtom::Event, 2); @@ -368,11 +367,7 @@ pub fn derive_style_recipe(entity: &OdooEntity, method: &OdooMethod) -> OdooStyl .enumerate() .filter_map(|(i, &a)| { let w = weights[i]; - if w > 0 { - Some((a, w)) - } else { - None - } + if w > 0 { Some((a, w)) } else { None } }) .collect(); @@ -396,7 +391,11 @@ pub fn derive_style_recipe(entity: &OdooEntity, method: &OdooMethod) -> OdooStyl pub fn derive_corpus_recipes(entities: &[&OdooEntity]) -> Vec { let mut recipes: Vec = entities .iter() - .flat_map(|e| e.methods.iter().map(move |m| derive_style_recipe(e, m))) + .flat_map(|e| { + e.methods + .iter() + .map(move |m| derive_style_recipe(e, m)) + }) .collect(); recipes.sort_by(|a, b| a.method_id.cmp(&b.method_id)); recipes @@ -481,7 +480,9 @@ fn fnv1a_recipe(atoms: &[(DAtom, u8)]) -> u32 { #[cfg(test)] mod tests { use super::*; - use crate::odoo_blueprint::{OdooConfidence, OdooEntityKind, OdooProvenance}; + use crate::odoo_blueprint::{ + OdooConfidence, OdooEntityKind, OdooProvenance, + }; fn empty_entity() -> OdooEntity { OdooEntity { @@ -575,11 +576,7 @@ mod tests { #[test] fn money_return_emits_both_money_and_emit_amount() { let e = empty_entity(); - let m = method( - "_compute_total", - OdooMethodKind::Compute, - OdooReturnKind::Money, - ); + let m = method("_compute_total", OdooMethodKind::Compute, OdooReturnKind::Money); let r = derive_style_recipe(&e, &m); assert_eq!(weight_of(&r, DAtom::Money), 6); assert_eq!(weight_of(&r, DAtom::EmitAmount), 7); @@ -590,11 +587,7 @@ mod tests { fn action_return_boosts_action_atom() { let e = empty_entity(); // Action method whose return is also an action dict. - let m = method( - "button_post", - OdooMethodKind::Action, - OdooReturnKind::Action, - ); + let m = method("button_post", OdooMethodKind::Action, OdooReturnKind::Action); let r = derive_style_recipe(&e, &m); // 7 from kind + 2 from return, max-merged = 7 (max wins). assert_eq!(weight_of(&r, DAtom::Action), 7); @@ -615,11 +608,7 @@ mod tests { let mut e = empty_entity(); e.fields = FIELDS; - let m = method( - "_compute_amount", - OdooMethodKind::Compute, - OdooReturnKind::Unit, - ); + let m = method("_compute_amount", OdooMethodKind::Compute, OdooReturnKind::Unit); let r = derive_style_recipe(&e, &m); // From Monetary kind on the field. assert_eq!(weight_of(&r, DAtom::EmitAmount), 7); @@ -632,11 +621,7 @@ mod tests { let mut e = empty_entity(); e.provenance.regulation_iri = IRIS; - let m = method( - "_compute_tax", - OdooMethodKind::Compute, - OdooReturnKind::Money, - ); + let m = method("_compute_tax", OdooMethodKind::Compute, OdooReturnKind::Money); let r = derive_style_recipe(&e, &m); assert_eq!(weight_of(&r, DAtom::Law), 8); assert_eq!(r.regulation_iris.len(), 2); @@ -747,7 +732,8 @@ mod tests { "no methods derived from chosen entities — extracted data missing?" ); - let mut seen_atoms: std::collections::BTreeSet = std::collections::BTreeSet::new(); + let mut seen_atoms: std::collections::BTreeSet = + std::collections::BTreeSet::new(); for r in &recipes { for (a, _) in &r.atoms { seen_atoms.insert(*a); diff --git a/crates/lance-graph-ontology/tests/dolce_edge_whitelist_registered.rs b/crates/lance-graph-ontology/tests/dolce_edge_whitelist_registered.rs index 775fcfb0..99d6ecb8 100644 --- a/crates/lance-graph-ontology/tests/dolce_edge_whitelist_registered.rs +++ b/crates/lance-graph-ontology/tests/dolce_edge_whitelist_registered.rs @@ -36,7 +36,9 @@ fn edge_whitelist_registered() { ); // Load-bearing minimum: DnS classification + role-binding. - let dul = |name: &str| format!("http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#{name}"); + let dul = |name: &str| { + format!("http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#{name}") + }; for name in &["isClassifiedBy", "classifies", "hasRole", "hasParticipant"] { let iri = dul(name); assert!( diff --git a/crates/lance-graph-ontology/tests/odoo_dolce_classifier.rs b/crates/lance-graph-ontology/tests/odoo_dolce_classifier.rs index 9671ef93..32a033ed 100644 --- a/crates/lance-graph-ontology/tests/odoo_dolce_classifier.rs +++ b/crates/lance-graph-ontology/tests/odoo_dolce_classifier.rs @@ -15,26 +15,26 @@ fn classify_odoo_matrix_matches_seam_table() { // (odoo model, expected category) — verbatim from the seam doc's 21-row // table, in the same order. let matrix: &[(&str, DolceCategory)] = &[ - ("res.partner", Endurant), // persistent stateful object - ("res.users", Endurant), // persistent stateful object - ("res.company", Endurant), // persistent stateful object - ("account.move", Perdurant), // .move — the journal-entry event - ("account.move.line", Perdurant), // child of Perdurant; fact within event - ("account.account", Endurant), // chart-of-accounts entry persists - ("account.tax", Quality), // .tax — a rate, characterises a txn - ("account.journal", Endurant), // persistent container - ("product.product", Endurant), // the product is the stateful thing - ("product.template", Endurant), // SPECIAL-CASE: master record, not config - ("product.category", Quality), // classification - ("stock.move", Perdurant), // .move — the stock event - ("stock.picking", Perdurant), // .picking — the logistic event - ("stock.warehouse", Endurant), // the physical warehouse - ("mail.message", Perdurant), // .message — communication event - ("crm.lead", Endurant), // the lead persists - ("crm.tag", Quality), // classification - ("hr.employee", Endurant), // persistent person - ("hr.attendance", Perdurant), // .attendance — an attendance event - ("mail.template", AbstractEntity), // .template — true template/config + ("res.partner", Endurant), // persistent stateful object + ("res.users", Endurant), // persistent stateful object + ("res.company", Endurant), // persistent stateful object + ("account.move", Perdurant), // .move — the journal-entry event + ("account.move.line", Perdurant), // child of Perdurant; fact within event + ("account.account", Endurant), // chart-of-accounts entry persists + ("account.tax", Quality), // .tax — a rate, characterises a txn + ("account.journal", Endurant), // persistent container + ("product.product", Endurant), // the product is the stateful thing + ("product.template", Endurant), // SPECIAL-CASE: master record, not config + ("product.category", Quality), // classification + ("stock.move", Perdurant), // .move — the stock event + ("stock.picking", Perdurant), // .picking — the logistic event + ("stock.warehouse", Endurant), // the physical warehouse + ("mail.message", Perdurant), // .message — communication event + ("crm.lead", Endurant), // the lead persists + ("crm.tag", Quality), // classification + ("hr.employee", Endurant), // persistent person + ("hr.attendance", Perdurant), // .attendance — an attendance event + ("mail.template", AbstractEntity), // .template — true template/config ("account.chart.template", AbstractEntity), // .template — chart template ]; @@ -56,10 +56,7 @@ fn product_template_special_case_overrides_template_suffix() { // it for the master product record — the seam's single special-case. assert_eq!(classify_odoo("product.template"), DolceCategory::Endurant); // ...while other `.template` models stay Abstract. - assert_eq!( - classify_odoo("mail.template"), - DolceCategory::AbstractEntity - ); + assert_eq!(classify_odoo("mail.template"), DolceCategory::AbstractEntity); assert_eq!( classify_odoo("account.chart.template"), DolceCategory::AbstractEntity diff --git a/crates/lance-graph-ontology/tests/odoo_hydrator_smoke.rs b/crates/lance-graph-ontology/tests/odoo_hydrator_smoke.rs index cba4d6eb..35ee7c00 100644 --- a/crates/lance-graph-ontology/tests/odoo_hydrator_smoke.rs +++ b/crates/lance-graph-ontology/tests/odoo_hydrator_smoke.rs @@ -97,9 +97,7 @@ fn odoo_hydrator_smoke_canonical_paths() { let g = hydrate_odoo(®istry).expect("odoo hydrates from canonical paths"); assert_eq!(g, OGIT::ODOO_V1.0); - let bundle = registry - .bundle_for(OGIT::ODOO_V1.0) - .expect("bundle registered"); + let bundle = registry.bundle_for(OGIT::ODOO_V1.0).expect("bundle registered"); // Seed alone is ~20 classes; with the FIBO + SKR alignment overlays the // interned count is strictly larger (pivot IRIs get interned too). assert!( diff --git a/crates/lance-graph-ontology/tests/skos_hydrator_smoke.rs b/crates/lance-graph-ontology/tests/skos_hydrator_smoke.rs index 44e72ec9..498aac7b 100644 --- a/crates/lance-graph-ontology/tests/skos_hydrator_smoke.rs +++ b/crates/lance-graph-ontology/tests/skos_hydrator_smoke.rs @@ -50,12 +50,7 @@ fn skos_core_classes_and_properties_resolve() { hydrate_skos(®istry).expect("SKOS hydrates"); let g = OGIT::SKOS_V1.0; // SKOS Core classes - for name in &[ - "Concept", - "ConceptScheme", - "Collection", - "OrderedCollection", - ] { + for name in &["Concept", "ConceptScheme", "Collection", "OrderedCollection"] { let iri = skos(name); assert!( registry.resolve_iri_in(g, &iri).is_some(), diff --git a/crates/lance-graph-ontology/tests/skr_hydrator_smoke.rs b/crates/lance-graph-ontology/tests/skr_hydrator_smoke.rs index 7978cf53..7f865832 100644 --- a/crates/lance-graph-ontology/tests/skr_hydrator_smoke.rs +++ b/crates/lance-graph-ontology/tests/skr_hydrator_smoke.rs @@ -136,15 +136,11 @@ fn skr03_and_skr04_are_separate_slots() { // Cross-resolve: SKR 03 / 1000 must NOT resolve in the SKR 04 slot. assert!( - skr04 - .resolve_iri(&format!("{SKR03_IRI_PREFIX}/1000")) - .is_none(), + skr04.resolve_iri(&format!("{SKR03_IRI_PREFIX}/1000")).is_none(), "SKR 03 IRI must not resolve in SKR 04 bundle" ); assert!( - skr03 - .resolve_iri(&format!("{SKR04_IRI_PREFIX}/1000")) - .is_none(), + skr03.resolve_iri(&format!("{SKR04_IRI_PREFIX}/1000")).is_none(), "SKR 04 IRI must not resolve in SKR 03 bundle" ); } @@ -195,18 +191,12 @@ fn skr03_canonical_and_bau_coexist_in_one_registry() { hydrate_skr03(®istry).expect("canonical SKR 03"); hydrate_skr03_bau(®istry).expect("SKR 03 Bau"); - let canonical = registry - .bundle_for(OGIT::SKR03_V1.0) - .expect("canonical bundle"); - let bau = registry - .bundle_for(OGIT::SKR03BAU_V1.0) - .expect("Bau bundle"); + let canonical = registry.bundle_for(OGIT::SKR03_V1.0).expect("canonical bundle"); + let bau = registry.bundle_for(OGIT::SKR03BAU_V1.0).expect("Bau bundle"); // Canonical bundle: 4-digit IRI base, includes load-bearing accounts. assert!( - canonical - .resolve_iri(&format!("{SKR03_IRI_PREFIX}/1000")) - .is_some(), + canonical.resolve_iri(&format!("{SKR03_IRI_PREFIX}/1000")).is_some(), "canonical SKR 03 / 1000 Kasse must still resolve after Bau hydration" ); assert!( @@ -216,21 +206,17 @@ fn skr03_canonical_and_bau_coexist_in_one_registry() { // Bau bundle: 6-digit IRI base, includes trade-specific extensions. assert!( - bau.resolve_iri(&format!("{SKR03_BAU_IRI_PREFIX}/007510")) - .is_some(), + bau.resolve_iri(&format!("{SKR03_BAU_IRI_PREFIX}/007510")).is_some(), "Bau extension 007510 must resolve in Bau bundle" ); // Cross-resolve: Bau IRI must NOT resolve in canonical bundle and vice versa. assert!( - canonical - .resolve_iri(&format!("{SKR03_BAU_IRI_PREFIX}/007510")) - .is_none(), + canonical.resolve_iri(&format!("{SKR03_BAU_IRI_PREFIX}/007510")).is_none(), "Bau IRI must not resolve in canonical SKR 03 bundle" ); assert!( - bau.resolve_iri(&format!("{SKR03_IRI_PREFIX}/1000")) - .is_none(), + bau.resolve_iri(&format!("{SKR03_IRI_PREFIX}/1000")).is_none(), "canonical SKR 03 IRI must not resolve in Bau bundle" ); } diff --git a/crates/lance-graph-ontology/tests/zugferd_hydrator_smoke.rs b/crates/lance-graph-ontology/tests/zugferd_hydrator_smoke.rs index 1319dee8..ced2ca5b 100644 --- a/crates/lance-graph-ontology/tests/zugferd_hydrator_smoke.rs +++ b/crates/lance-graph-ontology/tests/zugferd_hydrator_smoke.rs @@ -8,8 +8,7 @@ use lance_graph_contract::manifest::OGIT; use lance_graph_ontology::{hydrate_zugferd, OntologyRegistry}; const RSM: &str = "urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"; -const RAM: &str = - "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"; +const RAM: &str = "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"; const UDT: &str = "urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"; const QDT: &str = "urn:un:unece:uncefact:data:standard:QualifiedDataType:100"; diff --git a/crates/lance-graph-ontology/tests/zugferd_rules_hydrator_smoke.rs b/crates/lance-graph-ontology/tests/zugferd_rules_hydrator_smoke.rs index f84acac2..19814e9a 100644 --- a/crates/lance-graph-ontology/tests/zugferd_rules_hydrator_smoke.rs +++ b/crates/lance-graph-ontology/tests/zugferd_rules_hydrator_smoke.rs @@ -127,9 +127,7 @@ fn zugferd_rules_distinct_business_rule_namespace() { // K/L/M/O-NN (VAT category-specific), and PEPPOL-EN16931-*. let registry = OntologyRegistry::new_in_memory(); hydrate_zugferd_rules(®istry).expect("hydrate"); - let bundle = registry - .bundle_for(OGIT::ZUGFERDRULES_V1.0) - .expect("bundle"); + let bundle = registry.bundle_for(OGIT::ZUGFERDRULES_V1.0).expect("bundle"); let ontology = bundle.ontology.as_ref().expect("ontology slot present"); let rule_iris: Vec<&String> = ontology @@ -146,15 +144,9 @@ fn zugferd_rules_distinct_business_rule_namespace() { }) }; - assert!( - saw("BR-01") || saw("BR-02"), - "EN16931 BR-NN core rules missing" - ); + assert!(saw("BR-01") || saw("BR-02"), "EN16931 BR-NN core rules missing"); assert!(saw("BR-CO-"), "BR-CO-NN co-occurrence rules missing"); - assert!( - saw("BR-DEC-"), - "BR-DEC-NN decimal-restriction rules missing" - ); + assert!(saw("BR-DEC-"), "BR-DEC-NN decimal-restriction rules missing"); assert!(saw("BR-S-"), "BR-S-NN standard-rated VAT rules missing"); assert!(saw("BR-Z-"), "BR-Z-NN zero-rated VAT rules missing"); assert!(saw("PEPPOL-"), "PEPPOL extension rules missing"); diff --git a/crates/lance-graph-planner/src/cache/nars_engine.rs b/crates/lance-graph-planner/src/cache/nars_engine.rs index 55043e51..39ffdc1c 100644 --- a/crates/lance-graph-planner/src/cache/nars_engine.rs +++ b/crates/lance-graph-planner/src/cache/nars_engine.rs @@ -161,13 +161,13 @@ impl SpoDistances { #[derive(Clone, Copy, Debug, PartialEq, Eq)] #[repr(u8)] pub enum Inference { - Deduction = 0, // A→B, B→C ⊢ A→C - Induction = 1, // A→B, A→C ⊢ B→C - Abduction = 2, // A→B, C→B ⊢ A→C - Revision = 3, // merge evidence - Analogy = 4, // A→B, C≈A ⊢ C→B - Resemblance = 5, // A≈B, A≈C ⊢ B≈C - Synthesis = 6, // complementary merge + Deduction = 0, // A→B, B→C ⊢ A→C + Induction = 1, // A→B, A→C ⊢ B→C + Abduction = 2, // A→B, C→B ⊢ A→C + Revision = 3, // merge evidence + Analogy = 4, // A→B, C≈A ⊢ C→B + Resemblance = 5, // A≈B, A≈C ⊢ B≈C + Synthesis = 6, // complementary merge /// Pearl rung 2: do-calculus intervention. /// Surgically severs the causal mechanism and forces a variable to a value. /// Routes through MASK_PO (Predicate + Object planes) — the interventional diff --git a/crates/lance-graph-planner/src/mul/escalation.rs b/crates/lance-graph-planner/src/mul/escalation.rs index 42dacb12..c0bcaf67 100644 --- a/crates/lance-graph-planner/src/mul/escalation.rs +++ b/crates/lance-graph-planner/src/mul/escalation.rs @@ -40,12 +40,12 @@ pub fn boot_checklist() -> Checklist { ChecklistItem::new("soa_floor_up", GateKind::Hard), // SoaColumns, i4-32 unpack ChecklistItem::new("operational_store", GateKind::Hard), // Lance / SQLite (not surreal) ChecklistItem::new("nars_tables_loaded", GateKind::Hard), // NarsTables lookup hot - ChecklistItem::new("thresholds_loaded", GateKind::Hard), // MUL profile, SD_FLOW/BLOCK, rung thresholds - ChecklistItem::new("free_energy_wired", GateKind::Hard), // FreeEnergy::compose available + ChecklistItem::new("thresholds_loaded", GateKind::Hard), // MUL profile, SD_FLOW/BLOCK, rung thresholds + ChecklistItem::new("free_energy_wired", GateKind::Hard), // FreeEnergy::compose available // ── SOFT (degrade if red) ───────────────────────────────────────── ChecklistItem::new("capabilities_registered", GateKind::Soft), // ExpertCapability / actor / MCP ChecklistItem::new("wisdom_marker_store", GateKind::Soft), // cold start → foot of curve - ChecklistItem::new("macro_eval_harness", GateKind::Soft), // run without offline updates if absent + ChecklistItem::new("macro_eval_harness", GateKind::Soft), // run without offline updates if absent ]) } diff --git a/crates/lance-graph-planner/src/temporal.rs b/crates/lance-graph-planner/src/temporal.rs index ae769195..2731b02c 100644 --- a/crates/lance-graph-planner/src/temporal.rs +++ b/crates/lance-graph-planner/src/temporal.rs @@ -79,9 +79,7 @@ impl EpistemicMode { pub fn admits(self, status: TemporalStatus) -> bool { match status { TemporalStatus::Contemporary => true, - TemporalStatus::Anachronistic => { - matches!(self, EpistemicMode::Aware | EpistemicMode::Retro) - } + TemporalStatus::Anachronistic => matches!(self, EpistemicMode::Aware | EpistemicMode::Retro), TemporalStatus::Spoiler => matches!(self, EpistemicMode::Retro), TemporalStatus::Unknowable => false, } @@ -126,13 +124,7 @@ pub struct QueryReference { impl Default for QueryReference { fn default() -> Self { // The single-server reading: latest version, strict, rung 0, no HLC. - Self { - server_id: 0, - ref_version: u64::MAX, - hlc_tick: None, - mode: EpistemicMode::Strict, - rung: 0, - } + Self { server_id: 0, ref_version: u64::MAX, hlc_tick: None, mode: EpistemicMode::Strict, rung: 0 } } } @@ -141,13 +133,7 @@ impl QueryReference { /// `rung` (single-server: no HLC, `server_id` 0). #[must_use] pub fn at(ref_version: LanceVersion, rung: u8) -> Self { - Self { - server_id: 0, - ref_version, - hlc_tick: None, - mode: EpistemicMode::for_rung(rung), - rung, - } + Self { server_id: 0, ref_version, hlc_tick: None, mode: EpistemicMode::for_rung(rung), rung } } } @@ -158,11 +144,7 @@ impl QueryReference { /// `Contemporary` if in-phase; otherwise a future-frame row, which is a /// `Spoiler` under `Retro` (an intentional peek) and `Anachronistic` otherwise. #[must_use] -pub fn classify( - row_version: LanceVersion, - knowable_from: LanceVersion, - v_ref: &QueryReference, -) -> TemporalStatus { +pub fn classify(row_version: LanceVersion, knowable_from: LanceVersion, v_ref: &QueryReference) -> TemporalStatus { if knowable_from > v_ref.ref_version { TemporalStatus::Unknowable } else if row_version <= v_ref.ref_version { @@ -215,10 +197,7 @@ impl DepClosure { /// A satisfied, dependency-free closure — the trivial result. #[must_use] pub fn ready() -> Self { - Self { - edges: Vec::new(), - satisfied: true, - } + Self { edges: Vec::new(), satisfied: true } } } @@ -327,14 +306,8 @@ where let mut out: Vec = rows .iter() .filter(|r| { - classify_ready( - r.subject(), - r.lance_version(), - r.knowable_from(), - v_ref, - deps, - ) - .dispatchable(v_ref.mode) + classify_ready(r.subject(), r.lance_version(), r.knowable_from(), v_ref, deps) + .dispatchable(v_ref.mode) }) .cloned() .collect(); @@ -342,12 +315,7 @@ where // (single-server / legacy rows) — NOT to 0, which would force every // missing-HLC row ahead of all HLC rows regardless of its version (Codex // P2 on #468; honors the documented "fallback to lance_version"). - out.sort_by_key(|r| { - ( - r.hlc_tick().unwrap_or_else(|| r.lance_version()), - r.lance_version(), - ) - }); + out.sort_by_key(|r| (r.hlc_tick().unwrap_or_else(|| r.lance_version()), r.lance_version())); out } @@ -364,12 +332,7 @@ mod tests { } impl Row { fn new(v: LanceVersion, knowable: LanceVersion, hlc: Option) -> Self { - Self { - subj: "ogit-erp/sale.order/1".into(), - v, - knowable, - hlc, - } + Self { subj: "ogit-erp/sale.order/1".into(), v, knowable, hlc } } } impl DeinterlaceRow for Row { @@ -436,11 +399,7 @@ mod tests { assert!(!EpistemicMode::Aware.admits(TemporalStatus::Spoiler)); assert!(EpistemicMode::Retro.admits(TemporalStatus::Spoiler)); // Unknowable is never admitted. - for m in [ - EpistemicMode::Strict, - EpistemicMode::Aware, - EpistemicMode::Retro, - ] { + for m in [EpistemicMode::Strict, EpistemicMode::Aware, EpistemicMode::Retro] { assert!(!m.admits(TemporalStatus::Unknowable)); } } @@ -479,10 +438,7 @@ mod tests { fn deinterlace_hlc_orders_across_frames() { // Two frames interlaced; HLC tick is the deinterlace key (cross-server // progressive scan). All contemporary, admitted under strict. - let v_ref = QueryReference { - ref_version: 1000, - ..QueryReference::default() - }; + let v_ref = QueryReference { ref_version: 1000, ..QueryReference::default() }; let rows = vec![ Row::new(900, 1, Some(3)), Row::new(100, 1, Some(1)), @@ -490,10 +446,7 @@ mod tests { ]; let out = deinterlace(&rows, &v_ref, &NoDeps); // Ordered by hlc, NOT by per-frame lance_version. - assert_eq!( - out.iter().map(|r| r.hlc.unwrap()).collect::>(), - vec![1, 2, 3] - ); + assert_eq!(out.iter().map(|r| r.hlc.unwrap()).collect::>(), vec![1, 2, 3]); } #[test] @@ -511,10 +464,7 @@ mod tests { #[test] fn dep_closure_default_is_ready_not_blocking() { let d = DepClosure::default(); - assert!( - d.satisfied, - "Default DepClosure must be ready (satisfied: true)" - ); + assert!(d.satisfied, "Default DepClosure must be ready (satisfied: true)"); assert!(d.edges.is_empty()); } @@ -523,10 +473,7 @@ mod tests { /// legacy rows ahead of all HLC rows during partial cross-server rollout). #[test] fn deinterlace_mixed_hlc_falls_back_to_lance_version() { - let v_ref = QueryReference { - ref_version: 1000, - ..QueryReference::default() - }; + let v_ref = QueryReference { ref_version: 1000, ..QueryReference::default() }; // Two HLC-bearing rows + one legacy row (no HLC, lance_version 750). // With the old `unwrap_or(0)` the legacy row would sort first; with // the fallback to lance_version it sorts between HLCs 500 and 900. @@ -536,11 +483,8 @@ mod tests { Row::new(900, 1, Some(900)), ]; let out = deinterlace(&rows, &v_ref, &NoDeps); - let order: Vec = out.iter().map(|r| r.hlc.unwrap_or(r.v)).collect(); - assert_eq!( - order, - vec![500, 750, 900], - "legacy row must sort by its lance_version, not 0" - ); + let order: Vec = + out.iter().map(|r| r.hlc.unwrap_or(r.v)).collect(); + assert_eq!(order, vec![500, 750, 900], "legacy row must sort by its lance_version, not 0"); } } diff --git a/crates/lance-graph-planner/tests/w1_probes.rs b/crates/lance-graph-planner/tests/w1_probes.rs index 6a67e527..09e02373 100644 --- a/crates/lance-graph-planner/tests/w1_probes.rs +++ b/crates/lance-graph-planner/tests/w1_probes.rs @@ -91,24 +91,15 @@ fn probe_delegation_miss_then_hit() { resolver_calls += 1; mailbox + 1000 // arbitrary deterministic "resolved owner" transform }); - assert!( - !was_hit_first, - "first resolve for a mailbox must be a cache miss" - ); + assert!(!was_hit_first, "first resolve for a mailbox must be a cache miss"); assert_eq!(resolver_calls, 1); let (owner_second, was_hit_second) = writer.resolve_owner(on_behalf, |mailbox| { resolver_calls += 1; mailbox + 1000 }); - assert!( - was_hit_second, - "second resolve for the same mailbox must be a cache hit" - ); - assert_eq!( - resolver_calls, 1, - "resolver must not be called again on cache hit" - ); + assert!(was_hit_second, "second resolve for the same mailbox must be a cache hit"); + assert_eq!(resolver_calls, 1, "resolver must not be called again on cache hit"); assert_eq!(owner_first, owner_second); } diff --git a/crates/lance-graph-supervisor/tests/w2b_real_owner_probe.rs b/crates/lance-graph-supervisor/tests/w2b_real_owner_probe.rs index 656ecd6b..ade43c6b 100644 --- a/crates/lance-graph-supervisor/tests/w2b_real_owner_probe.rs +++ b/crates/lance-graph-supervisor/tests/w2b_real_owner_probe.rs @@ -33,9 +33,7 @@ mod w2b_real_owner_probe { /// followed by `set_populated` (W1c discipline). This mirrors the /// crate's own construction idiom, not an invented shape. fn real_mailbox() -> ProbeMailbox { - let mut mb = MailboxSoA::new( - /* mailbox_id */ 77, /* w_slot */ 3, /* threshold */ 1.0, - ); + let mut mb = MailboxSoA::new(/* mailbox_id */ 77, /* w_slot */ 3, /* threshold */ 1.0); // Declare 1 populated row so MailboxSoaView::n_rows() is non-zero, // matching how a real spawn would declare its logical size // (`MailboxSoA::set_populated` docs: "mirrors fixing BindSpace::len diff --git a/crates/sigma-tier-router/src/lib.rs b/crates/sigma-tier-router/src/lib.rs index 5784303d..3b275aca 100644 --- a/crates/sigma-tier-router/src/lib.rs +++ b/crates/sigma-tier-router/src/lib.rs @@ -31,7 +31,7 @@ //! The prior hand-tuned values are preserved as `SigmaTierBands::hand_tuned()` for //! backwards comparison. -use lance_graph_contract::mul::{i4_eval::gate_decision_i4, GateDecision}; +use lance_graph_contract::mul::{GateDecision, i4_eval::gate_decision_i4}; use lance_graph_contract::qualia::QualiaI4_16D; // ───────────────────────────────────────────────────────────────────────────── @@ -437,10 +437,10 @@ mod tests { /// → Calibrated trust + Flow state → GateDecision::Flow. fn flow_qualia() -> QualiaI4_16D { QualiaI4_16D::ZERO - .with(9, 5) // coherence (DIM_COHERENCE) - .with(1, 3) // valence - .with(2, 0) // tension (low) - .with(3, 5) // warmth + .with(9, 5) // coherence (DIM_COHERENCE) + .with(1, 3) // valence + .with(2, 0) // tension (low) + .with(3, 5) // warmth .with(14, 4) // groundedness } @@ -449,8 +449,8 @@ mod tests { /// Low coherence + high tension → Uncertain trust → Block. fn block_qualia() -> QualiaI4_16D { QualiaI4_16D::ZERO - .with(9, -5) // coherence (very low) - .with(2, 5) // tension (high) + .with(9, -5) // coherence (very low) + .with(2, 5) // tension (high) } // ── Test 1: default band thresholds are strictly monotonic ──────────────── @@ -470,10 +470,7 @@ mod tests { assert!( t[i] > t[i - 1], "threshold[{}]={} must be > threshold[{}]={}", - i, - t[i], - i - 1, - t[i - 1] + i, t[i], i - 1, t[i - 1] ); } } @@ -487,15 +484,15 @@ mod tests { // F values just at/below each threshold should give the correct tier. // Default: Σk upper bound = k * 0.10 let cases: &[(f32, u8)] = &[ - (0.05, 1), // below Σ1 threshold (0.10) - (0.10, 1), // exactly at Σ1 threshold - (0.15, 2), // between Σ1 and Σ2 - (0.20, 2), // exactly at Σ2 threshold - (0.55, 6), // between Σ5 and Σ6 - (0.90, 9), // exactly at Σ9 threshold - (0.95, 10), // between Σ9 and Σ10 → tier 10 - (1.00, 10), // exactly at Σ10 threshold - (1.10, 10), // above all thresholds → clamp to 10 + (0.05, 1), // below Σ1 threshold (0.10) + (0.10, 1), // exactly at Σ1 threshold + (0.15, 2), // between Σ1 and Σ2 + (0.20, 2), // exactly at Σ2 threshold + (0.55, 6), // between Σ5 and Σ6 + (0.90, 9), // exactly at Σ9 threshold + (0.95, 10), // between Σ9 and Σ10 → tier 10 + (1.00, 10), // exactly at Σ10 threshold + (1.10, 10), // above all thresholds → clamp to 10 ]; for &(f, expected_tier) in cases { let actual = bands.tier_for(f); @@ -576,13 +573,7 @@ mod tests { assert!(router.state.last_delta < 0.0, "expected F-falling delta"); let outcome = router.dispatch(&flow_qualia(), 3); assert!( - matches!( - outcome, - DispatchOutcome::Commit { - tier_reached: 10, - .. - } - ), + matches!(outcome, DispatchOutcome::Commit { tier_reached: 10, .. }), "Σ10 + F-falling should Commit, got {:?}", outcome ); @@ -646,15 +637,9 @@ mod tests { fn test_tick_updates_delta() { let mut router = make_router(0.0); let d1 = router.tick(0.5); - assert!( - (d1 - 0.5).abs() < 1e-6, - "first tick delta should be 0.5 - 0.0 = 0.5" - ); + assert!((d1 - 0.5).abs() < 1e-6, "first tick delta should be 0.5 - 0.0 = 0.5"); let d2 = router.tick(0.3); - assert!( - (d2 - (-0.2)).abs() < 1e-6, - "second tick delta should be 0.3 - 0.5 = -0.2" - ); + assert!((d2 - (-0.2)).abs() < 1e-6, "second tick delta should be 0.3 - 0.5 = -0.2"); assert!((router.state.last_delta - (-0.2)).abs() < 1e-6); assert!((router.state.current_f - 0.3).abs() < 1e-6); assert!((router.state.last_f - 0.5).abs() < 1e-6); @@ -670,10 +655,7 @@ mod tests { assert!((s.last_delta).abs() < 1e-9); s.update(0.7); - assert!( - (s.last_f).abs() < 1e-9, - "last_f should be 0.0 after first update" - ); + assert!((s.last_f).abs() < 1e-9, "last_f should be 0.0 after first update"); assert!((s.current_f - 0.7).abs() < 1e-6); assert!((s.last_delta - 0.7).abs() < 1e-6); @@ -712,13 +694,7 @@ mod tests { assert!(router.state.last_delta < 0.0); let outcome = router.dispatch(&flow_qualia(), 4); assert!( - matches!( - outcome, - DispatchOutcome::Commit { - tier_reached: 10, - .. - } - ), + matches!(outcome, DispatchOutcome::Commit { tier_reached: 10, .. }), "floor=0.0 + Σ10 + F-falling must Commit, got {:?}", outcome ); @@ -762,10 +738,7 @@ mod tests { assert!( deltas[i + 1] > deltas[i], "Jirak default must be convex: delta[{}]={:.6} must be < delta[{}]={:.6}", - i, - deltas[i], - i + 1, - deltas[i + 1] + i, deltas[i], i + 1, deltas[i + 1] ); } } @@ -782,8 +755,7 @@ mod tests { assert!( (t[0] - expected_sigma1).abs() < 1e-6, "Σ1 should be ≈ {:.7} (k^1.5/10^1.5), got {:.7}", - expected_sigma1, - t[0] + expected_sigma1, t[0] ); // Σ10 = 1.0 exactly (anchored) assert_eq!(t[9], 1.0_f32, "Σ10 must be exactly 1.0"); @@ -794,9 +766,7 @@ mod tests { #[test] fn test_hand_tuned_preserves_old_values() { let bands = SigmaTierBands::hand_tuned(); - let expected = [ - 0.10_f32, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.00, - ]; + let expected = [0.10_f32, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.00]; assert_eq!( bands.sigma1_to_sigma10, expected, "hand_tuned() must return exactly the sprint-11 linear baseline" @@ -843,8 +813,7 @@ mod tests { var_p4 > var_p3, "jirak_p(4.0) should have higher delta variance ({:.8}) than jirak_p(3.0) ({:.8}); \ p=4 has a larger Jirak tail correction (more convex spacing)", - var_p4, - var_p3 + var_p4, var_p3 ); } @@ -893,10 +862,7 @@ mod tests { assert!( t[i] < t[i + 1], "Jirak band: t[{}]={:.6} must be < t[{}]={:.6}", - i, - t[i], - i + 1, - t[i + 1] + i, t[i], i + 1, t[i + 1] ); } } diff --git a/crates/surreal_container/tests/scheduler_seam.rs b/crates/surreal_container/tests/scheduler_seam.rs index f2fe5939..b1b2c208 100644 --- a/crates/surreal_container/tests/scheduler_seam.rs +++ b/crates/surreal_container/tests/scheduler_seam.rs @@ -36,11 +36,7 @@ fn full_rubicon_arc_lowers_to_legal_successors() { ]; for (i, (from, want_to)) in arc.iter().enumerate() { let mv = scheduler - .on_version( - &view_at(*from), - DatasetVersion(i as u64 + 1), - ExecTarget::Native, - ) + .on_version(&view_at(*from), DatasetVersion(i as u64 + 1), ExecTarget::Native) .unwrap_or_else(|| panic!("{from:?} must schedule a forward move")); assert_eq!(mv.from, *from, "move.from must echo the observed phase"); assert_eq!(mv.to, *want_to, "{from:?} must lower to {want_to:?}"); @@ -60,10 +56,7 @@ fn full_rubicon_arc_lowers_to_legal_successors() { fn absorbing_columns_schedule_no_move() { let scheduler = NextPhaseScheduler; for phase in [KanbanColumn::Commit, KanbanColumn::Prune] { - assert!( - phase.is_absorbing(), - "{phase:?} must be absorbing (precondition)" - ); + assert!(phase.is_absorbing(), "{phase:?} must be absorbing (precondition)"); assert!( scheduler .on_version(&view_at(phase), DatasetVersion(99), ExecTarget::Native) @@ -82,11 +75,7 @@ fn libet_anchor_only_on_sigma_commit_crossing() { let scheduler = NextPhaseScheduler; let crossing = scheduler - .on_version( - &view_at(KanbanColumn::Planning), - DatasetVersion(1), - ExecTarget::Native, - ) + .on_version(&view_at(KanbanColumn::Planning), DatasetVersion(1), ExecTarget::Native) .expect("Planning advances"); assert_eq!(crossing.to, KanbanColumn::CognitiveWork); assert_eq!( @@ -94,11 +83,7 @@ fn libet_anchor_only_on_sigma_commit_crossing() { "the Σ-commit crossing must carry the -550ms Libet anchor" ); - for from in [ - KanbanColumn::CognitiveWork, - KanbanColumn::Evaluation, - KanbanColumn::Plan, - ] { + for from in [KanbanColumn::CognitiveWork, KanbanColumn::Evaluation, KanbanColumn::Plan] { let mv = scheduler .on_version(&view_at(from), DatasetVersion(2), ExecTarget::Native) .expect("non-absorbing column advances"); @@ -117,23 +102,12 @@ fn libet_anchor_only_on_sigma_commit_crossing() { fn lowering_is_deterministic() { let scheduler = NextPhaseScheduler; let a = scheduler - .on_version( - &view_at(KanbanColumn::CognitiveWork), - DatasetVersion(7), - ExecTarget::Jit, - ) + .on_version(&view_at(KanbanColumn::CognitiveWork), DatasetVersion(7), ExecTarget::Jit) .expect("advances"); let b = scheduler - .on_version( - &view_at(KanbanColumn::CognitiveWork), - DatasetVersion(7), - ExecTarget::Jit, - ) + .on_version(&view_at(KanbanColumn::CognitiveWork), DatasetVersion(7), ExecTarget::Jit) .expect("advances"); - assert_eq!( - a, b, - "same (view, version, exec) must lower to the same move" - ); + assert_eq!(a, b, "same (view, version, exec) must lower to the same move"); } /// KILL-CONDITION: the `exec` backend selector must ride through the lowering @@ -142,12 +116,7 @@ fn lowering_is_deterministic() { #[test] fn exec_target_rides_onto_the_move() { let scheduler = NextPhaseScheduler; - for exec in [ - ExecTarget::Native, - ExecTarget::Jit, - ExecTarget::SurrealQl, - ExecTarget::Elixir, - ] { + for exec in [ExecTarget::Native, ExecTarget::Jit, ExecTarget::SurrealQl, ExecTarget::Elixir] { let mv = scheduler .on_version(&view_at(KanbanColumn::Planning), DatasetVersion(3), exec) .expect("advances"); diff --git a/crates/thinking-engine/src/layered.rs b/crates/thinking-engine/src/layered.rs index 39e64888..2b56c80d 100644 --- a/crates/thinking-engine/src/layered.rs +++ b/crates/thinking-engine/src/layered.rs @@ -76,9 +76,7 @@ impl CascadeChannels8 { /// Set one channel's i8 net_strength. Out-of-range idx is a no-op. #[inline] pub fn set_channel(&mut self, idx: usize, value: i8) { - if idx >= 8 { - return; - } + if idx >= 8 { return; } let mask = 0xFFu64 << (idx * 8); self.0 = (self.0 & !mask) | ((value as u8 as u64) << (idx * 8)); } @@ -129,14 +127,8 @@ impl Default for CascadeChannels8 { impl CascadeChannels8 { /// 8 channel labels for diagnostics + tests. pub const CHANNEL_NAMES: [&'static str; 8] = [ - "BECOMES", - "CAUSES", - "SUPPORTS", - "REFINES", - "GROUNDS", - "ABSTRACTS", - "RELATES", - "CONTRADICTS", + "BECOMES", "CAUSES", "SUPPORTS", "REFINES", + "GROUNDS", "ABSTRACTS", "RELATES", "CONTRADICTS", ]; /// Index of the dominant channel (max |net_strength|). Ties break to @@ -162,11 +154,7 @@ impl CascadeChannels8 { #[inline] pub fn active_channel_count(&self) -> u8 { let mut n = 0u8; - for i in 0..8 { - if self.channel(i) != 0 { - n += 1; - } - } + for i in 0..8 { if self.channel(i) != 0 { n += 1; } } n } @@ -202,17 +190,8 @@ impl CascadeChannels8 { } else { -(mantissa_magnitude as i8) }; - SpoEdge::pack_v2( - s_idx, - p_idx, - o_idx, - freq_u8, - conf_u8, - causal_mask, - 0, - causal_edge::PlasticityState::ALL_FROZEN, - ) - .with_inference_mantissa(mantissa_signed) + SpoEdge::pack_v2(s_idx, p_idx, o_idx, freq_u8, conf_u8, causal_mask, 0, causal_edge::PlasticityState::ALL_FROZEN) + .with_inference_mantissa(mantissa_signed) } /// Inverse: project an SPO-palette edge into the 8-channel form @@ -224,13 +203,7 @@ impl CascadeChannels8 { let mag = mantissa.unsigned_abs(); let dom = match mag { 0 => 6, // RELATES (neutral) - 1 => { - if mantissa >= 0 { - 0 - } else { - 7 - } - } // BECOMES vs CONTRADICTS + 1 => if mantissa >= 0 { 0 } else { 7 }, // BECOMES vs CONTRADICTS 2 => 5, // ABSTRACTS 3 => 5, // (Synthesis tilts ABSTRACTS) — matches the table tilt 4 => 2, // SUPPORTS @@ -742,7 +715,7 @@ mod transcoder_tests { #[test] fn test_dominant_channel_picks_max_abs() { let mut e = CascadeChannels8::default(); - e.set_channel(2, 30); // SUPPORTS + e.set_channel(2, 30); // SUPPORTS e.set_channel(5, -100); // ABSTRACTS, larger magnitude e.set_channel(7, 10); assert_eq!(e.dominant_channel(), 5); @@ -756,11 +729,7 @@ mod transcoder_tests { assert_eq!(spo.s_idx(), 10); assert_eq!(spo.p_idx(), 20); assert_eq!(spo.o_idx(), 30); - assert_eq!( - spo.inference_mantissa(), - 1, - "BECOMES → mantissa +1 Deduction" - ); + assert_eq!(spo.inference_mantissa(), 1, "BECOMES → mantissa +1 Deduction"); assert!(spo.frequency_u8() > 0, "non-zero net → non-zero frequency"); } @@ -768,22 +737,14 @@ mod transcoder_tests { fn test_to_spo_causes_negative_is_counterfactual() { let e = build_8ch_with(1, -32); // CAUSES, negative magnitude let spo = e.to_spo(1, 2, 3); - assert_eq!( - spo.inference_mantissa(), - -6, - "CAUSES negative → mantissa -6 Counterfactual" - ); + assert_eq!(spo.inference_mantissa(), -6, "CAUSES negative → mantissa -6 Counterfactual"); } #[test] fn test_to_spo_relates_neutral_mantissa_zero() { - let e = build_8ch_with(6, 100); // RELATES dominant + let e = build_8ch_with(6, 100); // RELATES dominant let spo = e.to_spo(0, 0, 0); - assert_eq!( - spo.inference_mantissa(), - 0, - "RELATES → mantissa 0 (Identity)" - ); + assert_eq!(spo.inference_mantissa(), 0, "RELATES → mantissa 0 (Identity)"); } #[test] @@ -809,12 +770,12 @@ mod transcoder_tests { // lossy collapse: negative-BECOMES/GROUNDS is semantically CONTRADICTS // in the SPO lattice (both carry |mantissa|=1 in the backward slot). 0 | 4 => &[0, 7], - 1 => &[1], // CAUSES → mantissa ±6 → CAUSES - 2 => &[2], // SUPPORTS → mantissa +4 → SUPPORTS - 3 => &[3, 5], // REFINES → mantissa +5 → REFINES (or ABSTRACTS in tilt) - 5 => &[5], // ABSTRACTS → mantissa +2 → ABSTRACTS - 6 => &[6], // RELATES → mantissa 0 → RELATES - 7 => &[7, 0], // CONTRADICTS → mantissa ±1 (sign distinguishes) + 1 => &[1], // CAUSES → mantissa ±6 → CAUSES + 2 => &[2], // SUPPORTS → mantissa +4 → SUPPORTS + 3 => &[3, 5], // REFINES → mantissa +5 → REFINES (or ABSTRACTS in tilt) + 5 => &[5], // ABSTRACTS → mantissa +2 → ABSTRACTS + 6 => &[6], // RELATES → mantissa 0 → RELATES + 7 => &[7, 0], // CONTRADICTS → mantissa ±1 (sign distinguishes) _ => &[], }; assert!( From dd46ad2668a7cd720d9d79f2d149b008ebc9fcbc Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 7 Jul 2026 16:42:25 +0000 Subject: [PATCH 7/7] Board discipline: hot-plug consumer-migration doc + E-HOTPLUG-MIGRATION-1 ruling Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1 --- .claude/board/EPIPHANIES.md | 7 + .../knowledge/hotplug-consumer-migration.md | 134 ++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 .claude/knowledge/hotplug-consumer-migration.md diff --git a/.claude/board/EPIPHANIES.md b/.claude/board/EPIPHANIES.md index 20087816..2d2117f2 100644 --- a/.claude/board/EPIPHANIES.md +++ b/.claude/board/EPIPHANIES.md @@ -1,3 +1,10 @@ +## 2026-07-07 — E-HOTPLUG-MIGRATION-1 — the generic hot-plug pattern is the migration target for ALL consumers; migration doc is board discipline +**Status:** RULING (operator, 2026-07-07; shipped OGAR #174/#175 + lance-graph #658 + tesseract-rs #13/#14) + +**Every consumer migrates onto the generic hot-plug pattern** — one `HOT_PLUG` const (socket type `lance_graph_contract::hotplug::HotPlug`) + one activation test against `ogar_vocab::capability_registry::resolve_hotplug`; the consumer tells OGAR which classids are hot-plugged and receives BOTH the vocab rows and the action surface. No bespoke per-consumer plug crates, no git pins (sibling path deps only), no ontology payload in lance-graph, contract stays zero-dep (member path deps kill CI workspace load — burned once), classid low u16 = APP prefix, never a shape ordinal. + +**Board discipline:** `.claude/knowledge/hotplug-consumer-migration.md` (mirrored in OGAR `.claude/knowledge/`) is MANDATORY READING before (a) migrating any consumer onto the capability surface, (b) adding a new authoritative domain table (thinking-styles next), (c) any cross-repo capability wiring. It carries the 5-step recipe, the 5 drift arms, the burned-once anti-pattern list, and the evaluated ruff synergies (ActionDef lift via `ogar-from-ruff::lift_actions` + a future C++ arm; `walk_enums` param fidelity; ontology plug-and-play over the exports→OGIT→imports tier; thinking-styles as a one-entry `domain_tables()` addition). + ## 2026-07-07 — E-OCR-FACET-HOME-CORRECTION-1 — operator ruling: domain substrate does NOT live in agnostic lance-graph — textord facets removed; the facet producer is ruff→OGAR **Status:** RULING (operator-corrected same day; code removed in this commit) diff --git a/.claude/knowledge/hotplug-consumer-migration.md b/.claude/knowledge/hotplug-consumer-migration.md new file mode 100644 index 00000000..66eb35d9 --- /dev/null +++ b/.claude/knowledge/hotplug-consumer-migration.md @@ -0,0 +1,134 @@ +# Hot-Plug Consumer Migration — the generic plug-and-play pattern + +> READ BY: any session migrating a consumer (woa-rs, medcare-rs, +> smb-office-rs, odoo-rs, tesseract-rs, osm-website-rs, …) onto the +> OGAR-authoritative capability surface; any session adding a new +> authoritative domain table (thinking-styles best practices, …); +> integration-lead / baton-handoff-auditor before any cross-repo +> capability wiring. +> +> Shipped 2026-07-07 (operator-ruled same day). Reference PRs: +> OGAR #174 (ocr_actions) + #175 (resolve_hotplug), lance-graph #658 +> (hotplug socket + OgarAuthority + CI fuse gate), tesseract-rs #13/#14 +> (executor + HOT_PLUG migration — the template consumer). + +## The model — three roles, three homes, one binary + +Everything links into ONE binary (lance-graph + OGAR + consumer + +ndarray). Nothing serializes; every check is a compile-time const or a +test in the consumer's own suite. "Wenn's knallt, dann einmal — nicht +200 Pins monitoren." + +| Role | Home | Surface | +|---|---|---| +| **SOCKET** (agnostic, zero-dep) | `lance_graph_contract::hotplug` | `HotPlug { consumer, classids, covered }`, `Activation`, `ActivationDrift`, trait `CapabilityAuthority` | +| **AUTHORITY** (declares + resolves) | OGAR `ogar_vocab` | domain action tables (e.g. `ocr_actions`) + `capability_registry::{domain_tables, resolve_hotplug, HotplugDrift}` | +| **BRIDGE** (socket ⇄ authority) | `lance-graph-ogar` (workspace-EXCLUDED) | `OgarAuthority: CapabilityAuthority`; also owns COUNT_FUSE + per-entry mirror parity + the roundtrip green light | +| **CONSUMER** | your repo | ONE `HOT_PLUG` const + ONE activation test + your executor | + +The classid is the join key on BOTH sides: the consumer says "these +canon-high ids are hot", the authority returns BOTH the vocab rows and +every capability whose subject is one of those ids. + +## Migration recipe (per consumer, ~1 hour) + +1. **Authority side (OGAR PR #1):** declare your domain's action table + in `ogar-vocab` next to `ocr_actions` — one `ActionDef` per + capability on YOUR already-minted canon-high concepts (mint via the + normal codebook process if missing; hi u16 = concept, lo u16 = APP + render prefix, NEVER a shape ordinal). Export `_ACTION_NAMES` + (const fingerprint), `_SUBJECT_CLASSIDS`, + `_EXPECTED_EXECUTORS = [""]`. Register ONE entry + in `capability_registry::domain_tables()` mapping + `(capability, subject classid)`. That's the whole authority change. +2. **Consumer side:** add path deps (NO PINS — local siblings): + `ogar-vocab = { path = "/OGAR/crates/ogar-vocab" }` and + `lance-graph-contract = { path = "/lance-graph/crates/lance-graph-contract" }`. +3. Declare the plug: + ```rust + pub const HOT_PLUG: lance_graph_contract::hotplug::HotPlug = + lance_graph_contract::hotplug::HotPlug { + consumer: "", + classids: ogar_vocab::_actions::_SUBJECT_CLASSIDS, + covered: COVERED_CAPABILITIES, // your executor's arms + }; + ``` +4. Close the loop with ONE test: + ```rust + let (concepts, capabilities) = ogar_vocab::capability_registry::resolve_hotplug( + HOT_PLUG.consumer, HOT_PLUG.classids, HOT_PLUG.covered, + ).expect("hot-plug drifted from the authoritative OGAR tables"); + ``` + (Or through the socket: `OgarAuthority.activate(&HOT_PLUG)` via + `dyn CapabilityAuthority` when you want authority-agnostic code.) +5. **CI:** your workflows need the sibling checkouts (OGAR + + lance-graph), same as tesseract-rs `rust.yml` / lance-graph + `rust-test.yml`. Sibling layout: check the repo out into a subdir + (`path: `) so `path: OGAR` lands as a true sibling. + +## The drift arms (each one named bang, test-time, in YOUR binary) + +| Arm | Meaning | +|---|---| +| `UnknownClassid(id)` | plugged id not minted in the codebook | +| `NoCapabilitiesFor(id)` | id resolves to no capability — the table/ontology was forgotten | +| `UnexpectedConsumer` | you are not in the table's expected-executor list | +| `Uncovered(cap)` | authority declares it, your executor has no arm | +| `Undeclared(cap)` | your executor claims it, authority doesn't declare it | + +Plus, CI-side (lance-graph `rust-test.yml`): COUNT_FUSE + per-entry +mirror parity + the roundtrip green light run against the real OGAR +sibling on every push. + +## What NOT to do (each burned once, 2026-07-07) + +- **No bespoke per-consumer plug crate/mechanism.** The registration + surface is the `HOT_PLUG` const + one test. (tesseract-ogar's first + `CapabilityRegistration` draft was replaced for exactly this.) +- **No path/optional deps on `lance-graph-contract` toward OGAR.** The + contract is a workspace MEMBER; any path dep there (even optional) is + resolved at workspace-load time and kills every CI cargo invocation. + The contract stays zero-dep; armed things live in excluded crates. +- **No shape ordinals in the classid low u16.** Low half = APP render + prefix (`PortSpec::APP_PREFIX`). Distinct shapes are distinct hi-u16 + concepts or ClassView payload readings. +- **No ontology payload in lance-graph.** lance-graph carries the wire + mirror + the green light, nothing else. Authority checks live in OGAR. +- **No git deps on OGAR.** git+branch always writes a rev pin into + Cargo.lock. Path deps to the sibling, always. + +## Future synergies (evaluated 2026-07-07 — next arcs, not shipped) + +1. **ActionDef plug-and-play from ruff (HIGH, near-term).** + `ogar-from-ruff::lift_actions` already lifts ActionDefs from + Rails/Python model graphs — the OCR table is hand-declared only + because tesseract has no AR source. The generic path: ruff harvest + (`ruff_*_spo`) → fuzzy-recipe codebook (`(verb, criteria)` recipes, + ruff `.claude/knowledge/fuzzy-recipe-codebook.md`) → `lift_actions` → + the domain table auto-derives instead of being hand-written; a + consumer migration then starts with a harvest, not an authorship + session. Missing piece: a C++ arm for `lift_actions` (ruff_cpp_spo + has walk_tu/walk_free_functions/walk_enums; an action-lift over the + method-body facts is the natural fourth arm) and a + `derive_domain_table!`-style bridge from lifted ActionDefs into + `domain_tables()`. +2. **Param-enum fidelity via `walk_enums` (MEDIUM).** Capability params + that are C/C++ enums (PSM modes, connectivity 4/8, …) can carry + their variants from the ruff enum harvest instead of free-form + names — the same shapes-from-ruff discipline the dawg/dict arc used. +3. **Ontology plug-and-play (MEDIUM, design needed).** Today + `resolve_hotplug` returns vocab rows + capability names. The same + join can return ONTOLOGY fragments per classid: OGAR's + `vocab/exports → OGIT promote → vocab/imports` pipeline already + stages TTL per domain, and `ogar-adapter-ttl` renders it. A + `resolve_hotplug_with_ontology` returning the OGIT NTO fragment + references for the plugged classids would let a consumer pull + concepts + actions + ontology in one activation — still zero + serialization in-binary; the TTL stays an OGAR-internal artifact + (imports/ tier), never hauled through lance-graph. Gate: needs the + imports/ tier populated for the domain (ontologies, not harvests — + harvests stay in the consumer repo). +4. **Thinking-styles best practices (HIGH, planned all along).** One + `domain_tables()` entry + a `_EXPECTED_EXECUTORS` list arms + the thinking-style table for whichever engine executes styles — + same recipe as step 1 above, zero new machinery.