SlideShare a Scribd company logo
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 Apps
Adégòkè Obasá
 
Tango with django
Tango with djangoTango with django
Tango with django
Rajan Kumar Upadhyay
 
The Django Book - Chapter 5: Models
The Django Book - Chapter 5: ModelsThe Django Book - Chapter 5: Models
The Django Book - Chapter 5: Models
Sharon 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, Ch8
flywindy
 
Speed is a feature PyConAr 2014
Speed is a feature PyConAr 2014Speed is a feature PyConAr 2014
Speed is a feature PyConAr 2014
Pablo 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 - Highlights
Cé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 Presentation
Shrinath Shenoy
 
Introduction to Polymer
Introduction to PolymerIntroduction to Polymer
Introduction to Polymer
Egor Miasnikov
 
Cache Money Talk: Practical Application
Cache Money Talk: Practical ApplicationCache Money Talk: Practical Application
Cache Money Talk: Practical Application
Wolfram Arnold
 
Acts As Most Popular
Acts As Most PopularActs As Most Popular
Acts As Most Popular
Wolfram Arnold
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenery
toddbr
 
Mini Curso de Django
Mini Curso de DjangoMini Curso de Django
Mini Curso de Django
Felipe Queiroz
 
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 JavaScript
Vitaly 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 2015
Daniel 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 2014
Daniel 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 Basic
Mario IC
 
Odoo - Backend modules in v8
Odoo - Backend modules in v8Odoo - Backend modules in v8
Odoo - Backend modules in v8
Odoo
 
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
Odoo
 

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 personalization
OWOX BI
 
Event management system
Event management systemEvent management system
Event management system
Abhinav Shilwant
 
Python Expense Tracker Project with Source Code.pdf
Python Expense Tracker Project with Source Code.pdfPython Expense Tracker Project with Source Code.pdf
Python Expense Tracker Project with Source Code.pdf
abhishekdf3
 
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 App
Elí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.pptx
GanuBappa
 
Tejas_ppt (1).pptx
Tejas_ppt (1).pptxTejas_ppt (1).pptx
Tejas_ppt (1).pptx
GanuBappa
 
Event managementsystem
Event managementsystemEvent managementsystem
Event managementsystem
Praveen Jha
 
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?
IDEAS - Int'l Data Engineering and Science Association
 
Lightning Components Workshop
Lightning Components WorkshopLightning Components Workshop
Lightning Components Workshop
Gordon Bockus
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworks
Vishwanath KC
 
Zotonic tutorial EUC 2013
Zotonic tutorial EUC 2013Zotonic tutorial EUC 2013
Zotonic tutorial EUC 2013
Arjan
 
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
zrok
 
Oracle BPM 11g Lesson 2
Oracle BPM 11g Lesson 2Oracle BPM 11g Lesson 2
Oracle BPM 11g Lesson 2
Rakesh Gujjarlapudi
 
Automating AD Domain Services Administration
Automating AD Domain Services AdministrationAutomating AD Domain Services Administration
Automating AD Domain Services Administration
Napoleon NV
 
IDM Introduction
IDM IntroductionIDM Introduction
IDM Introduction
Aidy Tificate
 
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
raimonesteve
 

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
 
Python Expense Tracker Project with Source Code.pdf
Python Expense Tracker Project with Source Code.pdfPython Expense Tracker Project with Source Code.pdf
Python Expense Tracker Project with Source Code.pdf
 
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
 

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 Century
Daniel Reis
 
Odoo Development Cookbook TOC and preface
Odoo Development Cookbook TOC and prefaceOdoo Development Cookbook TOC and preface
Odoo Development Cookbook TOC and preface
Daniel 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 2014
Daniel 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ção
Daniel 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 story
Daniel 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

Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 

Recently uploaded (20)

Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 

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