Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 422 |
Technical Name |
web_syncer |
License | LGPL-3 |
Website | https://www.modoolar.com/ |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 422 |
Technical Name |
web_syncer |
License | LGPL-3 |
Website | https://www.modoolar.com/ |
Web Syncer
Overview
This module provides generic interface to receive CUD model notifications on web client side.
Note: This module is very technical. On its own, it doesn't do anything, but it enables other modules to extend web client to react upon model updates. It is base component of Scrummer UI for Project Agile module.
MODOOLAR
With extensive experience in implementing Odoo based applications, we can offer you a custom-tailored solution that perfectly meets your needs, and spanning through CRM, Sales management, Accounting, HR management, Project management, Document management, eCommerce, Webshop, and many more. With our hands-on expertise, we can help you get exclusive tailor-made apps for your unique business needs. Our knowledge extends beyond our tech-stack expertise - we follow startup trends, so that we can provide guidance to our clients regarding the business process, legal issues and marketing strategies.

Web Syncer
This module provides generic interface to receive CUD model notifications on web client side.
Usage
To use this module functionality you need to:
- Add _implements_syncer attribute to model at the backend side
class Task(models.Model): _name = 'project.task' _implements_syncer = True
- Instantiate web.syncer and subscribe to the notifications for your model
const Syncer = require('web.syncer').Syncer; const sync = new Syncer(); sync.subscribe(odoo.session_info.db + ":" + "project.task", notification => { let id = notification[0][2]; let payload = notification[1]; switch (notification[1].method) { case "write": // Handle record update this.recordUpdated(id, payload.data, payload); break; case "create": // Handle created record this.recordCreated(id, payload.data, payload); break; case "unlink": // Handle removed record let task = this.records.get(id); if (task) { this.records.delete(id); payload.data = task; this.recordDeleted(id, payload); } break; } });
Credits
Contributors
- Aleksandar Gajić <aleksandar.gajic@modoolar.com>
- Petar Najman <petar.najman@modoolar.com>
Maintainer

This module is maintained by Modoolar.
As Odoo Gold partner, our company is specialized in Odoo ERP customization and business solutions development. Beside that, we build cool apps on top of Odoo platform.
To contribute to this module, please visit https://modoolar.com
Please log in to comment on this module