Send PUSH notification when an eCommerce product becomes out of stock

You’ll need:

Prepare IFTTT Webhook URL

  • Open Webhook page at IFTTT:

  • Click Documentation

  • Choose some event name, e.g. product-out-of-stock

  • Copy the url. It has following format:


Register Webhook

  • Model: Stock Move (stock.move)

  • Trigger Condition: On Update

  • Before Update Domain: [['state', '!=', 'done'], ['product_id.website_published', '=', True]]

    • Note, that in Odoo 10.0 field is called Filter

  • Apply on: [['state', '=', 'done'],['product_id.website_published', '=', True],["product_id.qty_available","<=",0]]

    • Note, that in Odoo 10.0 field is located in Server Action model and called Condition

  • Python Code:

    base_url = env['ir.config_parameter'].get_param('web.base.url');
    template_id =
    image_url = base_url + "/website/image/product.template/%s/image/90x90" % template_id
    product_url = base_url + "/shop/product/%s" % template_id
    data = {
        "value2": image_url,
        "value3": product_url,
    log("Sending to webhook: %s" % data), json=data)

Prepare IFTTT applet

  • Open url:

  • This: search and select Webhooks

    • Choose Receive a web request

    • Set Event Name (in our example, product-out-of-stock)

  • That: search and select Notifications

    • Chose Send a reach notification from the IFTTT app

      • Message: Product {{Value1}} is out of stock!

      • Link URL: {{Value3}}

      • Image URL: {{Value2}}


Try it out

Be sure, that:

  • eCommerce and Inventory Management modules are installed in Odoo

  • There is at least one product, which is:

    • Stockable Product

    • Published on Website

    • Is not out of stock yet


  • make module out of stock (e.g. make a fake order at website or just make Inventory Adjustment).

  • RESULT: you can see PUSH notification on your phone

  • If something goes wrong, check Odoo and IFTTT logs

Custom integration

For any further assistance contact us by email or fill out request form: