SlideShare uma empresa Scribd logo
1 de 24
Business Intelligence
Develop cube views for your own objects
Content
1. BI/Graph View
2. Technical Overview
3. Preparing Data
4. Displaying cube views
5. Case study: cross models
6. Conclusion
BI/Graph View
BI/Graph View
measure : can be aggregated (right now, only summed)
dimension : can be grouped
·
·
A Short History of BI in Odoo
pre 2014: list view + group bys, graph view
Q1/Q2 2014: graph view rewrite -> pivot table + graphs,
lots of backend work
future: ? we're looking at searchview/BI view integration.
·
·
·
Technical Overview
Odoo architecture
Anatomy of BI/Graph View
pivot tablepivot table: keeps the data, calls the ORM
graph widgetgraph widget : user interaction
graph viewgraph view : client interaction
·
·
·
BI view xml
<record<record id="..." model="ir.ui.view">>
<field<field name="name">>crm.opportunity.report.graph</field></field>
<field<field name="model">>crm.lead.report</field></field>
<field<field name="arch" type="xml">>
<graph<graph string="Leads Analysis" type="pivot" stacked="True">>
<field<field name="date_deadline" type="row"/>/>
<field<field name="stage_id" type="col"/>/>
<field<field name="planned_revenue" type="measure"/>/>
</graph></graph>
</field></field>
</record></record>
BI view API
In graph tag:
string: title
stacked: if bar chart is stacked/not stacked (default=false)
type: mode (pivot, bar, pie, line) (default=bar)
In field tags, type attribute:
row : will be grouped by rows (dimension)
col : will be grouped by cols (dimension)
measure : will be aggregated
if no type, measure by default
·
·
·
·
·
·
·
Date/datetime
Always want to be different: date/datetime have a special
syntax for groupby:
field_date:day,
field_date:week,
field_date:month (default)
field_date:quarter,
field_date:year
<graph<graph string="Leads Analysis" type="pivot" stacked="True">>
<field<field name="date_deadline:week" type="row"/>/>
<field<field name="stage_id" type="col"/>/>
<field<field name="planned_revenue" type="measure"/>/>
</graph></graph>
·
·
·
·
·
Graph widget setup
Graph widget has two more options:
visible_ui (true) : indicate if UI is visible
heatmap_mode ('none') can be set to row/col/both
·
·
Preparing Data
Odoo Model
Odoo BI view will read the various fields. Depending on
their type, it will use them for
measures : every fields of type integer, float (except 'id')
dimensions :
right now: every fields defined in the 'group by'
category in the search bar.
later: every field that can be grouped by the db
·
·
·
·
Where is your data?
The data needs to satisfy two conditions:
be stored in the database (beware of functional fields not
stored)
be accessed from one single odoo model
If yes, you're done. If not, two possibilities:
can you extend a model? (stored functional fields,
relational fields)
can you create a custom model with a postgres view, to
link the various models with the data?
Bottom line: it needs to be in the DB
·
·
·
·
Extending a model
WARNING: old API... Do not try this at home!!!
classclass res_partner((osv..osv):):
_name == 'res.partner'
_inherit == 'res.partner'
defdef _total_invoice((self,, cr,, uid,, ids,, ......):):
......
# [insert here nice looking code to
# compute the total invoice of a customer]
......
returnreturn result
_columns == {{
'total_invoiced':: fields..function((_total_invoice,,
string=="Total Invoiced",, type=='float',, store==True))
}}
More advanced: Cross model
analysis
Example: purchase/report/purchase_report.py
All reporting views use that technique. Warning: bypass the
ORM
Displaying cube views
Edit in live
1. go to developer mode
2. edit action, add 'graph',
3. edit views, create 'graph'
4. profit!
Good for testing.
Adding a BI view with xml
Add the desired graph view:
<record<record id="view_project_task_graph" model="ir.ui.view">>
<field<field name="name">>project.task.graph</field></field>
<field<field name="model">>project.task</field></field>
<field<field name="arch" type="xml">>
<graph<graph string="Project Tasks" type="bar">>
<field<field name="project_id" type="row"/>/>
<field<field name="planned_hours" type="measure"/>/>
</graph></graph>
</field></field>
</record></record>
Adding a BI view with xml(2)
Add it to the action:
<record<record id="action_view_task" model="ir.actions.act_window">>
...
<field<field name="view_mode">>kanban,tree,form,calendar,gantt,graph</field></field>
...
You can force the correct view:
<field<field name="view_id" ref="view_project_task_graph"/>/>
Advanced: client action
In js, create a widget and append it to your view:
thisthis..graph_widget == newnew openerp..web_graph..Graph((
thisthis,,
some_model,,
some_domain,,
options););
thisthis..graph_widget..appendTo((thisthis..$el););
Future of BI in odoo?
Thank you

