Commit Graph
2 Commits
Author SHA1 Message Date
Lucas Perais 51077cc514 [FIX] base_automation: webhooks: put the request payload in eval_context
Set a webhook that executes a ir.actions.server of type python code.

Before this commit, the code had no access to any request's parameters. This was a limitation
in the basic flows that the feature is supposed to support.

After this commit, we pass in the context a key "payload" that contains a copy of the request parameters.

task-id-3599629

Part-of: odoo/odoo#142710
2023-12-15 08:44:19 +00:00
Lucas PeraisandDamien Bouvy b846d1ebe9 [IMP] base_automation: expose as webhook client
Allow third parties services to contact a base_automation via the route "/web/hook/<uuid>"
Base Automations now have an additional field "record_getter", which contains a python expression
that should return a record set on which the webhook will apply.

A base automation configured as a webhook takes in its eval_context, the "payload", that is, a shortcut
to the request's data.

task-id-3450200

Part-of: odoo/odoo#135932
Co-authored-by: Damien Bouvy <dbo@odoo.com>
2023-10-20 09:35:12 +00:00