Data Synchronization

Before you can use the data sync functionality make sure you've set up Konfoo Sync URL and Konfoo Sync Key parameters under Settings → Konfoo

settings

Datasets

konfoo app

Opening the Konfoo application you are first presented with a datasets management interface.

Here you can configure all lookup tables that you wish to export to your Konfoo instance. Every dataset described here is exported to Konfoo as a single Lookup Table.

datasets

Let's look at the dataset test from the above example. In the detail view you can see that it exports records of type Product Template and filters them to not contain any products that have the Internal Reference field set to "KONFOO-TEMPLATE". Naturally if you wish to export every record of the given model the domain filter can be left empty.

Every column can potentially be indexed with a Unique or a Group index. Unique indices require that the exported values actually are unique.

The id column is always exported automatically for every Odoo model and is always set to have a unique index.

dataset view

You can see your custom filter in action by clicking on the "N RECORDS" link under the Domain field.

dataset records

When editing a dataset keep in mind that some changes may require the entire dataset to be resynchronized to Konfoo. This is usually not a problem, but, for instance, changing the name of the dataset here also means you need to account for that change in your configurator source code.

edit dataset

When used in Konfoo this will behave just like any other Lookup Table configuration:

test:
  unique:
    id: id
    default_code: Tootekood
  group:
    name: Nimi
  csv: |
    "id","Nimi","Tootekood","Mõõtühik"
    2,mock1,mock1,Units
    4,Fäänsi Nimi 三角形,mock3,Units
    3,"Toode, Komaga",mock2,Units

Automation

By default the Konfoo module creates a Scheduled Action (Settings → Technical → Scheduled Actions) called Konfoo - Sync datasets. This action is by default disabled and you should configure it to fit your use-case.

This action:

  • can be run multiple times and will continue where it left off the last time;
  • will respect any cron thread time limit you have configured in Odoo;
  • will only synchronize records that have changed since the last time they were synchronized;
  • sends data in batches - the batch size can be configured in settings;

scheduled action