Mais conteúdo relacionado

Destaque

Intro to nick alison and the carpenter 2
Intro to nick alison and the carpenter 2Intro to nick alison and the carpenter 2
Intro to nick alison and the carpenter 2pierrette
 
Thisted muniicipality-climate friendly region
Thisted muniicipality-climate friendly regionThisted muniicipality-climate friendly region
Thisted muniicipality-climate friendly regionclimate.thisted
 
My PC
My PCMy PC
My PCmeelo
 
OplæG V Pelle Andersen 5. Marts 2009 V1
OplæG V Pelle Andersen 5. Marts 2009 V1OplæG V Pelle Andersen 5. Marts 2009 V1
OplæG V Pelle Andersen 5. Marts 2009 V1climate.thisted
 
Hạt Giống Tâm Hồn - Tập 1 - Cho lòng dũng cảm và tình yêu cuộc sống
Hạt Giống Tâm Hồn - Tập 1 - Cho lòng dũng cảm và tình yêu cuộc sốngHạt Giống Tâm Hồn - Tập 1 - Cho lòng dũng cảm và tình yêu cuộc sống
Hạt Giống Tâm Hồn - Tập 1 - Cho lòng dũng cảm và tình yêu cuộc sốngQuang Ngoc
 
The new Odoo warehouse management system
The new Odoo warehouse management systemThe new Odoo warehouse management system
The new Odoo warehouse management systemQuang Ngoc
 
пори року україни
пори року українипори року україни
пори року україниhelena54321
 
OplæG Ved Morten Pedersen 5. Marts 2009 V1
OplæG Ved Morten Pedersen 5. Marts 2009 V1OplæG Ved Morten Pedersen 5. Marts 2009 V1
OplæG Ved Morten Pedersen 5. Marts 2009 V1climate.thisted
 
OplæG Finn Mortensen 5. Marts 2009 V1
OplæG Finn Mortensen 5. Marts 2009 V1OplæG Finn Mortensen 5. Marts 2009 V1
OplæG Finn Mortensen 5. Marts 2009 V1climate.thisted
 
Janhit Volume-7,Issue 43, 5 th August to 11August
Janhit Volume-7,Issue 43, 5 th August to 11AugustJanhit Volume-7,Issue 43, 5 th August to 11August
Janhit Volume-7,Issue 43, 5 th August to 11AugustS.S. Avin
 
Thisted kommune klima venlig kommune powerpoint
Thisted kommune klima venlig kommune powerpointThisted kommune klima venlig kommune powerpoint
Thisted kommune klima venlig kommune powerpointclimate.thisted
 
Sáng Tạo Nội Dung Cho Facebook Fanpage
Sáng Tạo Nội Dung Cho Facebook FanpageSáng Tạo Nội Dung Cho Facebook Fanpage
Sáng Tạo Nội Dung Cho Facebook FanpageQuang Ngoc
 
1baswa Breem Kim
1baswa Breem Kim1baswa Breem Kim
1baswa Breem Kimkimbreem
 
Oplaeg Finn Mortensen 5. Marts 2009 V1
Oplaeg Finn Mortensen 5. Marts 2009 V1Oplaeg Finn Mortensen 5. Marts 2009 V1
Oplaeg Finn Mortensen 5. Marts 2009 V1climate.thisted
 

Destaque (20)

Intro to nick alison and the carpenter 2
Intro to nick alison and the carpenter 2Intro to nick alison and the carpenter 2
Intro to nick alison and the carpenter 2
 
