feat(ogar-vocab): OdooPort — commerce-arm curator + planning↔ERP convergence#94
Merged
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
OdooPort: PortSpec (NAMESPACE="Odoo", BRIDGE_ID="odoo") + ODOO_ALIASES map Odoo model names onto the canonical OGAR codebook, making Odoo a first-class codebook curator -- the commerce-arm sibling of OpenProjectPort / RedminePort (Northstar §7 T10, "same shape, different domain"). Commerce arm (0x02XX): account.move, sale.order -> commercial_document (0x0202) account.move.line, sale.order.line -> commercial_line_item (0x0201) account.tax -> tax_policy (0x0203) res.partner -> billing_party (0x0204) account.payment -> payment_record (0x0205) res.currency -> currency_policy (0x0206) Cross-arm bridge (the headline): account.analytic.line -> billable_work_entry (0x0103) That last row is the planning<->ERP convergence pin: an Odoo analytic (timesheet/cost) line resolves to the SAME canonical concept as an OpenProject TimeEntry and a Redmine TimeEntry. A logged planning hour and the billed ERP line are one concept, so the planner's hours and the ERP's billable hours align by construction. 6 tests: namespace/bridge_id, account.move -> commercial_document, every commerce alias in the Commerce (0x02XX) domain, the planning<->ERP convergence (op == rm == odoo == 0x0103), alias-count stability, unknown name -> None. Beachhead for converging odoo-rs onto the canonical layer: odoo-rs today lowers its ontology through a bespoke SurrealQL AST + triple pipeline that never touches ogar-vocab. OdooPort lets it adopt ogar_vocab::Class + ogar-adapter-surrealql instead of re-deriving the AR-shaped surface. cargo check --workspace --all-targets + cargo test --workspace clean.
90b2b56 to
2fc96e5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
OdooPort: PortSpec(NAMESPACE = "Odoo",BRIDGE_ID = "odoo") and theODOO_ALIASEStable toogar-vocab::ports, making Odoo a first-class codebookcurator — the commerce-arm sibling of
OpenProjectPort/RedminePort(Northstar §7 T10, "same shape, different domain").
Mappings
Commerce arm (
0x02XX):account.move,sale.ordercommercial_document0x0202account.move.line,sale.order.linecommercial_line_item0x0201account.taxtax_policy0x0203res.partnerbilling_party0x0204account.paymentpayment_record0x0205res.currencycurrency_policy0x0206Cross-arm bridge (the headline):
account.analytic.linebillable_work_entry0x0103Why this matters — planning ⟷ ERP convergence
That last row is the planning⟷ERP convergence pin. An Odoo analytic
(timesheet / cost) line resolves to the same canonical concept
(
billable_work_entry,0x0103) as an OpenProjectTimeEntryand a RedmineTimeEntry. A logged planning hour and the billed ERP line are one concept, sothe planner's hours and the ERP's billable hours align by construction rather
than by a downstream join. This is the codebook's named "first cross-domain
bridge": the planning arm (work performed) meets the commerce arm (work billed).
Tests (6)
odoo_namespace_and_bridge_id_match_canonical_stringsodoo_account_move_maps_to_commercial_documentodoo_commerce_models_resolve_into_the_commerce_domain— every commerce alias lands in the Commerce (0x02XX) domainplanning_and_erp_converge_on_billable_work_entry—op == rm == odoo == 0x0103odoo_alias_count_is_stableodoo_unknown_model_names_resolve_to_noneSeverity context — the odoo-rs beachhead
odoo-rstoday lowers its ontology through a bespoke SurrealQL AST + triplepipeline (
od-ontology::surreal_ast/triple/emit) that forksop-surreal-ast/ogar-adapter-surrealqland never touchesogar-vocab.OGAR exists precisely to own the AR-shaped
Class/ AST /ClassViewsurface;re-deriving it per-consumer is the defect.
OdooPortis the beachhead that letsodoo-rsconverge onto the canonical layer — lower ontoogar_vocab::Class,emit via
ogar-adapter-surrealql— instead of re-implementing it. (Wiringodoo-rsitself is a separate, staged follow-up; this PR only lands thevocabulary so both sides have a shared anchor.)
CI
Toolchain
1.95.0(pinned).cargo check --workspace --all-targetsandcargo test --workspaceboth clean (ogar-vocab lib: 20ports::tests pass,including the 6 above). Purely additive — no existing public API changed.