v 12.0 Third Party 18
Download for 12.0 series Deploy on Odoo.sh
Technical Name OdooSlack
LicenseLGPL-3
Websitehttps://github.com/EwetoyeIbrahim/OdooSlack
Also available in version v 12.0
You bought this module and need support? Click here!
Technical Name OdooSlack
LicenseLGPL-3
Websitehttps://github.com/EwetoyeIbrahim/OdooSlack
Also available in version v 12.0

OdooSlack

This module simply accepts message, and slack Id to perform hand-shakes between odoo and slack.
Note that: requests library, which as of now, is not shipped with python has to be installed on the system.
pip install requests.
It is currently best suited for automated actions and server action

Example

This is an implemtation of an automated action: It sends a slack message to channel whenever website users check-out or when a new quotation is sent

# Available variables:
#  - env: Odoo Environment on which the action is triggered
#  - model: Odoo Model of the record on which the action is triggered; is a void recordset
#  - record: record on which the action is triggered; may be void
#  - records: recordset of all records on which the action is triggered in multi-mode; may be void
#  - time, datetime, dateutil, timezone: useful Python libraries
#  - log: log(message, level='info'): logging function to record debug information in ir.logging table
#  - Warning: Warning Exception to use with raise
# To return an action, assign: action = {...}

odoo_slack = env["odoo.slack"]

# change to your slack webhook url
slack_hook = "https://hooks.slack.com/services/T4EXXXXXX/BM4XXXXXX/w436XXXXXXXXXXXXXXXXXXXX" # Slack Webhook

message = '''Sales Order {0},\n {1} just placed an order worth {2}'''.format(record.name, record.partner_id.name, record.amount_total)

odoo_slack.slackup(slack_hook, message)

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
by
Ewetoye Ibrahim
on 2/11/20, 7:49 AM Author

There are no comments yet!