SlideShare una empresa de Scribd logo
1 de 26
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Destacado

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
 

Destacado (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 a 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 a 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
 

Más de 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
 

Más de 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
 

Último

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
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 

Último (20)

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
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 

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