SlideShare a Scribd company logo
1 of 26
Download to read offline
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
Daniel Reis
twitter: @reis_pt
email: dgreis(at)sapo.pt
https://github.com/dreispt
●
IT Applications at Securitas
●
Board Member at the Odoo
Community Association
●
Partner at ThinkOpen Solutions
●
Author of a couple of Odoo
development books
Introductions
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
"Can it automatically
assign requests to the
right person?"
"Can we see a
warning if the
customer has no
more credit?"
"We need prior
manager approval
for these requests"
"A reminder on
requests
unattended
for more than 3
days
would be great!"
Real people have very specific problems to
tackle
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
Automated Action Rules
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
Some useful
Techniques
• Post Messages to followers
• Add Follower and assign Responsibles
• Use Color and Priority
• Use Kanban States
• Use Actions on Time Conditions
• Use Warnings and “On change” Actions
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
1. New Task notifications should be more informative.
2. Special requests should be highlighted and given priority.
3. For particular customer conditions display warnings.
4. On warnings require approval from the Customer manager.
5. Automatically assign the work, based on Tags.
6. Remind about Tasks idle for 3 days
Requirements from our customer
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
#1 "New Task notifications should be more
informative"
Use
message_post()
Custom notification with
details such as Customer and
Tags
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
#1 Add an “On Create” Automated Action
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
title = "[New Task] %s" % object.name
tag_list = object.tag_ids.mapped('name')
tag_text = '; '.join(tag_list)
msg = """<ul>
<li>Tags: %s</li>
<li>Customer: %s</li>
</ul>
""" % (tag_text or 'None',
object.partner_id.name or 'None')
object.message_post(
subtype='mt_comment',
subject=title,
body=msg)
#1 Use message_post() in a Python Code Server
Action
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
#1 Disable the original “Task Opened”
notifications
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
tag_names = object.tag_ids.mapped('name')
if 'Urgent' in tag_names:
object.write({
'color': 2,
'priority': '1'})
john = env['res.users'].search(
[('login','=','john')].partner_id
object.message_subscribe([john.id])
#2 "Special requests should be highlighted and
given priority"
For specific Tags, such
as “Urgent”: change
color, priority, add
Followers
Write() Color and priority values
message_subscribe() to add followers
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
#3 "For particular customer conditions display
warnings"
I need to see a warning
when the customer has
overdue payments
“on change” actions
raise warning()
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
#3 Install the “warning” addon module
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
#3 Create an Action “Based on form
modification”
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
if object.partner_id.sale_warn_msg:
raise Warning(object.partner_id.sale_warn_msg)
#3 Raise the warning that was set on the
partner form
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
#4 "On warning, require an approval from the
customer manager"
Will use Kanban States
for approval state
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
if object.partner_id.sale_warn_msg:
approver = object.partner_id.user_id # the Manager
if not approver:
domain = [('login', '=', 'john')]
approver = self.env['res.users'].search(domain)
object.write({
'kanban_state': 'blocked',
'user_id': approver.id
})
#4 Request the approval to the customer
manager
If there are warnings,
request approval to the
customer
salesperson/manager
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
raise Warning(u'Approval required')
[('stage_id.sequence', '!=', 1)]
[('kanban_state', '=', 'blocked'),
('stage_id.sequence', '=', 1)]
#4 Automated Action to enforce that an
approval is required to proceed
“on change”
automated action
FROM FILTER
Python Action
TO FILTER
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
approver = object.partner_id.user_id
if env.user_id != approver:
raise Warning(u'Must be approved by %s' % approver)
[('kanban_state', '=', 'done')]
[('kanban_state', '=', 'done'),
('stage_id.sequence', '=', 1)]
#4 Automated Action to enforce that the
approver is the customer manager
FROM FILTER
Python Action
TO FILTER
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
[('kanban_state', '!=', 'done')]
[('stage_id.sequence', '=', 1)]
#5 "Automatically assign the work, based on
tags"
FROM FILTER
TO FILTER
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
categ_names = object.tag_ids.mapped('name')
categ_string = '; '.join(categ_names)
assign_name = None
if 'Desktop Support' in categ_string:
assign_name = 'demo'
# if … Other assignment conditions
if assign_name:
domain = [('login', '=', assign_name)]
asign = env['res.users'].search(domain, limit=1)
object.write({'user_id': asign.id,
'kanban_state': 'blocked'})
#5 Write the logic to pick a responsible and
assign it
PYTHON ACTION
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
msg = "[Reminder] %s needs love!" % object.name
object.message_post(
body=msg,
subtype='mt_comment',
)
#6 "Remind about tasks idle for 3 days"
AUTOMATED ACTIONS ON TIME CONDITIONS
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
1. New Task notifications should be more informative:
use message_post() to create custom notification texts.
2. Special requests should be highlighted and given priority:
use write() on the color and priority fields.
3. For particular customer conditions display warnings:
use "On change" actions with a raise Warning().
Our solution for the customer requirements
Dynamic Business Processes using
Automated Actions
Dynamic Business Processes using
Automated Actions
4. On warnings require approval from the Customer manager:
use Kanban State
5. Automatically assign the work, based on Tags.
code the rules in Python and use write() to assign the user_id
6. Remind about Tasks idle for 3 days
use "Timed Condition" scheduled actions
Our solution for the customer requirements
Lisboa
Miraflores Office Center
Avenida das Tulipas, nº6, 13º A/B
1495-161 Algés
t: 808 455 255
e: sales@thinkopen.solutions
Porto
Rua do Espinheiro, nº 641
2,Escritório 2.3
4400-450 Vila Nova de Gaia
t: 808 455 255
e: sales@thinkopen.solutions
São Paulo
Av Paulista 1636,
São Paulo, SP
t: +55 (11) 957807759 / 50493125
e: info.br@tkobr.com
Luanda
Rua Dr. António Agostinho Neto 43
Bairro Operário, Luanda Angola
t: +244 923 510 491
e: comercial@thinkopensolutions.co.ao
Find more about
Automated actions in chapter 12
of the Odoo Development
Cookbook
Thank you
Daniel Reis
twitter: @reis_pt
email: dgreis(at)sapo.pt
www.thinkopen.solutions

More Related Content

What's hot

IndexedDB and Push Notifications in Progressive Web Apps
IndexedDB and Push Notifications in Progressive Web AppsIndexedDB and Push Notifications in Progressive Web Apps
IndexedDB and Push Notifications in Progressive Web AppsAdégòkè Obasá
 
The Django Book - Chapter 5: Models
The Django Book - Chapter 5: ModelsThe Django Book - Chapter 5: Models
The Django Book - Chapter 5: ModelsSharon Chen
 
Working with the django admin
Working with the django admin Working with the django admin
Working with the django admin flywindy
 
Two scoops of django 1.6 - Ch7, Ch8
Two scoops of django 1.6  - Ch7, Ch8Two scoops of django 1.6  - Ch7, Ch8
Two scoops of django 1.6 - Ch7, Ch8flywindy
 
Speed is a feature PyConAr 2014
Speed is a feature PyConAr 2014Speed is a feature PyConAr 2014
Speed is a feature PyConAr 2014Pablo Mouzo
 
Deploying
DeployingDeploying
Deployingsoon
 
Experience Manager 6 Developer Features - Highlights
Experience Manager 6 Developer Features - HighlightsExperience Manager 6 Developer Features - Highlights
Experience Manager 6 Developer Features - HighlightsCédric Hüsler
 
Authentication
AuthenticationAuthentication
Authenticationsoon
 
Taking Web Apps Offline
Taking Web Apps OfflineTaking Web Apps Offline
Taking Web Apps OfflinePedro Morais
 
Google
GoogleGoogle
Googlesoon
 
Web development with django - Basics Presentation
Web development with django - Basics PresentationWeb development with django - Basics Presentation
Web development with django - Basics PresentationShrinath Shenoy
 
Introduction to Polymer
Introduction to PolymerIntroduction to Polymer
Introduction to PolymerEgor Miasnikov
 
Cache Money Talk: Practical Application
Cache Money Talk: Practical ApplicationCache Money Talk: Practical Application
Cache Money Talk: Practical ApplicationWolfram Arnold
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenerytoddbr
 
Offline strategies for HTML5 web applications - IPC12
Offline strategies for HTML5 web applications - IPC12Offline strategies for HTML5 web applications - IPC12
Offline strategies for HTML5 web applications - IPC12Stephan Hochdörfer
 
Unobtrusive JavaScript
Unobtrusive JavaScriptUnobtrusive JavaScript
Unobtrusive JavaScriptVitaly Baum
 

What's hot (20)

IndexedDB and Push Notifications in Progressive Web Apps
IndexedDB and Push Notifications in Progressive Web AppsIndexedDB and Push Notifications in Progressive Web Apps
IndexedDB and Push Notifications in Progressive Web Apps
 
Tango with django
Tango with djangoTango with django
Tango with django
 
The Django Book - Chapter 5: Models
The Django Book - Chapter 5: ModelsThe Django Book - Chapter 5: Models
The Django Book - Chapter 5: Models
 
Working with the django admin
Working with the django admin Working with the django admin
Working with the django admin
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
Two scoops of django 1.6 - Ch7, Ch8
Two scoops of django 1.6  - Ch7, Ch8Two scoops of django 1.6  - Ch7, Ch8
Two scoops of django 1.6 - Ch7, Ch8
 
Speed is a feature PyConAr 2014
Speed is a feature PyConAr 2014Speed is a feature PyConAr 2014
Speed is a feature PyConAr 2014
 
Deploying
DeployingDeploying
Deploying
 
Experience Manager 6 Developer Features - Highlights
Experience Manager 6 Developer Features - HighlightsExperience Manager 6 Developer Features - Highlights
Experience Manager 6 Developer Features - Highlights
 
Authentication
AuthenticationAuthentication
Authentication
 
Taking Web Apps Offline
Taking Web Apps OfflineTaking Web Apps Offline
Taking Web Apps Offline
 
Google
GoogleGoogle
Google
 
Web development with django - Basics Presentation
Web development with django - Basics PresentationWeb development with django - Basics Presentation
Web development with django - Basics Presentation
 
Introduction to Polymer
Introduction to PolymerIntroduction to Polymer
Introduction to Polymer
 
Cache Money Talk: Practical Application
Cache Money Talk: Practical ApplicationCache Money Talk: Practical Application
Cache Money Talk: Practical Application
 
Acts As Most Popular
Acts As Most PopularActs As Most Popular
Acts As Most Popular
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenery
 
Mini Curso de Django
Mini Curso de DjangoMini Curso de Django
Mini Curso de Django
 
Offline strategies for HTML5 web applications - IPC12
Offline strategies for HTML5 web applications - IPC12Offline strategies for HTML5 web applications - IPC12
Offline strategies for HTML5 web applications - IPC12
 
Unobtrusive JavaScript
Unobtrusive JavaScriptUnobtrusive JavaScript
Unobtrusive JavaScript
 

Viewers also liked

Bending the odoo learning curve - Odoo Experience 2015
Bending the odoo learning curve - Odoo Experience 2015Bending the odoo learning curve - Odoo Experience 2015
Bending the odoo learning curve - Odoo Experience 2015Daniel Reis
 
Service Management with Odoo/OpenERP - Opendays 2014
Service Management with Odoo/OpenERP - Opendays 2014Service Management with Odoo/OpenERP - Opendays 2014
Service Management with Odoo/OpenERP - Opendays 2014Daniel Reis
 
How to customize views & menues of OpenERP online in a sustainable way. Frede...
How to customize views & menues of OpenERP online in a sustainable way. Frede...How to customize views & menues of OpenERP online in a sustainable way. Frede...
How to customize views & menues of OpenERP online in a sustainable way. Frede...Odoo
 
Development Odoo Basic
Development Odoo BasicDevelopment Odoo Basic
Development Odoo BasicMario IC
 
Odoo - Backend modules in v8
Odoo - Backend modules in v8Odoo - Backend modules in v8
Odoo - Backend modules in v8Odoo
 
How to manage a service company with Odoo
How to manage a service company with OdooHow to manage a service company with Odoo
How to manage a service company with OdooOdoo
 

Viewers also liked (6)

Bending the odoo learning curve - Odoo Experience 2015
Bending the odoo learning curve - Odoo Experience 2015Bending the odoo learning curve - Odoo Experience 2015
Bending the odoo learning curve - Odoo Experience 2015
 
Service Management with Odoo/OpenERP - Opendays 2014
Service Management with Odoo/OpenERP - Opendays 2014Service Management with Odoo/OpenERP - Opendays 2014
Service Management with Odoo/OpenERP - Opendays 2014
 
How to customize views & menues of OpenERP online in a sustainable way. Frede...
How to customize views & menues of OpenERP online in a sustainable way. Frede...How to customize views & menues of OpenERP online in a sustainable way. Frede...
How to customize views & menues of OpenERP online in a sustainable way. Frede...
 
Development Odoo Basic
Development Odoo BasicDevelopment Odoo Basic
Development Odoo Basic
 
Odoo - Backend modules in v8
Odoo - Backend modules in v8Odoo - Backend modules in v8
Odoo - Backend modules in v8
 
How to manage a service company with Odoo
How to manage a service company with OdooHow to manage a service company with Odoo
How to manage a service company with Odoo
 

Similar to Dynamic Business Processes using Automated Actions

Google Optimize for testing and personalization
Google Optimize for testing and personalizationGoogle Optimize for testing and personalization
Google Optimize for testing and personalizationOWOX BI
 
Agile methodologies based on BDD and CI by Nikolai Shevchenko
Agile methodologies based on BDD and CI by Nikolai ShevchenkoAgile methodologies based on BDD and CI by Nikolai Shevchenko
Agile methodologies based on BDD and CI by Nikolai ShevchenkoMoldova ICT Summit
 
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your AppOdoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your AppElínAnna Jónasdóttir
 
When you need more data in less time...
When you need more data in less time...When you need more data in less time...
When you need more data in less time...Bálint Horváth
 
Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...
Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...
Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...Learnosity
 
Tejas_ppt.pptx
Tejas_ppt.pptxTejas_ppt.pptx
Tejas_ppt.pptxGanuBappa
 
Tejas_ppt (1).pptx
Tejas_ppt (1).pptxTejas_ppt (1).pptx
Tejas_ppt (1).pptxGanuBappa
 
Event managementsystem
Event managementsystemEvent managementsystem
Event managementsystemPraveen Jha
 
Lightning Components Workshop
Lightning Components WorkshopLightning Components Workshop
Lightning Components WorkshopGordon Bockus
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworksVishwanath KC
 
Zotonic tutorial EUC 2013
Zotonic tutorial EUC 2013Zotonic tutorial EUC 2013
Zotonic tutorial EUC 2013Arjan
 
Get up and running with google app engine in 60 minutes or less
Get up and running with google app engine in 60 minutes or lessGet up and running with google app engine in 60 minutes or less
Get up and running with google app engine in 60 minutes or lesszrok
 
Automating AD Domain Services Administration
Automating AD Domain Services AdministrationAutomating AD Domain Services Administration
Automating AD Domain Services AdministrationNapoleon NV
 
Connecting your Python App to OpenERP through OOOP
Connecting your Python App to OpenERP through OOOPConnecting your Python App to OpenERP through OOOP
Connecting your Python App to OpenERP through OOOPraimonesteve
 

Similar to Dynamic Business Processes using Automated Actions (20)

Google Optimize for testing and personalization
Google Optimize for testing and personalizationGoogle Optimize for testing and personalization
Google Optimize for testing and personalization
 
Event management system
Event management systemEvent management system
Event management system
 
Agile methodologies based on BDD and CI by Nikolai Shevchenko
Agile methodologies based on BDD and CI by Nikolai ShevchenkoAgile methodologies based on BDD and CI by Nikolai Shevchenko
Agile methodologies based on BDD and CI by Nikolai Shevchenko
 
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your AppOdoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
Odoo Experience 2018 - Inherit from These 10 Mixins to Empower Your App
 
When you need more data in less time...
When you need more data in less time...When you need more data in less time...
When you need more data in less time...
 
Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...
Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...
Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...
 
Tejas_ppt.pptx
Tejas_ppt.pptxTejas_ppt.pptx
Tejas_ppt.pptx
 
Tejas_ppt (1).pptx
Tejas_ppt (1).pptxTejas_ppt (1).pptx
Tejas_ppt (1).pptx
 
Event managementsystem
Event managementsystemEvent managementsystem
Event managementsystem
 
Are API Services Taking Over All the Interesting Data Science Problems?
Are API Services Taking Over All the Interesting Data Science Problems?Are API Services Taking Over All the Interesting Data Science Problems?
Are API Services Taking Over All the Interesting Data Science Problems?
 
Lightning Components Workshop
Lightning Components WorkshopLightning Components Workshop
Lightning Components Workshop
 
Bpmn2010
Bpmn2010Bpmn2010
Bpmn2010
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworks
 
Zotonic tutorial EUC 2013
Zotonic tutorial EUC 2013Zotonic tutorial EUC 2013
Zotonic tutorial EUC 2013
 
Get up and running with google app engine in 60 minutes or less
Get up and running with google app engine in 60 minutes or lessGet up and running with google app engine in 60 minutes or less
Get up and running with google app engine in 60 minutes or less
 
Oracle BPM 11g Lesson 2
Oracle BPM 11g Lesson 2Oracle BPM 11g Lesson 2
Oracle BPM 11g Lesson 2
 
Automating AD Domain Services Administration
Automating AD Domain Services AdministrationAutomating AD Domain Services Administration
Automating AD Domain Services Administration
 
IDM Introduction
IDM IntroductionIDM Introduction
IDM Introduction
 
Connecting your Python App to OpenERP through OOOP
Connecting your Python App to OpenERP through OOOPConnecting your Python App to OpenERP through OOOP
Connecting your Python App to OpenERP through OOOP
 
ADMP+PPT1.ppt
ADMP+PPT1.pptADMP+PPT1.ppt
ADMP+PPT1.ppt
 

More from Daniel Reis

PixelsCamp | Odoo - The Open Source Business Apps Platform for the 21st Century
PixelsCamp | Odoo - The Open Source Business Apps Platform for the 21st CenturyPixelsCamp | Odoo - The Open Source Business Apps Platform for the 21st Century
PixelsCamp | Odoo - The Open Source Business Apps Platform for the 21st CenturyDaniel Reis
 
Odoo Development Cookbook TOC and preface
Odoo Development Cookbook TOC and prefaceOdoo Development Cookbook TOC and preface
Odoo Development Cookbook TOC and prefaceDaniel Reis
 
Using the "pip" package manager for Odoo/OpenERP - Opendays 2014
Using the "pip" package manager for Odoo/OpenERP - Opendays 2014Using the "pip" package manager for Odoo/OpenERP - Opendays 2014
Using the "pip" package manager for Odoo/OpenERP - Opendays 2014Daniel Reis
 
Q-Day 2013: As Aplicações ao serviço da inovação
Q-Day 2013: As Aplicações ao serviço da inovaçãoQ-Day 2013: As Aplicações ao serviço da inovação
Q-Day 2013: As Aplicações ao serviço da inovaçãoDaniel Reis
 
OpenERP data integration in an entreprise context: a war story
OpenERP data integration in an entreprise context: a war storyOpenERP data integration in an entreprise context: a war story
OpenERP data integration in an entreprise context: a war storyDaniel Reis
 
Service Management at Securitas using OpeneERP
Service Management at Securitas using OpeneERPService Management at Securitas using OpeneERP
Service Management at Securitas using OpeneERPDaniel Reis
 

More from Daniel Reis (6)

PixelsCamp | Odoo - The Open Source Business Apps Platform for the 21st Century
PixelsCamp | Odoo - The Open Source Business Apps Platform for the 21st CenturyPixelsCamp | Odoo - The Open Source Business Apps Platform for the 21st Century
PixelsCamp | Odoo - The Open Source Business Apps Platform for the 21st Century
 
Odoo Development Cookbook TOC and preface
Odoo Development Cookbook TOC and prefaceOdoo Development Cookbook TOC and preface
Odoo Development Cookbook TOC and preface
 
Using the "pip" package manager for Odoo/OpenERP - Opendays 2014
Using the "pip" package manager for Odoo/OpenERP - Opendays 2014Using the "pip" package manager for Odoo/OpenERP - Opendays 2014
Using the "pip" package manager for Odoo/OpenERP - Opendays 2014
 
Q-Day 2013: As Aplicações ao serviço da inovação
Q-Day 2013: As Aplicações ao serviço da inovaçãoQ-Day 2013: As Aplicações ao serviço da inovação
Q-Day 2013: As Aplicações ao serviço da inovação
 
OpenERP data integration in an entreprise context: a war story
OpenERP data integration in an entreprise context: a war storyOpenERP data integration in an entreprise context: a war story
OpenERP data integration in an entreprise context: a war story
 
Service Management at Securitas using OpeneERP
Service Management at Securitas using OpeneERPService Management at Securitas using OpeneERP
Service Management at Securitas using OpeneERP
 

Recently uploaded

Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 

Recently uploaded (20)

Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 

Dynamic Business Processes using Automated Actions

  • 1. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions
  • 2. Dynamic Business Processes using Automated Actions Daniel Reis twitter: @reis_pt email: dgreis(at)sapo.pt https://github.com/dreispt ● IT Applications at Securitas ● Board Member at the Odoo Community Association ● Partner at ThinkOpen Solutions ● Author of a couple of Odoo development books Introductions
  • 3. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions "Can it automatically assign requests to the right person?" "Can we see a warning if the customer has no more credit?" "We need prior manager approval for these requests" "A reminder on requests unattended for more than 3 days would be great!" Real people have very specific problems to tackle
  • 4. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions Automated Action Rules
  • 5. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions Some useful Techniques • Post Messages to followers • Add Follower and assign Responsibles • Use Color and Priority • Use Kanban States • Use Actions on Time Conditions • Use Warnings and “On change” Actions
  • 6. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions 1. New Task notifications should be more informative. 2. Special requests should be highlighted and given priority. 3. For particular customer conditions display warnings. 4. On warnings require approval from the Customer manager. 5. Automatically assign the work, based on Tags. 6. Remind about Tasks idle for 3 days Requirements from our customer
  • 7. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions #1 "New Task notifications should be more informative" Use message_post() Custom notification with details such as Customer and Tags
  • 8. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions #1 Add an “On Create” Automated Action
  • 9. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions title = "[New Task] %s" % object.name tag_list = object.tag_ids.mapped('name') tag_text = '; '.join(tag_list) msg = """<ul> <li>Tags: %s</li> <li>Customer: %s</li> </ul> """ % (tag_text or 'None', object.partner_id.name or 'None') object.message_post( subtype='mt_comment', subject=title, body=msg) #1 Use message_post() in a Python Code Server Action
  • 10. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions #1 Disable the original “Task Opened” notifications
  • 11. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions tag_names = object.tag_ids.mapped('name') if 'Urgent' in tag_names: object.write({ 'color': 2, 'priority': '1'}) john = env['res.users'].search( [('login','=','john')].partner_id object.message_subscribe([john.id]) #2 "Special requests should be highlighted and given priority" For specific Tags, such as “Urgent”: change color, priority, add Followers Write() Color and priority values message_subscribe() to add followers
  • 12. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions #3 "For particular customer conditions display warnings" I need to see a warning when the customer has overdue payments “on change” actions raise warning()
  • 13. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions #3 Install the “warning” addon module
  • 14. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions
  • 15. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions #3 Create an Action “Based on form modification”
  • 16. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions if object.partner_id.sale_warn_msg: raise Warning(object.partner_id.sale_warn_msg) #3 Raise the warning that was set on the partner form
  • 17. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions #4 "On warning, require an approval from the customer manager" Will use Kanban States for approval state
  • 18. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions if object.partner_id.sale_warn_msg: approver = object.partner_id.user_id # the Manager if not approver: domain = [('login', '=', 'john')] approver = self.env['res.users'].search(domain) object.write({ 'kanban_state': 'blocked', 'user_id': approver.id }) #4 Request the approval to the customer manager If there are warnings, request approval to the customer salesperson/manager
  • 19. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions raise Warning(u'Approval required') [('stage_id.sequence', '!=', 1)] [('kanban_state', '=', 'blocked'), ('stage_id.sequence', '=', 1)] #4 Automated Action to enforce that an approval is required to proceed “on change” automated action FROM FILTER Python Action TO FILTER
  • 20. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions approver = object.partner_id.user_id if env.user_id != approver: raise Warning(u'Must be approved by %s' % approver) [('kanban_state', '=', 'done')] [('kanban_state', '=', 'done'), ('stage_id.sequence', '=', 1)] #4 Automated Action to enforce that the approver is the customer manager FROM FILTER Python Action TO FILTER
  • 21. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions [('kanban_state', '!=', 'done')] [('stage_id.sequence', '=', 1)] #5 "Automatically assign the work, based on tags" FROM FILTER TO FILTER
  • 22. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions categ_names = object.tag_ids.mapped('name') categ_string = '; '.join(categ_names) assign_name = None if 'Desktop Support' in categ_string: assign_name = 'demo' # if … Other assignment conditions if assign_name: domain = [('login', '=', assign_name)] asign = env['res.users'].search(domain, limit=1) object.write({'user_id': asign.id, 'kanban_state': 'blocked'}) #5 Write the logic to pick a responsible and assign it PYTHON ACTION
  • 23. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions msg = "[Reminder] %s needs love!" % object.name object.message_post( body=msg, subtype='mt_comment', ) #6 "Remind about tasks idle for 3 days" AUTOMATED ACTIONS ON TIME CONDITIONS
  • 24. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions 1. New Task notifications should be more informative: use message_post() to create custom notification texts. 2. Special requests should be highlighted and given priority: use write() on the color and priority fields. 3. For particular customer conditions display warnings: use "On change" actions with a raise Warning(). Our solution for the customer requirements
  • 25. Dynamic Business Processes using Automated Actions Dynamic Business Processes using Automated Actions 4. On warnings require approval from the Customer manager: use Kanban State 5. Automatically assign the work, based on Tags. code the rules in Python and use write() to assign the user_id 6. Remind about Tasks idle for 3 days use "Timed Condition" scheduled actions Our solution for the customer requirements
  • 26. Lisboa Miraflores Office Center Avenida das Tulipas, nº6, 13º A/B 1495-161 Algés t: 808 455 255 e: sales@thinkopen.solutions Porto Rua do Espinheiro, nº 641 2,Escritório 2.3 4400-450 Vila Nova de Gaia t: 808 455 255 e: sales@thinkopen.solutions São Paulo Av Paulista 1636, São Paulo, SP t: +55 (11) 957807759 / 50493125 e: info.br@tkobr.com Luanda Rua Dr. António Agostinho Neto 43 Bairro Operário, Luanda Angola t: +244 923 510 491 e: comercial@thinkopensolutions.co.ao Find more about Automated actions in chapter 12 of the Odoo Development Cookbook Thank you Daniel Reis twitter: @reis_pt email: dgreis(at)sapo.pt www.thinkopen.solutions