| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 22 |
| Technical Name |
flight_json_widget |
| License | LGPL-3 |
Flight JSON Widget
Enhanced JSON field widget with pretty formatting and syntax highlighting for Odoo 18 backend
What It Does
Flight JSON Widget provides a custom Odoo widget for displaying JSON fields with beautiful syntax highlighting and proper formatting in the backend interface. Transform unreadable JSON data into clean, color-coded, formatted output.
Simply add the widget attribute to any JSON or Text field in your views, and enjoy automatic pretty-printing with proper indentation and color coding for keys, values, and punctuation.
Core Features
Pretty Formatting
Automatically formats JSON with proper indentation and structure. No more squinting at compressed JSON data.
Syntax Highlighting
Color-coded JSON elements for maximum readability. Keys, values, and punctuation are visually distinct.
Backend Integration
Works seamlessly in Odoo backend forms and views. Built using Odoo's OWL framework v2.
Easy Integration
Just add widget="flight_json" to any JSON or Text field. No model changes required.
How to Use
In Your XML Views:
Add the widget to any JSON or Text field containing JSON data:
<field name="json_data" widget="flight_json"/>
What You Get:
- Automatic pretty-printing with proper indentation
- Color coding for keys, values, and punctuation
- Readable formatting in backend forms and views
- Works with any JSON or Text field containing JSON data
Real-World Use Cases
API Response Data
Display API responses in a readable format for debugging and analysis
Configuration Data
Show JSON configuration data in an easy-to-read format for quick reference
Debug Information
Make debug data easier to read and understand during development
Flight Navigation Data
Display complex flight navigation data from flight_plan module in readable format
Example Output:
Compare this to compressed JSON: Much easier to read!
Quick Setup
- Install the module from Odoo Apps (requires web module)
- Widget is automatically available after installation
- Add widget="flight_json" to any JSON or Text field in your XML views
- That's it! Your JSON data will now display beautifully formatted
Technical Details
OWL Framework
Built using Odoo's OWL framework v2
ES Modules
Uses modern JavaScript module system
Backend Only
Designed for backend interface use
Lightweight
Minimal dependencies, fast loading
For Developers
The widget is a standard Odoo field widget that can be applied to any JSON or Text field containing JSON data. It provides automatic formatting without requiring changes to your models.
static/src/views/fields/flight_json/
Part of SmartOps Flight Suite
Essential widget used by flight_plan and other modules for displaying complex JSON data
Support & Documentation
Developed by Apexive Solutions LLC as part of the smartops.aero project
github.com/smartops-aero/smartops-odoo-flight
License: LGPL-3 • Version 18.0.1.0.0
Flight JSON Widget
Enhanced JSON field widget with pretty formatting for Odoo 18 backend.
Overview
Provides a custom Odoo widget for displaying JSON fields with syntax highlighting and proper formatting in the backend interface. Makes JSON data readable and easier to work with.
Features
- Pretty Formatting: Automatically formats JSON with proper indentation
- Syntax Highlighting: Color-coded JSON elements for readability
- Backend Widget: Works in Odoo backend forms and views
- Easy Integration: Simply add widget="flight_json" to JSON fields
Installation
- Install from Odoo Apps menu
- Requires: web module
- Widget is automatically available after installation
Usage
In Your Models
Add the widget to any JSON or Text field in your XML views:
<field name="json_data" widget="flight_json"/>
Viewing JSON Data
- JSON fields with the widget display formatted and highlighted
- Automatic pretty-printing with indentation
- Color coding for keys, values, and punctuation
Module Structure
flight_json_widget/
└── static/src/
└── views/fields/flight_json/
├── flight_json.js # Widget JavaScript implementation
└── flight_json.xml # Widget template
Use Cases
- API Data: Display API responses in readable format
- Configuration: Show JSON configuration data
- Debug Information: Make debug data easier to read
- Flight Data: Display complex flight navigation data (used by flight_plan)
Technical Details
- OWL Framework: Built using Odoo's OWL framework v2
- ES Modules: Uses modern JavaScript module system
- Backend Only: Designed for backend interface
- Lightweight: Minimal dependencies, fast loading
For Developers
The widget is a standard Odoo field widget that can be applied to any JSON or Text field containing JSON data. It provides automatic formatting without requiring changes to your models.
Support
- Author: Apexive Solutions LLC
- Website: https://github.com/smartops-aero/smartops-odoo-flight
- License: LGPL-3
Please log in to comment on this module