estate2008
estate2008estate2008
estate2008
 
Test
TestTest
Test
 
Thisted muniicipality-climate friendly region
Thisted muniicipality-climate friendly regionThisted muniicipality-climate friendly region
Thisted muniicipality-climate friendly region
 
Pandemic
PandemicPandemic
Pandemic
 
Twitter Final
Twitter FinalTwitter Final
Twitter Final
 
Citizen Lobbying
Citizen LobbyingCitizen Lobbying
Citizen Lobbying
 
My PC
My PCMy PC
My PC
 
OplæG V Pelle Andersen 5. Marts 2009 V1
OplæG V Pelle Andersen 5. Marts 2009 V1OplæG V Pelle Andersen 5. Marts 2009 V1
OplæG V Pelle Andersen 5. Marts 2009 V1
 
Ibu
IbuIbu
Ibu
 
Hạt Giống Tâm Hồn - Tập 1 - Cho lòng dũng cảm và tình yêu cuộc sống
Hạt Giống Tâm Hồn - Tập 1 - Cho lòng dũng cảm và tình yêu cuộc sốngHạt Giống Tâm Hồn - Tập 1 - Cho lòng dũng cảm và tình yêu cuộc sống
Hạt Giống Tâm Hồn - Tập 1 - Cho lòng dũng cảm và tình yêu cuộc sống
 
The new Odoo warehouse management system
The new Odoo warehouse management systemThe new Odoo warehouse management system
The new Odoo warehouse management system
 
пори року україни
пори року українипори року україни
пори року україни
 
OplæG Ved Morten Pedersen 5. Marts 2009 V1
OplæG Ved Morten Pedersen 5. Marts 2009 V1OplæG Ved Morten Pedersen 5. Marts 2009 V1
OplæG Ved Morten Pedersen 5. Marts 2009 V1
 
OplæG Finn Mortensen 5. Marts 2009 V1
OplæG Finn Mortensen 5. Marts 2009 V1OplæG Finn Mortensen 5. Marts 2009 V1
OplæG Finn Mortensen 5. Marts 2009 V1
 
Janhit Volume-7,Issue 43, 5 th August to 11August
Janhit Volume-7,Issue 43, 5 th August to 11AugustJanhit Volume-7,Issue 43, 5 th August to 11August
Janhit Volume-7,Issue 43, 5 th August to 11August
 
Thisted kommune klima venlig kommune powerpoint
Thisted kommune klima venlig kommune powerpointThisted kommune klima venlig kommune powerpoint
Thisted kommune klima venlig kommune powerpoint
 
Sáng Tạo Nội Dung Cho Facebook Fanpage
Sáng Tạo Nội Dung Cho Facebook FanpageSáng Tạo Nội Dung Cho Facebook Fanpage
Sáng Tạo Nội Dung Cho Facebook Fanpage
 
1baswa Breem Kim
1baswa Breem Kim1baswa Breem Kim
1baswa Breem Kim
 
Oplaeg Finn Mortensen 5. Marts 2009 V1
Oplaeg Finn Mortensen 5. Marts 2009 V1Oplaeg Finn Mortensen 5. Marts 2009 V1
Oplaeg Finn Mortensen 5. Marts 2009 V1
 

Semelhante a Business intelligence: Develop cube views for your own objects

Develop an App with the Odoo Framework
Develop an App with the Odoo FrameworkDevelop an App with the Odoo Framework
Develop an App with the Odoo FrameworkOdoo
 
Drupal Views development
Drupal Views developmentDrupal Views development
Drupal Views developmentOSInet
 
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch FixThe Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch FixDatabricks
 
Simplify Feature Engineering in Your Data Warehouse
Simplify Feature Engineering in Your Data WarehouseSimplify Feature Engineering in Your Data Warehouse
Simplify Feature Engineering in Your Data WarehouseFeatureByte
 
Drupal tips 'n tricks
Drupal tips 'n tricksDrupal tips 'n tricks
Drupal tips 'n tricksJohn Tsevdos
 
Social Networking using ROR
Social Networking using RORSocial Networking using ROR
Social Networking using RORDhaval Patel
 
