Frappe Renovation Docsync

Frappe added EventStreaming module recently in their v13 release. This enables a site to subscribe to another site for all document updates. This enables forwarding all the Sales Invoices made on one site to be reflected on another site. This is great!

But what if we dont want to send over all the Sales Invoices ? What if you need to send only those invoices made by Customer A ? Here we propose a solution for that.

While making a Event Producer document instance on the Consumer site, we specify the conditions along with it. This allows Consumer specific conditions.

Conditions in Producer Document

We can even set conditions on Global level using the Event DocType Condition doctype. It can be used to set a single condition for all Consumers.

Implementation

This flowchart aims to provide a simple overview.

Flow

In order to get our customizations working with frappe's system, 3 frappe functions had to be patched. You can find them patched here.

License

MIT