🚀 Connecting to Odoo with JSON-RPC Odoo provides multiple RPC APIs to interact with its server — one of them is JSON-RPC, which follows the JSON-RPC 2.0 specification. Interestingly, the Odoo web client itself uses JSON-RPC under the hood to fetch data. Keypoints 🔹 JSON-RPC requests must follow the JSON-RPC 2.0 spec → jsonrpc.org/specification 🔹 Requires {"Content-Type": "application/json"} header 🔹 Works very similar to XML-RPC but returns results in JSON 🔹 The common service is used for login and other public methods 🔹 The object service is used to interact with Odoo models (search, create, write, unlink, etc.) 🔹 JSON-RPC is the same protocol Odoo Web client uses internally, making it a reliable integration option 🔹 You can use any HTTP client (e.g., requests, urllib, axios in JS, etc.) to interact with Odoo via JSON-RPC This method allows you to authenticate and then interact with Odoo models through JSON-RPC calls — just like the web client does. #Odoo #JSONRPC #Python #API #OdooDevelopment #Integration
How to connect to Odoo using JSON-RPC
More Relevant Posts
-
🚨 Odoo Dev Tip — @api.onchange can’t return domains anymore (Odoo 16+) Ever written this classic code? @api.onchange('service_id') def _onchange_service_id(self): return {'domain': {'task_id': [('service_id', '=', self.service_id.id)]}} …and wondered why it stopped working after upgrading to Odoo 16+? 😅 No error. No warning. It just silently ignores your domain. 💡 Here’s why: Starting with Odoo 16, the frontend runs on OWL — a modern JavaScript framework. It no longer processes return {'domain': ...} values from @api.onchange methods. Domains are now handled entirely client-side, so the old way of “returning” them from Python doesn’t work anymore. ✅ The new correct way You must store your domain in a computed Binary field, so OWL can read it directly from the model — safely and reactively. This approach works in Odoo 16, 17, and 18. 💬 Have you hit this issue after upgrading your modules? Try this Binary Domain pattern — it’s the clean, future-proof solution for modern Odoo #Odoo #Odoo18 #OdooDev #Python #ERP #WebDevelopment #Tips #OpenSource
To view or add a comment, sign in
-
-
New in Honeybadger: Traditional APM tools bury you in dashboards you'll never use. Meanwhile, the things you actually care about require complex custom instrumentation. That's why we built smart dashboards that adapt to your stack. We added an intelligent overview dashboard to every Honeybadger project—monitor your errors, uptime, and performance in one place. We include automatic widgets for Rails, Phoenix, Laravel, and Django, with more on the way. Recommended dashboards help you discover automatic dashboards for your tools with one click. Using Sidekiq in Ruby or Oban in Elixir? Just add those dashboards to your project, then star your favorites to pin them for quick access. Need something custom? Build it with our new widget library. Create and edit widgets inline without leaving your dashboard. Choose from pre-configured templates or create your own. The new project overview dashboard and UI enhancements are available immediately for all Honeybadger accounts. Not using Honeybadger yet? Try it free for 30 days, no credit card required. Or grab a free developer account. Learn more: https://lnkd.in/gi6rxvN3 #RubyOnRails #ElixirLang #Laravel #Django #Python #Ruby #Monitoring #Observability
To view or add a comment, sign in
-
-
🥤 Why is the Framework Called "Frappe"? The Frappe Framework—the full-stack, low-code platform behind ERPNext—is named after the blended, iced frappé drink because it perfectly captures the framework's philosophy: 1. The Perfect Blend Like the drink, Frappe is a complete, well-mixed system that comes "batteries included." It seamlessly blends all the components needed for a modern web app: * Python (Backend) * JavaScript (Frontend) * MariaDB (Database) 2. Rapid Development The name suggests a quick, delightful, and easy process. Frappe speeds up development dramatically through its metadata-driven architecture (using DocTypes). By simply defining what your data is, the framework automatically generates the database tables, forms, and views. 3. Configuration Over Code Frappe embodies the philosophy: "The best code is the one that is not written." It allows developers to build complex applications by mixing and blending configurations (metadata) instead of writing excessive custom code. In short, the name Frappe signifies a complete, full-stack blend of technologies that offers a quick, configuration-driven solution for Rapid Application Development. Rushabh Mehta what made you name the framework as Frappe ?. Want to get more about Frappe or ERPNext and be the job ready . connect with me Sandip Pandit
To view or add a comment, sign in
-
-
🧩 Picking a TypeScript ORM: Drizzle, Prisma, TypeORM, Sequelize or MikroORM? Choosing an ORM in the TypeScript ecosystem isn’t just about syntax — it’s about trade-offs. Each ORM carries an opinion about how you should think about data, migrations, and performance. The trick is finding the one that fits the mental model of your project. Here’s how I think about it: Drizzle → Minimal, type-safe, SQL-first mindset. Perfect when you want control and simplicity. Prisma → Developer experience king. Auto-generated types, but more abstraction. TypeORM → Mature and flexible, but heavier to maintain in complex apps. Sequelize → Legacy but battle-tested. Great for quick prototypes, less ideal for strict typing. MikroORM → A hidden gem for advanced setups, especially when you need fine-grained control. In 2025, I’d rather choose clarity over magic. The best ORM is the one that makes debugging easier, not the one that hides SQL behind convenience. 👉 What’s your go-to ORM these days — and what made you stick with it? #TypeScript #Postgres #NodeJS #Prisma #Drizzle #WebDevelopment #CleanCode
To view or add a comment, sign in
-
-
ORM: _rec_names_search (Attribute) vs _name_search() (Method) 🔹 _rec_names_search (Attribute) A class attribute → list of fields Odoo should use when searching records by display name. Quick way to make extra fields searchable in a Many2one widget. Example: class ResPartner(models.Model): _inherit = "res.partner" _rec_names_search = ['name', 'mobile'] 👉 Now typing in the Customer field will match both partner name and mobile number. 🔹 _name_search() (Method) A public ORM method → entry point for name-based searches. Gives full control to add conditions, OR/AND logic, or joins. Example: def _name_search(self, name, args=None, operator='ilike', limit=100, name_get_uid=None): args = args or [] domain = ['|', ('mobile', operator, name), ('name', operator, name)] return super()._name_search(name, args, operator, limit, name_get_uid) 👉 Here, you can combine fields, add security filters, or customize search behavior deeply. #Odoo #Odoo19 #OdooDevelopment #Development #ORM #Python #ERPDevelopment #ERP #OdooTips #OpenSource #TechCommunity #DeveloperInsights #SoftwareDevelopment #Coding #CodingTips
To view or add a comment, sign in
-
🚀 Odoo 18 & 19 Update — group_operator is Deprecated! With the release of Odoo 18 (and continued in Odoo 19), the classic group_operator attribute has been deprecated and replaced by the cleaner, more intuitive aggregator attribute 🎯 🧠 What does it do? The aggregator defines the default aggregate function used by the web client when applying the “Group By” feature — powering the way data is summarized in read_group(). ♦ Supported Aggregators: • count → Number of rows • count_distinct → Number of distinct rows • bool_and → True if all values are true • bool_or → True if at least one value is true • max → Maximum value • min → Minimum value • avg → Arithmetic mean (average) • sum → Sum of all values (default for numeric fields) ✅ In short: Replace 👇 group_operator='sum' with 👇 aggregator='sum' 👇 If you found this helpful — ♦ Follow me for more Odoo tips & technical insights ♦ Repost to help others stay updated! #Odoo18 #Odoo19 #OdooTips #OdooTechnical #OdooDev #OdooDevelopment #OdooCommunity #Python #OdooMigration
To view or add a comment, sign in
-
-
Excited to share a behind-the-scenes look at my latest backend project: a high-performance RESTful API built with the Drogon framework in C++ and powered by PostgreSQL! 🚀 In this screenshot, you'll see the ProductsController in action—handling a POST request to create new products. It establishes a database connection, inserts structured data (including ID, title, description, image URL, price, and quantity), and responds with a 200 OK status. On the right, I'm testing it end-to-end with an API client like Postman, sending JSON payloads and verifying the results. Why C++ for APIs? Drogon's asynchronous design and built-in ORM make it incredibly efficient for handling high loads, while Postgres ensures robust, scalable data management. This combo is ideal for modern web apps where speed and reliability are non-negotiable. What do you think—have you experimented with C++ frameworks like Drogon for backend services, or do you stick to more common choices like Node.js or Go? Share your experiences in the comments, or let's connect if you're into performance-oriented development! #Cpp #DrogonFramework #PostgreSQL #RESTfulAPI #BackendDevelopment #WebDevelopment #SoftwareEngineering #API #OpenSource #TechCommunity [Poll: What's your go-to language for building RESTful APIs? C++ Node.js/JavaScript Go Python Other (comment below!)]
To view or add a comment, sign in
-
-
⚙️ Odoo ORM: The Hidden N+1 Trap: ....................................................................................................................................................................................... Many beginners start with something like this 👇 invoices = self.env['account.move'].search([]) for inv in invoices: print(inv.partner_id.name) ✅ It works. ❌ But with thousands of records — it kills performance. This is the classic N+1 problem. 1 query to fetch all invoices, and then N queries to fetch each related partner. 💡 A Smarter Way Instead of fetching related data one by one, prefetch it in bulk: invoices = self.env['account.move'].search([]) partners = invoices.mapped('partner_id') for inv in invoices: print(inv.partner_id.name) ✅ mapped() ensures all related partners are fetched at once. ✅ The next time you access inv.partner_id, it’s already in cache — no extra queries. ⚡ Beginner Tip: If your loop or computed field triggers repeated searches, Odoo’s ORM cache breaks — leading to real N+1 issues. So: Use mapped() to prefetch related records. Use search_read() for read-only operations. Avoid search() inside loops. 🔍 Quick Check: Run your code with --log-level=debug_sql and watch how many queries you really execute. #Odoo #ORM #Python #OdooTips #Performance #BackendDevelopment #NPlus1Problem #OdooDeveloper
To view or add a comment, sign in
-
I’ve been experimenting with modern web technologies lately — and this time, I wanted to push myself beyond tutorials — so I built a Task Management App to dive deep into how FastAPI, PostgreSQL, and React can come together in a real-world setup. FastAPI truly surprised me. It’s not just fast — it’s beautifully designed. ⚙️ Built-in async support → blazing performance 🧠 Pydantic for type safety, validation & clean data handling 📜 FastAPI automatically generates interactive documentation using Swagger UI and ReDoc — no extra setup needed. It’s like having your API self-document itself while you build it. You can test endpoints, visualize schemas, and debug requests — right from the browser. Here’s the live FastAPI Docs if you want to take a peek 👇 🔗 https://lnkd.in/gf3tKwAB 🗄️ PostgreSQL handled the backend data like a champ — rock-solid, relational, and super efficient for managing user tasks. This wasn’t just about building another CRUD app — it was about understanding how these technologies work together, from backend performance to deployment and scalability. 💻 Stack: FastAPI | Python | PostgreSQL | React | REST APIs Must visit : https://lnkd.in/gSgjcYS2 #FastAPI #Python #PostgreSQL #React #FullStackDeveloper #LearningByBuilding #WebDevelopment #Deployment #APIDocs #FastAPILearningJourney
To view or add a comment, sign in
-
-
Excited to share the launch of my new TypeScript package: linkedlist! 🚀 This package offers a comprehensive, type-safe implementation of linked list data structures tailored for modern JavaScript environments like Deno, browsers, Node.js, Bun etc. 🔑 Key Features: - Type-safe: Benefit from full TypeScript generics support ensuring compile-time safety. - Efficient: Enjoy O(1) append/prepend operations and O(n) search capabilities. - Iterable: Native support for for...of loops and spread syntax for seamless integration. - Chainable: Utilize a fluent API for convenient method chaining. - Cross-platform: Works effortlessly across Deno, browsers, and other JS environments. - Well-documented: Complete JSDoc documentation provided for easy reference. The package features a robust SinglyLinkedList implementation with versatile methods including appending, prepending, inserting, deleting, and more. It's designed to accommodate future enhancements such as doubly linked lists. Now available on JSR.io: 📦 JSR: https://lnkd.in/dZPmb2kX 💻 GitHub: https://lnkd.in/dJszNeJX Ideal for developers working on data structures, algorithms, or applications requiring efficient list operations. Explore it today and share your feedback! #TypeScript #JavaScript #DataStructures #OpenSource #WebDevelopment #Programming
To view or add a comment, sign in