Brainomics - CrEDIBLE 2013
Brainomics - CrEDIBLE 2013Brainomics - CrEDIBLE 2013
Brainomics - CrEDIBLE 2013Vincent Michel
 
BRAINOMICS A management system for exploring and merging heterogeneous brain ...
BRAINOMICS A management system for exploring and merging heterogeneous brain ...BRAINOMICS A management system for exploring and merging heterogeneous brain ...
BRAINOMICS A management system for exploring and merging heterogeneous brain ...Logilab
 
Webinar: Scaling MongoDB
Webinar: Scaling MongoDBWebinar: Scaling MongoDB
Webinar: Scaling MongoDBMongoDB
 
Making views - DrupalGov Canberra 2017
Making views - DrupalGov Canberra 2017Making views - DrupalGov Canberra 2017
Making views - DrupalGov Canberra 2017Donna Benjamin
 
Planbox Backbone MVC
Planbox Backbone MVCPlanbox Backbone MVC
Planbox Backbone MVCAcquisio
 
MVC Demystified: Essence of Ruby on Rails
MVC Demystified: Essence of Ruby on RailsMVC Demystified: Essence of Ruby on Rails
MVC Demystified: Essence of Ruby on Railscodeinmotion
 
Data Modeling Comparison: Tableau, Cognos and Power BI
Data Modeling Comparison: Tableau, Cognos and Power BIData Modeling Comparison: Tableau, Cognos and Power BI
Data Modeling Comparison: Tableau, Cognos and Power BISenturus
 
Mvc4 crud operations.-kemuning senja
Mvc4 crud operations.-kemuning senjaMvc4 crud operations.-kemuning senja
Mvc4 crud operations.-kemuning senjaalifha12
 
The State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistThe State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistMark Fayngersh
 
An approach to implement model classes in zend
An approach to implement model classes in zendAn approach to implement model classes in zend
An approach to implement model classes in zendswiss IT bridge
 

Semelhante a Business intelligence: Develop cube views for your own objects (20)

Develop an App with the Odoo Framework
Develop an App with the Odoo FrameworkDevelop an App with the Odoo Framework
Develop an App with the Odoo Framework
 
Drupal Views development
Drupal Views developmentDrupal Views development
Drupal Views development
 
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch FixThe Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
 
Simplify Feature Engineering in Your Data Warehouse
Simplify Feature Engineering in Your Data WarehouseSimplify Feature Engineering in Your Data Warehouse
Simplify Feature Engineering in Your Data Warehouse
 
Drupal tips 'n tricks
Drupal tips 'n tricksDrupal tips 'n tricks
Drupal tips 'n tricks
 
Social Networking using ROR
Social Networking using RORSocial Networking using ROR
Social Networking using ROR
 
Data herding
Data herdingData herding
Data herding
 
Data herding
Data herdingData herding
Data herding
 
Brainomics - CrEDIBLE 2013
Brainomics - CrEDIBLE 2013Brainomics - CrEDIBLE 2013
Brainomics - CrEDIBLE 2013
 
BRAINOMICS A management system for exploring and merging heterogeneous brain ...
BRAINOMICS A management system for exploring and merging heterogeneous brain ...BRAINOMICS A management system for exploring and merging heterogeneous brain ...
BRAINOMICS A management system for exploring and merging heterogeneous brain ...
 
Webinar: Scaling MongoDB
Webinar: Scaling MongoDBWebinar: Scaling MongoDB
Webinar: Scaling MongoDB
 
Idef v4
Idef v4Idef v4
Idef v4
 
Vanjs backbone-powerpoint
Vanjs backbone-powerpointVanjs backbone-powerpoint
Vanjs backbone-powerpoint
 
Making views - DrupalGov Canberra 2017
Making views - DrupalGov Canberra 2017Making views - DrupalGov Canberra 2017
Making views - DrupalGov Canberra 2017
 
Planbox Backbone MVC
Planbox Backbone MVCPlanbox Backbone MVC
Planbox Backbone MVC
 
MVC Demystified: Essence of Ruby on Rails
MVC Demystified: Essence of Ruby on RailsMVC Demystified: Essence of Ruby on Rails
MVC Demystified: Essence of Ruby on Rails
 
