SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 

Kürzlich hochgeladen (20)

(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 

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