Skip to content

Conversation

@adar2378
Copy link

@adar2378 adar2378 commented Dec 3, 2025

Summary

Adds a new JSON Editor widget for Odoo form views, wrapping the popular JSONEditor library.

Features

  • Syntax highlighting for JSON data
  • Schema-based validation and autocomplete
  • Multiple view modes (code, view)
  • Search functionality
  • Undo/redo history
  • Supports text, char, and json field types
  • Reusable OWL component for custom integrations

Usage

<field name="json_data" widget="json_editor"/>

With schema validation:

<field name="json_data" widget="json_editor"
       options="{'schema': {'type': 'object', 'properties': {'name': {'type': 'string'}}}}"/>

Screenshots

Code Mode:
Code Mode

View Mode:
View Mode

Technical Notes

  • JSONEditor library (v10.x) is bundled in static/lib/ (MIT licensed)
  • No external Python dependencies required
  • Compatible with Odoo 18.0

Checklist

  • PR title follows [VERSION][ADD/FIX/IMP] module_name: description format
  • Module follows OCA guidelines
  • Pre-commit hooks pass
  • Screenshots included
  • README generated from fragments

Provides a reusable JSON Editor widget for Odoo with:
  - Syntax highlighting for JSON data
  - Schema-based validation and autocomplete
  - Multiple view modes (code, view)
  - Search functionality and undo/redo history
  - Standalone OWL component for custom integrations

The widget supports text, char, and json field types.
@adar2378 adar2378 mentioned this pull request Dec 3, 2025
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.

1 participant