Data Modeling Comparison: Tableau, Cognos and Power BI
Data Modeling Comparison: Tableau, Cognos and Power BIData Modeling Comparison: Tableau, Cognos and Power BI
Data Modeling Comparison: Tableau, Cognos and Power BI
 
Mvc4 crud operations.-kemuning senja
Mvc4 crud operations.-kemuning senjaMvc4 crud operations.-kemuning senja
Mvc4 crud operations.-kemuning senja
 
The State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistThe State of Front-end At CrowdTwist
The State of Front-end At CrowdTwist
 
An approach to implement model classes in zend
An approach to implement model classes in zendAn approach to implement model classes in zend
An approach to implement model classes in zend
 

Mais de Quang Ngoc

Bản Đồ Thành Công
Bản Đồ Thành CôngBản Đồ Thành Công
Bản Đồ Thành CôngQuang Ngoc
 
Odoo Implementation Methodology
Odoo Implementation MethodologyOdoo Implementation Methodology
Odoo Implementation MethodologyQuang Ngoc
 
10 Rules for Safer Code
10 Rules for Safer Code10 Rules for Safer Code
10 Rules for Safer CodeQuang Ngoc
 
The Agile BA (Business Analyst)
The Agile BA (Business Analyst)The Agile BA (Business Analyst)
The Agile BA (Business Analyst)Quang Ngoc
 
Hướng dẫn sử dụng hệ điều hành Ubuntu
Hướng dẫn sử dụng hệ điều hành UbuntuHướng dẫn sử dụng hệ điều hành Ubuntu
Hướng dẫn sử dụng hệ điều hành UbuntuQuang Ngoc
 
Hướng dẫn sử dụng Outlook 2010
Hướng dẫn sử dụng Outlook 2010Hướng dẫn sử dụng Outlook 2010
Hướng dẫn sử dụng Outlook 2010Quang Ngoc
 
Hướng dẫn sử dụng Power Point 2010
Hướng dẫn sử dụng Power Point 2010Hướng dẫn sử dụng Power Point 2010
Hướng dẫn sử dụng Power Point 2010Quang Ngoc
 
Hướng dẫn sử dụng Excel 2010
Hướng dẫn sử dụng  Excel 2010Hướng dẫn sử dụng  Excel 2010
Hướng dẫn sử dụng Excel 2010Quang Ngoc
 
Hướng dẫn sử dụng Word 2010
Hướng dẫn sử dụng Word 2010Hướng dẫn sử dụng Word 2010
Hướng dẫn sử dụng Word 2010Quang Ngoc
 
Manage IT as a Business
Manage IT as a BusinessManage IT as a Business
Manage IT as a BusinessQuang Ngoc
 
Tóm tắt lệnh Ubuntu
Tóm tắt lệnh UbuntuTóm tắt lệnh Ubuntu
Tóm tắt lệnh UbuntuQuang Ngoc
 
Hạt Giống Tâm Hồn - Tập 11 - Những trải nghiệm cuộc sống
Hạt Giống Tâm Hồn - Tập 11 - Những trải nghiệm cuộc sốngHạt Giống Tâm Hồn - Tập 11 - Những trải nghiệm cuộc sống
Hạt Giống Tâm Hồn - Tập 11 - Những trải nghiệm cuộc sốngQuang Ngoc
 
Hạt Giống Tâm Hồn - Tập 10 - Theo dòng thời gian
Hạt Giống Tâm Hồn - Tập 10 - Theo dòng thời gianHạt Giống Tâm Hồn - Tập 10 - Theo dòng thời gian
Hạt Giống Tâm Hồn - Tập 10 - Theo dòng thời gianQuang Ngoc
 
Hạt Giống Tâm Hồn - Tập 9 - Vượt qua thử thách
Hạt Giống Tâm Hồn - Tập 9 - Vượt qua thử tháchHạt Giống Tâm Hồn - Tập 9 - Vượt qua thử thách
Hạt Giống Tâm Hồn - Tập 9 - Vượt qua thử tháchQuang Ngoc
 
Hạt Giống Tâm Hồn - Tập 8 - Những câu chuyện cuộc sống
Hạt Giống Tâm Hồn - Tập 8 - Những câu chuyện cuộc sốngHạt Giống Tâm Hồn - Tập 8 - Những câu chuyện cuộc sống
Hạt Giống Tâm Hồn - Tập 8 - Những câu chuyện cuộc sốngQuang Ngoc
 
Hạt Giống Tâm Hồn - Tập 7 - Những câu chuyện cuộc sống
Hạt Giống Tâm Hồn - Tập 7 - Những câu chuyện cuộc sốngHạt Giống Tâm Hồn - Tập 7 - Những câu chuyện cuộc sống
Hạt Giống Tâm Hồn - Tập 7 - Những câu chuyện cuộc sốngQuang Ngoc
 
Hạt Giống Tâm Hồn - Tập 5 - Ý nghĩa cuộc sống
Hạt Giống Tâm Hồn - Tập 5 - Ý nghĩa cuộc sốngHạt Giống Tâm Hồn - Tập 5 - Ý nghĩa cuộc sống
Hạt Giống Tâm Hồn - Tập 5 - Ý nghĩa cuộc sốngQuang Ngoc
 
Hạt Giống Tâm Hồn - Tập 4 - Từ Những Điều Bình Dị
Hạt Giống Tâm Hồn - Tập 4 - Từ Những Điều Bình DịHạt Giống Tâm Hồn - Tập 4 - Từ Những Điều Bình Dị
Hạt Giống Tâm Hồn - Tập 4 - Từ Những Điều Bình DịQuang Ngoc
 
Hạt Giống Tâm Hồn - Tập 3 - Từ những điều bình dị
Hạt Giống Tâm Hồn - Tập 3 - Từ những điều bình dịHạt Giống Tâm Hồn - Tập 3 - Từ những điều bình dị
Hạt Giống Tâm Hồn - Tập 3 - Từ những điều bình dịQuang Ngoc
 
Hạt Giống Tâm Hồn - Tập 2 - Cho lòng dũng cảm và tình yêu cuộc sống
Hạt Giống Tâm Hồn - Tập 2 - Cho lòng dũng cảm và tình yêu cuộc sốngHạt Giống Tâm Hồn - Tập 2 - Cho lòng dũng cảm và tình yêu cuộc sống
Hạt Giống Tâm Hồn - Tập 2 - Cho lòng dũng cảm và tình yêu cuộc sốngQuang Ngoc
 

Mais de Quang Ngoc (20)

Bản Đồ Thành Công
Bản Đồ Thành CôngBản Đồ Thành Công
Bản Đồ Thành Công
 
Odoo Implementation Methodology
Odoo Implementation MethodologyOdoo Implementation Methodology
Odoo Implementation Methodology
 
10 Rules for Safer Code
10 Rules for Safer Code10 Rules for Safer Code
10 Rules for Safer Code
 
The Agile BA (Business Analyst)
The Agile BA (Business Analyst)The Agile BA (Business Analyst)
The Agile BA (Business Analyst)
 
Hướng dẫn sử dụng hệ điều hành Ubuntu
Hướng dẫn sử dụng hệ điều hành UbuntuHướng dẫn sử dụng hệ điều hành Ubuntu
Hướng dẫn sử dụng hệ điều hành Ubuntu
 
Hướng dẫn sử dụng Outlook 2010
Hướng dẫn sử dụng Outlook 2010Hướng dẫn sử dụng Outlook 2010
Hướng dẫn sử dụng Outlook 2010
 
Hướng dẫn sử dụng Power Point 2010
Hướng dẫn sử dụng Power Point 2010Hướng dẫn sử dụng Power Point 2010
Hướng dẫn sử dụng Power Point 2010
 
Hướng dẫn sử dụng Excel 2010
Hướng dẫn sử dụng  Excel 2010Hướng dẫn sử dụng  Excel 2010
Hướng dẫn sử dụng Excel 2010
 
Hướng dẫn sử dụng Word 2010
Hướng dẫn sử dụng Word 2010Hướng dẫn sử dụng Word 2010
Hướng dẫn sử dụng Word 2010
 
Manage IT as a Business
Manage IT as a BusinessManage IT as a Business
Manage IT as a Business
 
Tóm tắt lệnh Ubuntu
Tóm tắt lệnh UbuntuTóm tắt lệnh Ubuntu
Tóm tắt lệnh Ubuntu
 
Hạt Giống Tâm Hồn - Tập 11 - Những trải nghiệm cuộc sống
Hạt Giống Tâm Hồn - Tập 11 - Những trải nghiệm cuộc sốngHạt Giống Tâm Hồn - Tập 11 - Những trải nghiệm cuộc sống
Hạt Giống Tâm Hồn - Tập 11 - Những trải nghiệm cuộc sống
 
Hạt Giống Tâm Hồn - Tập 10 - Theo dòng thời gian
Hạt Giống Tâm Hồn - Tập 10 - Theo dòng thời gianHạt Giống Tâm Hồn - Tập 10 - Theo dòng thời gian
Hạt Giống Tâm Hồn - Tập 10 - Theo dòng thời gian
 
Hạt Giống Tâm Hồn - Tập 9 - Vượt qua thử thách
Hạt Giống Tâm Hồn - Tập 9 - Vượt qua thử tháchHạt Giống Tâm Hồn - Tập 9 - Vượt qua thử thách
Hạt Giống Tâm Hồn - Tập 9 - Vượt qua thử thách
 
Hạt Giống Tâm Hồn - Tập 8 - Những câu chuyện cuộc sống
Hạt Giống Tâm Hồn - Tập 8 - Những câu chuyện cuộc sốngHạt Giống Tâm Hồn - Tập 8 - Những câu chuyện cuộc sống
Hạt Giống Tâm Hồn - Tập 8 - Những câu chuyện cuộc sống
 
Hạt Giống Tâm Hồn - Tập 7 - Những câu chuyện cuộc sống
Hạt Giống Tâm Hồn - Tập 7 - Những câu chuyện cuộc sốngHạt Giống Tâm Hồn - Tập 7 - Những câu chuyện cuộc sống
Hạt Giống Tâm Hồn - Tập 7 - Những câu chuyện cuộc sống
 
Hạt Giống Tâm Hồn - Tập 5 - Ý nghĩa cuộc sống
Hạt Giống Tâm Hồn - Tập 5 - Ý nghĩa cuộc sốngHạt Giống Tâm Hồn - Tập 5 - Ý nghĩa cuộc sống
Hạt Giống Tâm Hồn - Tập 5 - Ý nghĩa cuộc sống
 
Hạt Giống Tâm Hồn - Tập 4 - Từ Những Điều Bình Dị
Hạt Giống Tâm Hồn - Tập 4 - Từ Những Điều Bình DịHạt Giống Tâm Hồn - Tập 4 - Từ Những Điều Bình Dị
Hạt Giống Tâm Hồn - Tập 4 - Từ Những Điều Bình Dị
 
Hạt Giống Tâm Hồn - Tập 3 - Từ những điều bình dị
Hạt Giống Tâm Hồn - Tập 3 - Từ những điều bình dịHạt Giống Tâm Hồn - Tập 3 - Từ những điều bình dị
Hạt Giống Tâm Hồn - Tập 3 - Từ những điều bình dị
 
Hạt Giống Tâm Hồn - Tập 2 - Cho lòng dũng cảm và tình yêu cuộc sống
Hạt Giống Tâm Hồn - Tập 2 - Cho lòng dũng cảm và tình yêu cuộc sốngHạt Giống Tâm Hồn - Tập 2 - Cho lòng dũng cảm và tình yêu cuộc sống
Hạt Giống Tâm Hồn - Tập 2 - Cho lòng dũng cảm và tình yêu cuộc sống
 

Último

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Business intelligence: Develop cube views for your own objects

  • 1. Business Intelligence Develop cube views for your own objects
  • 2. Content 1. BI/Graph View 2. Technical Overview 3. Preparing Data 4. Displaying cube views 5. Case study: cross models 6. Conclusion
  • 4. BI/Graph View measure : can be aggregated (right now, only summed) dimension : can be grouped · ·
  • 5. A Short History of BI in Odoo pre 2014: list view + group bys, graph view Q1/Q2 2014: graph view rewrite -> pivot table + graphs, lots of backend work future: ? we're looking at searchview/BI view integration. · · ·
  • 8. Anatomy of BI/Graph View pivot tablepivot table: keeps the data, calls the ORM graph widgetgraph widget : user interaction graph viewgraph view : client interaction · · ·
  • 9. BI view xml <record<record id="..." model="ir.ui.view">> <field<field name="name">>crm.opportunity.report.graph</field></field> <field<field name="model">>crm.lead.report</field></field> <field<field name="arch" type="xml">> <graph<graph string="Leads Analysis" type="pivot" stacked="True">> <field<field name="date_deadline" type="row"/>/> <field<field name="stage_id" type="col"/>/> <field<field name="planned_revenue" type="measure"/>/> </graph></graph> </field></field> </record></record>
  • 10. BI view API In graph tag: string: title stacked: if bar chart is stacked/not stacked (default=false) type: mode (pivot, bar, pie, line) (default=bar) In field tags, type attribute: row : will be grouped by rows (dimension) col : will be grouped by cols (dimension) measure : will be aggregated if no type, measure by default · · · · · · ·
  • 11. Date/datetime Always want to be different: date/datetime have a special syntax for groupby: field_date:day, field_date:week, field_date:month (default) field_date:quarter, field_date:year <graph<graph string="Leads Analysis" type="pivot" stacked="True">> <field<field name="date_deadline:week" type="row"/>/> <field<field name="stage_id" type="col"/>/> <field<field name="planned_revenue" type="measure"/>/> </graph></graph> · · · · ·
  • 12. Graph widget setup Graph widget has two more options: visible_ui (true) : indicate if UI is visible heatmap_mode ('none') can be set to row/col/both · ·
  • 14. Odoo Model Odoo BI view will read the various fields. Depending on their type, it will use them for measures : every fields of type integer, float (except 'id') dimensions : right now: every fields defined in the 'group by' category in the search bar. later: every field that can be grouped by the db · · · ·
  • 15. Where is your data? The data needs to satisfy two conditions: be stored in the database (beware of functional fields not stored) be accessed from one single odoo model If yes, you're done. If not, two possibilities: can you extend a model? (stored functional fields, relational fields) can you create a custom model with a postgres view, to link the various models with the data? Bottom line: it needs to be in the DB · · · ·
  • 16. Extending a model WARNING: old API... Do not try this at home!!! classclass res_partner((osv..osv):): _name == 'res.partner' _inherit == 'res.partner' defdef _total_invoice((self,, cr,, uid,, ids,, ......):): ...... # [insert here nice looking code to # compute the total invoice of a customer] ...... returnreturn result _columns == {{ 'total_invoiced':: fields..function((_total_invoice,, string=="Total Invoiced",, type=='float',, store==True)) }}
  • 17. More advanced: Cross model analysis Example: purchase/report/purchase_report.py All reporting views use that technique. Warning: bypass the ORM
  • 19. Edit in live 1. go to developer mode 2. edit action, add 'graph', 3. edit views, create 'graph' 4. profit! Good for testing.
  • 20. Adding a BI view with xml Add the desired graph view: <record<record id="view_project_task_graph" model="ir.ui.view">> <field<field name="name">>project.task.graph</field></field> <field<field name="model">>project.task</field></field> <field<field name="arch" type="xml">> <graph<graph string="Project Tasks" type="bar">> <field<field name="project_id" type="row"/>/> <field<field name="planned_hours" type="measure"/>/> </graph></graph> </field></field> </record></record>
  • 21. Adding a BI view with xml(2) Add it to the action: <record<record id="action_view_task" model="ir.actions.act_window">> ... <field<field name="view_mode">>kanban,tree,form,calendar,gantt,graph</field></field> ... You can force the correct view: <field<field name="view_id" ref="view_project_task_graph"/>/>
  • 22. Advanced: client action In js, create a widget and append it to your view: thisthis..graph_widget == newnew openerp..web_graph..Graph(( thisthis,, some_model,, some_domain,, options);); thisthis..graph_widget..appendTo((thisthis..$el););
  • 23. Future of BI in odoo?