Skip to content

connector_onshape: Onshape PLM connector for Odoo#523

Open
dnplkndll wants to merge 5 commits intoOCA:16.0from
kencove:16.0-add-connector_onshape
Open

connector_onshape: Onshape PLM connector for Odoo#523
dnplkndll wants to merge 5 commits intoOCA:16.0from
kencove:16.0-add-connector_onshape

Conversation

@dnplkndll
Copy link

Summary

New module connector_onshape — bidirectional sync between Onshape CAD/PLM and Odoo products/BOMs using the OCA Connector framework.

Features:

  • Import Onshape documents, parts, and assembly BOMs into Odoo
  • 4-strategy SKU matching (exact filename, part number, McMaster catalog, case-insensitive) to link Onshape parts to existing product.product records
  • Export product default_code and name back to Onshape metadata
  • HMAC and OAuth2 authentication modes
  • Webhook receiver for real-time metadata/lifecycle change notifications
  • Batch import via queue_job with rate-limit awareness
  • Mass properties (weight, volume, surface area) import
  • Lifecycle state tracking (in_progress → pending → released → obsolete)

Models:

  • onshape.backend — backend configuration (inherits connector.backend)
  • onshape.document / onshape.document.element — document + element tracking
  • onshape.product.product — product binding with compound external IDs
  • onshape.mrp.bom — BOM binding for assembly sync

Components:

  • Adapter with HMAC request signing + OAuth2 bearer tokens
  • Compound-ID binder (doc_id/elem_id/part_id)
  • Batch + record importers for documents, products, BOMs
  • Import/export mappers
  • Event listener for auto-export on product changes

Also included: Bump setuptools-odoo from 3.1.8 → 3.3.2 to fix pkg_resources ModuleNotFoundError in pre-commit CI (setuptools 82+ removed pkg_resources; 3.3.2 pins setuptools<82).

55 tests, all passing. CI green (tests + pre-commit).

Test plan

  • Pre-commit passes (black, flake8, pylint-odoo, isort, prettier)
  • 55 unit tests pass on both OCB and Odoo test matrices
  • Backend credential check with mocked adapter
  • Document + element import flow
  • Product import with all 4 SKU matching strategies
  • BOM import with component matching
  • Product export mapper
  • Event listener triggers export on product write
  • Webhook signature validation + event routing
  • Import wizard functionality

🤖 Generated with Claude Code

dnplkndll and others added 3 commits February 28, 2026 04:37
New OCA-style connector module for bidirectional synchronization
between Odoo and Onshape cloud CAD/PLM platform.

Features:
- HMAC and OAuth2 authentication with Onshape API
- Document, element, and part discovery from Onshape workspace
- Product binding with 4-strategy SKU matching (exact, extension
  strip, version strip, case-insensitive)
- Assembly BOM import with component match scoring
- Part number/description export from Odoo to Onshape metadata
- Webhook receiver for real-time change notifications
- Event listener for auto-export on product changes
- Queue job integration for async processing with retry patterns
- Cron jobs for scheduled background synchronization
- Import wizard for guided document/product/BOM imports
- Rate limit handling and API quota exhaustion detection (402)

Models: onshape.backend, onshape.document, onshape.document.element,
onshape.product.product, onshape.mrp.bom

Test suite: 51 test methods covering backend, adapter, importers,
exporters, mappers, binder, webhooks, listener, and wizard.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add OAuth2 Authorization Code flow as an alternative to HMAC
authentication. Includes token exchange, refresh, CSRF protection,
and context-aware error handling for API quota (402) responses.
setuptools 82+ removed pkg_resources, which broke the
setuptools-odoo-make-default and setuptools-odoo-get-requirements
hooks. Version 3.3.2 pins setuptools<82 to restore compatibility.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@kobros-tech kobros-tech force-pushed the 16.0-add-connector_onshape branch from 48b7138 to f5dc996 Compare March 1, 2026 19:47
@kobros-tech kobros-tech force-pushed the 16.0-add-connector_onshape branch from f5dc996 to ff9de7b Compare March 2, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants