From 6ce88b101a4d4a7b21bce59b37c2c2adac9f21cb Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 14:44:50 +0000 Subject: [PATCH 01/11] WIP probe (UNVERIFIED): bump lance =7.0.0 -> =9.0.0, lancedb =0.30.0 -> =0.33.0, datafusion 53 -> 54 Operator-requested what-breaks assessment; NOT a migration and NOT verified. Compilation is still in flight at commit time - do not merge on the strength of this commit alone. Findings so far, variables isolated: - Rust 1.97.1 on the CURRENT pins is clean: contract passes clippy --all-targets -D warnings; the only reds are the 12 pre-existing lance-graph-ontology lints already on the board. - Resolution with lance 9 SUCCEEDS: lance 9.0.0 / lancedb 0.33.0 / datafusion 54.1.0 / arrow 58.3.0 / object_store 0.13.2, no conflict and no unused-patch warning. arrow and object_store do NOT move - only datafusion steps a major. A stale datafusion 53.1.0 also stays in the graph (duplicate major, source not yet identified). - Version correction: there is no lancedb 0.34-0.36 Rust crate. The registry tops out at 0.33.0, which is itself the lance-9 pairing (it pins lance =9.0.0). 0.36 is the PyPI package, versioned independently. - Policy finding (unresolved, NOT acted on): AdaWorldAPI forks exist for both lance and lancedb, but the workspace depends on the registry. Both forks are stale (no tags, main only) so neither can supply v9 today. Per P0, unknown fork coordinates means stop and ask - flagged, not changed. --- Cargo.lock | 1951 ++++++++++++++++------ Cargo.toml | 6 +- crates/holograph/Cargo.toml | 4 +- crates/lance-graph-benches/Cargo.toml | 2 +- crates/lance-graph-callcenter/Cargo.toml | 4 +- crates/lance-graph-catalog/Cargo.toml | 4 +- crates/lance-graph-ontology/Cargo.toml | 2 +- crates/lance-graph-python/Cargo.toml | 2 +- crates/lance-graph/Cargo.toml | 22 +- crates/surreal_container/Cargo.toml | 4 +- 10 files changed, 1467 insertions(+), 534 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 960939427..6141727c9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -452,7 +452,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -474,7 +474,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -485,7 +485,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -869,7 +869,7 @@ checksum = "8d7396fd9500589e62e460e987ecb671bad374934e55ec3b5f498cc7a8a8a7b7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -1118,15 +1118,6 @@ version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" -[[package]] -name = "bitpacking" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96a7139abd3d9cebf8cd6f920a389cf3dc9576172e32f4563f188cae3c3eb019" -dependencies = [ - "crunchy", -] - [[package]] name = "bitvec" version = "1.1.1" @@ -1211,7 +1202,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.118", + "syn", ] [[package]] @@ -1302,7 +1293,7 @@ checksum = "3448e05bba811d98c73a466843abd8c16d0416dc083f92b66847693fcb0714f4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -1325,9 +1316,15 @@ checksum = "89385e82b5d1821d2219e0b095efa2cc1f246cbf99080f3be46a1a85c0d392d9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] +[[package]] +name = "bytecount" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" + [[package]] name = "bytemuck" version = "1.25.0" @@ -1345,7 +1342,7 @@ checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -1412,9 +1409,9 @@ dependencies = [ [[package]] name = "cedarwood" -version = "0.4.6" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d910bedd62c24733263d0bed247460853c9d22e8956bd4cd964302095e04e90" +checksum = "c0524a528a6a0288df1863c3c20fe92c301875b4941e7b6c4b394ab08c5a4c55" dependencies = [ "smallvec", ] @@ -1540,7 +1537,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -1584,7 +1581,7 @@ dependencies = [ "serde_json", "thinking-engine", "tokio", - "tonic", + "tonic 0.12.3", "tonic-build", ] @@ -1956,7 +1953,17 @@ checksum = "83cf0d42651b16c6dfe68685716d18480d18a9c39c62d76e8cf3eb6ed5d8bcbf" dependencies = [ "ctor-proc-macro 0.0.13", "dtor 0.8.1", - "link-section", + "link-section 0.2.1", +] + +[[package]] +name = "ctor" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d83cb7e7a873830708d6b02a78cd36a592c6fa14bf267b68725103b85c0d77f" +dependencies = [ + "link-section 0.19.2", + "linktime-proc-macro", ] [[package]] @@ -2017,7 +2024,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.118", + "syn", ] [[package]] @@ -2030,7 +2037,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.118", + "syn", ] [[package]] @@ -2041,7 +2048,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -2052,7 +2059,7 @@ checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ "darling_core 0.23.0", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -2087,31 +2094,31 @@ dependencies = [ "bytes", "bzip2", "chrono", - "datafusion-catalog", - "datafusion-catalog-listing", - "datafusion-common", - "datafusion-common-runtime", - "datafusion-datasource", - "datafusion-datasource-arrow", - "datafusion-datasource-csv", - "datafusion-datasource-json", - "datafusion-datasource-parquet", - "datafusion-execution", - "datafusion-expr", - "datafusion-expr-common", - "datafusion-functions", - "datafusion-functions-aggregate", - "datafusion-functions-nested", - "datafusion-functions-table", - "datafusion-functions-window", - "datafusion-optimizer", - "datafusion-physical-expr", - "datafusion-physical-expr-adapter", - "datafusion-physical-expr-common", - "datafusion-physical-optimizer", - "datafusion-physical-plan", - "datafusion-session", - "datafusion-sql", + "datafusion-catalog 53.1.0", + "datafusion-catalog-listing 53.1.0", + "datafusion-common 53.1.0", + "datafusion-common-runtime 53.1.0", + "datafusion-datasource 53.1.0", + "datafusion-datasource-arrow 53.1.0", + "datafusion-datasource-csv 53.1.0", + "datafusion-datasource-json 53.1.0", + "datafusion-datasource-parquet 53.1.0", + "datafusion-execution 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-expr-common 53.1.0", + "datafusion-functions 53.1.0", + "datafusion-functions-aggregate 53.1.0", + "datafusion-functions-nested 53.1.0", + "datafusion-functions-table 53.1.0", + "datafusion-functions-window 53.1.0", + "datafusion-optimizer 53.1.0", + "datafusion-physical-expr 53.1.0", + "datafusion-physical-expr-adapter 53.1.0", + "datafusion-physical-expr-common 53.1.0", + "datafusion-physical-optimizer 53.1.0", + "datafusion-physical-plan 53.1.0", + "datafusion-session 53.1.0", + "datafusion-sql 53.1.0", "flate2", "futures", "itertools 0.14.0", @@ -2122,7 +2129,60 @@ dependencies = [ "parquet", "rand 0.9.4", "regex", - "sqlparser", + "sqlparser 0.61.0", + "tempfile", + "tokio", + "url", + "uuid", + "zstd", +] + +[[package]] +name = "datafusion" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "754ef4e8f073922a26f5b23133b9db4829342362b09be0bc94309cf261c2f098" +dependencies = [ + "arrow", + "arrow-schema", + "async-trait", + "bzip2", + "chrono", + "datafusion-catalog 54.1.0", + "datafusion-catalog-listing 54.1.0", + "datafusion-common 54.1.0", + "datafusion-common-runtime 54.1.0", + "datafusion-datasource 54.1.0", + "datafusion-datasource-arrow 54.1.0", + "datafusion-datasource-csv 54.1.0", + "datafusion-datasource-json 54.1.0", + "datafusion-datasource-parquet 54.1.0", + "datafusion-execution 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-expr-common 54.1.0", + "datafusion-functions 54.1.0", + "datafusion-functions-aggregate 54.1.0", + "datafusion-functions-nested 54.1.0", + "datafusion-functions-table 54.1.0", + "datafusion-functions-window 54.1.0", + "datafusion-optimizer 54.1.0", + "datafusion-physical-expr 54.1.0", + "datafusion-physical-expr-adapter 54.1.0", + "datafusion-physical-expr-common 54.1.0", + "datafusion-physical-optimizer 54.1.0", + "datafusion-physical-plan 54.1.0", + "datafusion-session 54.1.0", + "datafusion-sql 54.1.0", + "flate2", + "futures", + "indexmap 2.14.0", + "itertools 0.14.0", + "liblzma", + "log", + "object_store", + "parking_lot", + "parquet", + "sqlparser 0.62.0", "tempfile", "tokio", "url", @@ -2139,14 +2199,39 @@ dependencies = [ "arrow", "async-trait", "dashmap", - "datafusion-common", - "datafusion-common-runtime", - "datafusion-datasource", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-expr", - "datafusion-physical-plan", - "datafusion-session", + "datafusion-common 53.1.0", + "datafusion-common-runtime 53.1.0", + "datafusion-datasource 53.1.0", + "datafusion-execution 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-physical-expr 53.1.0", + "datafusion-physical-plan 53.1.0", + "datafusion-session 53.1.0", + "futures", + "itertools 0.14.0", + "log", + "object_store", + "parking_lot", + "tokio", +] + +[[package]] +name = "datafusion-catalog" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06afd1e38dd27bbb1258685a1fc6524df6aff4e07b25b393a47de59635178d99" +dependencies = [ + "arrow", + "async-trait", + "dashmap", + "datafusion-common 54.1.0", + "datafusion-common-runtime 54.1.0", + "datafusion-datasource 54.1.0", + "datafusion-execution 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-physical-expr 54.1.0", + "datafusion-physical-plan 54.1.0", + "datafusion-session 54.1.0", "futures", "itertools 0.14.0", "log", @@ -2163,15 +2248,38 @@ checksum = "17e112307715d6a7a331111a4c2330ff54bc237183511c319e3708a4cff431fb" dependencies = [ "arrow", "async-trait", - "datafusion-catalog", - "datafusion-common", - "datafusion-datasource", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-expr", - "datafusion-physical-expr-adapter", - "datafusion-physical-expr-common", - "datafusion-physical-plan", + "datafusion-catalog 53.1.0", + "datafusion-common 53.1.0", + "datafusion-datasource 53.1.0", + "datafusion-execution 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-physical-expr 53.1.0", + "datafusion-physical-expr-adapter 53.1.0", + "datafusion-physical-expr-common 53.1.0", + "datafusion-physical-plan 53.1.0", + "futures", + "itertools 0.14.0", + "log", + "object_store", +] + +[[package]] +name = "datafusion-catalog-listing" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0668fb32c12065ec242be0e5b4bc62bd7a06a0be3ecd83791ef877e4be67e02" +dependencies = [ + "arrow", + "async-trait", + "datafusion-catalog 54.1.0", + "datafusion-common 54.1.0", + "datafusion-datasource 54.1.0", + "datafusion-execution 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-physical-expr 54.1.0", + "datafusion-physical-expr-adapter 54.1.0", + "datafusion-physical-expr-common 54.1.0", + "datafusion-physical-plan 54.1.0", "futures", "itertools 0.14.0", "log", @@ -2198,8 +2306,34 @@ dependencies = [ "parquet", "paste", "recursive", - "sqlparser", + "sqlparser 0.61.0", + "tokio", + "web-time", +] + +[[package]] +name = "datafusion-common" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca43b263cdff57042cfa8fb817fb3469f4878933380dccff25f5e793580abbf9" +dependencies = [ + "arrow", + "arrow-ipc", + "arrow-schema", + "chrono", + "foldhash 0.2.0", + "half", + "hashbrown 0.17.1", + "indexmap 2.14.0", + "itertools 0.14.0", + "libc", + "log", + "object_store", + "parquet", + "recursive", + "sqlparser 0.62.0", "tokio", + "uuid", "web-time", ] @@ -2214,6 +2348,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "datafusion-common-runtime" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f0ba2b864792bdca4d76c59a1de0ab6e1b61946596b9936888dbd6360035f2" +dependencies = [ + "futures", + "log", + "tokio", +] + [[package]] name = "datafusion-datasource" version = "53.1.0" @@ -2226,15 +2371,15 @@ dependencies = [ "bytes", "bzip2", "chrono", - "datafusion-common", - "datafusion-common-runtime", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-expr", - "datafusion-physical-expr-adapter", - "datafusion-physical-expr-common", - "datafusion-physical-plan", - "datafusion-session", + "datafusion-common 53.1.0", + "datafusion-common-runtime 53.1.0", + "datafusion-execution 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-physical-expr 53.1.0", + "datafusion-physical-expr-adapter 53.1.0", + "datafusion-physical-expr-common 53.1.0", + "datafusion-physical-plan 53.1.0", + "datafusion-session 53.1.0", "flate2", "futures", "glob", @@ -2249,6 +2394,42 @@ dependencies = [ "zstd", ] +[[package]] +name = "datafusion-datasource" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b840a8bce0bcbf5afad02946d438591e7c373f7afccaf3d874c04485772514dd" +dependencies = [ + "arrow", + "async-compression", + "async-trait", + "bytes", + "bzip2", + "chrono", + "datafusion-common 54.1.0", + "datafusion-common-runtime 54.1.0", + "datafusion-execution 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-physical-expr 54.1.0", + "datafusion-physical-expr-adapter 54.1.0", + "datafusion-physical-expr-common 54.1.0", + "datafusion-physical-plan 54.1.0", + "datafusion-session 54.1.0", + "flate2", + "futures", + "glob", + "itertools 0.14.0", + "liblzma", + "log", + "object_store", + "parking_lot", + "rand 0.9.4", + "tokio", + "tokio-util", + "url", + "zstd", +] + [[package]] name = "datafusion-datasource-arrow" version = "53.1.0" @@ -2259,14 +2440,38 @@ dependencies = [ "arrow-ipc", "async-trait", "bytes", - "datafusion-common", - "datafusion-common-runtime", - "datafusion-datasource", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-expr-common", - "datafusion-physical-plan", - "datafusion-session", + "datafusion-common 53.1.0", + "datafusion-common-runtime 53.1.0", + "datafusion-datasource 53.1.0", + "datafusion-execution 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-physical-expr-common 53.1.0", + "datafusion-physical-plan 53.1.0", + "datafusion-session 53.1.0", + "futures", + "itertools 0.14.0", + "object_store", + "tokio", +] + +[[package]] +name = "datafusion-datasource-arrow" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a24cc0b9cf6e367f27f27406eff13abf48a11b72446aaa40b3105c0ded5c17d9" +dependencies = [ + "arrow", + "arrow-ipc", + "async-trait", + "bytes", + "datafusion-common 54.1.0", + "datafusion-common-runtime 54.1.0", + "datafusion-datasource 54.1.0", + "datafusion-execution 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-physical-expr-common 54.1.0", + "datafusion-physical-plan 54.1.0", + "datafusion-session 54.1.0", "futures", "itertools 0.14.0", "object_store", @@ -2282,14 +2487,37 @@ dependencies = [ "arrow", "async-trait", "bytes", - "datafusion-common", - "datafusion-common-runtime", - "datafusion-datasource", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-expr-common", - "datafusion-physical-plan", - "datafusion-session", + "datafusion-common 53.1.0", + "datafusion-common-runtime 53.1.0", + "datafusion-datasource 53.1.0", + "datafusion-execution 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-physical-expr-common 53.1.0", + "datafusion-physical-plan 53.1.0", + "datafusion-session 53.1.0", + "futures", + "object_store", + "regex", + "tokio", +] + +[[package]] +name = "datafusion-datasource-csv" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1abe56b2a7a2d1d6de5117dd1a203181e267f28529faa5da546947621b697d7" +dependencies = [ + "arrow", + "async-trait", + "bytes", + "datafusion-common 54.1.0", + "datafusion-common-runtime 54.1.0", + "datafusion-datasource 54.1.0", + "datafusion-execution 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-physical-expr-common 54.1.0", + "datafusion-physical-plan 54.1.0", + "datafusion-session 54.1.0", "futures", "object_store", "regex", @@ -2305,14 +2533,14 @@ dependencies = [ "arrow", "async-trait", "bytes", - "datafusion-common", - "datafusion-common-runtime", - "datafusion-datasource", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-expr-common", - "datafusion-physical-plan", - "datafusion-session", + "datafusion-common 53.1.0", + "datafusion-common-runtime 53.1.0", + "datafusion-datasource 53.1.0", + "datafusion-execution 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-physical-expr-common 53.1.0", + "datafusion-physical-plan 53.1.0", + "datafusion-session 53.1.0", "futures", "object_store", "serde_json", @@ -2320,6 +2548,29 @@ dependencies = [ "tokio-stream", ] +[[package]] +name = "datafusion-datasource-json" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3e467f0611ad7bdd5aad17c63c9bb6182d04e5282e5496d897ea2b49c024ba" +dependencies = [ + "arrow", + "async-trait", + "bytes", + "datafusion-common 54.1.0", + "datafusion-common-runtime 54.1.0", + "datafusion-datasource 54.1.0", + "datafusion-execution 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-physical-expr-common 54.1.0", + "datafusion-physical-plan 54.1.0", + "datafusion-session 54.1.0", + "futures", + "object_store", + "tokio", + "tokio-stream", +] + [[package]] name = "datafusion-datasource-parquet" version = "53.1.0" @@ -2329,18 +2580,49 @@ dependencies = [ "arrow", "async-trait", "bytes", - "datafusion-common", - "datafusion-common-runtime", - "datafusion-datasource", - "datafusion-execution", - "datafusion-expr", - "datafusion-functions-aggregate-common", - "datafusion-physical-expr", - "datafusion-physical-expr-adapter", - "datafusion-physical-expr-common", - "datafusion-physical-plan", - "datafusion-pruning", - "datafusion-session", + "datafusion-common 53.1.0", + "datafusion-common-runtime 53.1.0", + "datafusion-datasource 53.1.0", + "datafusion-execution 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-functions-aggregate-common 53.1.0", + "datafusion-physical-expr 53.1.0", + "datafusion-physical-expr-adapter 53.1.0", + "datafusion-physical-expr-common 53.1.0", + "datafusion-physical-plan 53.1.0", + "datafusion-pruning 53.1.0", + "datafusion-session 53.1.0", + "futures", + "itertools 0.14.0", + "log", + "object_store", + "parking_lot", + "parquet", + "tokio", +] + +[[package]] +name = "datafusion-datasource-parquet" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cc35b92cd560082155e80d9c826929c852d3c51543f4affd3a51c464a0aab3a" +dependencies = [ + "arrow", + "async-trait", + "bytes", + "datafusion-common 54.1.0", + "datafusion-common-runtime 54.1.0", + "datafusion-datasource 54.1.0", + "datafusion-execution 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-functions 54.1.0", + "datafusion-functions-aggregate-common 54.1.0", + "datafusion-physical-expr 54.1.0", + "datafusion-physical-expr-adapter 54.1.0", + "datafusion-physical-expr-common 54.1.0", + "datafusion-physical-plan 54.1.0", + "datafusion-pruning 54.1.0", + "datafusion-session 54.1.0", "futures", "itertools 0.14.0", "log", @@ -2356,6 +2638,12 @@ version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de6ac0df1662b9148ad3c987978b32cbec7c772f199b1d53520c8fa764a87ee" +[[package]] +name = "datafusion-doc" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d69bb69d8769e34f76839c960dbde24c1ac0c885a79b6c3c2287bdc56ec67891" + [[package]] name = "datafusion-execution" version = "53.1.0" @@ -2367,9 +2655,31 @@ dependencies = [ "async-trait", "chrono", "dashmap", - "datafusion-common", - "datafusion-expr", - "datafusion-physical-expr-common", + "datafusion-common 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-physical-expr-common 53.1.0", + "futures", + "log", + "object_store", + "parking_lot", + "rand 0.9.4", + "tempfile", + "url", +] + +[[package]] +name = "datafusion-execution" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8eac0a09bc8d263f52025cad9e001da4d8138d633fa288edda4d06b1772eae6" +dependencies = [ + "arrow", + "arrow-buffer", + "async-trait", + "dashmap", + "datafusion-common 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-physical-expr-common 54.1.0", "futures", "log", "object_store", @@ -2388,18 +2698,41 @@ dependencies = [ "arrow", "async-trait", "chrono", - "datafusion-common", - "datafusion-doc", - "datafusion-expr-common", - "datafusion-functions-aggregate-common", - "datafusion-functions-window-common", - "datafusion-physical-expr-common", + "datafusion-common 53.1.0", + "datafusion-doc 53.1.0", + "datafusion-expr-common 53.1.0", + "datafusion-functions-aggregate-common 53.1.0", + "datafusion-functions-window-common 53.1.0", + "datafusion-physical-expr-common 53.1.0", "indexmap 2.14.0", "itertools 0.14.0", "paste", "recursive", "serde_json", - "sqlparser", + "sqlparser 0.61.0", +] + +[[package]] +name = "datafusion-expr" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeb14d374767ee0fc62dc79a5ba8bcf8a63c14e993c7d992d0e63adfa23d77d3" +dependencies = [ + "arrow", + "arrow-schema", + "async-trait", + "chrono", + "datafusion-common 54.1.0", + "datafusion-doc 54.1.0", + "datafusion-expr-common 54.1.0", + "datafusion-functions-aggregate-common 54.1.0", + "datafusion-functions-window-common 54.1.0", + "datafusion-physical-expr-common 54.1.0", + "indexmap 2.14.0", + "itertools 0.14.0", + "recursive", + "serde_json", + "sqlparser 0.62.0", ] [[package]] @@ -2409,12 +2742,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d7c3adf3db8bf61e92eb90cb659c8e8b734593a8f7c8e12a843c7ddba24b87e" dependencies = [ "arrow", - "datafusion-common", + "datafusion-common 53.1.0", "indexmap 2.14.0", "itertools 0.14.0", "paste", ] +[[package]] +name = "datafusion-expr-common" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7b19a8c95522bee8cbb313d74263b85e355d2b52f42e67ef5694bf5de9e9356" +dependencies = [ + "arrow", + "datafusion-common 54.1.0", + "indexmap 2.14.0", + "itertools 0.14.0", +] + [[package]] name = "datafusion-functions" version = "53.1.0" @@ -2428,16 +2773,16 @@ dependencies = [ "blake3", "chrono", "chrono-tz", - "datafusion-common", - "datafusion-doc", - "datafusion-execution", - "datafusion-expr", - "datafusion-expr-common", - "datafusion-macros", + "datafusion-common 53.1.0", + "datafusion-doc 53.1.0", + "datafusion-execution 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-expr-common 53.1.0", + "datafusion-macros 53.1.0", "hex", "itertools 0.14.0", "log", - "md-5", + "md-5 0.10.6", "memchr", "num-traits", "rand 0.9.4", @@ -2447,6 +2792,38 @@ dependencies = [ "uuid", ] +[[package]] +name = "datafusion-functions" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f64c983bbbdcb729d921a2b2ac3375598719b5cc0c30345ad664936f3176fc7" +dependencies = [ + "arrow", + "arrow-buffer", + "base64", + "blake2", + "blake3", + "chrono", + "chrono-tz", + "datafusion-common 54.1.0", + "datafusion-doc 54.1.0", + "datafusion-execution 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-expr-common 54.1.0", + "datafusion-macros 54.1.0", + "datafusion-physical-expr-common 54.1.0", + "hex", + "itertools 0.14.0", + "log", + "md-5 0.11.0", + "memchr", + "num-traits", + "rand 0.9.4", + "regex", + "sha2 0.11.0", + "uuid", +] + [[package]] name = "datafusion-functions-aggregate" version = "53.1.0" @@ -2455,31 +2832,64 @@ checksum = "00aa6217e56098ba84e0a338176fe52f0a84cca398021512c6c8c5eff806d0ad" dependencies = [ "ahash", "arrow", - "datafusion-common", - "datafusion-doc", - "datafusion-execution", - "datafusion-expr", - "datafusion-functions-aggregate-common", - "datafusion-macros", - "datafusion-physical-expr", - "datafusion-physical-expr-common", + "datafusion-common 53.1.0", + "datafusion-doc 53.1.0", + "datafusion-execution 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-functions-aggregate-common 53.1.0", + "datafusion-macros 53.1.0", + "datafusion-physical-expr 53.1.0", + "datafusion-physical-expr-common 53.1.0", "half", "log", "num-traits", "paste", ] +[[package]] +name = "datafusion-functions-aggregate" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89bc17041e424a47ed062f43df24d84aab8b57c4c3221e5c1a5eef46d6c5718b" +dependencies = [ + "arrow", + "datafusion-common 54.1.0", + "datafusion-doc 54.1.0", + "datafusion-execution 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-functions-aggregate-common 54.1.0", + "datafusion-macros 54.1.0", + "datafusion-physical-expr 54.1.0", + "datafusion-physical-expr-common 54.1.0", + "foldhash 0.2.0", + "half", + "log", + "num-traits", +] + +[[package]] +name = "datafusion-functions-aggregate-common" +version = "53.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b511250349407db7c43832ab2de63f5557b19a20dfd236b39ca2c04468b50d47" +dependencies = [ + "ahash", + "arrow", + "datafusion-common 53.1.0", + "datafusion-expr-common 53.1.0", + "datafusion-physical-expr-common 53.1.0", +] + [[package]] name = "datafusion-functions-aggregate-common" -version = "53.1.0" +version = "54.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b511250349407db7c43832ab2de63f5557b19a20dfd236b39ca2c04468b50d47" +checksum = "97dd2a9e865c6108059f5b37b77934f84b50bfb108f837bd0e5c9536e03f0545" dependencies = [ - "ahash", "arrow", - "datafusion-common", - "datafusion-expr-common", - "datafusion-physical-expr-common", + "datafusion-common 54.1.0", + "datafusion-expr-common 54.1.0", + "datafusion-physical-expr-common 54.1.0", ] [[package]] @@ -2490,16 +2900,16 @@ checksum = "ef13a858e20d50f0a9bb5e96e7ac82b4e7597f247515bccca4fdd2992df0212a" dependencies = [ "arrow", "arrow-ord", - "datafusion-common", - "datafusion-doc", - "datafusion-execution", - "datafusion-expr", - "datafusion-expr-common", - "datafusion-functions", - "datafusion-functions-aggregate", - "datafusion-functions-aggregate-common", - "datafusion-macros", - "datafusion-physical-expr-common", + "datafusion-common 53.1.0", + "datafusion-doc 53.1.0", + "datafusion-execution 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-expr-common 53.1.0", + "datafusion-functions 53.1.0", + "datafusion-functions-aggregate 53.1.0", + "datafusion-functions-aggregate-common 53.1.0", + "datafusion-macros 53.1.0", + "datafusion-physical-expr-common 53.1.0", "hashbrown 0.16.1", "itertools 0.14.0", "itoa", @@ -2507,6 +2917,31 @@ dependencies = [ "paste", ] +[[package]] +name = "datafusion-functions-nested" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75f0bdfeef16d96417b9632ef855645376b242e9006a126dfd0bedfc54a93f5f" +dependencies = [ + "arrow", + "arrow-ord", + "datafusion-common 54.1.0", + "datafusion-doc 54.1.0", + "datafusion-execution 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-expr-common 54.1.0", + "datafusion-functions 54.1.0", + "datafusion-functions-aggregate 54.1.0", + "datafusion-functions-aggregate-common 54.1.0", + "datafusion-macros 54.1.0", + "datafusion-physical-expr-common 54.1.0", + "hashbrown 0.17.1", + "itertools 0.14.0", + "itoa", + "log", + "memchr", +] + [[package]] name = "datafusion-functions-table" version = "53.1.0" @@ -2515,14 +2950,30 @@ checksum = "72b40d3f5bbb3905f9ccb1ce9485a9595c77b69758a7c24d3ba79e334ff51e7e" dependencies = [ "arrow", "async-trait", - "datafusion-catalog", - "datafusion-common", - "datafusion-expr", - "datafusion-physical-plan", + "datafusion-catalog 53.1.0", + "datafusion-common 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-physical-plan 53.1.0", "parking_lot", "paste", ] +[[package]] +name = "datafusion-functions-table" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4e4941673c917819616877e9993da4503e4f4739812be0bc32c5356184c6383" +dependencies = [ + "arrow", + "async-trait", + "datafusion-catalog 54.1.0", + "datafusion-common 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-physical-expr 54.1.0", + "datafusion-physical-plan 54.1.0", + "parking_lot", +] + [[package]] name = "datafusion-functions-window" version = "53.1.0" @@ -2530,25 +2981,52 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4e88ec9d57c9b685d02f58bfee7be62d72610430ddcedb82a08e5d9925dbfb6" dependencies = [ "arrow", - "datafusion-common", - "datafusion-doc", - "datafusion-expr", - "datafusion-functions-window-common", - "datafusion-macros", - "datafusion-physical-expr", - "datafusion-physical-expr-common", + "datafusion-common 53.1.0", + "datafusion-doc 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-functions-window-common 53.1.0", + "datafusion-macros 53.1.0", + "datafusion-physical-expr 53.1.0", + "datafusion-physical-expr-common 53.1.0", "log", "paste", ] +[[package]] +name = "datafusion-functions-window" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12dd2e16c12b84b6f6b41b19f55b366dd1c46876bb35b86896c6349067379e8d" +dependencies = [ + "arrow", + "datafusion-common 54.1.0", + "datafusion-doc 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-functions-window-common 54.1.0", + "datafusion-macros 54.1.0", + "datafusion-physical-expr 54.1.0", + "datafusion-physical-expr-common 54.1.0", + "log", +] + [[package]] name = "datafusion-functions-window-common" version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8307bb93519b1a91913723a1130cfafeee3f72200d870d88e91a6fc5470ede5c" dependencies = [ - "datafusion-common", - "datafusion-physical-expr-common", + "datafusion-common 53.1.0", + "datafusion-physical-expr-common 53.1.0", +] + +[[package]] +name = "datafusion-functions-window-common" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cdc5e4b6f8b6ef823cc1c761f85088ad4c884fe8df64df3cbcc6b2b84698441" +dependencies = [ + "datafusion-common 54.1.0", + "datafusion-physical-expr-common 54.1.0", ] [[package]] @@ -2557,9 +3035,20 @@ version = "53.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e367e6a71051d0ebdd29b2f85d12059b38b1d1f172c6906e80016da662226bd" dependencies = [ - "datafusion-doc", + "datafusion-doc 53.1.0", + "quote", + "syn", +] + +[[package]] +name = "datafusion-macros" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a3614234dd93578c92428cb4f408e020874f0d2b7e6c90c928d9d28b5df2ceb" +dependencies = [ + "datafusion-doc 54.1.0", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -2570,10 +3059,30 @@ checksum = "e929015451a67f77d9d8b727b2bf3a40c4445fdef6cdc53281d7d97c76888ace" dependencies = [ "arrow", "chrono", - "datafusion-common", - "datafusion-expr", - "datafusion-expr-common", - "datafusion-physical-expr", + "datafusion-common 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-expr-common 53.1.0", + "datafusion-physical-expr 53.1.0", + "indexmap 2.14.0", + "itertools 0.14.0", + "log", + "recursive", + "regex", + "regex-syntax", +] + +[[package]] +name = "datafusion-optimizer" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0635620b050b81bb92764e99250868f654e2cd5ad1bece413283b3f73c83179" +dependencies = [ + "arrow", + "chrono", + "datafusion-common 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-expr-common 54.1.0", + "datafusion-physical-expr 54.1.0", "indexmap 2.14.0", "itertools 0.14.0", "log", @@ -2590,11 +3099,11 @@ checksum = "4b1e68aba7a4b350401cfdf25a3d6f989ad898a7410164afe9ca52080244cb59" dependencies = [ "ahash", "arrow", - "datafusion-common", - "datafusion-expr", - "datafusion-expr-common", - "datafusion-functions-aggregate-common", - "datafusion-physical-expr-common", + "datafusion-common 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-expr-common 53.1.0", + "datafusion-functions-aggregate-common 53.1.0", + "datafusion-physical-expr-common 53.1.0", "half", "hashbrown 0.16.1", "indexmap 2.14.0", @@ -2606,6 +3115,28 @@ dependencies = [ "tokio", ] +[[package]] +name = "datafusion-physical-expr" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cabf7a86eb70b816729e33c81bf7767c936ee1226f607a114f5dac2decac8d0" +dependencies = [ + "arrow", + "datafusion-common 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-expr-common 54.1.0", + "datafusion-functions-aggregate-common 54.1.0", + "datafusion-physical-expr-common 54.1.0", + "half", + "hashbrown 0.17.1", + "indexmap 2.14.0", + "itertools 0.14.0", + "parking_lot", + "petgraph 0.8.3", + "recursive", + "tokio", +] + [[package]] name = "datafusion-physical-expr-adapter" version = "53.1.0" @@ -2613,11 +3144,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea22315f33cf2e0adc104e8ec42e285f6ed93998d565c65e82fec6a9ee9f9db4" dependencies = [ "arrow", - "datafusion-common", - "datafusion-expr", - "datafusion-functions", - "datafusion-physical-expr", - "datafusion-physical-expr-common", + "datafusion-common 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-functions 53.1.0", + "datafusion-physical-expr 53.1.0", + "datafusion-physical-expr-common 53.1.0", + "itertools 0.14.0", +] + +[[package]] +name = "datafusion-physical-expr-adapter" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de222e04f7e6744501555a54ab0abe26bfdfebee380af79a9bdc175704246859" +dependencies = [ + "arrow", + "datafusion-common 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-functions 54.1.0", + "datafusion-physical-expr 54.1.0", + "datafusion-physical-expr-common 54.1.0", "itertools 0.14.0", ] @@ -2630,14 +3176,31 @@ dependencies = [ "ahash", "arrow", "chrono", - "datafusion-common", - "datafusion-expr-common", + "datafusion-common 53.1.0", + "datafusion-expr-common 53.1.0", "hashbrown 0.16.1", "indexmap 2.14.0", "itertools 0.14.0", "parking_lot", ] +[[package]] +name = "datafusion-physical-expr-common" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d0d0057fc5a502d45c870cb6d47c66eb7bdd5edb1bd71ad6f3f724975ac2a8" +dependencies = [ + "arrow", + "chrono", + "datafusion-common 54.1.0", + "datafusion-expr-common 54.1.0", + "hashbrown 0.17.1", + "indexmap 2.14.0", + "itertools 0.14.0", + "parking_lot", + "pin-project", +] + [[package]] name = "datafusion-physical-optimizer" version = "53.1.0" @@ -2645,14 +3208,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cb13397809a425918f608dfe8653f332015a3e330004ab191b4404187238b95" dependencies = [ "arrow", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", - "datafusion-expr-common", - "datafusion-physical-expr", - "datafusion-physical-expr-common", - "datafusion-physical-plan", - "datafusion-pruning", + "datafusion-common 53.1.0", + "datafusion-execution 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-expr-common 53.1.0", + "datafusion-physical-expr 53.1.0", + "datafusion-physical-expr-common 53.1.0", + "datafusion-physical-plan 53.1.0", + "datafusion-pruning 53.1.0", + "itertools 0.14.0", + "recursive", +] + +[[package]] +name = "datafusion-physical-optimizer" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86046eed10950c5f9aaed9acfd148e9bd2e1dfdfe4f9aef607d1447b271e4183" +dependencies = [ + "arrow", + "datafusion-common 54.1.0", + "datafusion-execution 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-expr-common 54.1.0", + "datafusion-physical-expr 54.1.0", + "datafusion-physical-expr-common 54.1.0", + "datafusion-physical-plan 54.1.0", + "datafusion-pruning 54.1.0", "itertools 0.14.0", "recursive", ] @@ -2668,15 +3250,15 @@ dependencies = [ "arrow-ord", "arrow-schema", "async-trait", - "datafusion-common", - "datafusion-common-runtime", - "datafusion-execution", - "datafusion-expr", - "datafusion-functions", - "datafusion-functions-aggregate-common", - "datafusion-functions-window-common", - "datafusion-physical-expr", - "datafusion-physical-expr-common", + "datafusion-common 53.1.0", + "datafusion-common-runtime 53.1.0", + "datafusion-execution 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-functions 53.1.0", + "datafusion-functions-aggregate-common 53.1.0", + "datafusion-functions-window-common 53.1.0", + "datafusion-physical-expr 53.1.0", + "datafusion-physical-expr-common 53.1.0", "futures", "half", "hashbrown 0.16.1", @@ -2689,6 +3271,39 @@ dependencies = [ "tokio", ] +[[package]] +name = "datafusion-physical-plan" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bc84da934c903407ba297971ebcc020c4c1a38aafd765d6c144c76eff3fa6a1" +dependencies = [ + "arrow", + "arrow-data", + "arrow-ipc", + "arrow-ord", + "arrow-schema", + "async-trait", + "datafusion-common 54.1.0", + "datafusion-common-runtime 54.1.0", + "datafusion-execution 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-functions 54.1.0", + "datafusion-functions-aggregate-common 54.1.0", + "datafusion-functions-window-common 54.1.0", + "datafusion-physical-expr 54.1.0", + "datafusion-physical-expr-common 54.1.0", + "futures", + "half", + "hashbrown 0.17.1", + "indexmap 2.14.0", + "itertools 0.14.0", + "log", + "num-traits", + "parking_lot", + "pin-project-lite", + "tokio", +] + [[package]] name = "datafusion-proto" version = "53.1.0" @@ -2697,20 +3312,20 @@ checksum = "6a387aaef949dc16bb6abc81bd1af850ec7449183aef011214f9724957495738" dependencies = [ "arrow", "chrono", - "datafusion-catalog", - "datafusion-catalog-listing", - "datafusion-common", - "datafusion-datasource", - "datafusion-datasource-arrow", - "datafusion-datasource-csv", - "datafusion-datasource-json", - "datafusion-datasource-parquet", - "datafusion-execution", - "datafusion-expr", - "datafusion-functions-table", - "datafusion-physical-expr", - "datafusion-physical-expr-common", - "datafusion-physical-plan", + "datafusion-catalog 53.1.0", + "datafusion-catalog-listing 53.1.0", + "datafusion-common 53.1.0", + "datafusion-datasource 53.1.0", + "datafusion-datasource-arrow 53.1.0", + "datafusion-datasource-csv 53.1.0", + "datafusion-datasource-json 53.1.0", + "datafusion-datasource-parquet 53.1.0", + "datafusion-execution 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-functions-table 53.1.0", + "datafusion-physical-expr 53.1.0", + "datafusion-physical-expr-common 53.1.0", + "datafusion-physical-plan 53.1.0", "datafusion-proto-common", "object_store", "prost 0.14.4", @@ -2724,7 +3339,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16e614c7c53a9c304c6a850b821010bb492e57300311835f1180613f9d2c63d9" dependencies = [ "arrow", - "datafusion-common", + "datafusion-common 53.1.0", "prost 0.14.4", ] @@ -2735,16 +3350,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac8c76860e355616555081cab5968cec1af7a80701ff374510860bcd567e365a" dependencies = [ "arrow", - "datafusion-common", - "datafusion-datasource", - "datafusion-expr-common", - "datafusion-physical-expr", - "datafusion-physical-expr-common", - "datafusion-physical-plan", + "datafusion-common 53.1.0", + "datafusion-datasource 53.1.0", + "datafusion-expr-common 53.1.0", + "datafusion-physical-expr 53.1.0", + "datafusion-physical-expr-common 53.1.0", + "datafusion-physical-plan 53.1.0", "itertools 0.14.0", "log", ] +[[package]] +name = "datafusion-pruning" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb63eeac6de19be40f487b65dd84e546195f783c5a9928618e0c4f2a3569b0d7" +dependencies = [ + "arrow", + "datafusion-common 54.1.0", + "datafusion-datasource 54.1.0", + "datafusion-expr-common 54.1.0", + "datafusion-physical-expr 54.1.0", + "datafusion-physical-expr-common 54.1.0", + "datafusion-physical-plan 54.1.0", + "log", +] + [[package]] name = "datafusion-session" version = "53.1.0" @@ -2752,10 +3383,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5412111aa48e2424ba926112e192f7a6b7e4ccb450145d25ce5ede9f19dc491e" dependencies = [ "async-trait", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-plan", + "datafusion-common 53.1.0", + "datafusion-execution 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-physical-plan 53.1.0", + "parking_lot", +] + +[[package]] +name = "datafusion-session" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f961d209177f91bd014db5cbb2c33b7d28a2597b9003e77f17aeb712964315a" +dependencies = [ + "async-trait", + "datafusion-common 54.1.0", + "datafusion-execution 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-physical-plan 54.1.0", "parking_lot", ] @@ -2768,14 +3413,33 @@ dependencies = [ "arrow", "bigdecimal", "chrono", - "datafusion-common", - "datafusion-expr", - "datafusion-functions-nested", + "datafusion-common 53.1.0", + "datafusion-expr 53.1.0", + "datafusion-functions-nested 53.1.0", + "indexmap 2.14.0", + "log", + "recursive", + "regex", + "sqlparser 0.61.0", +] + +[[package]] +name = "datafusion-sql" +version = "54.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d71cb454da682b2af7488e1fc1ddd72ee1b28f19297b8ccad73f0a21ee9a69" +dependencies = [ + "arrow", + "bigdecimal", + "chrono", + "datafusion-common 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-functions-nested 54.1.0", "indexmap 2.14.0", "log", "recursive", "regex", - "sqlparser", + "sqlparser 0.62.0", ] [[package]] @@ -2804,26 +3468,6 @@ dependencies = [ "ndarray 0.17.2", ] -[[package]] -name = "deepsize" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cdb987ec36f6bf7bfbea3f928b75590b736fc42af8e54d97592481351b2b96c" -dependencies = [ - "deepsize_derive", -] - -[[package]] -name = "deepsize_derive" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990101d41f3bc8c1a45641024377ee284ecc338e5ecf3ea0f0e236d897c72796" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "defmt" version = "1.1.0" @@ -2844,7 +3488,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -2934,9 +3578,9 @@ dependencies = [ "cfg-if 1.0.4", "chrono", "dashmap", - "datafusion", - "datafusion-datasource", - "datafusion-physical-expr-adapter", + "datafusion 53.1.0", + "datafusion-datasource 53.1.0", + "datafusion-physical-expr-adapter 53.1.0", "datafusion-proto", "deltalake-derive", "dirs", @@ -2956,7 +3600,7 @@ dependencies = [ "regex", "serde", "serde_json", - "sqlparser", + "sqlparser 0.61.0", "strum 0.27.2", "thiserror 2.0.18", "tokio", @@ -2976,7 +3620,7 @@ dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -3013,6 +3657,7 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" dependencies = [ + "powerfmt", "serde_core", ] @@ -3034,7 +3679,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -3044,7 +3689,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.118", + "syn", ] [[package]] @@ -3100,7 +3745,7 @@ checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -3116,7 +3761,7 @@ dependencies = [ name = "dto-class-check" version = "0.1.0" dependencies = [ - "syn 2.0.118", + "syn", "walkdir", ] @@ -3347,9 +3992,9 @@ checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" [[package]] name = "fsst" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcd0ce0249ac12fd44fcde62d435c36d881952c2f0df4d1de24b45e1dbba5ddb" +checksum = "d6f1155128aba964cf6925c22a667ed763b52c8c653693c4b46f8a79d509a8c1" dependencies = [ "arrow-array", "rand 0.9.4", @@ -3426,7 +4071,7 @@ checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -3577,14 +4222,15 @@ dependencies = [ [[package]] name = "geodatafusion" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cd430f1a1f59bc97053d824ad410ea6fd123c8977b3c1a75335e289233b8b" +checksum = "fecbdd00d0fff2b04635c1b1e4129c217908f0c2d17539e0a2275308afce2552" dependencies = [ "arrow-arith", "arrow-array", + "arrow-buffer", "arrow-schema", - "datafusion", + "datafusion 54.1.0", "geo", "geo-traits", "geoarrow-array", @@ -3672,7 +4318,7 @@ checksum = "53010ccb100b96a67bc32c0175f0ed1426b31b655d562898e57325f81c023ac0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -3693,6 +4339,30 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "goosefs-sdk" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae079b88ffe7772d12cfc5c40a5a324babb357893d95b5e3a22ae857f236c5f" +dependencies = [ + "async-trait", + "bytes", + "dashmap", + "hostname", + "prost 0.14.4", + "prost-types 0.14.4", + "rand 0.9.4", + "reqwest 0.12.28", + "serde", + "thiserror 2.0.18", + "tokio", + "tokio-stream", + "tonic 0.14.6", + "tonic-prost", + "tracing", + "uuid", +] + [[package]] name = "h2" version = "0.4.15" @@ -3718,6 +4388,7 @@ version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ + "bytemuck", "cfg-if 1.0.4", "crunchy", "num-traits", @@ -3770,6 +4441,11 @@ name = "hashbrown" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.2.0", +] [[package]] name = "heapify" @@ -3863,6 +4539,17 @@ dependencies = [ "thiserror 2.0.18", ] +[[package]] +name = "hostname" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617aaa3557aef3810a6369d0a99fac8a080891b68bd9f9812a1eeda0c0730cbd" +dependencies = [ + "cfg-if 1.0.4", + "libc", + "windows-link", +] + [[package]] name = "http" version = "0.2.12" @@ -3981,6 +4668,7 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", + "webpki-roots", ] [[package]] @@ -4127,6 +4815,21 @@ dependencies = [ "zerovec", ] +[[package]] +name = "icu_locale" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5a396343c7208121dc86e35623d3dfe19814a7613cfd14964994cdc9c9a2e26" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_locale_data", + "icu_provider", + "potential_utf", + "tinystr", + "zerovec", +] + [[package]] name = "icu_locale_core" version = "2.2.0" @@ -4135,11 +4838,18 @@ checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" dependencies = [ "displaydoc", "litemap", + "serde", "tinystr", "writeable", "zerovec", ] +[[package]] +name = "icu_locale_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fdcc9ac77c6d74ff5cf6e65ef3181d6af32003b16fce3a77fb451d2f695993" + [[package]] name = "icu_normalizer" version = "2.2.0" @@ -4188,6 +4898,8 @@ checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" dependencies = [ "displaydoc", "icu_locale_core", + "serde", + "stable_deref_trait", "writeable", "yoke", "zerofrom", @@ -4195,6 +4907,27 @@ dependencies = [ "zerovec", ] +[[package]] +name = "icu_segmenter" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c0794db0b1a86193ac9c48768d0e6c52c54448e0870ad87907d456ee0dac964" +dependencies = [ + "icu_collections", + "icu_locale", + "icu_provider", + "icu_segmenter_data", + "potential_utf", + "utf8_iter", + "zerovec", +] + +[[package]] +name = "icu_segmenter_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4a2c462a4d927d512f5f882a033ddd62f33a05bb9f230d98f736ac3dc85938f" + [[package]] name = "ident_case" version = "1.0.1" @@ -4313,15 +5046,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.14.0" @@ -4343,19 +5067,20 @@ version = "0.1.0" [[package]] name = "jieba-macros" -version = "0.9.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a29cfc5dcd898604c6f80363411fa6b6b08e27d1d253d6225b9cb6702ea02fc0" +checksum = "34904340bc65749a9e9a02fcc7f3368e675427c18447b9bbe02df52c15c9a36a" dependencies = [ "phf_codegen", ] [[package]] name = "jieba-rs" -version = "0.9.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3245d6e9d1d5facbd6a23848d6b67e3439738ccbb4fa5a3d65da315ba1a910a2" +checksum = "bb5bdea4dc241d589e179f39d2a778f31490f3370aa2f626223dbd930ebc5c9d" dependencies = [ + "bytecount", "cedarwood", "jieba-macros", "phf 0.13.1", @@ -4389,7 +5114,7 @@ checksum = "0666b5ab5ecaca213fc2a85b8c0083d9004e84ee2d5f9a7e0017aaf50986f25f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -4434,7 +5159,7 @@ dependencies = [ "quote", "rustc_version", "simd_cesu8", - "syn 2.0.118", + "syn", ] [[package]] @@ -4453,7 +5178,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" dependencies = [ "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -4525,9 +5250,9 @@ checksum = "e037a2e1d8d5fdbd49b16a4ea09d5d6401c1f29eca5ff29d03d3824dba16256a" [[package]] name = "lance" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3944aca86f4c78f4da04af1c2bf33e664a2826b7af72972ad200d6b9de59019f" +checksum = "23d04bed056e254bc6e31264b031c8492507ca57939586f016924081dcf221a9" dependencies = [ "arc-swap", "arrow", @@ -4544,25 +5269,25 @@ dependencies = [ "async-trait", "async_cell", "aws-credential-types", - "bitpacking", "byteorder", "bytes", "chrono", "crossbeam-queue", "crossbeam-skiplist", "dashmap", - "datafusion", - "datafusion-expr", - "datafusion-functions", - "datafusion-physical-expr", - "datafusion-physical-plan", - "deepsize", + "datafusion 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-functions 54.1.0", + "datafusion-physical-expr 54.1.0", + "datafusion-physical-plan 54.1.0", "either", + "fst", "futures", "half", "humantime", - "itertools 0.13.0", + "itertools 0.14.0", "lance-arrow", + "lance-bitpacking", "lance-core", "lance-datafusion", "lance-encoding", @@ -4571,6 +5296,7 @@ dependencies = [ "lance-io", "lance-linalg", "lance-namespace", + "lance-select", "lance-table", "lance-tokenizer", "log", @@ -4584,6 +5310,7 @@ dependencies = [ "rand 0.9.4", "rayon", "roaring", + "rustc-hash", "semver", "serde", "serde_json", @@ -4598,9 +5325,9 @@ dependencies = [ [[package]] name = "lance-arrow" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "253f4a0a70580c985b91e65e9ca6cad644825a4078de28d8efbacf3ffbd7ecdc" +checksum = "b6e7b87c8183988c40a6bd30a6d8ec588b84e53f702b82f19859dc71ba6c02bc" dependencies = [ "arrow-array", "arrow-buffer", @@ -4609,6 +5336,7 @@ dependencies = [ "arrow-ord", "arrow-schema", "arrow-select", + "bytemuck", "bytes", "futures", "getrandom 0.2.17", @@ -4618,36 +5346,66 @@ dependencies = [ "rand 0.9.4", ] +[[package]] +name = "lance-arrow-scalar" +version = "58.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771f68b04b47f3addf781116f65061808de94b05e1e9411c23c18f32d14ebe79" +dependencies = [ + "arrow-array", + "arrow-buffer", + "arrow-cast", + "arrow-data", + "arrow-row", + "arrow-schema", + "half", +] + +[[package]] +name = "lance-arrow-stats" +version = "58.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd47ec33c90bf29f688fd02118e37d3a5ad5c339caa3163f89e417dc0867001f" +dependencies = [ + "arrow-array", + "arrow-schema", + "half", + "lance-arrow-scalar", +] + [[package]] name = "lance-bitpacking" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80c4d12521b1945041dd515a56aa0854973138e7ac12111c92572e33e4ecb593" +checksum = "4a4d84a3f36133c70bf89d306d813a29f8eb8555bba2b84995260867cfafdd5e" dependencies = [ "arrayref", + "crunchy", "paste", "seq-macro", ] [[package]] name = "lance-core" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f84020da5a484e2f07dd1796e09785ed7cd889857ebc4cb77e32ef214ee594" +checksum = "238c8a58308e7718d6bd96b53494eb7953fa299778bc4911cc571c3576e9446d" dependencies = [ "arrow-array", "arrow-buffer", + "arrow-data", "arrow-schema", "async-trait", "byteorder", "bytes", - "datafusion-common", - "datafusion-sql", - "deepsize", + "datafusion-common 54.1.0", + "datafusion-sql 54.1.0", "futures", - "itertools 0.13.0", + "itertools 0.14.0", "lance-arrow", + "lance-derive", "libc", + "libm", "log", "moka", "num_cpus", @@ -4663,14 +5421,15 @@ dependencies = [ "tokio-stream", "tokio-util", "tracing", + "twox-hash", "url", ] [[package]] name = "lance-datafusion" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7460597a66534a75987993d4dac5bc330586d99c5b79ae73367dbcbd4e29e576" +checksum = "12f0ac4e1cf2f9b1b2fb5ee11bcd04af617bdd6f6cca13726a41c4212220193e" dependencies = [ "arrow", "arrow-array", @@ -4681,10 +5440,10 @@ dependencies = [ "arrow-select", "async-trait", "chrono", - "datafusion", - "datafusion-common", - "datafusion-functions", - "datafusion-physical-expr", + "datafusion 54.1.0", + "datafusion-common 54.1.0", + "datafusion-functions 54.1.0", + "datafusion-physical-expr 54.1.0", "futures", "jsonb", "lance-arrow", @@ -4701,9 +5460,9 @@ dependencies = [ [[package]] name = "lance-datagen" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046f5506ed2271cd941a050de7bf535dd3aedc291aadec836a63fa56c5926e3b" +checksum = "dd65e7ea88ab28e5d3e91b58a56c02bfd44c47474caae5f8aed1322df1611476" dependencies = [ "arrow", "arrow-array", @@ -4716,14 +5475,24 @@ dependencies = [ "rand 0.9.4", "rand_distr", "rand_xoshiro", - "random_word", +] + +[[package]] +name = "lance-derive" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf46656b359786f0b73f13936193583972b7af6e53ccb542da87830be18e94b2" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] [[package]] name = "lance-encoding" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7af54edf43dcf9d6a56cc636eb35d457e68373c6448dca3f0891b3325b4a24e6" +checksum = "4725f14fe6cc1b2a5644786b4afa828d0c243064e208fa17378f839243d049c0" dependencies = [ "arrow-arith", "arrow-array", @@ -4739,7 +5508,7 @@ dependencies = [ "futures", "hex", "hyperloglogplus", - "itertools 0.13.0", + "itertools 0.14.0", "lance-arrow", "lance-bitpacking", "lance-core", @@ -4758,9 +5527,9 @@ dependencies = [ [[package]] name = "lance-file" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0772ae2d6207995dc1eb28aff9507f78e90b3362b58f311da001e9dc25f3d736" +checksum = "8c161b00eb5813f98f1d6d52e06f1b712f9eebb0a7f535a8dc1e1122ceca7307" dependencies = [ "arrow-arith", "arrow-array", @@ -4772,8 +5541,7 @@ dependencies = [ "async-trait", "byteorder", "bytes", - "datafusion-common", - "deepsize", + "datafusion-common 54.1.0", "futures", "lance-arrow", "lance-core", @@ -4791,11 +5559,11 @@ dependencies = [ [[package]] name = "lance-geo" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5466cc6524104de7f07d70d4af57fb6912b0eb484f4ac939501c01dbfae572df" +checksum = "97739c10f2c818ac4aa8a798a115e11c790c174d016c0836792aa3b8d0f981ab" dependencies = [ - "datafusion", + "datafusion 54.1.0", "geo-traits", "geo-types", "geoarrow-array", @@ -4818,11 +5586,11 @@ dependencies = [ "bytes", "causal-edge", "chrono", - "datafusion", - "datafusion-common", - "datafusion-expr", - "datafusion-functions-aggregate", - "datafusion-sql", + "datafusion 54.1.0", + "datafusion-common 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-functions-aggregate 54.1.0", + "datafusion-sql 54.1.0", "deepnsm", "deltalake", "futures", @@ -4880,7 +5648,7 @@ dependencies = [ "axum 0.8.9", "chrono", "clap", - "datafusion", + "datafusion 54.1.0", "flate2", "futures", "lance", @@ -4890,7 +5658,7 @@ dependencies = [ "log", "serde", "serde_json", - "syn 2.0.118", + "syn", "thinking-engine", "thiserror 1.0.69", "tokio", @@ -4904,7 +5672,7 @@ version = "0.5.4" dependencies = [ "arrow-schema", "async-trait", - "datafusion", + "datafusion 54.1.0", "lance-namespace", "reqwest 0.12.28", "serde", @@ -5033,9 +5801,9 @@ dependencies = [ [[package]] name = "lance-index" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e71fbfb51096a903cb524fe0da716f5f15fbc4a6b6f84cd6dec21abf319c5e84" +checksum = "bf7980b0a6287fd46b9308a31e2cf284065d5693bfb43336297f0400172670ad" dependencies = [ "arc-swap", "arrow", @@ -5047,16 +5815,14 @@ dependencies = [ "async-channel", "async-recursion", "async-trait", - "bitpacking", "bitvec", "bytes", "chrono", "crossbeam-queue", - "datafusion", - "datafusion-common", - "datafusion-expr", - "datafusion-physical-expr", - "deepsize", + "datafusion 54.1.0", + "datafusion-common 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-physical-expr 54.1.0", "dirs", "fst", "futures", @@ -5064,21 +5830,25 @@ dependencies = [ "geoarrow-array", "geoarrow-schema", "half", - "itertools 0.13.0", + "itertools 0.14.0", "jieba-rs", "jsonb", "lance-arrow", + "lance-arrow-stats", + "lance-bitpacking", "lance-core", "lance-datafusion", "lance-datagen", "lance-encoding", "lance-file", "lance-geo", + "lance-index-core", "lance-io", "lance-linalg", + "lance-select", "lance-table", "lance-tokenizer", - "libm", + "libsais-rs", "log", "ndarray 0.16.1", "num-traits", @@ -5090,6 +5860,7 @@ dependencies = [ "rand_distr", "rangemap", "rayon", + "regex-syntax", "roaring", "serde", "serde_json", @@ -5097,15 +5868,38 @@ dependencies = [ "tempfile", "tokio", "tracing", - "twox-hash", "uuid", ] +[[package]] +name = "lance-index-core" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a95f46ac3e4cdd710ca6929226cfb0dd343d5d2370ecb4b40e1c452043f7d27a" +dependencies = [ + "arrow-array", + "arrow-schema", + "arrow-select", + "async-trait", + "bytes", + "datafusion 54.1.0", + "datafusion-common 54.1.0", + "datafusion-expr 54.1.0", + "futures", + "lance-core", + "lance-io", + "lance-select", + "prost-types 0.14.4", + "roaring", + "serde", + "serde_json", +] + [[package]] name = "lance-io" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab8c98ef1b870b20541d27f3ca4efdf7c9f5c25214233be07d231ba88900219" +checksum = "e6deecd351ed6849184cc83000eabb87c8a5bfc519996f92451284498af7b42c" dependencies = [ "arrow", "arrow-arith", @@ -5122,8 +5916,8 @@ dependencies = [ "byteorder", "bytes", "chrono", - "deepsize", "futures", + "goosefs-sdk", "http 1.4.2", "io-uring", "lance-arrow", @@ -5147,27 +5941,27 @@ dependencies = [ [[package]] name = "lance-linalg" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4c51cad0ac780b02dc4da48528479e7693c03e8d05390510bbc69ca2a9a1f1" +checksum = "0e5a9b99bd1f49bc2fe5afb81323141abc506c818f589de95dbab4f6143d9a88" dependencies = [ "arrow-array", "arrow-buffer", "arrow-schema", "cc", - "deepsize", "half", "lance-arrow", "lance-core", "num-traits", "rand 0.9.4", + "rayon", ] [[package]] name = "lance-namespace" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "014e8332ca0615506342e0d3af608639864b68396973be14239f09c9f21f1fc2" +checksum = "8624fd33a894b5f2eb411cb56588d29138137ce100dee8e335843828e249b860" dependencies = [ "arrow", "async-trait", @@ -5179,15 +5973,17 @@ dependencies = [ [[package]] name = "lance-namespace-impls" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d1231906a3cf92dd3dcda7d14a09c4835af6cd2bcd76dfd2481e87f20a282d" +checksum = "39f0cb9651a65f8eb411d825f34967fff46ba575a76e6ae9becda6ee31c1a974" dependencies = [ "arrow", "arrow-ipc", "arrow-schema", "async-trait", "bytes", + "datafusion-common 54.1.0", + "datafusion-physical-plan 54.1.0", "futures", "lance", "lance-core", @@ -5199,16 +5995,19 @@ dependencies = [ "log", "object_store", "rand 0.9.4", + "roaring", "serde_json", + "time", "tokio", "url", + "uuid", ] [[package]] name = "lance-namespace-reqwest-client" -version = "0.7.7" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6369eee4682fb11edf538388b43c61ce288b8302fe89bb40944d7daa7faaae99" +checksum = "ba3f0a235e3ed5f8805205649ccc7d7d0f3df23ce1294242c9265ad488d7f19d" dependencies = [ "reqwest 0.12.28", "serde", @@ -5218,11 +6017,28 @@ dependencies = [ "url", ] +[[package]] +name = "lance-select" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb5c718c141ea4f067203b11a54ccf57f8effbf963f345bc811f4837a660ad57" +dependencies = [ + "arrow-array", + "arrow-buffer", + "arrow-schema", + "byteorder", + "bytes", + "itertools 0.14.0", + "lance-core", + "roaring", + "tracing", +] + [[package]] name = "lance-table" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16f1355904aea4ebb04ffc70c58c97901e10bde44452b4b021de4a1f329250d" +checksum = "ffc125611b4fe46f99f00b5262e71e17bd947a3bc3b81f3a4a604cc9ca290b3f" dependencies = [ "arrow", "arrow-array", @@ -5233,12 +6049,12 @@ dependencies = [ "byteorder", "bytes", "chrono", - "deepsize", "futures", "lance-arrow", "lance-core", "lance-file", "lance-io", + "lance-select", "log", "object_store", "prost 0.14.4", @@ -5257,41 +6073,31 @@ dependencies = [ "uuid", ] -[[package]] -name = "lance-testing" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3094c2aacbd1fa093d809fc54fa911e3498671ba451041341d7caaa18460e6b2" -dependencies = [ - "arrow-array", - "arrow-schema", - "lance-arrow", - "num-traits", - "rand 0.9.4", -] - [[package]] name = "lance-tokenizer" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39b7f5ed9d0c0b716bf599b559d888267ed1dfe4c4e29d3648b51d2a28940cf" +checksum = "73060a844ceda2405759b8f0f16a1c586b5b285dbdf7a3784350d048f991cfd3" dependencies = [ + "icu_segmenter", "jieba-rs", "lindera", "rust-stemmers", "serde", + "stop-words", "unicode-normalization", ] [[package]] name = "lancedb" -version = "0.30.0" +version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9db595d8da6c1fbf41ef6a547f27a73cc1105d83a837e8c76ce08743a3c09260" +checksum = "922c99ca9f8cc33717e85b086887f444795bdcbf3bec1fd760c5d59a9e47f937" dependencies = [ "ahash", "arrow", "arrow-array", + "arrow-buffer", "arrow-cast", "arrow-data", "arrow-ipc", @@ -5301,15 +6107,15 @@ dependencies = [ "async-trait", "bytes", "chrono", - "datafusion", - "datafusion-catalog", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", - "datafusion-functions", - "datafusion-physical-expr", - "datafusion-physical-plan", - "datafusion-sql", + "datafusion 54.1.0", + "datafusion-catalog 54.1.0", + "datafusion-common 54.1.0", + "datafusion-execution 54.1.0", + "datafusion-expr 54.1.0", + "datafusion-functions 54.1.0", + "datafusion-physical-expr 54.1.0", + "datafusion-physical-plan 54.1.0", + "datafusion-sql 54.1.0", "futures", "half", "lance", @@ -5325,8 +6131,6 @@ dependencies = [ "lance-namespace", "lance-namespace-impls", "lance-table", - "lance-testing", - "lazy_static", "log", "moka", "num-traits", @@ -5458,6 +6262,15 @@ dependencies = [ "libc", ] +[[package]] +name = "libsais-rs" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00777f770949ecbe5524eb6630699a501c9c27e4d18493705a7dad49c9bdfbd1" +dependencies = [ + "rayon", +] + [[package]] name = "libyml" version = "0.0.5" @@ -5528,6 +6341,18 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b685d66585d646efe09fec763d796c291049c8b6bf84e04954bffc8748341f0d" +[[package]] +name = "link-section" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee1a0d6e252afe82e7bc2db42fba60e02ddf3b1accaf8cb21d96e34ba61f3d4" + +[[package]] +name = "linktime-proc-macro" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "348d0075b1fc163b26d72a7f75fc5141daf2fd1bdf128d873cbaf6785d495bdf" + [[package]] name = "linux-raw-sys" version = "0.12.1" @@ -5646,6 +6471,16 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "md-5" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69b6441f590336821bb897fb28fc622898ccceb1d6cea3fde5ea86b090c4de98" +dependencies = [ + "cfg-if 1.0.4", + "digest 0.11.3", +] + [[package]] name = "mea" version = "0.6.4" @@ -5762,7 +6597,7 @@ checksum = "4568f25ccbd45ab5d5603dc34318c1ec56b117531781260002151b8530a9f931" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -5961,7 +6796,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -6021,7 +6856,7 @@ dependencies = [ "humantime", "hyper", "itertools 0.14.0", - "md-5", + "md-5 0.10.6", "parking_lot", "percent-encoding", "quick-xml 0.39.4", @@ -6043,9 +6878,9 @@ dependencies = [ [[package]] name = "object_store_opendal" -version = "0.56.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08298874eee5935c95bcaa393148834f9c53d904461ca15584a041d8a1c907c2" +checksum = "0eb12a624a41fce745838d0ef3701ff6c47797c13cd18ad3612fd2a3134fdbd8" dependencies = [ "async-trait", "bytes", @@ -6107,11 +6942,11 @@ checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" [[package]] name = "opendal" -version = "0.56.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b31d3d8e99a85d83b73ec26647f5607b80578ed9375810b6e44ffa3590a236" +checksum = "96c9c85ce253ff87225e7669979d877a20c98a06604ec9d6dd5f4473e08f1ae1" dependencies = [ - "ctor 0.6.3", + "ctor 1.0.12", "opendal-core", "opendal-layer-concurrent-limit", "opendal-layer-logging", @@ -6121,16 +6956,18 @@ dependencies = [ "opendal-service-azdls", "opendal-service-cos", "opendal-service-gcs", + "opendal-service-goosefs", "opendal-service-hf", "opendal-service-oss", "opendal-service-s3", + "opendal-service-tos", ] [[package]] name = "opendal-core" -version = "0.56.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1849dd2687e173e776d3af5fce1ba3ae47b9dd37a09d1c4deba850ef45fe00ca" +checksum = "c4f8607c90e2c963a91467f50fb49fbc7fb3d573f88cea219ca59ccd3740b309" dependencies = [ "anyhow", "base64", @@ -6140,10 +6977,10 @@ dependencies = [ "http-body 1.0.1", "jiff", "log", - "md-5", + "md-5 0.11.0", "mea", "percent-encoding", - "quick-xml 0.38.4", + "quick-xml 0.39.4", "reqsign-core", "reqwest 0.13.4", "serde", @@ -6156,9 +6993,9 @@ dependencies = [ [[package]] name = "opendal-layer-concurrent-limit" -version = "0.56.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048b1b29c503263bdd80a9afe46a68cd02ea9bd361185b1feab4b151078998e9" +checksum = "0d6f81ba6960e3fae1882f253b114b21d7e444e1534f209c7737a79f6243eb6f" dependencies = [ "futures", "http 1.4.2", @@ -6168,9 +7005,9 @@ dependencies = [ [[package]] name = "opendal-layer-logging" -version = "0.56.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2645adc988b12eda106e2679ae529facfbbaa868ceb706f6f8125c6af15c47b" +checksum = "58ada45c6d81d1aa4c9305d0c7d4bc317c59c85866a0908a2d75a7a978aa5ee2" dependencies = [ "log", "opendal-core", @@ -6178,9 +7015,9 @@ dependencies = [ [[package]] name = "opendal-layer-retry" -version = "0.56.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eac134ffa4ddda6131a640a84a5315996424b9416c85052f8c64c1a33b70ad4" +checksum = "7b2a25a718afb81fad81cb9a0580a1cb989221fa2317f888c6a37f8dad408eb7" dependencies = [ "backon", "log", @@ -6189,9 +7026,9 @@ dependencies = [ [[package]] name = "opendal-layer-timeout" -version = "0.56.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "619586ab7480c2e3009f6d18eabab18957bc094778fd130bcc38924970a90f4c" +checksum = "1e91f731724c213af81e9d03517859c8fc47b4578e64ad61ae4f099f10fe36e3" dependencies = [ "opendal-core", "tokio", @@ -6199,9 +7036,9 @@ dependencies = [ [[package]] name = "opendal-service-azblob" -version = "0.56.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7452bf3ec61cfd81ac9ad9ada17825931e9e371d44a045c6bfab9596c0a2ac3b" +checksum = "0030644366ef5d8cbe3a4a5822bf99a4aafddc1666e9d24b44d158d9062fc76a" dependencies = [ "base64", "bytes", @@ -6209,27 +7046,28 @@ dependencies = [ "log", "opendal-core", "opendal-service-azure-common", - "quick-xml 0.38.4", + "quick-xml 0.39.4", "reqsign-azure-storage", "reqsign-core", "reqsign-file-read-tokio", "serde", - "sha2 0.10.9", + "sha2 0.11.0", "uuid", ] [[package]] name = "opendal-service-azdls" -version = "0.56.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9884c2d8cf8ba2bb077d79c877dac5863ba3bab9e2c9c1e41a2e0491404772" +checksum = "6dea4908d490143a9b0b7f7a790e139ff829b06a023f670455ed3d44f664b361" dependencies = [ + "base64", "bytes", "http 1.4.2", "log", "opendal-core", "opendal-service-azure-common", - "quick-xml 0.38.4", + "quick-xml 0.39.4", "reqsign-azure-storage", "reqsign-core", "reqsign-file-read-tokio", @@ -6239,9 +7077,9 @@ dependencies = [ [[package]] name = "opendal-service-azure-common" -version = "0.56.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb0e45d6c8dcf66ce2da20e241bcb80e6e540e109a4ff20f318f6c9b4c54e0c" +checksum = "9b489f13c42e69d69bdd72952b634356ec43a7881a20259b38b540fcecdf4051" dependencies = [ "http 1.4.2", "opendal-core", @@ -6249,15 +7087,15 @@ dependencies = [ [[package]] name = "opendal-service-cos" -version = "0.56.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55a0765ba451b6effdbf514b7b50060530ff8a29e4231c4a3ab7792c016408e6" +checksum = "aa8cafe9729213375c7331019b0cb756ad3e1aff7f45cd32c45eae91ebde8901" dependencies = [ "bytes", "http 1.4.2", "log", "opendal-core", - "quick-xml 0.38.4", + "quick-xml 0.39.4", "reqsign-core", "reqsign-file-read-tokio", "reqsign-tencent-cos", @@ -6266,9 +7104,9 @@ dependencies = [ [[package]] name = "opendal-service-gcs" -version = "0.56.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a49477a10163431896d106136117f5670717f9c9e49cf6f710528800c6633a" +checksum = "48de101aac565ed06af4b47903c24eafd249075553ec1fb18256751c45148d47" dependencies = [ "async-trait", "bytes", @@ -6276,7 +7114,7 @@ dependencies = [ "log", "opendal-core", "percent-encoding", - "quick-xml 0.38.4", + "quick-xml 0.39.4", "reqsign-core", "reqsign-file-read-tokio", "reqsign-google", @@ -6285,11 +7123,25 @@ dependencies = [ "tokio", ] +[[package]] +name = "opendal-service-goosefs" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69e43048bde419947ba826fbdc2f134d6c03f44ebf48bd33a03b72f9fc45fcb4" +dependencies = [ + "bytes", + "goosefs-sdk", + "log", + "opendal-core", + "serde", + "tokio", +] + [[package]] name = "opendal-service-hf" -version = "0.56.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b2ab7a2a8a11dfe257ef4db5c0de798acbcd0d6429c37382dad2154bc06a388" +checksum = "c4922661976a1d40794a2adfbdb888cc3c23097690f825a92f773af38908a848" dependencies = [ "bytes", "hf-xet", @@ -6304,15 +7156,15 @@ dependencies = [ [[package]] name = "opendal-service-oss" -version = "0.56.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c8a917829ad06d21b639558532cb0101fe49b040d946d673a73018683fac05" +checksum = "328fa55e8888cbdfe00826bfea2a79042422b720e8369e9e021e46121dea5ace" dependencies = [ "bytes", "http 1.4.2", "log", "opendal-core", - "quick-xml 0.38.4", + "quick-xml 0.39.4", "reqsign-aliyun-oss", "reqsign-core", "reqsign-file-read-tokio", @@ -6321,18 +7173,18 @@ dependencies = [ [[package]] name = "opendal-service-s3" -version = "0.56.0" +version = "0.57.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dadddeb9bb50b0d30927dd914c298c4ddca47e4c1cfa7674d311f0cf9b051c8" +checksum = "313d46c9f5ae70bca26b7c3e3fbb9b639292625f28af73aa016f47e788af9deb" dependencies = [ "base64", "bytes", "crc32c", "http 1.4.2", "log", - "md-5", + "md-5 0.11.0", "opendal-core", - "quick-xml 0.38.4", + "quick-xml 0.39.4", "reqsign-aws-v4", "reqsign-core", "reqsign-file-read-tokio", @@ -6340,6 +7192,23 @@ dependencies = [ "url", ] +[[package]] +name = "opendal-service-tos" +version = "0.57.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f2f7a4c32e5202eb4ac72e76c4b5e30c86ab60762811172f4111103b9d673a1" +dependencies = [ + "bytes", + "http 1.4.2", + "opendal-core", + "quick-xml 0.39.4", + "reqsign-core", + "reqsign-file-read-tokio", + "reqsign-volcengine-tos", + "serde", + "serde_json", +] + [[package]] name = "openssl" version = "0.10.81" @@ -6362,7 +7231,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -6726,7 +7595,7 @@ checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -6834,6 +7703,8 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" dependencies = [ + "serde_core", + "writeable", "zerovec", ] @@ -6859,7 +7730,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.118", + "syn", ] [[package]] @@ -6890,7 +7761,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -6938,7 +7809,7 @@ dependencies = [ "prost 0.13.5", "prost-types 0.13.5", "regex", - "syn 2.0.118", + "syn", "tempfile", ] @@ -6957,7 +7828,7 @@ dependencies = [ "prost 0.14.4", "prost-types 0.14.4", "regex", - "syn 2.0.118", + "syn", "tempfile", ] @@ -6971,7 +7842,7 @@ dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -6984,7 +7855,7 @@ dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -7032,7 +7903,7 @@ checksum = "7347867d0a7e1208d93b46767be83e2b8f978c3dad35f775ac8d8847551d6fe1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -7044,16 +7915,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "quick-xml" -version = "0.38.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "quick-xml" version = "0.39.4" @@ -7280,19 +8141,6 @@ dependencies = [ "rand_core 0.9.5", ] -[[package]] -name = "random_word" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e47a395bdb55442b883c89062d6bcff25dc90fa5f8369af81e0ac6d49d78cf81" -dependencies = [ - "ahash", - "brotli", - "paste", - "rand 0.9.4", - "unicase", -] - [[package]] name = "rangemap" version = "1.7.1" @@ -7342,7 +8190,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76009fbe0614077fc1a2ce255e3a1881a2e3a3527097d5dc6d8212c585e7e38b" dependencies = [ "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -7391,7 +8239,7 @@ checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -7567,6 +8415,19 @@ dependencies = [ "serde_json", ] +[[package]] +name = "reqsign-volcengine-tos" +version = "3.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91d083a363b3577f519ce8425bb50f902622a28a83f7c4a26a5c990b66ec75b3" +dependencies = [ + "anyhow", + "http 1.4.2", + "log", + "percent-encoding", + "reqsign-core", +] + [[package]] name = "reqwest" version = "0.12.28" @@ -7613,6 +8474,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams 0.4.2", "web-sys", + "webpki-roots", ] [[package]] @@ -7713,7 +8575,7 @@ checksum = "5d2ed0b54125315fb36bd021e82d314d1c126548f871634b483f46b31d13cac6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -8042,7 +8904,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -8077,7 +8939,7 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -8130,7 +8992,7 @@ dependencies = [ "darling 0.23.0", "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -8196,6 +9058,12 @@ dependencies = [ "digest 0.11.3", ] +[[package]] +name = "sha1_smol" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" + [[package]] name = "sha2" version = "0.10.9" @@ -8349,7 +9217,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -8361,7 +9229,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -8429,6 +9297,17 @@ dependencies = [ "sqlparser_derive", ] +[[package]] +name = "sqlparser" +version = "0.62.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c6d1b651dc4edf07eead2a0c6c78016ce971bc2c10da5266861b13f25e7cec" +dependencies = [ + "log", + "recursive", + "sqlparser_derive", +] + [[package]] name = "sqlparser_derive" version = "0.5.0" @@ -8437,7 +9316,7 @@ checksum = "a6dd45d8fc1c79299bfbb7190e42ccbbdf6a5f52e4a6ad98d92357ea965bd289" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -8487,6 +9366,15 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e51f1e89f093f99e7432c491c382b88a6860a5adbe6bf02574bf0a08efff1978" +[[package]] +name = "stop-words" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d68df56303396bcfb639455b3c166804aeb7994005010aab5e9e8a1277b8871d" +dependencies = [ + "serde_json", +] + [[package]] name = "strsim" version = "0.11.1" @@ -8530,7 +9418,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.118", + "syn", ] [[package]] @@ -8542,7 +9430,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -8554,7 +9442,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -8582,17 +9470,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.118" @@ -8621,7 +9498,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -8723,7 +9600,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -8734,7 +9611,7 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -8768,11 +9645,12 @@ dependencies = [ [[package]] name = "time" -version = "0.3.51" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c17d80feb7334b40c484e45ed1a5273dfd8bfda537c3be2e74a06a6686f327" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", + "itoa", "num-conv", "powerfmt", "serde_core", @@ -8782,15 +9660,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.9" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.30" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcef1a61bdb119096e153208ec5cbec23944ce8bca13be5c7f60c634f7403935" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" dependencies = [ "num-conv", "time-core", @@ -8812,6 +9690,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" dependencies = [ "displaydoc", + "serde_core", "zerovec", ] @@ -8866,7 +9745,7 @@ checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -8970,7 +9849,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d8aa1d26c1550eef93cfb2dafadc145b3220432dae8d156b5ba485880594ffe" dependencies = [ "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -9067,6 +9946,34 @@ dependencies = [ "tracing", ] +[[package]] +name = "tonic" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" +dependencies = [ + "async-trait", + "base64", + "bytes", + "h2", + "http 1.4.2", + "http-body 1.0.1", + "http-body-util", + "hyper", + "hyper-timeout", + "hyper-util", + "percent-encoding", + "pin-project", + "socket2 0.6.4", + "sync_wrapper", + "tokio", + "tokio-stream", + "tower 0.5.3", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tonic-build" version = "0.12.3" @@ -9078,7 +9985,18 @@ dependencies = [ "prost-build 0.13.5", "prost-types 0.13.5", "quote", - "syn 2.0.118", + "syn", +] + +[[package]] +name = "tonic-prost" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50849f68853be452acf590cde0b146665b8d507b3b8af17261df47e02c209ea0" +dependencies = [ + "bytes", + "prost 0.14.4", + "tonic 0.14.6", ] [[package]] @@ -9109,9 +10027,12 @@ checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", + "indexmap 2.14.0", "pin-project-lite", + "slab", "sync_wrapper", "tokio", + "tokio-util", "tower-layer", "tower-service", "tracing", @@ -9201,7 +10122,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -9322,7 +10243,7 @@ checksum = "076a02dc54dd46795c2e9c8282ed40bcfb1e22747e955de9389a1de28190fb26" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -9441,6 +10362,7 @@ dependencies = [ "js-sys", "rand 0.10.1", "serde_core", + "sha1_smol", "wasm-bindgen", ] @@ -9471,7 +10393,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -9592,7 +10514,7 @@ dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.118", + "syn", "wasm-bindgen-shared", ] @@ -9660,6 +10582,15 @@ dependencies = [ "rustls-pki-types", ] +[[package]] +name = "webpki-roots" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcd9d09a39985f5344844e66b0c530a33843579125f23e21e9f0f220850f22a" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "whoami" version = "2.1.2" @@ -9757,7 +10688,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -9768,7 +10699,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -10246,7 +11177,7 @@ checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", "synstructure", ] @@ -10273,7 +11204,7 @@ checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] @@ -10293,7 +11224,7 @@ checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", "synstructure", ] @@ -10312,6 +11243,7 @@ dependencies = [ "displaydoc", "yoke", "zerofrom", + "zerovec", ] [[package]] @@ -10320,6 +11252,7 @@ version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" dependencies = [ + "serde", "yoke", "zerofrom", "zerovec-derive", @@ -10333,7 +11266,7 @@ checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 37b2a91ad..0c3846a9b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -204,10 +204,10 @@ resolver = "2" # Crate-level pins (canonical source of truth — workspace.dependencies is not # used; each consumer crate declares its own pin with exact-equals so the # whole graph resolves to the same semver): -# lance = "=7.0.0" (lance-arrow / lance-index / lance-linalg / +# lance = "=9.0.0" (lance-arrow / lance-index / lance-linalg / # lance-namespace bump in lock-step) -# lancedb = "=0.30.0" -# datafusion = "53" (+ datafusion-common / -expr / -sql / +# lancedb = "=0.33.0" +# datafusion = "54" (+ datafusion-common / -expr / -sql / # -functions-aggregate) # arrow-array = "58" (+ arrow-schema / -buffer / -ipc / arrow) diff --git a/crates/holograph/Cargo.toml b/crates/holograph/Cargo.toml index 6c84aaf21..8fbc7b40d 100644 --- a/crates/holograph/Cargo.toml +++ b/crates/holograph/Cargo.toml @@ -32,10 +32,10 @@ arrow-schema = "58" arrow-buffer = "58" # Query engine — DataFusion 52 -datafusion = { version = "53", optional = true } +datafusion = { version = "54", optional = true } # Lance columnar format — 100x faster random access than Parquet -lance = { version = "=7.0.0", optional = true, default-features = false } +lance = { version = "=9.0.0", optional = true, default-features = false } # Async runtime tokio = { version = "1.49", features = ["rt-multi-thread", "macros"], optional = true } diff --git a/crates/lance-graph-benches/Cargo.toml b/crates/lance-graph-benches/Cargo.toml index 01f41bd1a..f1a80a4b7 100644 --- a/crates/lance-graph-benches/Cargo.toml +++ b/crates/lance-graph-benches/Cargo.toml @@ -7,7 +7,7 @@ description = "Benchmarks for lance-graph (not published)" [dependencies] lance-graph = { path = "../lance-graph", version = "0.5.3" } -lance = "=7.0.0" +lance = "=9.0.0" arrow-array = "58" arrow-schema = "58" criterion = { version = "0.5", features = ["async", "async_tokio", "html_reports"] } diff --git a/crates/lance-graph-callcenter/Cargo.toml b/crates/lance-graph-callcenter/Cargo.toml index 23470e470..af9bd5bf0 100644 --- a/crates/lance-graph-callcenter/Cargo.toml +++ b/crates/lance-graph-callcenter/Cargo.toml @@ -27,14 +27,14 @@ thiserror = "1" # arrow bumped to 58 to match lance 6.0's transitive arrow version. # TODO(lance-bump): align rest of workspace on arrow 58 once feasible. arrow = { version = "58", optional = true } -lance = { version = "=7.0.0", optional = true } +lance = { version = "=9.0.0", optional = true } # [query] / [query-lite] — DataFusion. Base dep has default-features = false. # The full `query` feature adds datafusion/default (compression backends etc). # The `query-lite` feature gets logical plan + optimizer without compression, # avoiding the xz2/liblzma `links = "lzma"` collision (lance v2 era; may be # resolved with lance 4 + datafusion 52 — verify and remove if so). -datafusion = { version = "53", optional = true, default-features = false, features = ["unicode_expressions"] } +datafusion = { version = "54", optional = true, default-features = false, features = ["unicode_expressions"] } # [realtime] — version watcher, Phoenix channel shapes, WebSocket tokio = { version = "1", features = ["sync", "rt-multi-thread", "macros", "time"], optional = true } diff --git a/crates/lance-graph-catalog/Cargo.toml b/crates/lance-graph-catalog/Cargo.toml index 8ce109028..500a0361c 100644 --- a/crates/lance-graph-catalog/Cargo.toml +++ b/crates/lance-graph-catalog/Cargo.toml @@ -13,8 +13,8 @@ categories = ["database", "data-structures", "science"] [dependencies] arrow-schema = "58" async-trait = "0.1" -datafusion = { version = "53", default-features = false } -lance-namespace = "=7.0.0" +datafusion = { version = "54", default-features = false } +lance-namespace = "=9.0.0" reqwest = { version = "0.12", features = ["json"], optional = true } serde = { version = "1", features = ["derive"] } serde_json = "1" diff --git a/crates/lance-graph-ontology/Cargo.toml b/crates/lance-graph-ontology/Cargo.toml index fe1e4bf1d..3798406c6 100644 --- a/crates/lance-graph-ontology/Cargo.toml +++ b/crates/lance-graph-ontology/Cargo.toml @@ -43,7 +43,7 @@ sha2 = "0.10" # Lance-backed dictionary cache is feature-gated so the crate compiles without # protoc (lance-encoding's build-time dep). The default in-memory registry is # the canonical surface for tests and consumers that don't need persistence. -lance = { version = "=7.0.0", optional = true } +lance = { version = "=9.0.0", optional = true } # arrow bumped to 58 to match lance 6.0's transitive arrow version. # TODO(lance-bump): align rest of workspace on arrow 58 once feasible. arrow = { version = "58", optional = true } diff --git a/crates/lance-graph-python/Cargo.toml b/crates/lance-graph-python/Cargo.toml index 83d371162..b042aaac1 100644 --- a/crates/lance-graph-python/Cargo.toml +++ b/crates/lance-graph-python/Cargo.toml @@ -14,7 +14,7 @@ arrow = { version = "58", features = ["pyarrow"] } arrow-array = "58" arrow-schema = "58" arrow-ipc = "58" -datafusion = { version = "53", default-features = false } +datafusion = { version = "54", default-features = false } futures = "0.3" lance-graph = { path = "../lance-graph" } serde = { version = "1", features = ["derive"] } diff --git a/crates/lance-graph/Cargo.toml b/crates/lance-graph/Cargo.toml index fa22713cc..5f0d52010 100644 --- a/crates/lance-graph/Cargo.toml +++ b/crates/lance-graph/Cargo.toml @@ -18,7 +18,7 @@ arrow-array = "58" arrow-schema = "58" chrono = "0.4" async-trait = "0.1" -datafusion = { version = "53", default-features = false, features = [ +datafusion = { version = "54", default-features = false, features = [ "nested_expressions", "regex_expressions", "unicode_expressions", @@ -28,17 +28,17 @@ datafusion = { version = "53", default-features = false, features = [ "string_expressions", "parquet", ] } -datafusion-common = "53" -datafusion-expr = "53" -datafusion-sql = "53" -datafusion-functions-aggregate = "53" +datafusion-common = "54" +datafusion-expr = "54" +datafusion-sql = "54" +datafusion-functions-aggregate = "54" futures = "0.3" lance-graph-catalog = { path = "../lance-graph-catalog", version = "0.5.4" } lance-graph-contract = { path = "../lance-graph-contract" } -lance = "=7.0.0" -lance-linalg = "=7.0.0" -lance-namespace = "=7.0.0" -lancedb = { version = "=0.30.0", optional = true, default-features = false } +lance = "=9.0.0" +lance-linalg = "=9.0.0" +lance-namespace = "=9.0.0" +lancedb = { version = "=0.33.0", optional = true, default-features = false } nom = "7.1" serde = { version = "1", features = ["derive"] } serde_json = "1" @@ -106,8 +106,8 @@ lite-unified = [] deepnsm = { path = "../deepnsm" } lance-graph-contract = { path = "../lance-graph-contract" } futures = "0.3" -lance-arrow = "=7.0.0" -lance-index = "=7.0.0" +lance-arrow = "=9.0.0" +lance-index = "=9.0.0" tempfile = "3" tokio = { version = "1.37", features = ["macros", "rt-multi-thread"] } causal-edge = { path = "../causal-edge" } diff --git a/crates/surreal_container/Cargo.toml b/crates/surreal_container/Cargo.toml index 4c9f78fc0..891b30c52 100644 --- a/crates/surreal_container/Cargo.toml +++ b/crates/surreal_container/Cargo.toml @@ -50,8 +50,8 @@ Depends on task 01 (deps_substrate) being resolved before compiling. # Contract types the view glove (`view.rs`) implements. lance-graph-contract = { path = "../lance-graph-contract" } -lance = "=7.0.0" -lancedb = { version = "=0.30.0", optional = true, default-features = false } +lance = "=9.0.0" +lancedb = { version = "=0.33.0", optional = true, default-features = false } # Runtime support (not blocked — these are well-known, confirmed versions) tokio = { version = "1", features = ["rt-multi-thread", "macros"] } From 24745226db6d713fe7515f4ecf1947233cf69b7a Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 14:47:34 +0000 Subject: [PATCH 02/11] Probe: DataFusion 54 TableSource fix + bank the upstream-authoritative ruling Operator ruling E-LANCE-IS-UPSTREAM-AUTHORITATIVE-1: lance/lancedb and the whole lance-* family are consumed from crates.io upstream, NEVER from a fork - too risky, upstream is authoritative. This CORRECTS the CLAUDE.md P0, which had explicitly named those crates in its must-be-wired-via-the-fork list; the P0 is regraded in place with a carve-out (append-only; the rule still stands for ndarray, surrealdb and every other forked crate). The trap it closes: AdaWorldAPI/lance and AdaWorldAPI/lancedb DO exist, and I read their existence plus the P0's naming as a standing violation to fix - it is the opposite. A fork's existence is not evidence of intent to depend on it. First real API break found, and it is DataFusion 54, not Lance 9: DataFusion 54 made Any a SUPERTRAIT of TableSource instead of a method on it, so the explicit as_any impl in lance-graph-catalog is now E0407. Fixed by deleting the method (downcasting goes through the blanket Any impl) with a comment naming the cause. Everything upstream of that crate had already compiled clean under lance 9: lance 9.0.0 itself, lance-index, lance-tokenizer, lance-datagen, lance-geo, lance-index-core, datafusion 54.1.0, plus our lance-graph-planner, lance-graph-cognitive, holograph and bgz-tensor. --- .claude/board/EPIPHANIES.md | 37 +++++++++++++++++++ CLAUDE.md | 20 +++++++++- .../lance-graph-catalog/src/source_catalog.rs | 8 ++-- 3 files changed, 59 insertions(+), 6 deletions(-) diff --git a/.claude/board/EPIPHANIES.md b/.claude/board/EPIPHANIES.md index 5381ca9ee..7554dd362 100644 --- a/.claude/board/EPIPHANIES.md +++ b/.claude/board/EPIPHANIES.md @@ -1,3 +1,40 @@ +## E-LANCE-IS-UPSTREAM-AUTHORITATIVE-1 (2026-08-05, operator-ruled — corrects a P0 in `CLAUDE.md`) + +**The lance family is consumed from crates.io upstream and NEVER from a fork — +"too risky, and the upstream is authoritative."** Operator ruling, verbatim +substance: *"lance and lancedb are never used from forks because it's too risky +and the upstream is authoritative."* Scope: `lance`, `lancedb`, and the whole +`lance-*` family (`lance-arrow` / `lance-core` / `lance-index` / `lance-linalg` / +`lance-namespace` / `lance-datafusion` / …). + +**This CORRECTS `CLAUDE.md`'s P0**, which explicitly named `lance` / `lancedb` / +`lance-index` / `lance-linalg` / `lance-namespace` in its must-be-wired-via-the-fork +list. That naming was wrong; the P0 has been regraded in place with a `⊘` +carve-out (append-only — the rule itself stands for `ndarray`, `surrealdb`, and +every other forked crate). + +**The trap this closes, and why it needed a ruling.** `AdaWorldAPI/lance` and +`AdaWorldAPI/lancedb` DO exist as repos — I found them while auditing the v9 +bump and read their existence, plus the P0's explicit naming, as evidence of a +standing policy violation to be fixed. It is the opposite: **a fork's existence +is not evidence of intent to depend on it.** A future session that greps +`list_repos`, finds the forks, and "corrects" the registry pins would be +introducing the risk, not removing it. Registry pins for this family are +CORRECT. + +The reasoning generalizes: **forking the storage engine whose durability +guarantees the whole stack trusts buys a maintenance liability, not freedom.** +The stack's own value is in the layers above (spine, contracts, codecs) — a +diverged Lance would have to re-earn upstream's durability testing forever. +Both forks are in fact stale (no tags, `main` only, last pushed 2026-05-28 and +2026-02-26) and could not supply v9 today even if policy allowed it. + +**What discipline DOES apply:** exact lockstep. Every member pinned `=X.Y.Z`, +with `lancedb`'s own `lance` pin matching, so a bump is one deliberate measured +PR (the v9 probe below) and never a drift. + +**Status:** RULING (operator). Carve-out live in `CLAUDE.md` P0. + ## E-THE-LEGEND-IS-NOT-THE-GRAMMAR-1 (2026-08-05, measured — PROBE-ORACLE-FUNNEL Stage 0) **Vocabulary knowledge buys almost nothing at a refuse-don't-guess gate; the diff --git a/CLAUDE.md b/CLAUDE.md index 300ed244b..77241b3af 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,10 +7,26 @@ upstream crates.io version of a forked crate.** Non-negotiable; applies to every `Cargo.toml` and every dependency decision in this repo. Every repo in this workspace is local — prefer the local/fork source over the registry, always. -- Crates with an `AdaWorldAPI/` fork — e.g. `ndarray`, `lance` / - `lancedb` / `lance-index` / `lance-linalg` / `lance-namespace`, `surrealdb`, +- Crates with an `AdaWorldAPI/` fork — e.g. `ndarray`, `surrealdb`, and any other — MUST be wired via the fork (`path` / `git` / `[patch.crates-io]`), never the registry version. + +> **⊘ CARVE-OUT — the lance family is UPSTREAM-AUTHORITATIVE (operator-ruled +> 2026-08-05, `E-LANCE-IS-UPSTREAM-AUTHORITATIVE-1`).** `lance`, `lancedb`, +> and the whole `lance-*` family (`lance-arrow` / `lance-core` / `lance-index` / +> `lance-linalg` / `lance-namespace` / `lance-datafusion` / …) are consumed from +> **crates.io upstream, never from a fork** — *"lance and lancedb are never used +> from forks because it's too risky and the upstream is authoritative."* Forking +> the storage engine underneath a stack that trusts its durability guarantees +> buys a maintenance liability, not freedom. This list previously NAMED +> lance/lancedb as must-fork; that was wrong and is corrected here, not deleted. +> **`AdaWorldAPI/lance` and `AdaWorldAPI/lancedb` DO exist as repos — their +> existence is NOT evidence of intent to depend on them**, and a session that +> finds them must not read the P0 above as a mandate to wire them in. Registry +> pins for this family are therefore CORRECT, not a policy violation to +> "fix". The version discipline that DOES apply: the family moves in exact +> lockstep (`=X.Y.Z` across every member, `lancedb` pinning its matching +> `lance`), so a bump is one deliberate, measured PR — never a drift. - If a fork's coordinates (git URL, branch/tag, feature flag) are unknown, **STOP and ask**. Do NOT fall back to crates.io as a convenience or to make a build pass. diff --git a/crates/lance-graph-catalog/src/source_catalog.rs b/crates/lance-graph-catalog/src/source_catalog.rs index a122c87a6..ade16429d 100644 --- a/crates/lance-graph-catalog/src/source_catalog.rs +++ b/crates/lance-graph-catalog/src/source_catalog.rs @@ -3,7 +3,6 @@ //! Context-free source catalog for DataFusion logical planning. -use std::any::Any; use std::collections::HashMap; use std::sync::Arc; @@ -92,9 +91,10 @@ impl SimpleTableSource { } impl TableSource for SimpleTableSource { - fn as_any(&self) -> &dyn Any { - self - } + // No `as_any` here: DataFusion 54 made `Any` a SUPERTRAIT of `TableSource` + // (`trait TableSource: Any + Sync + Send`) instead of a method on it, so + // downcasting goes through the blanket `Any` impl and an inherent + // `as_any` is a hard error (E0407). fn schema(&self) -> SchemaRef { self.schema.clone() } From a7f1ba04898a64a7aa97702feed8fae4a82c06c6 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 14:50:51 +0000 Subject: [PATCH 03/11] Probe: sweep the DataFusion 54 as_any removals (12 sites, 3 traits) DF 54 moved Any from a METHOD to a SUPERTRAIT on TableSource, TableProvider and ScalarUDFImpl alike, so every explicit as_any impl is E0407. Verified per trait against the 54.1.0 sources before deleting - not a blanket assumption: TableSource: trait TableSource: Any + Sync + Send TableProvider: trait TableProvider: Any + Debug + Sync + Send ScalarUDFImpl: trait ScalarUDFImpl: Debug + DynEq + DynHash + Send + Sync + Any Downcasting now goes through the blanket Any impl; no call site changes. Recorded while here, NOT yet acted on: ScalarUDFImpl in 54 also requires DynEq + DynHash, which are blanket-implemented for T: Eq + Any and T: Hash + Any. So all 11 UDF types must become Eq + Hash. DF 54's Signature is itself derive(PartialEq, Eq, Hash), so signature-only UDFs can derive - but the ones carrying func: Arc Result> (and NsmSimilarityUdf's Arc) CANNOT: a closure trait-object has neither equality nor a hash. Those need hand-written impls keyed on identity fields, which is a semantic decision about what makes two UDFs the same expression - deferred to the report, not guessed here. --- crates/lance-graph-callcenter/src/policy.rs | 3 --- .../src/transcode/ontology_table.rs | 3 --- crates/lance-graph-callcenter/src/vsa_udfs.rs | 15 --------------- crates/lance-graph/src/cam_pq/udf.rs | 3 --- crates/lance-graph/src/datafusion_planner/udf.rs | 9 --------- crates/lance-graph/src/nsm/nsm_word.rs | 3 --- 6 files changed, 36 deletions(-) diff --git a/crates/lance-graph-callcenter/src/policy.rs b/crates/lance-graph-callcenter/src/policy.rs index b95b60b4c..498246ffb 100644 --- a/crates/lance-graph-callcenter/src/policy.rs +++ b/crates/lance-graph-callcenter/src/policy.rs @@ -315,9 +315,6 @@ impl std::hash::Hash for NotYetWiredHashUdf { #[cfg(feature = "auth-rls-lite")] impl ScalarUDFImpl for NotYetWiredHashUdf { - fn as_any(&self) -> &dyn std::any::Any { - self - } /// Stable name — surfaces in plan rendering so test assertions /// (and operators inspecting EXPLAIN output) can verify the /// wrap was applied. diff --git a/crates/lance-graph-callcenter/src/transcode/ontology_table.rs b/crates/lance-graph-callcenter/src/transcode/ontology_table.rs index 0c0cbad1a..b5a901804 100644 --- a/crates/lance-graph-callcenter/src/transcode/ontology_table.rs +++ b/crates/lance-graph-callcenter/src/transcode/ontology_table.rs @@ -88,9 +88,6 @@ impl OntologyTableProvider { #[async_trait] impl TableProvider for OntologyTableProvider { - fn as_any(&self) -> &dyn Any { - self - } fn schema(&self) -> SchemaRef { self.inner.schema() diff --git a/crates/lance-graph-callcenter/src/vsa_udfs.rs b/crates/lance-graph-callcenter/src/vsa_udfs.rs index df263a1cf..2dde49bda 100644 --- a/crates/lance-graph-callcenter/src/vsa_udfs.rs +++ b/crates/lance-graph-callcenter/src/vsa_udfs.rs @@ -174,9 +174,6 @@ struct UnbindUdf { } impl datafusion::logical_expr::ScalarUDFImpl for UnbindUdf { - fn as_any(&self) -> &dyn std::any::Any { - self - } fn name(&self) -> &str { "vsa_unbind" } @@ -247,9 +244,6 @@ struct BundleUdf { } impl datafusion::logical_expr::ScalarUDFImpl for BundleUdf { - fn as_any(&self) -> &dyn std::any::Any { - self - } fn name(&self) -> &str { "vsa_bundle" } @@ -317,9 +311,6 @@ struct HammingDistUdf { } impl datafusion::logical_expr::ScalarUDFImpl for HammingDistUdf { - fn as_any(&self) -> &dyn std::any::Any { - self - } fn name(&self) -> &str { "vsa_hamming_dist" } @@ -384,9 +375,6 @@ struct BraidAtUdf { } impl datafusion::logical_expr::ScalarUDFImpl for BraidAtUdf { - fn as_any(&self) -> &dyn std::any::Any { - self - } fn name(&self) -> &str { "vsa_braid_at" } @@ -462,9 +450,6 @@ struct TopKUdf { } impl datafusion::logical_expr::ScalarUDFImpl for TopKUdf { - fn as_any(&self) -> &dyn std::any::Any { - self - } fn name(&self) -> &str { "vsa_top_k" } diff --git a/crates/lance-graph/src/cam_pq/udf.rs b/crates/lance-graph/src/cam_pq/udf.rs index e6b65ab07..bc8dc710e 100644 --- a/crates/lance-graph/src/cam_pq/udf.rs +++ b/crates/lance-graph/src/cam_pq/udf.rs @@ -196,9 +196,6 @@ impl std::fmt::Debug for CamDistanceUDF { } impl datafusion::logical_expr::ScalarUDFImpl for CamDistanceUDF { - fn as_any(&self) -> &dyn std::any::Any { - self - } fn name(&self) -> &str { &self.name diff --git a/crates/lance-graph/src/datafusion_planner/udf.rs b/crates/lance-graph/src/datafusion_planner/udf.rs index 09693256a..97ddd879d 100644 --- a/crates/lance-graph/src/datafusion_planner/udf.rs +++ b/crates/lance-graph/src/datafusion_planner/udf.rs @@ -361,9 +361,6 @@ impl std::fmt::Debug for VectorDistanceUDF { } impl datafusion::logical_expr::ScalarUDFImpl for VectorDistanceUDF { - fn as_any(&self) -> &dyn std::any::Any { - self - } fn name(&self) -> &str { &self.name @@ -418,9 +415,6 @@ impl std::fmt::Debug for VectorSimilarityUDF { } impl datafusion::logical_expr::ScalarUDFImpl for VectorSimilarityUDF { - fn as_any(&self) -> &dyn std::any::Any { - self - } fn name(&self) -> &str { &self.name @@ -656,9 +650,6 @@ impl std::fmt::Debug for HammingDistanceUDF { } impl datafusion::logical_expr::ScalarUDFImpl for HammingDistanceUDF { - fn as_any(&self) -> &dyn std::any::Any { - self - } fn name(&self) -> &str { &self.name diff --git a/crates/lance-graph/src/nsm/nsm_word.rs b/crates/lance-graph/src/nsm/nsm_word.rs index f2642bac6..56e8a918c 100644 --- a/crates/lance-graph/src/nsm/nsm_word.rs +++ b/crates/lance-graph/src/nsm/nsm_word.rs @@ -278,9 +278,6 @@ impl std::fmt::Debug for NsmSimilarityUdf { } impl datafusion::logical_expr::ScalarUDFImpl for NsmSimilarityUdf { - fn as_any(&self) -> &dyn std::any::Any { - self - } fn name(&self) -> &str { &self.name From b2b08b07e566de5fe69a62383396f6e8b4b8b712 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 15:09:50 +0000 Subject: [PATCH 04/11] Bump Rust 1.95.0 -> 1.97.1 and record the lance 9 / DataFusion 54 probe Operator-directed: bump now, fix after. rust-toolchain.toml 1.95.0 -> 1.97.1, and the three Dockerfiles with it - they were installing 1.94.0, a pre-existing drift BEHIND the repo's own 1.95.0 pin, so they were two versions stale rather than one. (ruff's Dockerfile has the drift-proof pattern: COPY rust-toolchain.toml + --default-toolchain none, so it can never disagree with the pin. Worth adopting here.) Toolchain measured clean on the OLD pins first, deliberately, so a toolchain failure could never be mistaken for a dependency failure: lance-graph-contract passes clippy --all-targets -D warnings; the only reds are the 12 pre-existing lance-graph-ontology lints already on the board. NOTE this bump does NOT satisfy rust-toolchain.toml's own documented rule ('bump explicitly when a future version is reviewed and workspace clippy passes clean') - workspace clippy is not clean because of those pre-existing lints. Bumping ahead of that gate is the operator's explicit call; the fix-after is owed. Also adds the probe plan and 4 invariant comments on the UDF PartialEq impls (no behaviour change). The name()-keyed equality is CORRECT for DataFusion - a UDF's identity in expression comparison and CSE is its registered name, not its payload - but at three sites it ASSERTS rather than restates: CamDistanceUDF's closure captures a caller-supplied codebook and NsmSimilarityUdf's an Arc, neither compared, so same-name => same-behaviour is load-bearing and was invisible. Now documented with the one-per-session-context rule. VectorDistance/Similarity are safe by construction (func derives from the compared metric) and say so. --- .../lance9-datafusion54-upgrade-probe-v1.md | 120 ++++++++++++++++++ Dockerfile | 10 +- Dockerfile.avx512 | 6 +- Dockerfile.hhtld | 2 +- crates/lance-graph/src/cam_pq/udf.rs | 9 ++ .../lance-graph/src/datafusion_planner/udf.rs | 8 ++ crates/lance-graph/src/nsm/nsm_word.rs | 5 + rust-toolchain.toml | 2 +- 8 files changed, 152 insertions(+), 10 deletions(-) create mode 100644 .claude/plans/lance9-datafusion54-upgrade-probe-v1.md diff --git a/.claude/plans/lance9-datafusion54-upgrade-probe-v1.md b/.claude/plans/lance9-datafusion54-upgrade-probe-v1.md new file mode 100644 index 000000000..4cccd5551 --- /dev/null +++ b/.claude/plans/lance9-datafusion54-upgrade-probe-v1.md @@ -0,0 +1,120 @@ +# lance9-datafusion54-upgrade-probe-v1 — what breaks on lance 9 / lancedb 0.33 / DataFusion 54 / Rust 1.97.1 + +> **Status:** MEASURED 2026-08-05. Assessment, not a landed migration — the pins +> and the two code fixes are on `claude/x265-x266-plans-review-h9osnl`; the real +> upgrade is being driven in a parallel session. +> **Method:** variables isolated on operator instruction — toolchain tested ALONE +> on the old pins first, so a toolchain failure could never be mistaken for a +> dependency failure. `target/` cleared between (the rustc-version swap +> invalidates every artifact anyway). + +## 1. Version correction — there is no `lancedb` 0.36 Rust crate + +The registry tops out at **`lancedb 0.33.0`**, and that release IS the lance-9 +pairing (it pins `lance = "=9.0.0"` exactly). **0.36.0 is the PyPI package**, +versioned independently of the Rust crate. So "lance 9 + lancedb 0.36" spells +`lance =9.0.0` + `lancedb =0.33.0` on the Rust side. + +## 2. Results + +| Leg | Result | +|---|---| +| Rust 1.97.1 on the OLD pins | **clean** — no new language or lint surface. `lance-graph-contract` passes `clippy --all-targets -D warnings`; the only reds anywhere were the 12 **pre-existing** `lance-graph-ontology` lints already on the board (oxrdf deprecated alias, doc-list indentation) | +| Resolution, lance 9 | **succeeds** — no conflict, no unused-patch alert | +| `cargo check -p lance-graph` | **green** (after 2 fixes below) | +| `-p lance-graph-callcenter --features query` | **green** (compiles the 5 `vsa_udfs` UDFs + `policy`) | +| `-p lance-graph-callcenter --features query-lite` | **green** (compiles `transcode/ontology_table.rs`) | + +**arrow and `object_store` do not move** — `arrow 58.3.0`, `object_store 0.13.2`, +unchanged. Historically the two that force painful cascades; they sit still. +Only DataFusion crosses a major (53 → 54). + +## 3. The whole break surface: `as_any` → `Any` supertrait, 12 sites, 3 traits + +DataFusion 54 moved `Any` from a **method** to a **supertrait** on three traits +at once, so every explicit `as_any` impl is `E0407`. Verified per trait against +the 54.1.0 sources — not assumed: + +| trait | 53 | 54 | +|---|---|---| +| `TableSource` | `: Sync + Send` + `fn as_any` | `: Any + Sync + Send`, no method | +| `TableProvider` | `: Debug + Sync + Send` + `fn as_any` (`table.rs:54`) | `: Any + Debug + Sync + Send`, no method | +| `ScalarUDFImpl` | `: Debug + DynEq + DynHash + Send + Sync` + `fn as_any` | `: … + Any`, no method | + +Downcasting now goes through the blanket `Any` impl; **no call site changed.** +`TableProvider` is NOT untouched by this — a parallel audit read the break as +`TableSource`-only, and `OntologyTableProvider` would have failed the moment +`query-lite` was enabled. + +## 4. The `DynEq`/`DynHash` non-break — and the reasoning error that predicted it + +Reading 54's `ScalarUDFImpl` supertrait list (`Debug + DynEq + DynHash + Send + +Sync + Any`), with `impl DynEq for T` / `impl +DynHash for T` blanket impls, I predicted a second migration: all ~11 UDF types +must gain `Eq + Hash`, and the ones holding `Arc` can't derive it. **That +prediction was wrong, and it is recorded here because the error is reusable:** + +**DataFusion 53 ALREADY required `DynEq + DynHash`** — +`datafusion-expr-53.1.0/src/udf.rs:498` is +`pub trait ScalarUDFImpl: Debug + DynEq + DynHash + Send + Sync`. The +53 → 54 delta on that trait is EXACTLY `+ Any` / `− fn as_any`. Nothing about +Eq/Hash moved. The codebase already satisfied it — all 10 in-tree UDFs carry +hand-written `PartialEq`/`Eq`/`Hash` keyed on `name()` — **because it had to, to +compile against 53 in the first place.** + +**The error:** I read the NEW version's trait bound and inferred "new +requirement" without diffing the OLD one. The differential was one grep away. +Ruling: `E-DIFF-THE-VERSIONS-DONT-READ-THE-NEW-ONE-1`. + +## 5. Two code fixes (the entire migration cost, so far) + +1. **`as_any` sweep** — 12 deletions across `datafusion_planner/udf.rs` (3), + `cam_pq/udf.rs`, `nsm/nsm_word.rs`, `callcenter/vsa_udfs.rs` (5), + `callcenter/policy.rs`, `callcenter/transcode/ontology_table.rs`, + `catalog/source_catalog.rs`. Mechanical; one comment left at the + `TableSource` site naming the cause. +2. **Invariant notes on 4 hand-written `PartialEq` impls** (no behaviour change). + The `name()`-keyed equality is CORRECT for DataFusion — a UDF's identity in + expression comparison and CSE is its registered name, not its payload — but + at three sites it makes an *assertion* rather than restating a fact, and that + was invisible: + - `VectorDistanceUDF` / `VectorSimilarityUDF` — `func` is derived from the + compared `metric` at every construction site, so + `(name, metric)`-equality ⇒ function-equality **by construction**. Safe; + now stated. + - `CamDistanceUDF` — `func` captures a caller-supplied **codebook** under the + fixed name `"cam_distance"`. Nothing in the type enforces + same-name ⇒ same-codebook: two registrations with different codebooks + compare equal for CSE while computing different distances. Load-bearing + assumption, now documented with the "one codebook per session context" + rule. + - `NsmSimilarityUdf` — same shape with `Arc`. + +## 6. The duplicate-major cost, and where it actually lives + +After bumping the two workspace `datafusion` pins (`lance-graph/Cargo.toml:21`, +`lance-graph-catalog/Cargo.toml:16`) to 54, **every one of the 20 `lance-*` +crates resolves to a single major, 9.0.0** — no lance 6/7/9 triple, no two +Lance stacks compiled. A parallel audit saw three lance majors; that state is +pre-pin-bump, and the pin bump is what collapses it. + +`datafusion 53.1.0` does remain in the lock, from **exactly one source**: +`deltalake-core 0.32.4`, reached only through the **non-default `delta` +feature** — already quarantined out of `default` with a standing +`TODO(lance-bump-delta)` (deltalake 0.32 removed `DeltaTableProvider::try_new`). +So the duplicate DataFusion major is confined to an already-broken opt-in +feature and costs a default build nothing. + +## 7. Two failures that will look like Lance fallout and are not + +- **`protoc` is a hard prerequisite** — `lance-encoding`'s build script fails + without it. +- **A `--all-targets` example fails to resolve `lance_graph_ontology` / `oxrdf` + / `oxrdfxml` / `oxttl`** — a pre-existing feature-gating bug in the example, + unrelated to either bump. + +## 8. Not done here + +Remaining lance-dependent crates unchecked (`-benches`, `-ontology`, `symbiont`, +`cognitive-stack`, `surreal_container`, `-python`); no test run; no clippy at +workspace scope; the `delta` feature still broken by its own API drift. diff --git a/Dockerfile b/Dockerfile index 25786eb12..53df33bd1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # lance-graph — Railway compile-test image (AVX2 default) # Verifies the workspace builds cleanly (core + bgz17 + planner + contract) -# Requires Rust 1.94.0 (LazyLock, modern std APIs) +# Requires Rust 1.97.1 (LazyLock, modern std APIs) # # CPU detection & SIMD dispatch documentation: see Dockerfile.md # AVX-512 pinned variant: see Dockerfile.avx512 @@ -16,13 +16,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ protobuf-compiler cmake \ && rm -rf /var/lib/apt/lists/* -# Install Rust 1.94.0 via rustup +# Install Rust 1.97.1 via rustup ENV RUSTUP_HOME=/usr/local/rustup \ CARGO_HOME=/usr/local/cargo \ PATH=/usr/local/cargo/bin:$PATH RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ - sh -s -- -y --default-toolchain 1.94.0 --profile minimal \ - && rustc --version | grep -q "1.94.0" + sh -s -- -y --default-toolchain 1.97.1 --profile minimal \ + && rustc --version | grep -q "1.97.1" WORKDIR /app @@ -69,4 +69,4 @@ RUN cargo test --release \ # Minimal runtime image FROM debian:bookworm-slim RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/* -CMD ["echo", "lance-graph build verified — Rust 1.94.0"] +CMD ["echo", "lance-graph build verified — Rust 1.97.1"] diff --git a/Dockerfile.avx512 b/Dockerfile.avx512 index bf82329dd..7805e72af 100644 --- a/Dockerfile.avx512 +++ b/Dockerfile.avx512 @@ -21,8 +21,8 @@ ENV RUSTUP_HOME=/usr/local/rustup \ CARGO_HOME=/usr/local/cargo \ PATH=/usr/local/cargo/bin:$PATH RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ - sh -s -- -y --default-toolchain 1.94.0 --profile minimal \ - && rustc --version | grep -q "1.94.0" + sh -s -- -y --default-toolchain 1.97.1 --profile minimal \ + && rustc --version | grep -q "1.97.1" WORKDIR /app @@ -52,4 +52,4 @@ RUN cargo test --release \ FROM debian:bookworm-slim RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && rm -rf /var/lib/apt/lists/* -CMD ["echo", "lance-graph AVX-512 build verified — Rust 1.94.0, target-cpu=x86-64-v4"] +CMD ["echo", "lance-graph AVX-512 build verified — Rust 1.97.1, target-cpu=x86-64-v4"] diff --git a/Dockerfile.hhtld b/Dockerfile.hhtld index 89e9dbb0a..7601a50a2 100644 --- a/Dockerfile.hhtld +++ b/Dockerfile.hhtld @@ -33,7 +33,7 @@ ENV RUSTUP_HOME=/usr/local/rustup \ CARGO_HOME=/usr/local/cargo \ PATH=/usr/local/cargo/bin:$PATH RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ - sh -s -- -y --default-toolchain 1.94.0 --profile minimal + sh -s -- -y --default-toolchain 1.97.1 --profile minimal WORKDIR /build diff --git a/crates/lance-graph/src/cam_pq/udf.rs b/crates/lance-graph/src/cam_pq/udf.rs index bc8dc710e..f51c749c3 100644 --- a/crates/lance-graph/src/cam_pq/udf.rs +++ b/crates/lance-graph/src/cam_pq/udf.rs @@ -219,6 +219,15 @@ impl datafusion::logical_expr::ScalarUDFImpl for CamDistanceUDF { impl PartialEq for CamDistanceUDF { fn eq(&self, other: &Self) -> bool { + // INVARIANT (load-bearing, not derivable): `func` captures a + // caller-supplied CODEBOOK under the fixed name "cam_distance", so + // name-equality asserts same-name ⇒ same-codebook. Unlike the + // vector UDFs (whose closures derive from a compared field), nothing + // in this type enforces it: two registrations with different + // codebooks would compare equal for expression-CSE while computing + // different distances. Registering more than one codebook under one + // name in a single query context is a broken registration — keep + // one `create_cam_distance_udf` per session context. self.name == other.name } } diff --git a/crates/lance-graph/src/datafusion_planner/udf.rs b/crates/lance-graph/src/datafusion_planner/udf.rs index 97ddd879d..5dc0d1667 100644 --- a/crates/lance-graph/src/datafusion_planner/udf.rs +++ b/crates/lance-graph/src/datafusion_planner/udf.rs @@ -384,6 +384,11 @@ impl datafusion::logical_expr::ScalarUDFImpl for VectorDistanceUDF { impl PartialEq for VectorDistanceUDF { fn eq(&self, other: &Self) -> bool { + // INVARIANT: `func` is an Arc and cannot be compared, so + // (name, metric)-equality asserts same-name ⇒ same-function. This + // holds because every construction site derives `func` from + // `metric` alone (make_vector_distance_udf) — two instances with + // equal (name, metric) compute identically by construction. self.name == other.name && self.metric == other.metric // Note: signature is structural so we don't compare it } @@ -438,6 +443,9 @@ impl datafusion::logical_expr::ScalarUDFImpl for VectorSimilarityUDF { impl PartialEq for VectorSimilarityUDF { fn eq(&self, other: &Self) -> bool { + // INVARIANT: same as VectorDistanceUDF — `func` is derived from + // `metric` at every construction site, so (name, metric)-equality + // implies function-equality by construction. self.name == other.name && self.metric == other.metric // Note: signature is structural so we don't compare it } diff --git a/crates/lance-graph/src/nsm/nsm_word.rs b/crates/lance-graph/src/nsm/nsm_word.rs index 56e8a918c..3159e587d 100644 --- a/crates/lance-graph/src/nsm/nsm_word.rs +++ b/crates/lance-graph/src/nsm/nsm_word.rs @@ -301,6 +301,11 @@ impl datafusion::logical_expr::ScalarUDFImpl for NsmSimilarityUdf { impl PartialEq for NsmSimilarityUdf { fn eq(&self, other: &Self) -> bool { + // INVARIANT (load-bearing): `runtime` is a payload the type cannot + // compare, so name-equality asserts same-name ⇒ same-NsmRuntime. + // Two registrations with different runtimes under one name would + // compare equal for expression-CSE while scoring differently — + // register one runtime per name per query context. self.name == other.name } } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 5b2df78d2..a276a290b 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "1.95.0" +channel = "1.97.1" # Pinned to 1.95.0 (bumped from 1.94.1 in PR #367, 2026-05-13). Aligns # with bevy (edition 2024 → 1.95 MSRV) and ndarray (bumped in parallel # per LATEST_STATE 2026-05-13). 1.95 added clippy lints From 00b134f714b71d00a43b1f2e73be3b7a1267616d Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 15:15:33 +0000 Subject: [PATCH 05/11] =?UTF-8?q?Fix=20the=2011=20pre-existing=20lance-gra?= =?UTF-8?q?ph-ontology=20lints=20=E2=80=94=20clippy=20-D=20warnings=20clea?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are what made 'workspace clippy passes clean' - rust-toolchain.toml's own precondition for a toolchain bump - unsatisfiable, so clearing them is the first owed fix-after of the 1.97.1 bump. Pre-existing, NOT 1.97 arrivals (they fire on 1.95 identically). 5x use of deprecated oxrdf::Subject -> oxrdf::NamedOrBlankNode. Verified semantically exact before substituting: oxrdf 0.3.3 declares 'pub type Subject = NamedOrBlankNode' behind #[deprecated], and NamedOrBlankNode carries the identical NamedNode/BlankNode variants. A type-alias rename, no behaviour change. 6x doc list item indentation, in two directions - worth recording because the naive fix oscillates between the twin lints. clippy's 'try using 4 spaces' is NOT the fix for a list-item CONTINUATION: 4 spaces flips 'overindented' into its twin 'without indentation'. A continuation must align with the list item's TEXT column (marker '- ' at 3 spaces => text at 5), so the sweep computes the column from the nearest preceding item rather than applying a constant. One of the six was NOT a continuation at all: l15.rs's two trailing lines are standalone prose after the list, and indenting them (which silences clippy) would have made them read as part of the account.tax bullet. Fixed by ending the list with a blank doc line - clippy's own second suggestion - preserving the meaning instead of the appearance. --- .../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 | 26 +- .../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 +- .../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 | 54 +- .../src/odoo_blueprint/l14.rs | 40 +- .../src/odoo_blueprint/l15.rs | 19 +- .../src/odoo_blueprint/l2.rs | 51 +- .../src/odoo_blueprint/l3.rs | 29 +- .../src/odoo_blueprint/l4.rs | 33 +- .../src/odoo_blueprint/l5.rs | 48 +- .../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 | 56 +- .../src/odoo_blueprint/structural.rs | 11 +- .../src/odoo_blueprint/style_recipe.rs | 50 +- crates/lance-graph-ontology/src/ttl_parse.rs | 6 +- .../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 +- 56 files changed, 8363 insertions(+), 4698 deletions(-) diff --git a/crates/lance-graph-ontology/src/hydrators/dolce.rs b/crates/lance-graph-ontology/src/hydrators/dolce.rs index 181f2364b..a0b5f6d8b 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 ee223f2fe..dad808c79 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 8d82b338b..0e97a7768 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 f0833e351..604b31131 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 b952d355e..90c00a212 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 { @@ -223,7 +221,7 @@ impl OwlHydrator { path: ttl_path.to_path_buf(), message: e.to_string(), })?; - if let oxrdf::Subject::NamedNode(n) = &triple.subject { + if let oxrdf::NamedOrBlankNode::NamedNode(n) = &triple.subject { intern(n.as_str(), &mut iri_to_id, &mut next_id); } intern(triple.predicate.as_str(), &mut iri_to_id, &mut next_id); @@ -239,7 +237,7 @@ impl OwlHydrator { path: ttl_path.to_path_buf(), message: e.to_string(), })?; - if let oxrdf::Subject::NamedNode(n) = &triple.subject { + if let oxrdf::NamedOrBlankNode::NamedNode(n) = &triple.subject { intern(n.as_str(), &mut iri_to_id, &mut next_id); } intern(triple.predicate.as_str(), &mut iri_to_id, &mut next_id); diff --git a/crates/lance-graph-ontology/src/hydrators/provo.rs b/crates/lance-graph-ontology/src/hydrators/provo.rs index ca895421d..28405b861 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 cabb8799e..cee045543 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 0fb98e5d8..2fc4c9a0e 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 e02f5ac57..c1aeaa65d 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 16d99f2ca..4a1c9f885 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 b8b6df9b4..cd81a301f 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 5cc52b662..7ae5a37c0 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/namespace_registry.rs b/crates/lance-graph-ontology/src/namespace_registry.rs index 953c1e98e..821da3bd2 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 2ef49b360..a3d0207ac 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 5e9b1e124..a2d18155f 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 52bc3d6de..018333e15 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 1616fbdb4..b7484bb4f 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 b283fc48c..3639e7000 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 bb5ffbc2b..7b51cec59 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 9bd694bed..b78d2e582 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 c5c188a27..410c3e4d1 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 3fbab5196..f8844713e 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 6233f6f6d..65c92f6fa 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 4d05da33f..1561b6d69 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 d3339ccd1..5c61cfddc 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 b35ceae8d..846a06545 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 c5f7e9e74..c70ce93ae 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 2673620b2..fa46eb14f 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 709eca8f1..3227d6d24 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 6093d2a20..bb1643eaa 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 2e75fd001..185281e9d 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 9e2929ce3..0e7d1a7c7 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 e7e8ead9c..8471fd746 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 3aca4cc14..1cada81d9 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l13.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l13.rs @@ -4,11 +4,11 @@ //! //! Entities covered (5): //! - `stock.valuation.layer` — SVL interface contract (FIFO/AVCO/standard; absent from -//! community clone, specced as fresh woa-rs build) +//! community clone, specced as fresh woa-rs build) //! - `stock.warehouse.orderpoint` — min/max reorder rule; drives ReorderTimingAdvisor + -//! ReplenishmentReportAdvisor savants +//! ReplenishmentReportAdvisor savants //! - `stock.rule` — procurement-side priority-resolution (EXTENDS L7 basics); -//! drives ProcurementRuleSelector + RouteTiebreaker savants +//! drives ProcurementRuleSelector + RouteTiebreaker savants //! - `stock.lot` — lot/serial master; uniqueness constraint, name generation //! - `res.company` (valuation) — anglo-saxon vs continental GL config //! @@ -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 6394b902c..40d3778eb 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 b24b631ab..d12221988 100644 --- a/crates/lance-graph-ontology/src/odoo_blueprint/l15.rs +++ b/crates/lance-graph-ontology/src/odoo_blueprint/l15.rs @@ -12,6 +12,7 @@ //! - `account.account.tag`: adds `balance_negate` + `report_expression_id` (R12). //! - `account.tax`: adds `hide_tax_exigibility` field + rounding/totals methods //! (`_round_base_lines_tax_details`, `_get_tax_totals_summary`, `_prepare_tax_lines`). +//! //! No field duplication with L3; CABA routing is on `repartition.line` in L3. //! `balance_negate` is also referenced from **L4** (move-line tagging). //! @@ -288,7 +289,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 +338,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 +398,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 +501,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 3c248f690..26163284b 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 6428db9d7..b20bb0e89 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 9fceea5e9..fe52a7a60 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 07ffbd0ef..d98945d79 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 { @@ -1032,7 +1050,7 @@ pub const RECONCILE_MODEL_LINE: OdooEntity = OdooEntity { /// /// Entities NOT included (skipped): /// - `account.payment.method` — referenced indirectly via payment_method_line_id; -/// not documented as a primary entity in L5. +/// not documented as a primary entity in L5. /// - `account.payment.method.line` — same; belongs to journal / payment-method lane. /// - `account.payment.register` — wizard, not documented in L5 prose. pub const ENTITIES: &[OdooEntity] = &[ @@ -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 18b0187f7..15011028d 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 8518bc4b5..eb55a5bf8 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 cb493ef18..7dbafea4d 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 ef35246c9..0c916d32b 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 ebf1f2726..0447b7a57 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 1e20a442f..3c55e778d 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(); @@ -179,9 +187,10 @@ pub fn emit_op_dispatch(buckets: &[BucketedRecipe]) -> (String, EmitStats) { let count = entries.len(); // Sort for determinism: recipe_id asc, then method_id asc. - let mut sorted: Vec<&BucketedRecipe> = entries.iter().copied().collect(); + let mut sorted: Vec<&BucketedRecipe> = entries.to_vec(); 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 558d45dc9..a9044cecd 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 ac4d11e23..e1aef4cd1 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/src/ttl_parse.rs b/crates/lance-graph-ontology/src/ttl_parse.rs index 0c3bc225e..570d86e69 100644 --- a/crates/lance-graph-ontology/src/ttl_parse.rs +++ b/crates/lance-graph-ontology/src/ttl_parse.rs @@ -529,10 +529,10 @@ enum RdfValue { Literal(String), } -fn subject_to_string(s: &oxrdf::Subject) -> String { +fn subject_to_string(s: &oxrdf::NamedOrBlankNode) -> String { match s { - oxrdf::Subject::NamedNode(n) => n.as_str().to_string(), - oxrdf::Subject::BlankNode(b) => format!("_:{}", b.as_str()), + oxrdf::NamedOrBlankNode::NamedNode(n) => n.as_str().to_string(), + oxrdf::NamedOrBlankNode::BlankNode(b) => format!("_:{}", b.as_str()), } } 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 99d6ecb8e..775fcfb07 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 32a033ed9..9671ef931 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 35ee7c009..cba4d6eb9 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 498aac7b1..44e72ec9a 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 7f865832b..7978cf539 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 ced2ca5b2..1319dee88 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 19814e9a0..f84acac2a 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"); From 5a1346d5f78cee2ee8efd376d8cc402aa96b71f2 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 15:36:47 +0000 Subject: [PATCH 06/11] Clippy clean under 1.97.1: the DataFusion-54 sweep's follow-ons + pre-existing lints Second owed fix-after of the toolchain+lance-9 bump. Every crate now passes clippy --all-targets -D warnings: lance-graph, -catalog, -contract, -ontology, -planner, -supervisor, cognitive-shader-driver, and -callcenter under BOTH its query and query-lite features (the default-feature check was a false green - vsa_udfs and ontology_table are feature-gated, so the first pass never compiled them). Follow-ons from my own as_any sweep: - savant_reasoners.rs: 4x manual_async_fn (the impls wrapped an async block in a hand-written impl Future; RPITIT lets the impl just be async fn). Dropped the now-unused core::future::Future import, and moved savant_by_name into the TEST module - it is test-only, so a module-scope import made it unused in the lib build. - ontology_table.rs: std::any::Any unused once as_any was deleted. Pre-existing, never gated because the feature was never in the gate: - vsa_udfs.rs: sort_unstable_by -> sort_unstable_by_key(Reverse) (the exact same comparator; tie order stays implementation-defined either way), 2x needless_range_loop -> enumerate() with a debug_assert that the collection length matches the arrow array's. - zerocopy.rs: 2x iter_kv_map, 1x unnecessary_cast (clippy --fix). - bindspace.rs push_typed: too_many_arguments 8/7 -> #[expect] with a reason. One argument per SoA column IS the point; folding them into a params struct would re-wrap the axes in a new struct, the exact anti-pattern the AGI-as-SoA invariant forbids. - driver.rs/engine_bridge.rs/end_to_end.rs: needless_range_loop where the index IS the data (position-coupled bit patterns across two plane rows) -> #[expect] with reasons, not rewrites; a constant assert! -> const _: () = assert!(...); a constant-folded bit expression spelled through a binding. - ndarray_bridge.rs: 8 SIMD/scalar fallbacks were dead under the default ndarray-hpc feature - gated to cfg(not(feature = "ndarray-hpc")) alongside the dispatch arms that call them, and their two tests with them. - Two examples: a doc line starting with '+' read as a markdown bullet; a range loop over facts -> iter().enumerate(). --- .../cognitive-shader-driver/src/bindspace.rs | 6 +++ crates/cognitive-shader-driver/src/driver.rs | 8 +++- .../src/engine_bridge.rs | 7 ++- .../tests/end_to_end.rs | 6 ++- .../src/savant_reasoners.rs | 44 ++++++++++--------- .../src/transcode/ontology_table.rs | 2 - .../src/transcode/zerocopy.rs | 6 +-- crates/lance-graph-callcenter/src/vsa_udfs.rs | 23 +++++++--- .../examples/multihop_witness_confidence.rs | 14 +++--- .../examples/text_stream_to_soa.rs | 3 ++ crates/lance-graph/src/cam_pq/udf.rs | 1 - .../lance-graph/src/datafusion_planner/udf.rs | 3 -- .../src/graph/blasgraph/ndarray_bridge.rs | 10 +++++ crates/lance-graph/src/nsm/nsm_word.rs | 1 - 14 files changed, 85 insertions(+), 49 deletions(-) diff --git a/crates/cognitive-shader-driver/src/bindspace.rs b/crates/cognitive-shader-driver/src/bindspace.rs index 577bce4f1..336fffe51 100644 --- a/crates/cognitive-shader-driver/src/bindspace.rs +++ b/crates/cognitive-shader-driver/src/bindspace.rs @@ -472,6 +472,12 @@ impl BindSpaceBuilder { /// /// # Panics /// Panics if cursor >= capacity (F-08: bounds-checked push). + // One argument per SoA column is the point: the signature mirrors the + // BindSpace column layout (content/meta/edge/qualia/temporal/expert/ + // entity_type). Folding them into a params struct would re-wrap the axes + // in a new struct — the exact anti-pattern the AGI-as-SoA invariant + // forbids (CLAUDE.md § AGI-as-glove; PR #223). + #[expect(clippy::too_many_arguments)] pub fn push_typed( mut self, content: &[u64], diff --git a/crates/cognitive-shader-driver/src/driver.rs b/crates/cognitive-shader-driver/src/driver.rs index 1104d8582..1590b2578 100644 --- a/crates/cognitive-shader-driver/src/driver.rs +++ b/crates/cognitive-shader-driver/src/driver.rs @@ -1109,6 +1109,9 @@ mod tests { fn demo_planes() -> [[u64; 64]; 8] { let mut planes = [[0u64; 64]; 8]; + // Indexes TWO plane rows (0 and 2) at position i plus i+1 arithmetic; + // an iterator over one row cannot express that. + #[expect(clippy::needless_range_loop)] for i in 0..4 { if i + 1 < 4 { planes[0][i] |= 1u64 << (i + 1); @@ -1693,8 +1696,9 @@ mod tests { assert_eq!(default.saturated, composite.saturated); assert_eq!(default.color_acc, composite.color_acc); // ALPHA_COMPOSITE_DIMS sanity probe — keeps the import live and - // documents the active prefix size. - assert!(ALPHA_COMPOSITE_DIMS >= QUALIA_DIMS); + // documents the active prefix size. A const assert does the same job + // at compile time (and satisfies clippy::assertions_on_constants). + const _: () = assert!(ALPHA_COMPOSITE_DIMS >= QUALIA_DIMS); } #[test] diff --git a/crates/cognitive-shader-driver/src/engine_bridge.rs b/crates/cognitive-shader-driver/src/engine_bridge.rs index 3884f9d91..e141c67c5 100644 --- a/crates/cognitive-shader-driver/src/engine_bridge.rs +++ b/crates/cognitive-shader-driver/src/engine_bridge.rs @@ -792,9 +792,12 @@ mod tests { let (start, end) = ingest_codebook_indices(&mut bs, &[42, 100, 200], 1, 12345, 0); assert_eq!(start, 0); assert_eq!(end, 3); - // Check bit 42 is set in row 0's content fingerprint. + // Check bit 42 is set in row 0's content fingerprint (word = idx/64, + // bit = idx%64 — spelled through a binding so the pattern survives + // clippy's constant-folding lint). + let bit_index = 42usize; let words = bs.fingerprints.content_row(0); - assert_ne!(words[42 / 64] & (1u64 << (42 % 64)), 0); + assert_ne!(words[bit_index / 64] & (1u64 << (bit_index % 64)), 0); assert_eq!(bs.temporal[0], 12345); } diff --git a/crates/cognitive-shader-driver/tests/end_to_end.rs b/crates/cognitive-shader-driver/tests/end_to_end.rs index f77fdb8bb..0ef8aea4d 100644 --- a/crates/cognitive-shader-driver/tests/end_to_end.rs +++ b/crates/cognitive-shader-driver/tests/end_to_end.rs @@ -7,7 +7,7 @@ use bgz17::palette::Palette; use bgz17::palette_semiring::PaletteSemiring; use cognitive_shader_driver::auto_style; -use cognitive_shader_driver::bindspace::{BindSpace, FLOATS_PER_VSA, WORDS_PER_FP}; +use cognitive_shader_driver::bindspace::{BindSpace, FLOATS_PER_VSA}; use cognitive_shader_driver::driver::CognitiveShaderBuilder; use cognitive_shader_driver::engine_bridge::{ classification_distance, ingest_codebook_indices, persist_cycle, read_qualia_17d, @@ -31,9 +31,13 @@ fn palette_256() -> PaletteSemiring { fn planes_chain() -> [[u64; 64]; 8] { let mut planes = [[0u64; 64]; 8]; + // Position-coupled bit patterns (bit i+1 at word i / bit i at word i) — + // the index IS the data here, so the range loop is the clear spelling. + #[expect(clippy::needless_range_loop)] for i in 0..63 { planes[0][i] |= 1u64 << (i + 1); // CAUSES chain } + #[expect(clippy::needless_range_loop)] for i in 0..64 { planes[2][i] |= 1u64 << i; // SUPPORTS self } diff --git a/crates/lance-graph-callcenter/src/savant_reasoners.rs b/crates/lance-graph-callcenter/src/savant_reasoners.rs index c8ba9e0fb..07198e44b 100644 --- a/crates/lance-graph-callcenter/src/savant_reasoners.rs +++ b/crates/lance-graph-callcenter/src/savant_reasoners.rs @@ -20,13 +20,12 @@ //! 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 lance_graph_contract::exploration::NarsTruth; use lance_graph_contract::nars::QueryStrategy; use lance_graph_contract::reasoning::{Reasoner, ReasoningContext, ReasoningKind}; -use lance_graph_contract::savants::{savant_by_name, Savant, SAVANTS}; +use lance_graph_contract::savants::{Savant, SAVANTS}; /// Error from a savant reasoner. #[derive(Debug, Clone, Copy, PartialEq, Eq)] @@ -271,11 +270,11 @@ impl Reasoner for CustomerCategoryReasoner { type Conclusion = SavantConclusion; type Error = SavantError; - fn reason<'a>( + async fn reason<'a>( &'a self, context: ReasoningContext<'a>, - ) -> impl Future> + Send + 'a { - async move { reason_for_kind(ReasoningKind::CustomerCategory, &context) } + ) -> Result { + reason_for_kind(ReasoningKind::CustomerCategory, &context) } } @@ -287,11 +286,11 @@ impl Reasoner for PostingAnomalyReasoner { type Conclusion = SavantConclusion; type Error = SavantError; - fn reason<'a>( + async fn reason<'a>( &'a self, context: ReasoningContext<'a>, - ) -> impl Future> + Send + 'a { - async move { reason_for_kind(ReasoningKind::PostingAnomaly, &context) } + ) -> Result { + reason_for_kind(ReasoningKind::PostingAnomaly, &context) } } @@ -302,11 +301,11 @@ impl Reasoner for NextBestActionReasoner { type Conclusion = SavantConclusion; type Error = SavantError; - fn reason<'a>( + async fn reason<'a>( &'a self, context: ReasoningContext<'a>, - ) -> impl Future> + Send + 'a { - async move { reason_for_kind(ReasoningKind::NextBestAction, &context) } + ) -> Result { + reason_for_kind(ReasoningKind::NextBestAction, &context) } } @@ -319,19 +318,17 @@ impl Reasoner for OtherReasoner { type Conclusion = SavantConclusion; type Error = SavantError; - fn reason<'a>( + async fn reason<'a>( &'a self, context: ReasoningContext<'a>, - ) -> impl Future> + Send + 'a { - async move { - match context.kind { - ReasoningKind::Other(_) => { - let savant = resolve_savant(context.kind, context.namespace) - .ok_or(SavantError::UnknownSavant)?; - Ok(build_conclusion(savant, &context)) - } - _ => Err(SavantError::KindMismatch), + ) -> Result { + match context.kind { + ReasoningKind::Other(_) => { + let savant = resolve_savant(context.kind, context.namespace) + .ok_or(SavantError::UnknownSavant)?; + Ok(build_conclusion(savant, &context)) } + _ => Err(SavantError::KindMismatch), } } } @@ -339,6 +336,11 @@ impl Reasoner for OtherReasoner { #[cfg(test)] mod tests { use super::*; + // `savant_by_name` is a test-only lookup — the lib dispatches through + // `resolve_savant` / `SAVANTS`, so importing it at module scope made it an + // unused import in the lib build. + use lance_graph_contract::savants::savant_by_name; + use core::future::Future; use core::pin::pin; use core::task::{Context, Poll, RawWaker, RawWakerVTable, Waker}; diff --git a/crates/lance-graph-callcenter/src/transcode/ontology_table.rs b/crates/lance-graph-callcenter/src/transcode/ontology_table.rs index b5a901804..59797ec29 100644 --- a/crates/lance-graph-callcenter/src/transcode/ontology_table.rs +++ b/crates/lance-graph-callcenter/src/transcode/ontology_table.rs @@ -10,7 +10,6 @@ //! Domain-agnostic. Pass any `(Ontology, entity_type)` and you get a //! provider — Foundry-style. -use std::any::Any; use std::sync::Arc; use arrow::datatypes::SchemaRef; @@ -88,7 +87,6 @@ impl OntologyTableProvider { #[async_trait] impl TableProvider for OntologyTableProvider { - fn schema(&self) -> SchemaRef { self.inner.schema() } diff --git a/crates/lance-graph-callcenter/src/transcode/zerocopy.rs b/crates/lance-graph-callcenter/src/transcode/zerocopy.rs index 2f4a4ff92..a9dd82360 100644 --- a/crates/lance-graph-callcenter/src/transcode/zerocopy.rs +++ b/crates/lance-graph-callcenter/src/transcode/zerocopy.rs @@ -470,7 +470,7 @@ pub fn triples_to_batch( let mut body: Vec>> = (0..ncols).map(|_| Vec::with_capacity(nrows)).collect(); - for (_, (entity_id, group_triples)) in &grouped { + for (entity_id, group_triples) in grouped.values() { ids.push(*entity_id); entity_type_strs.push(soa.entity_type); @@ -634,7 +634,7 @@ where let mut resolved: Vec>>> = (0..ncols).map(|_| Vec::with_capacity(nrows)).collect(); - for (_subject, (entity_id, group_triples)) in &grouped { + for (entity_id, group_triples) in grouped.values() { ids.push(*entity_id); entity_type_strs.push(soa.entity_type); for (col_idx, soa_col) in soa.columns.iter().enumerate() { @@ -843,7 +843,7 @@ fn parse_iso_date_to_days(s: &str) -> Option { let y = if m <= 2 { y - 1 } else { y }; let era = if y >= 0 { y } else { y - 399 } / 400; let yoe = (y - era * 400) as u64; - let doy = ((153 * (if m > 2 { m - 3 } else { m + 9 } as u64) + 2) / 5 + d as u64 - 1) as u64; + let doy = (153 * (if m > 2 { m - 3 } else { m + 9 } as u64) + 2) / 5 + d as u64 - 1; let doe = yoe * 365 + yoe / 4 - yoe / 100 + doy; let days_since_epoch = era * 146_097 + doe as i64 - 719_468; i32::try_from(days_since_epoch).ok() diff --git a/crates/lance-graph-callcenter/src/vsa_udfs.rs b/crates/lance-graph-callcenter/src/vsa_udfs.rs index 2dde49bda..9f7a84cb6 100644 --- a/crates/lance-graph-callcenter/src/vsa_udfs.rs +++ b/crates/lance-graph-callcenter/src/vsa_udfs.rs @@ -160,7 +160,10 @@ fn top_k_op(fp_bytes: &[u8], k: usize) -> Vec { .enumerate() .map(|(i, w)| (w.count_ones(), i as u16)) .collect(); - scored.sort_unstable_by(|a, b| b.0.cmp(&a.0)); + // Descending by popcount. `Reverse` is exactly the previous comparator + // (`b.0.cmp(&a.0)`); tie order among equal popcounts stays + // implementation-defined either way, as it was before. + scored.sort_unstable_by_key(|&(count, _)| core::cmp::Reverse(count)); scored.into_iter().take(k).map(|(_, idx)| idx).collect() } @@ -417,11 +420,12 @@ impl datafusion::logical_expr::ScalarUDFImpl for BraidAtUdf { .collect::>(); let mut builder = FixedSizeBinaryBuilder::with_capacity(len, FP_BYTES); - for i in 0..len { - if pos_col.is_null(i) || fps[i].is_none() { + debug_assert_eq!(fps.len(), len, "fps is built from the same array as len"); + for (i, fp) in fps.iter().enumerate() { + if pos_col.is_null(i) || fp.is_none() { builder.append_null(); } else { - let out = braid_at_op(pos_col.value(i), fps[i].as_ref().unwrap()); + let out = braid_at_op(pos_col.value(i), fp.as_ref().unwrap()); builder.append_value(words_to_bytes(&out)).unwrap(); } } @@ -488,12 +492,17 @@ impl datafusion::logical_expr::ScalarUDFImpl for TopKUdf { let mut all_values: Vec = Vec::new(); let mut offsets: Vec = vec![0]; - for i in 0..len { - if fp_arr[i].is_none() || k_col.is_null(i) { + debug_assert_eq!( + fp_arr.len(), + len, + "fp_arr is built from the same array as len" + ); + for (i, fp) in fp_arr.iter().enumerate() { + if fp.is_none() || k_col.is_null(i) { offsets.push(*offsets.last().unwrap()); } else { let k = k_col.value(i) as usize; - let indices = top_k_op(fp_arr[i].as_ref().unwrap(), k); + let indices = top_k_op(fp.as_ref().unwrap(), k); all_values.extend_from_slice(&indices); offsets.push(*offsets.last().unwrap() + indices.len() as i32); } diff --git a/crates/lance-graph/examples/multihop_witness_confidence.rs b/crates/lance-graph/examples/multihop_witness_confidence.rs index d4990e107..b0171258c 100644 --- a/crates/lance-graph/examples/multihop_witness_confidence.rs +++ b/crates/lance-graph/examples/multihop_witness_confidence.rs @@ -15,10 +15,12 @@ //! cargo run -p lance-graph --example multihop_witness_confidence //! ``` //! -//! Scope: composes the SHIPPED primitives (`CausalEdge64` u8 truth + `WitnessTable` -//! + NARS revision) to prove the multi-hop-witness → Truth mechanism. The -//! contract-level wiring (edge→W-slot in the `MailboxSoA` emission path) is the -//! gated V3 slice; here the arc is keyed by fact index (feature-agnostic). +//! Scope: composes the SHIPPED primitives (`CausalEdge64` u8 truth, +//! `WitnessTable`, NARS revision) to prove the multi-hop-witness → Truth +//! mechanism. (A wrapped line must not start with `+` — rustdoc/clippy reads +//! it as a markdown list bullet.) The contract-level wiring (edge→W-slot in +//! the `MailboxSoA` emission path) is the gated V3 slice; here the arc is +//! keyed by fact index (feature-agnostic). use causal_edge::edge::InferenceType; use causal_edge::{CausalEdge64, CausalMask, PlasticityState}; @@ -126,8 +128,8 @@ fn main() { facts[0].confidence() ); println!(" fact single-obs conf multi-hop conf witness hops"); - for i in 0..N { - let single = facts[i].confidence(); + for (i, fact) in facts.iter().enumerate().take(N) { + let single = fact.confidence(); let (mc, hops) = multihop(i); println!(" F{i} {single:.3} {mc:.3} {hops}"); } diff --git a/crates/lance-graph/examples/text_stream_to_soa.rs b/crates/lance-graph/examples/text_stream_to_soa.rs index a37a7bfdd..c00543958 100644 --- a/crates/lance-graph/examples/text_stream_to_soa.rs +++ b/crates/lance-graph/examples/text_stream_to_soa.rs @@ -147,6 +147,9 @@ fn main() { let lo = focal.saturating_sub(RADIUS); let hi = (focal + RADIUS + 1).min(n_triples); let a = &ranks[focal]; + // A windowed pairwise walk: `other` also feeds the focal-skip compare, + // so the index is semantic here, not an iteration artifact. + #[expect(clippy::needless_range_loop)] for other in lo..hi { if other == focal { continue; diff --git a/crates/lance-graph/src/cam_pq/udf.rs b/crates/lance-graph/src/cam_pq/udf.rs index f51c749c3..363836e21 100644 --- a/crates/lance-graph/src/cam_pq/udf.rs +++ b/crates/lance-graph/src/cam_pq/udf.rs @@ -196,7 +196,6 @@ impl std::fmt::Debug for CamDistanceUDF { } impl datafusion::logical_expr::ScalarUDFImpl for CamDistanceUDF { - fn name(&self) -> &str { &self.name } diff --git a/crates/lance-graph/src/datafusion_planner/udf.rs b/crates/lance-graph/src/datafusion_planner/udf.rs index 5dc0d1667..587cba0da 100644 --- a/crates/lance-graph/src/datafusion_planner/udf.rs +++ b/crates/lance-graph/src/datafusion_planner/udf.rs @@ -361,7 +361,6 @@ impl std::fmt::Debug for VectorDistanceUDF { } impl datafusion::logical_expr::ScalarUDFImpl for VectorDistanceUDF { - fn name(&self) -> &str { &self.name } @@ -420,7 +419,6 @@ impl std::fmt::Debug for VectorSimilarityUDF { } impl datafusion::logical_expr::ScalarUDFImpl for VectorSimilarityUDF { - fn name(&self) -> &str { &self.name } @@ -658,7 +656,6 @@ impl std::fmt::Debug for HammingDistanceUDF { } impl datafusion::logical_expr::ScalarUDFImpl for HammingDistanceUDF { - fn name(&self) -> &str { &self.name } diff --git a/crates/lance-graph/src/graph/blasgraph/ndarray_bridge.rs b/crates/lance-graph/src/graph/blasgraph/ndarray_bridge.rs index 767f9c1bd..f7ccb6a46 100644 --- a/crates/lance-graph/src/graph/blasgraph/ndarray_bridge.rs +++ b/crates/lance-graph/src/graph/blasgraph/ndarray_bridge.rs @@ -208,6 +208,7 @@ pub fn dispatch_popcount(a: &[u8]) -> u64 { // Scalar fallback — always available // --------------------------------------------------------------------------- +#[cfg(not(feature = "ndarray-hpc"))] /// Scalar Hamming distance: XOR each u64 pair and sum `count_ones()`. fn hamming_scalar(a: &[u8], b: &[u8]) -> u64 { // Process 8 bytes at a time as u64 words for efficiency. @@ -233,6 +234,7 @@ fn hamming_scalar(a: &[u8], b: &[u8]) -> u64 { total } +#[cfg(not(feature = "ndarray-hpc"))] /// Scalar popcount: process as u64 words then handle remainder. fn popcount_scalar(a: &[u8]) -> u64 { let chunks = a.len() / 8; @@ -259,6 +261,7 @@ fn popcount_scalar(a: &[u8]) -> u64 { // AVX2 — 256-bit SIMD via shuffle-based popcount LUT // --------------------------------------------------------------------------- +#[cfg(not(feature = "ndarray-hpc"))] #[cfg(target_arch = "x86_64")] #[target_feature(enable = "avx2")] unsafe fn hamming_avx2(a: &[u8], b: &[u8]) -> u64 { @@ -307,6 +310,7 @@ unsafe fn hamming_avx2(a: &[u8], b: &[u8]) -> u64 { total } +#[cfg(not(feature = "ndarray-hpc"))] #[cfg(target_arch = "x86_64")] #[target_feature(enable = "avx2")] unsafe fn popcount_avx2(a: &[u8]) -> u64 { @@ -352,6 +356,7 @@ unsafe fn popcount_avx2(a: &[u8]) -> u64 { // AVX-512BW — 512-bit SIMD via shuffle-based popcount LUT // --------------------------------------------------------------------------- +#[cfg(not(feature = "ndarray-hpc"))] #[cfg(target_arch = "x86_64")] #[target_feature(enable = "avx512f", enable = "avx512bw")] unsafe fn hamming_avx512bw(a: &[u8], b: &[u8]) -> u64 { @@ -395,6 +400,7 @@ unsafe fn hamming_avx512bw(a: &[u8], b: &[u8]) -> u64 { total } +#[cfg(not(feature = "ndarray-hpc"))] #[cfg(target_arch = "x86_64")] #[target_feature(enable = "avx512f", enable = "avx512bw")] unsafe fn popcount_avx512bw(a: &[u8]) -> u64 { @@ -440,6 +446,7 @@ unsafe fn popcount_avx512bw(a: &[u8]) -> u64 { // AVX-512 VPOPCNTDQ — native 512-bit popcount // --------------------------------------------------------------------------- +#[cfg(not(feature = "ndarray-hpc"))] #[cfg(target_arch = "x86_64")] #[target_feature(enable = "avx512f", enable = "avx512vpopcntdq")] unsafe fn hamming_avx512_vpopcntdq(a: &[u8], b: &[u8]) -> u64 { @@ -469,6 +476,7 @@ unsafe fn hamming_avx512_vpopcntdq(a: &[u8], b: &[u8]) -> u64 { total } +#[cfg(not(feature = "ndarray-hpc"))] #[cfg(target_arch = "x86_64")] #[target_feature(enable = "avx512f", enable = "avx512vpopcntdq")] unsafe fn popcount_avx512_vpopcntdq(a: &[u8]) -> u64 { @@ -565,6 +573,7 @@ mod tests { } #[test] + #[cfg(not(feature = "ndarray-hpc"))] fn test_scalar_hamming_small() { let a = [0xFFu8, 0x00, 0xAA]; let b = [0x00u8, 0xFF, 0x55]; @@ -574,6 +583,7 @@ mod tests { } #[test] + #[cfg(not(feature = "ndarray-hpc"))] fn test_scalar_popcount_small() { let a = [0xFFu8, 0x00, 0x0F]; // 8 + 0 + 4 = 12 diff --git a/crates/lance-graph/src/nsm/nsm_word.rs b/crates/lance-graph/src/nsm/nsm_word.rs index 3159e587d..c5bcc921b 100644 --- a/crates/lance-graph/src/nsm/nsm_word.rs +++ b/crates/lance-graph/src/nsm/nsm_word.rs @@ -278,7 +278,6 @@ impl std::fmt::Debug for NsmSimilarityUdf { } impl datafusion::logical_expr::ScalarUDFImpl for NsmSimilarityUdf { - fn name(&self) -> &str { &self.name } From fc28eb1e62d8530a750dfb2d0334e784de310d70 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 15:44:41 +0000 Subject: [PATCH 07/11] =?UTF-8?q?Board:=20the=20lance=209=20/=20DF=2054=20?= =?UTF-8?q?/=20Rust=201.97.1=20bump=20=E2=80=94=20arc=20entry,=20state=20h?= =?UTF-8?q?ead,=20agent=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Records the measured assessment turned landed bump (9 repos, 8 sibling PRs merged), both operator rulings, and two things worth a future session's time: - The false green. A default-feature clippy pass on lance-graph-callcenter reported EXIT=0 while never compiling vsa_udfs or ontology_table - both feature-gated, and both carrying the very as_any impls the DF-54 break hits. Only explicit impls break, and only when their module actually compiles, so a gated module looks fine indefinitely. The fix was gate-aware gating, not more trust in an exit code. - My falsified prediction, kept rather than quietly dropped: I read DF 54's DynEq + DynHash supertraits as a NEW requirement without diffing 53, which already declared them. The tree already satisfied it. The claim reached a commit message before measurement corrected it; the lesson (diff the versions, do not read the new one) is in the plan. Also records that both Sonnet workers stopped on their explicit disk floor and correctly blamed an external target dir rather than their own residue - the argument for giving grindworkers a numeric floor and permission to halt. --- .claude/board/AGENT_LOG.md | 40 ++++++++++++++++ .claude/board/LATEST_STATE.md | 12 +++++ .claude/board/PR_ARC_INVENTORY.md | 11 +++++ .../lance9-datafusion54-upgrade-probe-v1.md | 47 +++++++++++++++++-- 4 files changed, 105 insertions(+), 5 deletions(-) diff --git a/.claude/board/AGENT_LOG.md b/.claude/board/AGENT_LOG.md index 338eec751..fa5ddda97 100644 --- a/.claude/board/AGENT_LOG.md +++ b/.claude/board/AGENT_LOG.md @@ -1,3 +1,43 @@ +## 2026-08-05 — lance 9 / DataFusion 54 / Rust 1.97.1 cross-repo bump (main thread + 2 Sonnet grindworkers) + +- **Agents:** main thread (design, adjudication, all commits/pushes) + 2 Sonnet + lint-sweep workers (ndarray; OGAR) spawned WITHOUT worktrees per + `agent-cargo-hygiene.md`, edit-only, each writing only its own tag-file + (`/.claude/exec-runs/sonnet-197-lint-sweep.md`). A third resumed OGAR. +- **Method the operator imposed, and it paid:** test the TOOLCHAIN ALONE on the + OLD dependency pins first, so a toolchain failure could never be mistaken for + a dependency failure. 1.97.1 came back clean on the old pins; every + subsequent red was therefore attributable to the dep bump. +- **Result:** lance-graph green under lance 9 + DF 54 + 1.97.1 across + `lance-graph`, `-catalog`, `-contract`, `-ontology`, `-planner`, + `-supervisor`, `cognitive-shader-driver`, and `-callcenter` (both `query` + and `query-lite` — the default-feature pass was a FALSE GREEN, since + `vsa_udfs`/`ontology_table` are feature-gated and never compiled). + ndarray: 2186 lib tests pass, 0 fail. Plan + + `E-LANCE-IS-UPSTREAM-AUTHORITATIVE-1` + `E-THE-LEGEND-IS-NOT-THE-GRAMMAR-1` + banked; 9 repos' toolchains/CI/Dockerfiles bumped; 8 PRs merged. +- **Two disk incidents, both handled by the guard, not by luck:** both Sonnet + workers stopped on their explicit `df` floor rather than pushing through, and + both correctly diagnosed the cause as EXTERNAL (a 9.8 GB sibling `target/` + holding two toolchains' artifacts plus both the lance-7 and lance-9 trees) + rather than their own residue. `cargo clean` there recovered 10.3 GB. The + lesson for future briefs: give grindworkers an explicit numeric disk floor + and permission to stop — a worker that halts with a diagnosis is worth far + more than one that ENOSPCs mid-edit. +- **My own error, recorded because it is reusable:** I predicted a second + migration (all ~11 UDF types needing `Eq + Hash`, since DF 54's + `ScalarUDFImpl` lists `DynEq + DynHash` supertraits blanket-implemented over + them). WRONG — DF **53 already** required them, so the tree already satisfied + it with hand-written `name()`-keyed impls everywhere. I read the NEW version's + bound and inferred "new requirement" without diffing the OLD one; the + differential was one grep away. The claim had already reached a commit message + before measurement corrected it. +- **Still owed (not claimed as done):** OGAR's 22 unreached crates + one + unverified `clickhouse-ddl` fix (resume worker dispatched); `blockly-rs` and + `rig` still on 1.95.0, outside the sweep. +- **Gates untouched:** D-BLW-5, D-HWV-1/EXP-HOT-WINDOW, PROBE-ORACLE-FUNNEL + Stage 1 + Stage 2 — all still wait on the operator's word. + ## 2026-08-05 — PROBE-ORACLE-FUNNEL Stage 0 (main thread; pre-register → build → run → record) - **Agent:** main thread only (no fleet). **D-id:** PROBE-ORACLE-FUNNEL-S0. diff --git a/.claude/board/LATEST_STATE.md b/.claude/board/LATEST_STATE.md index b445da0e0..ecea4b205 100644 --- a/.claude/board/LATEST_STATE.md +++ b/.claude/board/LATEST_STATE.md @@ -1,3 +1,15 @@ +## 2026-08-05 — lance 9 / lancedb 0.33 / DataFusion 54 / Rust 1.97.1 — the ecosystem bump, MEASURED then LANDED across 9 repos + +**Current pins:** `lance =9.0.0`, `lancedb =0.33.0`, `datafusion 54`, `arrow 58` (unmoved), `object_store 0.13.2` (unmoved), toolchain **1.97.1**. Plan: `.claude/plans/lance9-datafusion54-upgrade-probe-v1.md`. + +Started as a what-breaks probe, became the bump on the operator's "bump all now, fix after". Method that made it legible: the toolchain was tested ALONE on the OLD pins first, so a toolchain failure could never be confused with a dependency failure — it came back clean, making every later red attributable to the deps. **The entire break surface was one uniform DataFusion change** — `Any` moved from a method to a supertrait on seven traits — costing 12 `as_any` deletions and no call-site changes. + +**Two operator rulings landed:** `E-LANCE-IS-UPSTREAM-AUTHORITATIVE-1` (lance family from crates.io upstream, NEVER a fork; the `AdaWorldAPI/lance` + `/lancedb` repos exist but are deliberately not depended on — CLAUDE.md's P0 carve-out now says so, since it had named them as must-fork) and, from the Stage-0 funnel probe, `E-THE-LEGEND-IS-NOT-THE-GRAMMAR-1`. + +**Contract-inventory deltas:** none — the bump is pins + lint fixes. `lance-graph-ontology`'s 12 long-standing lints are cleared, which is what made `rust-toolchain.toml`'s own "bump when clippy is clean" precondition satisfiable. + +**Standing gates (unchanged):** D-BLW-5; D-HWV-1/EXP-HOT-WINDOW; PROBE-ORACLE-FUNNEL Stage 1 (rig LLM arm) and Stage 2 (NARS-34 Gadamer bag); `--features cycle-driver` CI arming. **Owed:** OGAR's 22 unswept crates; `blockly-rs`/`rig` still 1.95.0. + ## 2026-08-05 — PR #894 (MERGED `d7a6efc`) + OGAR #243/#244/#245 — the wishlist round-trip closes and the funnel is MEASURED One same-day arc across the repo boundary, crate-dependency-free by ruling: **#243** (OGAR) delivered the consumer wishlist handover (F-1 double-sampling finding, W-1..W-5); **#244** (OGAR, loco session) shipped W-1 (compose-then-check), W-2 (`FnSpec.name` — OQ-1 answered "in the spec"), W-4 (`telemetry::FunnelTally`), W-5 (split-contract doc), leaving only the W-3 NARS-34 mint operator-gated; **#245** (OGAR) + **#894** (here) ran PROBE-ORACLE-FUNNEL Stage 0 over that delivery — pre-registered E1–E4 all met (floor 0.5% / legend-constrained 2.5% / stack-aware 100%; E4 discrimination KILL passes at 99.5 points vs the 50 bar). Headline finding: `E-THE-LEGEND-IS-NOT-THE-GRAMMAR-1` — the legend-knowing arm landed at the FLOOR; ~all funnel selectivity is the stack discipline, so the gated Stage-1 LLM arm's prompt must teach the discipline, not just serialize the ~382-token legend. Plan: `.claude/plans/oracle-funnel-probe-v1.md`. diff --git a/.claude/board/PR_ARC_INVENTORY.md b/.claude/board/PR_ARC_INVENTORY.md index d4e309cde..573128e76 100644 --- a/.claude/board/PR_ARC_INVENTORY.md +++ b/.claude/board/PR_ARC_INVENTORY.md @@ -33,6 +33,17 @@ > - **Docs** — knowledge files produced (immutable) > - **Confidence (YYYY-MM-DD):** — the ONLY mutable field +## 2026-08-05 — the lance 9 / DataFusion 54 / Rust 1.97.1 cross-repo bump (9 repos; lance-graph PR pending, siblings MERGED) + +Siblings merged same day: OGAR #244/#245, ruff #93, stockfish-rs #14, woa-rs #179, a2ui-rs #19, MedCare-rs #351. lance-graph's own arc rides the branch below. + +- **Added.** `.claude/plans/lance9-datafusion54-upgrade-probe-v1.md` (the measured what-breaks assessment). Pin moves: `lance =7.0.0→=9.0.0`, `lancedb =0.30.0→=0.33.0`, `datafusion 53→54` across 10 manifests; toolchain 1.95.0→1.97.1 in `rust-toolchain.toml`, CI, and 3 Dockerfiles. +- **Locked.** `E-LANCE-IS-UPSTREAM-AUTHORITATIVE-1` (operator: the lance family is consumed from crates.io upstream, NEVER a fork — "too risky, upstream is authoritative"; **a fork's existence is not evidence of intent to depend on it**; CLAUDE.md's P0 regraded with a `⊘` carve-out because it had explicitly NAMED lance/lancedb as must-fork). **There is no `lancedb` 0.34–0.36 Rust crate** — the registry tops out at 0.33.0, which IS the lance-9 pairing; 0.36 is the PyPI package on an independent line. **The whole DF-54 break is one uniform change:** `Any` moved from a METHOD to a SUPERTRAIT on `TableSource`, `TableProvider`, `ScalarUDFImpl`, `CatalogProvider`, `SchemaProvider`, `AggregateUDFImpl`, `WindowUDFImpl` — 12 `as_any` deletions, zero call-site changes (`.as_any()` still resolves via the blanket impl; only explicit impls break, and only when their module actually compiles). arrow stays 58 and `object_store` 0.13.2 — only DataFusion crosses a major. +- **Deferred.** OGAR's 22 unswept crates + 1 unverified fix; `blockly-rs`/`rig` still on 1.95.0; `q2` deliberately left on its nightly pin; `-benches`/`symbiont`/`cognitive-stack`/`surreal_container`/`-python` unchecked; the `delta` feature still broken by deltalake 0.32's own drift (which is what quarantines the duplicate DF major to a non-default feature). +- **Docs.** The plan (§4 records a falsified prediction of mine: I read DF 54's `DynEq + DynHash` supertraits as a NEW requirement without diffing 53, which already had them — the tree already satisfied it. §6 corrects a parallel audit's "three lance majors", which was a pre-pin-bump state). + +**Confidence (2026-08-05):** measured, not predicted — 8 lance-graph crates clippy-clean under `-D warnings` (incl. `-callcenter` under both `query` and `query-lite`, after the default-feature pass proved a FALSE GREEN on feature-gated files), ndarray 2186 lib tests green. + ## 2026-08-05 — lance-graph #894 (MERGED `d7a6efc`) — PROBE-ORACLE-FUNNEL Stage 0: pre-registration, measured results, the legend-is-not-the-grammar finding **Head at merge:** `e4967e3` (1 commit). 4 files, docs/board only — the harness itself is OGAR-side (`ogar-loco` example, OGAR PR #245, merged same day), per the no-cross-dependency ruling in the merged wishlist handover (OGAR #243; delivery #244): candidates and legends cross as DATA, never as a crate edge. diff --git a/.claude/plans/lance9-datafusion54-upgrade-probe-v1.md b/.claude/plans/lance9-datafusion54-upgrade-probe-v1.md index 4cccd5551..1bbf5ef33 100644 --- a/.claude/plans/lance9-datafusion54-upgrade-probe-v1.md +++ b/.claude/plans/lance9-datafusion54-upgrade-probe-v1.md @@ -113,8 +113,45 @@ feature and costs a default build nothing. / `oxrdfxml` / `oxttl`** — a pre-existing feature-gating bug in the example, unrelated to either bump. -## 8. Not done here - -Remaining lance-dependent crates unchecked (`-benches`, `-ontology`, `symbiont`, -`cognitive-stack`, `surreal_container`, `-python`); no test run; no clippy at -workspace scope; the `delta` feature still broken by its own API drift. +## 8. Landed (updated after the operator ruled "bump all now, fix after") + +The probe became the bump. Nine repos' toolchains moved 1.95 → 1.97.1 +(rust-toolchain.toml + CI pins + Dockerfiles, together — a pin that CI +overrides is not a pin); `q2` was deliberately LEFT on its `nightly-2026-04-28` +(an external project whose nightly pin likely carries nightly features; breaking +it was not in scope). Merged: lance-graph #891-#895, OGAR #243/#244/#245, +ruff #93, stockfish-rs #14, woa-rs #179, a2ui-rs #19, MedCare-rs #351. + +**Docker drift found while in there (pre-existing, unrelated to either bump):** +lance-graph's and ndarray's Dockerfiles installed **1.94.0** — a version BEHIND +their own 1.95.0 `rust-toolchain.toml`, so the images had been building on an +older toolchain than the workspace declared. Both now on 1.97.1. `ruff`'s +Dockerfile is the drift-proof pattern and needed no edit: it COPYs +`rust-toolchain.toml` and installs `--default-toolchain none`, so it cannot +disagree with the pin. Worth adopting in the others. + +**Clippy fix-after, all green under 1.97.1:** `lance-graph`, `-catalog`, +`-contract`, `-ontology`, `-planner`, `-supervisor`, `cognitive-shader-driver`, +`-callcenter` (both `query` and `query-lite`). **The default-feature pass was a +FALSE GREEN** — `vsa_udfs` and `transcode/ontology_table` are feature-gated, so +the first run never compiled the very files carrying the `as_any` impls. Only +explicit impls break, and only when their module is actually compiled; that is +exactly how a gated module can look fine. ndarray: 6 mechanical lints fixed, +**2186 lib tests pass, 0 fail**. + +The 12 pre-existing `lance-graph-ontology` lints are gone (5 oxrdf deprecations ++ 6 doc-indentation + 1 in a paired file), which is what made +`rust-toolchain.toml`'s own precondition — "bump when workspace clippy passes +clean" — satisfiable rather than aspirational. Note the bump ran AHEAD of that +gate on the operator's explicit call; the fix-after discharged it. + +## 9. Still open + +- OGAR: 22 crates unreached by the lint sweep + one unverified + `clickhouse-ddl` fix (resume worker dispatched). +- `blockly-rs` and `rig` still pin 1.95.0 — outside the sweep. +- Unchecked lance-dependent crates: `-benches`, `symbiont`, `cognitive-stack`, + `surreal_container`, `-python`. No workspace-scope clippy (per the `-p`-only + rule). The `delta` feature stays broken by deltalake 0.32's own API drift + (`TODO(lance-bump-delta)`), which is what quarantines the duplicate + DataFusion major. From 626bb286077085772bb0fec62f682d2ce68c7ec2 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 15:55:29 +0000 Subject: [PATCH 08/11] Fix the one CI-mandatory 1.97 lint: clippy::some_filter in deepnsm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI clippy went red on ONE error, and it corrects something I said earlier in this arc: I reported 1.97.1 as adding "no new lint surface". It does — clippy::some_filter is new in 1.97, and this is the proof. My claim was true only of the crates I had scoped, which is a narrower statement than the one I made. Why the -p sweep never saw it: deepnsm is workspace-EXCLUDED, so no -p run reaches it; CI checks it by --manifest-path. Reading the CI config rather than guessing also showed the gate is TIERED — lance-graph-contract, deepnsm and deepnsm-v2 are MANDATORY while lance-graph and bgz-tensor are advisory — so only the mandatory set had to move. Verified all three mandatory manifests: 0 errors; deepnsm tests 217 + 4 + 8 + 2 green. The fix is simpler than clippy's own suggestion and equivalent: animate.or(Some(false).filter(|_| animate.is_none())) is just animate.or(Some(false)). Option::or already discards its argument when self is Some, so the filter's predicate could only ever be true on the None branch — where the filter is a no-op. Clippy proposed animate.is_none().then_some(false), which is also correct but keeps a condition that cannot change the result. Recorded, NOT fixed (deliberately): the ungated/advisory excluded crates carry pre-existing clippy debt — bgz17 27, lance-graph-codec-research 55, bgz-tensor 10 (advisory) — mostly needless_range_loop. CI does not gate bgz17 or codec-research at all, and the workflow's own comments already describe ~91 pre-existing lance-graph violations as debt to be paid down over time. Fixing 92 unrelated lints inside a dependency-bump PR would bury the bump; they belong in their own pass. --- crates/deepnsm/examples/spo_anaphora_nibble.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/deepnsm/examples/spo_anaphora_nibble.rs b/crates/deepnsm/examples/spo_anaphora_nibble.rs index 18f7e0444..559aa99ec 100644 --- a/crates/deepnsm/examples/spo_anaphora_nibble.rs +++ b/crates/deepnsm/examples/spo_anaphora_nibble.rs @@ -155,7 +155,11 @@ fn resolve(stream: &[&str], pos: usize, p: Pron) -> Option { nf.plural == plural && want_anim.is_none_or(|a| nf.animate == a) }; // pass 1: strict animacy (it -> inanimate) - let want = animate.or(Some(false).filter(|_| animate.is_none())); + // Keep the pronoun's own animacy when it has one; an unmarked pronoun + // (`it`) starts as inanimate. Same value as the previous + // `.or(Some(false).filter(|_| animate.is_none()))`, without evaluating a + // filter whose predicate can only be true on the None branch. + let want = animate.or(Some(false)); for &k in &cands { if let Some(nf) = noun_features(stream[k]) { if agrees(&nf, want) { From 8fcd7b027eda36a2c5442cb15278f27cb44434dc Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 16:00:16 +0000 Subject: [PATCH 09/11] bgz-tensor: clippy clean under 1.97.1 (Sonnet, orchestrator-verified) All 10 reported errors were ONE cluster - a single clippy::doc_lazy_continuation paragraph in adaptive_codec.rs that clippy counted nine times. A blank /// line ending the doc list cleared every one of them, so the raw error count overstated the work by ~9x. Same twin-lint family that recurred in lance-graph-ontology: prose following a doc list needs a blank line to END the list, never indentation. Nothing touched arithmetic, quantization, table indexing or iteration order - which matters here, because this crate's whole premise is that a table lookup reproduces a computed distance. No #[expect] was needed and no SAFETY comment moved. Re-verified centrally: 0 clippy errors, 207 tests pass. fmt also reflowed two files (line-wrapping only). Committed alone while two sibling agents are still live-editing crates/bgz17 and crates/lance-graph-codec-research - staging their half-finished edits would land a broken intermediate state. --- .claude/exec-runs/sonnet-bgz-tensor-clippy.md | 38 ++++++++++++++ .../examples/probe_l5_fisherz_amortization.rs | 49 +++++++++++++++---- crates/bgz-tensor/src/adaptive_codec.rs | 1 + crates/bgz-tensor/src/matryoshka.rs | 4 +- 4 files changed, 82 insertions(+), 10 deletions(-) create mode 100644 .claude/exec-runs/sonnet-bgz-tensor-clippy.md diff --git a/.claude/exec-runs/sonnet-bgz-tensor-clippy.md b/.claude/exec-runs/sonnet-bgz-tensor-clippy.md new file mode 100644 index 000000000..2f8ab3944 --- /dev/null +++ b/.claude/exec-runs/sonnet-bgz-tensor-clippy.md @@ -0,0 +1,38 @@ +# bgz-tensor clippy sweep (Rust 1.97.1) + +Scope: `crates/bgz-tensor/` only, driven via `--manifest-path` (workspace-excluded crate). + +## Fixes + +| File:line | Lint | Fix | +|---|---|---| +| `src/adaptive_codec.rs:681-682` | `clippy::doc_lazy_continuation` (9 errors, lines 682-690) | Inserted a blank `///` line between the end of the 2-item doc list and the following prose paragraph, so the paragraph is no longer read as an unindented list-item continuation. No wording changed. | + +That single blank-line insertion cleared all 9 reported errors (they were one multi-line diagnostic cluster on the same paragraph). + +## Skipped / `#[expect]`-ed + +None needed — no lints touched arithmetic, quantization, table indexing, or iteration order (the AttentionSemiring / u16 distance table / u8 compose table / HHTL cascade code was already clean on this toolchain). + +## Post-fix `cargo fmt` + +Ran `cargo +1.97.1 fmt --manifest-path crates/bgz-tensor/Cargo.toml` per instructions. It reformatted two files beyond the one I hand-edited: +- `examples/probe_l5_fisherz_amortization.rs` — pure line-wrapping of long method chains / `println!` argument lists (no logic change). +- `src/matryoshka.rs` — minor formatting (2 lines). + +Re-ran clippy after fmt: still 0 errors, 0 warnings. + +## Test result + +``` +test result: ok. 207 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 7.98s +Doc-tests bgz_tensor: 0 passed; 0 failed +``` + +## Real bugs exposed by lints + +None — the crate was already clippy-clean except for the single doc-comment formatting issue above, which was cosmetic (rustdoc rendering), not a code-correctness issue. + +## Disk + +Free space stayed well above the 4 GB floor throughout (28G → 29G → 8.6G... wait, actual readings: 10G free at start, 8.6G free after fmt — still comfortably above floor). No stop triggered. diff --git a/crates/bgz-tensor/examples/probe_l5_fisherz_amortization.rs b/crates/bgz-tensor/examples/probe_l5_fisherz_amortization.rs index 1293c1a7a..fe6ee5a07 100644 --- a/crates/bgz-tensor/examples/probe_l5_fisherz_amortization.rs +++ b/crates/bgz-tensor/examples/probe_l5_fisherz_amortization.rs @@ -151,7 +151,9 @@ fn load_rows(shard: &str) -> Vec<[f32; DIM]> { } fn main() { - let shard = std::env::args().nth(1).unwrap_or_else(|| DEFAULT_SHARD.to_string()); + let shard = std::env::args() + .nth(1) + .unwrap_or_else(|| DEFAULT_SHARD.to_string()); let rows = load_rows(&shard); println!("shard: {shard}\nusable rows: {}\n", rows.len()); assert!( @@ -175,7 +177,9 @@ fn main() { // ═══════════════════════════════════════════════════════════════════ println!("═══ PART A — L5 γ-fold (euler_gamma_fold / euler_gamma_unfold) ═══\n"); - let fold_idx: Vec = (0..N_FOLD_MEMBERS).map(|_| draw(&mut rng, &mut taken)).collect(); + let fold_idx: Vec = (0..N_FOLD_MEMBERS) + .map(|_| draw(&mut rng, &mut taken)) + .collect(); let members: Vec> = fold_idx.iter().map(|&i| rows[i].to_vec()).collect(); let t0 = Instant::now(); @@ -199,7 +203,10 @@ fn main() { correct_pearsons.push(r); } let mean_correct = correct_pearsons.iter().sum::() / N_FOLD_MEMBERS as f64; - let min_correct = correct_pearsons.iter().cloned().fold(f64::INFINITY, f64::min); + let min_correct = correct_pearsons + .iter() + .cloned() + .fold(f64::INFINITY, f64::min); let mean_unfold_ns = unfold_ns_samples.iter().sum::() / N_FOLD_MEMBERS as f64; // Falsifier: unfold with a WRONG member_index — ask for (i+1)%N and @@ -213,7 +220,10 @@ fn main() { let orig_f32 = StackedN::from_f32(member, SPD).hydrate_f32(); let r = pearson( &orig_f32.iter().map(|&v| v as f64).collect::>(), - &recovered_wrong.iter().map(|&v| v as f64).collect::>(), + &recovered_wrong + .iter() + .map(|&v| v as f64) + .collect::>(), ); wrong_pearsons.push(r); } @@ -236,11 +246,18 @@ fn main() { ); println!( "wrong-index recovery: mean ρ = {mean_wrong:.4} (per-member: {:?})", - wrong_pearsons.iter().map(|v| format!("{v:.4}")).collect::>() + wrong_pearsons + .iter() + .map(|v| format!("{v:.4}")) + .collect::>() ); println!( "falsifier margin (correct − wrong) = {margin:.4} → {}", - if falsifier_fires { "FIRES (container addresses members)" } else { "DOES-NOT-FIRE (no addressing signal)" } + if falsifier_fires { + "FIRES (container addresses members)" + } else { + "DOES-NOT-FIRE (no addressing signal)" + } ); println!( "bytes: raw {raw_member_bytes} B vs folded {folded_bytes} B → ratio_vs_raw {ratio_vs_raw:.2}×, FoldedFamily::compression_ratio() = {ratio_family_reported:.2}×" @@ -299,7 +316,11 @@ fn main() { ); println!( "gate (Spearman ≥ 0.9990, u8-lane): {}\n", - if cert_pass { "PASS" } else { "FAIL (real measured number, not fudged)" } + if cert_pass { + "PASS" + } else { + "FAIL (real measured number, not fudged)" + } ); // Per-read cost: tight loop of LOOKUP_ITERS lookup_i8 calls. @@ -357,7 +378,13 @@ fn main() { println!("\n═══ SUMMARY ═══\n"); println!( "{:<8} | {:>12} | {:>13} | {:>12} | {:>13} | {:>17} | {:>9} | falsifier", - "lane", "build_once", "product_bytes", "per_read_ns", "float_alt_ns", "break_even_reads", "fidelity" + "lane", + "build_once", + "product_bytes", + "per_read_ns", + "float_alt_ns", + "break_even_reads", + "fidelity" ); println!("{}", "-".repeat(112)); println!( @@ -369,7 +396,11 @@ fn main() { "N/A", "N/A", mean_correct, - if falsifier_fires { "FIRES" } else { "DOES-NOT-FIRE" } + if falsifier_fires { + "FIRES" + } else { + "DOES-NOT-FIRE" + } ); println!( "{:<8} | {:>9.0} ns | {:>10} B | {:>9.2} ns | {:>10.2} ns | {:>17.1} | ρ={:>6.4} | {}", diff --git a/crates/bgz-tensor/src/adaptive_codec.rs b/crates/bgz-tensor/src/adaptive_codec.rs index afe6d8f38..985a8e3ea 100644 --- a/crates/bgz-tensor/src/adaptive_codec.rs +++ b/crates/bgz-tensor/src/adaptive_codec.rs @@ -679,6 +679,7 @@ mod probe_wh_mag { /// quantization entirely, stored exact (`classify_rows_by_lfd`); /// 2. a CENTROID RESIDUAL — WH runs on `row - nearest_centroid`, not /// on the raw row (`encode()` step 3: `hadamard_rotate(&residual)`). + /// /// This nested module (kept a child of `probe_wh_mag` so it can reuse /// its private generators/cascades via `super::*` — the original /// `probe_wh_mag_class_ratios` test above is completely untouched and diff --git a/crates/bgz-tensor/src/matryoshka.rs b/crates/bgz-tensor/src/matryoshka.rs index 1eea28a06..c7e5515f5 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 => { From f54566b5a43ac1aa7fea90508642a632ff5228c5 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 16:02:20 +0000 Subject: [PATCH 10/11] bgz17: clippy clean under 1.97.1 (Sonnet, orchestrator-verified) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ~30 errors → 0 across 15 files. Dominated by needless_range_loop (18 of them), plus 3 unused imports, a non_snake_case test fn, assertions_on_constants, manual_div_ceil, identity_op, unused_variables, and one doc_lazy_continuation the survey had missed. The correctness fence held where it mattered: every needless_range_loop fix used enumerate() with the index still bound where the body needs it, so index ORDER is preserved and no palette/SIMD kernel semantics moved. No public API changed — PaletteMatrix, PaletteCsr, Base17, batch_palette_distance, TypedPaletteGraph and the container pack/unpack surface are consumed by other crates, so a signature change would have broken callers. No unsafe block touched, so no SAFETY comment moved. Re-verified centrally rather than on the worker's word: 0 clippy errors, 134 tests pass (the crate has grown past the ~121 in its docs). A real defect the lints exposed, recorded NOT fixed: in src/palette.rs::test_sigma_band_no_empty the inner loop's variable is unused in the body, so the nested loop re-asserts the same i-only condition instead of adding coverage. That is a vacuous-assertion instance of exactly the kind CLAUDE.md's falsifiability rule names — it is pre-existing and rewriting test logic was out of scope for a lint sweep, but it wants a real second axis, not an enumerate(). --- .claude/exec-runs/sonnet-bgz17-clippy.md | 58 +++++++++++++++++++ .../examples/probe_base17_fold_ceiling.rs | 1 + .../bgz17/examples/probe_foveated_descent.rs | 4 +- crates/bgz17/src/base17.rs | 2 +- crates/bgz17/src/bridge.rs | 5 +- crates/bgz17/src/container.rs | 27 ++++++--- crates/bgz17/src/distance_matrix.rs | 4 +- crates/bgz17/src/layered.rs | 4 +- crates/bgz17/src/palette.rs | 6 +- crates/bgz17/src/palette_matrix.rs | 4 +- crates/bgz17/src/palette_semiring.rs | 12 ++-- crates/bgz17/src/prefetch.rs | 4 +- crates/bgz17/src/rabitq_compat.rs | 10 ++-- crates/bgz17/src/simd.rs | 4 +- crates/bgz17/src/tripartite.rs | 4 +- crates/bgz17/src/typed_palette_graph.rs | 4 +- 16 files changed, 109 insertions(+), 44 deletions(-) create mode 100644 .claude/exec-runs/sonnet-bgz17-clippy.md diff --git a/.claude/exec-runs/sonnet-bgz17-clippy.md b/.claude/exec-runs/sonnet-bgz17-clippy.md new file mode 100644 index 000000000..7e52843f9 --- /dev/null +++ b/.claude/exec-runs/sonnet-bgz17-clippy.md @@ -0,0 +1,58 @@ +# bgz17 clippy cleanup — Sonnet run + +Toolchain: `+1.97.1`. Command: `cargo +1.97.1 clippy --manifest-path crates/bgz17/Cargo.toml --all-targets -- -D warnings`. +Result: **0 errors, 0 warnings** (started at ~30 errors across lib/test/example targets). + +## Fixes + +| File:line | Lint | Fix | +|---|---|---| +| `src/bridge.rs:270-272` (tests mod) | `unused_imports` | Removed unused `use crate::base17::Base17`, `crate::distance_matrix::SpoDistanceMatrices`, `crate::palette::Palette` (kept `crate::scope::Bgz17Scope`, which is used). | +| `src/bridge.rs:453` | `non_snake_case` | Renamed test fn `test_scent_NOT_metric_safe` → `test_scent_not_metric_safe`. Test-only symbol, no public API impact. | +| `src/container.rs:302` (`pack_spo_crystal`) | `needless_range_loop` | `for w in W_SPO_CRYSTAL_START..=W_SPO_CRYSTAL_END { container[w] = 0 }` → `for word in container.iter_mut().take(END+1).skip(START) { *word = 0 }`. Same zeroing order preserved. | +| `src/container.rs:305` (`pack_spo_crystal`) | `needless_range_loop` | `for i in 0..n { triples[i] ... }` → `for (i, triple) in triples.iter().enumerate().take(n)`; index `i` still used for `w_off` computation into `container`. | +| `src/container.rs:386` (`pack_extended_edges`) | `needless_range_loop` | Same zero-region pattern as above (`W_EXT_EDGES_START..=END`). | +| `src/container.rs:430` (`compute_wide_checksum`) | `needless_range_loop` | `for i in 128..254 { xor ^= container[i] }` → `for word in container.iter().take(254).skip(128) { xor ^= word }`. | +| `src/container.rs:787` (test) | `assertions_on_constants` | `assert!((W_BGZ17_ANNEX_END - W_BGZ17_ANNEX_START + 1) * 8 >= SpoBase17::BYTE_SIZE)` → wrapped in `const _: () = assert!(...)` (compile-time, same guarantee, all operands are const). | +| `src/palette_semiring.rs:130` (`premultiplied_over`) | `needless_range_loop` | `for d in 0..BASE_DIM { acc[d] += ... }` → `for (d, acc_d) in acc.iter_mut().enumerate().take(BASE_DIM) { *acc_d += ... }`. | +| `src/palette_semiring.rs:147,162` (tests) | `needless_range_loop` | Same `dims[d] = f(i,d)` build pattern → `for (d, dim) in dims.iter_mut().enumerate().take(BASE_DIM) { *dim = f(i,d) }`. `d` still used inside the formula via the enumerate index. | +| `src/rabitq_compat.rs:91-97` (`OrthogonalMatrix::rotate`) | `needless_range_loop` (×2, nested) | Outer `for i in 0..d` → `for (i, out_i) in out.iter_mut().enumerate().take(d)`; inner `for j in 0..d` → `for (j, &input_j) in input.iter().enumerate().take(d)`. `i`/`j` still used to index `self.data[i*d+j]`. | +| `src/rabitq_compat.rs:127` | `manual_div_ceil` | `(d + 63) / 64` → `d.div_ceil(64)`. Same value, no behaviour change. | +| `src/palette.rs:707` (test) | `unused_variables` | Inner loop var `j` genuinely unused in loop body → prefixed `_j` per lint's own suggestion. Noted below as a pre-existing weak/vacuous test, left as-is per scope (no test-logic rewrite). | +| `src/palette.rs:592` (test helper `make_patterns`) | `needless_range_loop` | Same `dims[d] = f(i,d)` pattern as above. | +| `src/base17.rs:432` (test) | `identity_op` | `assert_eq!(d_mant, 100 * 1)` → `assert_eq!(d_mant, 100); // mantissa weight is ×1` (kept the intent as a comment instead of the no-op literal). | +| `src/distance_matrix.rs:141` (test helper) | `needless_range_loop` | Same `dims[d]=f(i,d)` pattern. | +| `src/layered.rs:202` (test helper) | `needless_range_loop` | Same pattern. | +| `src/palette_matrix.rs:243` (test helper) | `needless_range_loop` | Same pattern (BASE_DIM variant). | +| `src/prefetch.rs:324` (test helper) | `needless_range_loop` | Same pattern. | +| `src/simd.rs:317` (test helper) | `needless_range_loop` | Same pattern (BASE_DIM variant). | +| `src/tripartite.rs:144` (test helper) | `needless_range_loop` | Same pattern (adds `seed*53` term; unaffected). | +| `src/typed_palette_graph.rs:141` (test helper) | `needless_range_loop` | Same pattern (BASE_DIM variant). | +| `examples/probe_foveated_descent.rs:214` | `needless_range_loop` | `for d in 0..BASE_DIM { dims[d] = f(hp.coarse[c1].dims[d], hp.coarse[c2].dims[d]) }` → `for (d, dim) in dims.iter_mut().enumerate().take(BASE_DIM) { *dim = f(hp.coarse[c1].dims[d], hp.coarse[c2].dims[d]) }`. `d` still used to index the two read-only source arrays. | +| `examples/probe_base17_fold_ceiling.rs:13-17` (doc comment) | `doc_lazy_continuation` | Not in the pre-scoped known list (found live). Two-item `//! -` bullet list ran directly into unindented prose on the next lines with no blank-line separator. Inserted a blank `//!` line after the second bullet to end the list before the paragraph. No code/behaviour change, doc-comment text unchanged otherwise. | + +All fixes are index-order-preserving (no kernel arithmetic/bit-pattern/iteration-order change) and touch no public signatures — `PaletteMatrix`, `PaletteCsr`, `Base17`, `batch_palette_distance`, `TypedPaletteGraph`, container pack/unpack APIs are untouched. + +## Skipped + +None. Every reported lint was fixable within the "fix only what clippy reports, no API change" constraint. + +## Real bug exposed? + +No functional bug found. One test (`src/palette.rs::test_sigma_band_no_empty`) has an inner loop variable (`j`) that was never used in the loop body — the nested loop just repeats the same `i`-only assertion `(palette.len() - i - 1)` extra times without adding coverage. This is a pre-existing **weak/vacuous-adjacent test structure** (the assertion only depends on `i`, not `j`), not a compile-time bug — flagged here per the falsifiability-rule spirit in CLAUDE.md, but NOT rewritten since the task scope is lint-fix-only and rewriting test semantics was out of bounds for this run. + +## Final test result + +``` +cargo +1.97.1 test --manifest-path crates/bgz17/Cargo.toml +test result: ok. 134 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 17.66s +Doc-tests bgz17: 0 passed; 0 failed +``` + +(134 > the ~121 baseline mentioned in the task brief — the crate has grown since that count was taken; all pass.) + +## fmt + +`cargo +1.97.1 fmt --manifest-path crates/bgz17/Cargo.toml` ran clean; reformatted the 15 files touched by the clippy fixes above (whitespace/wrapping only, re-verified clippy stayed 0 errors after fmt). + +Disk headroom stayed at 8.5-10 GB free throughout (never approached the 4 GB guard). diff --git a/crates/bgz17/examples/probe_base17_fold_ceiling.rs b/crates/bgz17/examples/probe_base17_fold_ceiling.rs index 2b9f4d986..beffe7c12 100644 --- a/crates/bgz17/examples/probe_base17_fold_ceiling.rs +++ b/crates/bgz17/examples/probe_base17_fold_ceiling.rs @@ -12,6 +12,7 @@ //! against TWO ground truths on the same real pairs: //! - `1 - cosine` on the full-dimension f32 rows (the semantic reference), and //! - `L1` on the full-dimension f32 rows (the metric-matched reference). +//! //! Reporting both separates "the FOLD loses information" from "L1-on-means is //! the wrong metric for a cosine question" — two different defects with two //! different fixes. diff --git a/crates/bgz17/examples/probe_foveated_descent.rs b/crates/bgz17/examples/probe_foveated_descent.rs index 74f1298be..4b9620d9a 100644 --- a/crates/bgz17/examples/probe_foveated_descent.rs +++ b/crates/bgz17/examples/probe_foveated_descent.rs @@ -211,11 +211,11 @@ fn boundary_queries( let c2 = nearest_other_coarse(hp, c1); for _ in 0..per_pair { let mut dims = [0i16; BASE_DIM]; - for d in 0..BASE_DIM { + for (d, dim) in dims.iter_mut().enumerate().take(BASE_DIM) { let a = hp.coarse[c1].dims[d] as i32; let b = hp.coarse[c2].dims[d] as i32; let mid = (a + b) / 2; - dims[d] = (mid as i16).saturating_add(rng.jitter(50)); + *dim = (mid as i16).saturating_add(rng.jitter(50)); } queries.push(Base17 { dims }); } diff --git a/crates/bgz17/src/base17.rs b/crates/bgz17/src/base17.rs index 1cdaec52b..30d87c559 100644 --- a/crates/bgz17/src/base17.rs +++ b/crates/bgz17/src/base17.rs @@ -429,7 +429,7 @@ mod tests { // Sign diff should be 20× the mantissa diff assert_eq!(d_sign, 100 * 20); - assert_eq!(d_mant, 100 * 1); + assert_eq!(d_mant, 100); // mantissa weight is ×1 assert!( d_sign > d_mant * 10, "sign should dominate: {} vs {}", diff --git a/crates/bgz17/src/bridge.rs b/crates/bgz17/src/bridge.rs index 2055702c3..c2eb77be6 100644 --- a/crates/bgz17/src/bridge.rs +++ b/crates/bgz17/src/bridge.rs @@ -267,9 +267,6 @@ pub fn hhtl_leaf_bgz17( #[cfg(test)] mod tests { use super::*; - use crate::base17::Base17; - use crate::distance_matrix::SpoDistanceMatrices; - use crate::palette::Palette; use crate::scope::Bgz17Scope; fn random_plane(seed: u64) -> Vec { @@ -453,7 +450,7 @@ mod tests { } #[test] - fn test_scent_NOT_metric_safe() { + fn test_scent_not_metric_safe() { // Scent MAY violate triangle inequality (Boolean lattice constraint). // This test documents the expectation — it's not a bug, it's why // Scent must only be used as a heuristic pre-filter. diff --git a/crates/bgz17/src/container.rs b/crates/bgz17/src/container.rs index 374995cc7..2b9589914 100644 --- a/crates/bgz17/src/container.rs +++ b/crates/bgz17/src/container.rs @@ -299,11 +299,15 @@ impl CrystalTriple { pub fn pack_spo_crystal(container: &mut [u64; CONTAINER_WORDS], triples: &[CrystalTriple]) { let n = triples.len().min(CrystalTriple::MAX_CRYSTAL_TRIPLES); // Zero the region first - for w in W_SPO_CRYSTAL_START..=W_SPO_CRYSTAL_END { - container[w] = 0; + for word in container + .iter_mut() + .take(W_SPO_CRYSTAL_END + 1) + .skip(W_SPO_CRYSTAL_START) + { + *word = 0; } - for i in 0..n { - let bytes = triples[i].to_bytes(); + for (i, triple) in triples.iter().enumerate().take(n) { + let bytes = triple.to_bytes(); // Each triple is 16 bytes = 2 words let w_off = i * 2; container[W_SPO_CRYSTAL_START + w_off] = @@ -383,8 +387,12 @@ impl InlineEdge { pub fn pack_extended_edges(container: &mut [u64; CONTAINER_WORDS], edges: &[InlineEdge]) { let n_words = (W_EXT_EDGES_END - W_EXT_EDGES_START) + 1; // 16 // Zero the region - for w in W_EXT_EDGES_START..=W_EXT_EDGES_END { - container[w] = 0; + for word in container + .iter_mut() + .take(W_EXT_EDGES_END + 1) + .skip(W_EXT_EDGES_START) + { + *word = 0; } for wi in 0..n_words { let base = wi * 4; @@ -427,8 +435,8 @@ pub fn unpack_extended_edges(container: &[u64; CONTAINER_WORDS]) -> Vec u64 { let mut xor = 0u64; - for i in 128..254 { - xor ^= container[i]; + for word in container.iter().take(254).skip(128) { + xor ^= word; } xor } @@ -776,7 +784,8 @@ mod tests { assert_eq!(CONTAINER_BYTES, 2048); assert_eq!(CONTAINER_WORDS, 256); // Base17 annex: 13 words = 104 bytes ≥ 102 bytes (SpoBase17) - assert!((W_BGZ17_ANNEX_END - W_BGZ17_ANNEX_START + 1) * 8 >= SpoBase17::BYTE_SIZE); + const _: () = + assert!((W_BGZ17_ANNEX_END - W_BGZ17_ANNEX_START + 1) * 8 >= SpoBase17::BYTE_SIZE); // Palette word fits in 1 word assert_eq!(W_PALETTE_PACK, W_BGZ17_ANNEX_END + 1); } diff --git a/crates/bgz17/src/distance_matrix.rs b/crates/bgz17/src/distance_matrix.rs index 44d387f64..ff851b2f6 100644 --- a/crates/bgz17/src/distance_matrix.rs +++ b/crates/bgz17/src/distance_matrix.rs @@ -138,8 +138,8 @@ mod tests { let entries = (0..k) .map(|i| { let mut dims = [0i16; 17]; - for d in 0..17 { - dims[d] = ((i * 97 + d * 31) % 512) as i16 - 256; + for (d, dim) in dims.iter_mut().enumerate() { + *dim = ((i * 97 + d * 31) % 512) as i16 - 256; } Base17 { dims } }) diff --git a/crates/bgz17/src/layered.rs b/crates/bgz17/src/layered.rs index ba5fb123b..084c25dd8 100644 --- a/crates/bgz17/src/layered.rs +++ b/crates/bgz17/src/layered.rs @@ -199,8 +199,8 @@ mod tests { .map(|i| { let make_base = |seed: usize| { let mut dims = [0i16; 17]; - for d in 0..17 { - dims[d] = ((seed * 97 + d * 31) % 512) as i16 - 256; + for (d, dim) in dims.iter_mut().enumerate() { + *dim = ((seed * 97 + d * 31) % 512) as i16 - 256; } Base17 { dims } }; diff --git a/crates/bgz17/src/palette.rs b/crates/bgz17/src/palette.rs index 172692216..a8ad74b97 100644 --- a/crates/bgz17/src/palette.rs +++ b/crates/bgz17/src/palette.rs @@ -589,8 +589,8 @@ mod tests { (0..n) .map(|i| { let mut dims = [0i16; 17]; - for d in 0..17 { - dims[d] = ((i * 7 + d * 13) % 256) as i16 - 128; + for (d, dim) in dims.iter_mut().enumerate() { + *dim = ((i * 7 + d * 13) % 256) as i16 - 128; } Base17 { dims } }) @@ -704,7 +704,7 @@ mod tests { assert_eq!(palette.len(), 16); // All entries should be distinct (from different percentile bands) for i in 0..palette.len() { - for j in (i + 1)..palette.len() { + for _j in (i + 1)..palette.len() { // Not necessarily distinct, but they come from different positions // At minimum, palette shouldn't be empty assert!(!palette.entries[i].dims.iter().all(|&d| d == 0) || i == 0); diff --git a/crates/bgz17/src/palette_matrix.rs b/crates/bgz17/src/palette_matrix.rs index f89efc8df..e094a339c 100644 --- a/crates/bgz17/src/palette_matrix.rs +++ b/crates/bgz17/src/palette_matrix.rs @@ -240,8 +240,8 @@ mod tests { let entries = (0..k) .map(|i| { let mut dims = [0i16; BASE_DIM]; - for d in 0..BASE_DIM { - dims[d] = ((i * 97 + d * 31) % 512) as i16 - 256; + for (d, dim) in dims.iter_mut().enumerate().take(BASE_DIM) { + *dim = ((i * 97 + d * 31) % 512) as i16 - 256; } Base17 { dims } }) diff --git a/crates/bgz17/src/palette_semiring.rs b/crates/bgz17/src/palette_semiring.rs index c2deb0637..a374a391e 100644 --- a/crates/bgz17/src/palette_semiring.rs +++ b/crates/bgz17/src/palette_semiring.rs @@ -127,8 +127,8 @@ pub fn premultiplied_over(palette: &Palette, contribs: &[(u8, u16)]) -> [i64; BA let mut acc = [0i64; BASE_DIM]; for &(code, weight) in contribs { let entry = &palette.entries[code as usize]; - for d in 0..BASE_DIM { - acc[d] += weight as i64 * entry.dims[d] as i64; + for (d, acc_d) in acc.iter_mut().enumerate().take(BASE_DIM) { + *acc_d += weight as i64 * entry.dims[d] as i64; } } acc @@ -144,8 +144,8 @@ mod tests { let entries = (0..k) .map(|i| { let mut dims = [0i16; BASE_DIM]; - for d in 0..BASE_DIM { - dims[d] = ((i * 97 + d * 31) % 512) as i16 - 256; + for (d, dim) in dims.iter_mut().enumerate().take(BASE_DIM) { + *dim = ((i * 97 + d * 31) % 512) as i16 - 256; } Base17 { dims } }) @@ -159,8 +159,8 @@ mod tests { let mut entries: Vec = (0..31) .map(|i| { let mut dims = [0i16; BASE_DIM]; - for d in 0..BASE_DIM { - dims[d] = ((i * 97 + d * 31) % 512) as i16 - 256; + for (d, dim) in dims.iter_mut().enumerate().take(BASE_DIM) { + *dim = ((i * 97 + d * 31) % 512) as i16 - 256; } Base17 { dims } }) diff --git a/crates/bgz17/src/prefetch.rs b/crates/bgz17/src/prefetch.rs index 09893037b..ebdbcd17d 100644 --- a/crates/bgz17/src/prefetch.rs +++ b/crates/bgz17/src/prefetch.rs @@ -321,8 +321,8 @@ mod tests { .map(|i| { let make_base = |seed: usize| { let mut dims = [0i16; 17]; - for d in 0..17 { - dims[d] = ((seed * 97 + d * 31) % 512) as i16 - 256; + for (d, dim) in dims.iter_mut().enumerate() { + *dim = ((seed * 97 + d * 31) % 512) as i16 - 256; } Base17 { dims } }; diff --git a/crates/bgz17/src/rabitq_compat.rs b/crates/bgz17/src/rabitq_compat.rs index 3255a1905..040e87af5 100644 --- a/crates/bgz17/src/rabitq_compat.rs +++ b/crates/bgz17/src/rabitq_compat.rs @@ -88,12 +88,12 @@ impl OrthogonalMatrix { let d = self.dim; assert!(input.len() >= d); let mut out = vec![0.0f32; d]; - for i in 0..d { + for (i, out_i) in out.iter_mut().enumerate().take(d) { let mut sum = 0.0f32; - for j in 0..d { - sum += self.data[i * d + j] * input[j]; + for (j, &input_j) in input.iter().enumerate().take(d) { + sum += self.data[i * d + j] * input_j; } - out[i] = sum; + *out_i = sum; } out } @@ -124,7 +124,7 @@ impl RaBitQEncoding { let rotated = rotation.rotate(&normalized); // Step 4: sign-quantize → binary - let nwords = (d + 63) / 64; + let nwords = d.div_ceil(64); let mut binary = vec![0u64; nwords]; for (i, &v) in rotated.iter().enumerate() { if v >= 0.0 { diff --git a/crates/bgz17/src/simd.rs b/crates/bgz17/src/simd.rs index ab996746f..0c64e2256 100644 --- a/crates/bgz17/src/simd.rs +++ b/crates/bgz17/src/simd.rs @@ -314,8 +314,8 @@ mod tests { let entries = (0..k) .map(|i| { let mut dims = [0i16; BASE_DIM]; - for d in 0..BASE_DIM { - dims[d] = ((i * 97 + d * 31) % 512) as i16 - 256; + for (d, dim) in dims.iter_mut().enumerate().take(BASE_DIM) { + *dim = ((i * 97 + d * 31) % 512) as i16 - 256; } Base17 { dims } }) diff --git a/crates/bgz17/src/tripartite.rs b/crates/bgz17/src/tripartite.rs index 6c450a244..cef2aea35 100644 --- a/crates/bgz17/src/tripartite.rs +++ b/crates/bgz17/src/tripartite.rs @@ -141,8 +141,8 @@ mod tests { let entries = (0..k) .map(|i| { let mut dims = [0i16; 17]; - for d in 0..17 { - dims[d] = ((i * 97 + d * 31 + seed * 53) % 512) as i16 - 256; + for (d, dim) in dims.iter_mut().enumerate() { + *dim = ((i * 97 + d * 31 + seed * 53) % 512) as i16 - 256; } Base17 { dims } }) diff --git a/crates/bgz17/src/typed_palette_graph.rs b/crates/bgz17/src/typed_palette_graph.rs index adfd43981..60846c6bd 100644 --- a/crates/bgz17/src/typed_palette_graph.rs +++ b/crates/bgz17/src/typed_palette_graph.rs @@ -138,8 +138,8 @@ mod tests { let entries = (0..k) .map(|i| { let mut dims = [0i16; BASE_DIM]; - for d in 0..BASE_DIM { - dims[d] = ((i * 97 + d * 31) % 512) as i16 - 256; + for (d, dim) in dims.iter_mut().enumerate().take(BASE_DIM) { + *dim = ((i * 97 + d * 31) % 512) as i16 - 256; } Base17 { dims } }) From bda5d10f7d9765968ec877750cc9bc3aec09464d Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 5 Aug 2026 16:20:01 +0000 Subject: [PATCH 11/11] codec-research: clippy clean under 1.97.1 (Sonnet sweep, orchestrator-verified) 20 clippy errors -> 0 across eight files: needless_range_loop (the bulk -- iter()/enumerate()/zip() where the index only subscripted), unused imports pulled out of the module preamble or moved into `mod tests`, manual_div_ceil, manual_range_contains, len()>=1, a Default impl beside the inherent `new`, and three genuinely dead accumulators deleted (`confident_count`, `component_energy`, `prev_bands`, `pal_scents` -- each declared next to siblings that ARE consumed, which is what made them read as live). One `#[expect(clippy::needless_range_loop)]` in `BasePalette::distance_matrix` with a reason: the symmetric `mat[i][j]` / `mat[j][i]` double-write needs two positions in one `Vec>` at once, which no single iterator expresses without split_at_mut gymnastics. `decode_crystallized` became a three-way zip rather than an index because it walks three parallel BARK_BANDS arrays -- zip makes the band-for-band correspondence structural instead of trusting three subscripts to agree. TESTS ARE NOT GREEN AND THAT PREDATES THIS COMMIT. 56 pass, 9 fail, all nine panicking at the same `transform.rs:46` MDCT length assert. Verified by stashing this entire diff and re-running at HEAD: identical 56/9, identical test names. The diagnosis (the assert demands 4N input for an N-coefficient call that every caller feeds 2N) and the reason nobody caught it (the crate is workspace-excluded AND ungated at both CI tiers) are recorded as ISS-CODEC-RESEARCH-MDCT-ASSERT. Fixing it is a research-codec correctness question, not a lint question, and it does not belong in a lint commit. --- .claude/board/ISSUES.md | 39 ++++++++++++++++ .../src/accumulator.rs | 39 ++++++++++------ .../lance-graph-codec-research/src/diamond.rs | 5 +- .../lance-graph-codec-research/src/hybrid.rs | 10 ++-- .../lance-graph-codec-research/src/metrics.rs | 11 ++--- .../src/perframe.rs | 4 +- .../src/transform.rs | 33 ++++++------- .../src/universal_perception.rs | 12 ++--- .../src/zeckbf17.rs | 46 ++++++++++--------- 9 files changed, 122 insertions(+), 77 deletions(-) diff --git a/.claude/board/ISSUES.md b/.claude/board/ISSUES.md index 3ebfefc32..2fc68c83f 100644 --- a/.claude/board/ISSUES.md +++ b/.claude/board/ISSUES.md @@ -1,5 +1,44 @@ # Issues Log — Open + Resolved (double-entry, append-only) +## ISS-CODEC-RESEARCH-MDCT-ASSERT (2026-08-05) — OPEN, PRE-EXISTING, DISCOVERED NOT CAUSED + +**The observation.** `cargo +1.97.1 test --manifest-path +crates/lance-graph-codec-research/Cargo.toml --lib` fails **9 of 65** tests. Every +one of the nine panics at the same line — +`transform.rs:46 assert_eq!(input.len(), n * 2, "MDCT input must be 2N samples")` — +reached through `perframe::encode_perframe`, `metrics::compare_all_strategies`, or +`hybrid::encode_hybrid`. Failing: `hybrid::tests::{test_hybrid_bitrate_breakdown, +test_hybrid_encode_basic, test_hybrid_scent_stream_valid}`, +`metrics::tests::{test_compare_noise, test_compare_sine, +test_hypothesis_tonal_vs_noise}`, `perframe::tests::{test_encode_silence, +test_encode_sine_wave}`, `transform::tests::test_band_energy_roundtrip`. + +**Why it is not a regression from the 1.97 clippy sweep.** The sweep's eight-file +diff was stashed and the suite re-run at HEAD: **identical 56 passed / 9 failed, +identical test names.** The sweep is exonerated by measurement, not by argument. +The commit landing those lint fixes says so and links here. + +**The arithmetic, which is the whole diagnosis.** `mdct` binds `n2 = +output.len()` (commented "N/2"), `n = n2 * 2`, then requires `input.len() == n * 2` +— i.e. **4× the coefficient count**. Every one of the four call sites passes +`2 * SAMPLES_PER_FRAME` samples for `SAMPLES_PER_FRAME` coefficients, which is the +2N→N contract the doc-comment and the assert message both state. So the assert as +written can never be satisfied by any caller in the crate, and the internal +indexing (`idx0 = (n4 + k) % (n * 2)`) is consistent with the 4N reading, not with +the callers. Either the naming is off by one factor of two throughout the function +or the fold is wrong — **do not "fix" this by relaxing the assert**; that would +silently index a 2N buffer with 4N arithmetic. + +**Why nobody noticed.** `lance-graph-codec-research` is workspace-EXCLUDED, so no +`-p` run reaches it, and `.github/workflows/style.yml` gates it at **neither** the +mandatory nor the advisory tier. A crate that no gate runs is a crate whose red is +invisible. That absence of coverage is the second-order finding here. + +**Resolution shape.** Decide the intended transform size convention first (read +`imdct`, which asserts nothing, and `test_band_energy_roundtrip`'s expectation), +then correct `mdct` to match and re-anchor. Owner: unassigned. Not a blocker for +the 1.97/lance-9 arc. + ## ISS-MARM-T1-4X-A0-GAP (2026-08-05) — OPEN, MEASUREMENT DEFECT NOT A RESULT **The observation.** The M-arm's temporal-reconstruction baseline (T1) reads diff --git a/crates/lance-graph-codec-research/src/accumulator.rs b/crates/lance-graph-codec-research/src/accumulator.rs index 2a054bbd9..97d94445e 100644 --- a/crates/lance-graph-codec-research/src/accumulator.rs +++ b/crates/lance-graph-codec-research/src/accumulator.rs @@ -9,14 +9,20 @@ //! Quality: parametric (tonal components survive, transients don't). //! The Diamond Markov pipeline extracts crystallized components progressively. -use crate::{AudioFrame, AudioQualia, CrystallizedComponent, SpectralAccumulator, - BARK_BANDS, SAMPLES_PER_FRAME, FRAME_RATE}; -use crate::transform::{mdct, coeffs_to_band_energies, psychoacoustic_mask, sine_window}; -use crate::bands::{pack_bands, f32_to_bf16, bf16_to_f32}; +use crate::{AudioQualia, CrystallizedComponent, SpectralAccumulator, + BARK_BANDS, SAMPLES_PER_FRAME}; +use crate::transform::{mdct, coeffs_to_band_energies, sine_window}; +use crate::bands::{pack_bands, bf16_to_f32}; /// Accumulator cell count: 24 bands × 16 bits per BF16 = 384. const CELL_COUNT: usize = BARK_BANDS * 16; +impl Default for SpectralAccumulator { + fn default() -> Self { + Self::new() + } +} + impl SpectralAccumulator { /// Create a fresh accumulator (all cells zero). pub fn new() -> Self { @@ -37,12 +43,12 @@ impl SpectralAccumulator { /// by ZeckBF17's golden-step traversal, not at the accumulation level. pub fn accumulate_frame(&mut self, bands: &[u16; BARK_BANDS]) { // Unpack 24 BF16 values into 384 bits - for band in 0..BARK_BANDS { + for (band, &bv) in bands.iter().enumerate() { for bit in 0..16 { let cell_idx = band * 16 + bit; // Extract bit from BF16 value - let bit_val = ((bands[band] >> bit) & 1) as i16; + let bit_val = ((bv >> bit) & 1) as i16; // Map 0→-1, 1→+1 for bipolar accumulation let bipolar = bit_val * 2 - 1; @@ -88,7 +94,6 @@ impl SpectralAccumulator { pub fn crystallize(&self, threshold: i16) -> CrystallizedComponent { let mut spectrum = [0u16; BARK_BANDS]; let mut alpha = [false; BARK_BANDS]; - let mut confident_count = 0u32; for band in 0..BARK_BANDS { let mut bf16_val = 0u16; @@ -101,7 +106,6 @@ impl SpectralAccumulator { if self.cells[cell_idx] > 0 { bf16_val |= 1 << bit; } - confident_count += 1; } else { // Below threshold: noise floor. This bit is uncertain. band_confident = false; @@ -147,7 +151,7 @@ impl SpectralAccumulator { pub fn noise_mask_correlation(&self, threshold: i16, mask: &[f32; BARK_BANDS]) -> f64 { // For each band: compute fraction of cells below threshold let mut noise_fraction = [0.0f64; BARK_BANDS]; - for band in 0..BARK_BANDS { + for (band, nf) in noise_fraction.iter_mut().enumerate() { let mut below = 0; for bit in 0..16 { let cell_idx = band * 16 + bit; @@ -155,7 +159,7 @@ impl SpectralAccumulator { below += 1; } } - noise_fraction[band] = below as f64 / 16.0; + *nf = below as f64 / 16.0; } // Normalize mask to [0, 1] @@ -243,9 +247,16 @@ pub fn pearson_correlation(x: &[f64], y: &[f64]) -> f64 { /// Only confident bands (alpha=true) are decoded. Others stay zero. pub fn decode_crystallized(component: &CrystallizedComponent) -> [f32; BARK_BANDS] { let mut energies = [0.0f32; BARK_BANDS]; - for band in 0..BARK_BANDS { - if component.alpha[band] { - energies[band] = bf16_to_f32(component.spectrum[band]); + // Three parallel BARK_BANDS arrays walked in lockstep. `zip` is the fix + // rather than an index: it makes the band-for-band correspondence + // structural instead of relying on three `[band]` subscripts agreeing. + for ((e, &alpha), &spec) in energies + .iter_mut() + .zip(component.alpha.iter()) + .zip(component.spectrum.iter()) + { + if alpha { + *e = bf16_to_f32(spec); } } energies @@ -411,7 +422,7 @@ mod tests { println!("{:>10} {:>12} {:>12} {:>10}", "encounters", "alpha_before", "alpha_after", "components"); - let mut rng = 12345u64; + let mut rng: u64; for n in [5, 10, 20, 30, 50, 75, 100, 150, 200, 300] { let mut acc = SpectralAccumulator::new(); diff --git a/crates/lance-graph-codec-research/src/diamond.rs b/crates/lance-graph-codec-research/src/diamond.rs index 1caf90bcd..cc34a5a9d 100644 --- a/crates/lance-graph-codec-research/src/diamond.rs +++ b/crates/lance-graph-codec-research/src/diamond.rs @@ -8,7 +8,7 @@ //! The 25% noise floor IS the lossy compression. What survives is what //! the psychoacoustic model says humans perceive. -use crate::{CrystallizedComponent, SpectralAccumulator, AudioQualia, BARK_BANDS, FRAME_RATE}; +use crate::{CrystallizedComponent, SpectralAccumulator, BARK_BANDS}; use crate::bands::bf16_to_f32; /// A Diamond Markov audio session: streams frames, extracts components. @@ -147,9 +147,6 @@ impl DiamondAudioSession { .map(|&c| c.abs() as i64).sum(); let reconstructed_energy: i64 = reconstructed.cells.iter() .map(|&c| c.abs() as i64).sum(); - let component_energy: i64 = self.components.iter() - .map(|c| c.spectrum.iter().map(|&s| bf16_to_f32(s).abs() as i64).sum::()) - .sum(); // Hamming distance between residual and reconstructed let mut hamming = 0u64; diff --git a/crates/lance-graph-codec-research/src/hybrid.rs b/crates/lance-graph-codec-research/src/hybrid.rs index 43d9efa13..5058e060e 100644 --- a/crates/lance-graph-codec-research/src/hybrid.rs +++ b/crates/lance-graph-codec-research/src/hybrid.rs @@ -8,12 +8,9 @@ //! The crystallized identity IS the I-frame. //! The Diamond Markov epiphanies ARE the scene changes. -use crate::{AudioFrame, CrystallizedComponent, SpectralAccumulator, - BARK_BANDS, SAMPLES_PER_FRAME, FRAME_RATE}; -use crate::transform::{mdct, coeffs_to_band_energies, psychoacoustic_mask, sine_window}; -use crate::bands::{pack_bands, bf16_band_distance}; +use crate::{AudioFrame, CrystallizedComponent, SpectralAccumulator, BARK_BANDS}; +use crate::bands::bf16_band_distance; use crate::perframe::encode_perframe; -use crate::accumulator::decode_crystallized; /// Hybrid encoding result: per-frame stream + crystallized components. #[derive(Clone, Debug)] @@ -168,6 +165,7 @@ pub struct HybridBitrateBreakdown { #[cfg(test)] mod tests { use super::*; + use crate::FRAME_RATE; fn sine_samples(freq_hz: f32, duration_s: f32) -> Vec { let n = (duration_s * 48000.0) as usize; @@ -187,7 +185,7 @@ mod tests { assert_eq!(encoding.edge_stream.len(), encoding.frames.len()); // Should have ~2 components (2 seconds / 1 second window) - assert!(encoding.components.len() >= 1 && encoding.components.len() <= 3, + assert!(!encoding.components.is_empty() && encoding.components.len() <= 3, "Expected 1-3 components for 2s audio, got {}", encoding.components.len()); } diff --git a/crates/lance-graph-codec-research/src/metrics.rs b/crates/lance-graph-codec-research/src/metrics.rs index 31f7ad05d..40fbcd240 100644 --- a/crates/lance-graph-codec-research/src/metrics.rs +++ b/crates/lance-graph-codec-research/src/metrics.rs @@ -3,9 +3,8 @@ //! Measures quality, compression, searchability, and the core hypothesis: //! does the VSA noise floor correlate with psychoacoustic masking? -use crate::{AudioFrame, ComparisonResult, SpectralAccumulator, BARK_BANDS, SAMPLES_PER_FRAME}; +use crate::{ComparisonResult, SpectralAccumulator, BARK_BANDS, SAMPLES_PER_FRAME}; use crate::transform::{mdct, coeffs_to_band_energies, psychoacoustic_mask, sine_window}; -use crate::bands::{pack_bands, unpack_bands, bf16_to_f32, bf16_band_distance}; /// Run the full comparison suite on a PCM signal. /// @@ -126,9 +125,9 @@ pub fn spectral_distortion(original: &[f32], reconstructed: &[f32]) -> f64 { let mut signal_power = 0.0f64; let mut error_power = 0.0f64; - for i in 0..len { - signal_power += (original[i] as f64).powi(2); - let err = original[i] as f64 - reconstructed.get(i).copied().unwrap_or(0.0) as f64; + for (i, &o) in original.iter().enumerate().take(len) { + signal_power += (o as f64).powi(2); + let err = o as f64 - reconstructed.get(i).copied().unwrap_or(0.0) as f64; error_power += err.powi(2); } @@ -209,7 +208,7 @@ fn average_masking_thresholds(samples: &[f32]) -> [f32; BARK_BANDS] { for b in 0..BARK_BANDS { avg[b] += mask[b]; } } - for b in 0..BARK_BANDS { avg[b] /= n_frames as f32; } + for a in avg.iter_mut() { *a /= n_frames as f32; } avg } diff --git a/crates/lance-graph-codec-research/src/perframe.rs b/crates/lance-graph-codec-research/src/perframe.rs index d6f852a0b..eba784e12 100644 --- a/crates/lance-graph-codec-research/src/perframe.rs +++ b/crates/lance-graph-codec-research/src/perframe.rs @@ -14,7 +14,6 @@ pub fn encode_perframe(samples: &[f32]) -> Vec { let window = sine_window(SAMPLES_PER_FRAME * 2); let hop = SAMPLES_PER_FRAME; let mut frames = Vec::new(); - let mut prev_bands = [0u16; BARK_BANDS]; let mut prev_energies = [0.0f32; BARK_BANDS]; let n_frames = samples.len().saturating_sub(SAMPLES_PER_FRAME * 2) / hop; @@ -64,7 +63,6 @@ pub fn encode_perframe(samples: &[f32]) -> Vec { mask: mask_packed, }); - prev_bands = packed; prev_energies = energies; } @@ -141,7 +139,7 @@ mod tests { .map(|(i, _)| i) .unwrap(); - assert!(max_band >= 3 && max_band <= 6, + assert!((3..=6).contains(&max_band), "440Hz should be in band 3-6, got band {}", max_band); } } diff --git a/crates/lance-graph-codec-research/src/transform.rs b/crates/lance-graph-codec-research/src/transform.rs index b5b87d9eb..20862bf16 100644 --- a/crates/lance-graph-codec-research/src/transform.rs +++ b/crates/lance-graph-codec-research/src/transform.rs @@ -7,7 +7,7 @@ use rustfft::{num_complex::Complex, FftPlanner}; use std::f32::consts::PI; -use crate::{BARK_BANDS, SAMPLES_PER_FRAME, SAMPLE_RATE}; +use crate::{BARK_BANDS, SAMPLE_RATE}; /// Bark-scale critical band edges in Hz for 24 bands. /// These approximate the frequency resolution of the human cochlea. @@ -47,7 +47,7 @@ pub fn mdct(input: &[f32], output: &mut [f32]) { // Pre-twiddle: fold and rotate into N/2 complex values let mut pre = vec![Complex::new(0.0f32, 0.0f32); n2]; - for k in 0..n2 { + for (k, slot) in pre.iter_mut().enumerate().take(n2) { let cos_tw = (PI / n as f32 * (2.0 * k as f32 + 1.0 + n2 as f32) * 0.5).cos(); let sin_tw = (PI / n as f32 * (2.0 * k as f32 + 1.0 + n2 as f32) * 0.5).sin(); @@ -63,7 +63,7 @@ pub fn mdct(input: &[f32], output: &mut [f32]) { let s3 = if idx3 < input.len() { -input[idx3] } else { 0.0 }; let re = s0 + s1 + s2 + s3; - pre[k] = Complex::new(re * cos_tw, re * sin_tw); + *slot = Complex::new(re * cos_tw, re * sin_tw); } // FFT of length N/2 @@ -89,10 +89,10 @@ pub fn imdct(input: &[f32], output: &mut [f32]) { // Pre-twiddle let mut pre = vec![Complex::new(0.0f32, 0.0f32); n2]; - for k in 0..n2 { + for (k, slot) in pre.iter_mut().enumerate() { let cos_tw = (PI / n as f32 * (2.0 * k as f32 + 1.0 + n2 as f32) * 0.5).cos(); let sin_tw = (PI / n as f32 * (2.0 * k as f32 + 1.0 + n2 as f32) * 0.5).sin(); - pre[k] = Complex::new(input[k] * cos_tw, input[k] * sin_tw); + *slot = Complex::new(input[k] * cos_tw, input[k] * sin_tw); } // Inverse FFT of length N/2 @@ -102,10 +102,10 @@ pub fn imdct(input: &[f32], output: &mut [f32]) { // Post-twiddle and unfold let scale = 2.0 / n as f32; - for k in 0..n2 { + for (k, p) in pre.iter().enumerate() { let cos_tw = (PI / n as f32 * (2.0 * k as f32 + 1.0 + n2 as f32) * 0.5).cos(); let sin_tw = (PI / n as f32 * (2.0 * k as f32 + 1.0 + n2 as f32) * 0.5).sin(); - let val = (pre[k].re * cos_tw + pre[k].im * sin_tw) * scale; + let val = (p.re * cos_tw + p.im * sin_tw) * scale; // Unfold into 2N output with proper symmetry let n4 = n2 / 2; @@ -130,8 +130,8 @@ pub fn coeffs_to_band_energies(coeffs: &[f32]) -> [f32; BARK_BANDS] { let bin_count = (hi - lo).max(1); let mut sum_sq = 0.0f32; - for bin in lo..hi { - sum_sq += coeffs[bin] * coeffs[bin]; + for &c in coeffs.iter().take(hi).skip(lo) { + sum_sq += c * c; } energies[band] = (sum_sq / bin_count as f32).sqrt(); } @@ -151,8 +151,8 @@ pub fn band_energies_to_coeffs(energies: &[f32; BARK_BANDS], n_bins: usize) -> V let hi = freq_to_bin(edges[band + 1], n_bins).min(n_bins); let bin_count = (hi - lo).max(1); let per_bin = energies[band] / (bin_count as f32).sqrt(); - for bin in lo..hi { - coeffs[bin] = per_bin; + for c in coeffs.iter_mut().take(hi).skip(lo) { + *c = per_bin; } } @@ -178,7 +178,7 @@ pub fn psychoacoustic_mask(energies: &[f32; BARK_BANDS]) -> [f32; BARK_BANDS] { let mut mask = ath[band]; // Spreading function: loud neighbors mask this band - for other in 0..BARK_BANDS { + for (other, &e) in energies.iter().enumerate() { if other == band { continue; } @@ -186,10 +186,10 @@ pub fn psychoacoustic_mask(energies: &[f32; BARK_BANDS]) -> [f32; BARK_BANDS] { // Spreading: -27 dB per Bark on the high side, -12 dB per Bark on the low side let spread = if other < band { // Lower frequency masking upper: gentler slope - energies[other] * 10.0f32.powf(-1.2 * distance) + e * 10.0f32.powf(-1.2 * distance) } else { // Upper frequency masking lower: steeper slope - energies[other] * 10.0f32.powf(-2.7 * distance) + e * 10.0f32.powf(-2.7 * distance) }; mask = mask.max(spread); } @@ -203,6 +203,7 @@ pub fn psychoacoustic_mask(energies: &[f32; BARK_BANDS]) -> [f32; BARK_BANDS] { #[cfg(test)] mod tests { use super::*; + use crate::SAMPLES_PER_FRAME; #[test] fn test_bark_band_edges_monotonic() { @@ -230,8 +231,8 @@ mod tests { let edges = bark_band_edges(); let lo = freq_to_bin(edges[5], n); let hi = freq_to_bin(edges[6], n); - for bin in lo..hi.min(n) { - coeffs[bin] = 1.0; + for c in coeffs.iter_mut().take(hi.min(n)).skip(lo) { + *c = 1.0; } let energies = coeffs_to_band_energies(&coeffs); diff --git a/crates/lance-graph-codec-research/src/universal_perception.rs b/crates/lance-graph-codec-research/src/universal_perception.rs index 9eaad68b3..e1326344c 100644 --- a/crates/lance-graph-codec-research/src/universal_perception.rs +++ b/crates/lance-graph-codec-research/src/universal_perception.rs @@ -49,10 +49,10 @@ impl UniversalAccumulator { pub fn accumulate(&mut self, band_values: &[u16]) { assert_eq!(band_values.len(), self.n_bands); - for band in 0..self.n_bands { + for (band, &bv) in band_values.iter().enumerate() { for bit in 0..self.bits_per_band { let cell_idx = band * self.bits_per_band + bit; - let bit_val = ((band_values[band] >> bit) & 1) as i16; + let bit_val = ((bv >> bit) & 1) as i16; let bipolar = bit_val * 2 - 1; self.cells[cell_idx] = self.cells[cell_idx].saturating_add(bipolar); } @@ -293,14 +293,14 @@ fn synthetic_video_blocks(n_frames: usize) -> Vec<[u16; 32]> { // Mid-frequency texture (slowly varying) let texture_phase = (t * 2.0).sin() * 0.3 + 0.7; - for b in 8..16 { - bands[b] = (0x2000 as f64 * texture_phase) as u16; + for slot in bands.iter_mut().take(16).skip(8) { + *slot = (0x2000 as f64 * texture_phase) as u16; } // High-frequency detail (rapidly varying = noise-like) let noise_seed = frame as u16; - for b in 20..32 { - bands[b] = noise_seed.wrapping_mul(97 + b as u16) & 0x1FFF; + for (b, slot) in bands.iter_mut().enumerate().skip(20) { + *slot = noise_seed.wrapping_mul(97 + b as u16) & 0x1FFF; } // Motion edge (appears/disappears) diff --git a/crates/lance-graph-codec-research/src/zeckbf17.rs b/crates/lance-graph-codec-research/src/zeckbf17.rs index 317a395ce..cdf4cfe5b 100644 --- a/crates/lance-graph-codec-research/src/zeckbf17.rs +++ b/crates/lance-graph-codec-research/src/zeckbf17.rs @@ -47,7 +47,7 @@ pub const BASE_DIM: usize = 17; pub const FULL_DIM: usize = 16384; /// Number of octaves: ceil(FULL_DIM / BASE_DIM). -pub const N_OCTAVES: usize = (FULL_DIM + BASE_DIM - 1) / BASE_DIM; // 964 +pub const N_OCTAVES: usize = FULL_DIM.div_ceil(BASE_DIM); // 964 /// Independent octaves (JL bound). pub const INDEPENDENT_OCTAVES: usize = 14; @@ -323,8 +323,8 @@ impl BasePalette { for i in 0..k { let idx = (i * step).min(patterns.len() - 1); let mut c = [0.0f64; BASE_DIM]; - for d in 0..BASE_DIM { - c[d] = patterns[idx].dims[d] as f64; + for (d, cv) in c.iter_mut().enumerate() { + *cv = patterns[idx].dims[d] as f64; } centroids.push(c); } @@ -340,8 +340,8 @@ impl BasePalette { let mut best_c = 0; for (ci, cent) in centroids.iter().enumerate() { let mut d = 0.0f64; - for dim in 0..BASE_DIM { - let diff = pat.dims[dim] as f64 - cent[dim]; + for (dim, &cv) in cent.iter().enumerate() { + let diff = pat.dims[dim] as f64 - cv; d += diff.abs(); } if d < best_dist { @@ -363,8 +363,8 @@ impl BasePalette { for (pi, pat) in patterns.iter().enumerate() { let c = assignments[pi]; counts[c] += 1; - for d in 0..BASE_DIM { - sums[c][d] += pat.dims[d] as f64; + for (d, sv) in sums[c].iter_mut().enumerate() { + *sv += pat.dims[d] as f64; } } for ci in 0..k { @@ -429,6 +429,10 @@ impl BasePalette { } /// Build a precomputed 256×256 distance matrix for fast lookup. + #[expect( + clippy::needless_range_loop, + reason = "symmetric mat[i][j]/mat[j][i] double-write requires index-based access to two positions in the same Vec> at once; not expressible via a single iterator without unsafe split_at_mut gymnastics" + )] pub fn distance_matrix(&self) -> Vec> { let n = self.entries.len(); let mut mat = vec![vec![0u32; n]; n]; @@ -618,8 +622,8 @@ impl Default for ExperimentConfig { /// Build position table for any step coprime to BASE_DIM. fn make_position_table(step: usize) -> [u8; BASE_DIM] { let mut t = [0u8; BASE_DIM]; - for i in 0..BASE_DIM { - t[i] = ((i * step) % BASE_DIM) as u8; + for (i, tv) in t.iter_mut().enumerate() { + *tv = ((i * step) % BASE_DIM) as u8; } t } @@ -927,8 +931,8 @@ mod tests { fn test_i16_captures_subunit() { // mean = 0.2 → i16 = 51 (0.2 * 256). BF16 would store 0.0. let mut acc = vec![0i8; FULL_DIM]; - for i in 0..FULL_DIM { - acc[i] = if i % 5 < 3 { 1 } else { -1 }; // mean ≈ 0.2 + for (i, a) in acc.iter_mut().enumerate() { + *a = if i % 5 < 3 { 1 } else { -1 }; // mean ≈ 0.2 } let plane = ZeckBF17Plane::encode(&acc); // At least some base dims should capture the positive bias @@ -939,8 +943,8 @@ mod tests { #[test] fn test_encode_decode_roundtrip() { let mut acc = vec![0i8; FULL_DIM]; - for i in 0..FULL_DIM { - acc[i] = if i % 3 == 0 { 50 } else if i % 3 == 1 { -30 } else { 10 }; + for (i, a) in acc.iter_mut().enumerate() { + *a = if i % 3 == 0 { 50 } else if i % 3 == 1 { -30 } else { 10 }; } let fid = sign_bit_fidelity(&acc, &ZeckBF17Plane::encode(&acc).decode()); println!("Roundtrip fidelity: {:.4}", fid); @@ -1208,7 +1212,6 @@ mod tests { println!(" {}", "─".repeat(34)); let mut products = Vec::new(); - let mut prev_scale = 0.0f64; for scale in [1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 512.0, 1024.0, 4096.0] { let best = fractal_map.iter() .filter(|(s, _, _)| (*s - scale).abs() < 0.1) @@ -1573,10 +1576,10 @@ mod tests { // Fibonacci intervals: [1,1,2,3,5,8,13,4,0,4,4,8,12,3,15,1,16] // (fib(i) mod 17 as interval) ("fibonacci", { - let mut fibs = vec![0usize; BASE_DIM]; + let mut fibs = [0usize; BASE_DIM]; let (mut a, mut b) = (1usize, 1usize); - for i in 0..BASE_DIM { - fibs[i] = a % BASE_DIM; + for f in fibs.iter_mut() { + *f = a % BASE_DIM; let next = (a + b) % BASE_DIM; a = b; b = next; } @@ -1778,9 +1781,9 @@ mod tests { }; let mut signal = vec![0i8; FULL_DIM]; - for d in 0..FULL_DIM { + for s in signal.iter_mut() { let h = next(&mut rng); - signal[d] = (((h >> 8) % 201) as i16 - 100) as i8; // range [-100, 100] + *s = (((h >> 8) % 201) as i16 - 100) as i8; // range [-100, 100] } let mut current = signal.clone(); @@ -2148,7 +2151,6 @@ mod tests { // Compute palette distances for ρ let mut exact_d: Vec = Vec::new(); let mut pal_d: Vec = Vec::new(); - let mut pal_scents: Vec = Vec::new(); for i in 0..n_pairs { for j in (i + 1)..n_pairs { @@ -2227,9 +2229,9 @@ mod tests { let mut patterns: Vec = Vec::new(); for _ in 0..200 { let mut dims = [0i16; BASE_DIM]; - for d in 0..BASE_DIM { + for dv in dims.iter_mut() { let h = next(&mut rng); - dims[d] = (((h >> 8) % 2001) as i32 - 1000) as i16; + *dv = (((h >> 8) % 2001) as i32 - 1000) as i16; } patterns.push(BasePattern { dims }); }