SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
OpenERP e l'arte della gestione azienda con Python




                  Firenze - 8 maggio 2010


                   OpenERP
e l'arte della gestione aziendale con Python
                           relatore:

      Davide Corio < davide.corio@domsense.com >


     domsense srl - http://www.domsense.com - info@domsense.com
OpenERP: cos'è?




  ...o meglio, cosa non è?

  OpenERP NON è un software gestionale




   domsense srl - http://www.domsense.com - info@domsense.com
OpenERP: cos'è?




  OpenERP è prima di tutto un framework




 2003                                                   2009




   domsense srl - http://www.domsense.com - info@domsense.com
OpenObject: cos'è?




A RAD framework to design
    OpenERP è prima di tutto un framework

sexy applications in hours !




      domsense srl - http://www.domsense.com - info@domsense.com
OpenERP: sexy?




  domsense srl - http://www.domsense.com - info@domsense.com
OpenERP: multi-piattaforma




   domsense srl - http://www.domsense.com - info@domsense.com
OpenERP: multi-piattaforma




   domsense srl - http://www.domsense.com - info@domsense.com
OpenERP: multi-piattaforma




   domsense srl - http://www.domsense.com - info@domsense.com
OpenERP 6.0: countdown




                                              Nuovo Skin




   domsense srl - http://www.domsense.com - info@domsense.com
OpenERP 6.0: countdown




   domsense srl - http://www.domsense.com - info@domsense.com
OpenERP 6.0: countdown




   domsense srl - http://www.domsense.com - info@domsense.com
OpenERP 6.0: countdown




   domsense srl - http://www.domsense.com - info@domsense.com
OpenERP 6.0: countdown




   domsense srl - http://www.domsense.com - info@domsense.com
OpenERP: oltre il look




OpenObject: ORM, API, XML-RPC, Viste, ...




         domsense srl - http://www.domsense.com - info@domsense.com
OpenObject: gli oggetti




class project(osv.osv):
   _name = "project.project"
   _description = "Project"

 […]

def onchange_partner_id(self, cr, uid, ids, part):
     if not part:
         return {'value':{'contact_id': False, 'pricelist_id': False}}
     addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['contact'])
       […]

_columns = {
    'name': fields.char("Project Name", size=128, required=True),
    'complete_name': fields.function(_complete_name, method=True, string="Project Name", type='char', size=128),
    'active': fields.boolean('Active'),
    'category_id': fields.many2one('account.analytic.account','Analytic Account', help="..."),
    'priority': fields.integer('Sequence'),
      […]

_defaults = {
    'active': lambda *a: True,
    'manager': lambda object,cr,uid,context: uid,
      [...]




                     domsense srl - http://www.domsense.com - info@domsense.com
OpenObject: le viste




<?xml version="1.0" encoding="utf-8"?>
<openerp>
  <data>
    <menuitem icon="terp-project" id="menu_main" name="Project Management"/>
    <menuitem id="menu_tasks" name="Tasks" parent="menu_main"/>
    <menuitem id="menu_definitions" name="Configuration" parent="project.menu_main" sequence="1"/>

    <!-- Project -->
    <record id="edit_project" model="ir.ui.view">
       <field name="name">project.project.form</field>
       <field name="model">project.project</field>
       <field name="type">form</field>
       <field name="arch" type="xml">                      'parent_id': fields.many2one('project.project', 
          <form string="Project">                                       'Parent Project',
             <group colspan="4" col="6">                                help="If you have..."),
               <field name="name" select="1"/>
               <field name="parent_id"/>
               <field name="manager" select="1"/>
               <field name="date_start"/>
               <field name="date_end"/>
               <field name="progress_rate" widget="progressbar"/>




                   domsense srl - http://www.domsense.com - info@domsense.com
OpenObject: i widget




<?xml version="1.0" encoding="utf-8"?>
<openerp>
  <data>
    <menuitem icon="terp-project" id="menu_main" name="Project Management"/>
    <menuitem id="menu_tasks" name="Tasks" parent="menu_main"/>
    <menuitem id="menu_definitions" name="Configuration" parent="project.menu_main" sequence="1"/>

    <!-- Project -->
    <record id="edit_project" model="ir.ui.view">
       <field name="name">project.project.form</field>
       <field name="model">project.project</field>
       <field name="type">form</field>
       <field name="arch" type="xml">
          <form string="Project">
             <group colspan="4" col="6">
               <field name="name" select="1"/>
               <field name="parent_id"/>
               <field name="manager" select="1"/>
               <field name="date_start"/>
               <field name="date_end"/>
               <field name="progress_rate" widget="progressbar"/>




                   domsense srl - http://www.domsense.com - info@domsense.com
OpenObject: i wizard




class wizard_close(wizard.interface):
   def _check_complete(self, cr, uid, data, context):
     task = pooler.get_pool(cr.dbname).get('project.task').browse(cr, uid, data['ids'])[0]
     if not (task.project_id and task.project_id.warn_customer):
         return 'close'
     return 'mail_ask'
  […]

states = {
     'init': {
         'actions': [],
         'result': {'type':'choice', 'next_state':_check_complete}
     },
     'mail_ask': {
         'actions': [_get_data],
         'result': {'type':'form', 'arch':mail_form, 'fields':mail_fields, 'state':[('end', 'Cancel'), ('close', 'Quiet close'), 
                                                                                     ('mail_send', 'Send Message')]},
     },
       [...]
     'close': {
         'actions': [_do_close],
         'result': {'type':'state', 'state':'end'},
     },
   }




                        domsense srl - http://www.domsense.com - info@domsense.com
OpenObject: i reports




   domsense srl - http://www.domsense.com - info@domsense.com
OpenObject: XML-RPC




import xmlrpclib

user = 'admin'
pwd = 'admin'
dbname = 'pycon4'
model = 'res.partner'

sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/common')
uid = sock.login(dbname ,user ,pwd)

sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/object')

# CREATE A PARTNER
partner_data = {'name':'Acme SPA', 'active':True, 'vat':'IT0123456789213'}
partner_id = sock.execute(dbname, uid, pwd, model, 'create', partner_data)




          domsense srl - http://www.domsense.com - info@domsense.com
OpenObject: XML-RPC




<?
  include('xmlrpc.inc');
  $arrayVal = array(
  'name'=>new xmlrpcval('Acme SPA', "string") ,
  'vat'=>new xmlrpcval('IT0123456789434' , "string")
  );
  $client = new xmlrpc_client("http://localhost:8069/xmlrpc/object");
  $msg = new xmlrpcmsg('execute');
  $msg->addParam(new xmlrpcval("dbname", "string"));
  $msg->addParam(new xmlrpcval("3", "int"));
  $msg->addParam(new xmlrpcval("demo", "string"));
  $msg->addParam(new xmlrpcval("res.partner", "string"));
  $msg->addParam(new xmlrpcval("create", "string"));
  $msg->addParam(new xmlrpcval($arrayVal, "struct"));
  $resp = $client->send($msg);
  if ($resp->faultCode())
      echo 'Error: '.$resp->faultString();
  else
      echo 'Partner '.$resp->value()->scalarval().' created !';
  ?>




             domsense srl - http://www.domsense.com - info@domsense.com
OpenERP: Documentazione




1. http://www.openobject.com (Forum, Wiki, Planet...)

2. http://doc.openerp.com (Dev Book, Community Book, …)

3. Memento: http://www.openobject.com/memento




          domsense srl - http://www.domsense.com - info@domsense.com
OpenERP: Risorse




1. IRC (freenode): #openobject, #openerp-it

2. Forum: http://www.openobject.com/forum

3. Forum IT: http://www.openerp-italia.org




          domsense srl - http://www.domsense.com - info@domsense.com
OpenERP: Launchpad




1. https://launchpad.net/openobject-server

2. https://launchpad.net/openobject-client

3. https://launchpad.net/openobject-client-web

4. https://launchpad.net/openobject-addons




    domsense srl - http://www.domsense.com - info@domsense.com

Contenu connexe

Tendances

Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...
Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...
Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...Francois Marier
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I thinkWim Godden
 
Remy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQueryRemy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQuerydeimos
 
HTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymoreHTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymoreRemy Sharp
 
Aplicacoes dinamicas Rails com Backbone
Aplicacoes dinamicas Rails com BackboneAplicacoes dinamicas Rails com Backbone
Aplicacoes dinamicas Rails com BackboneRafael Felix da Silva
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoRob Bontekoe
 
Rushed to Victory Gardens' stage, An Issue of Blood is more effusion than play
Rushed to Victory Gardens' stage, An Issue of Blood is more effusion than playRushed to Victory Gardens' stage, An Issue of Blood is more effusion than play
Rushed to Victory Gardens' stage, An Issue of Blood is more effusion than playchicagonewsyesterday
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I thinkWim Godden
 
Joe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand DwrJoe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand Dwrdeimos
 
DOM Scripting Toolkit - jQuery
DOM Scripting Toolkit - jQueryDOM Scripting Toolkit - jQuery
DOM Scripting Toolkit - jQueryRemy Sharp
 
Acceptance Testing with Webrat
Acceptance Testing with WebratAcceptance Testing with Webrat
Acceptance Testing with WebratLuismi Cavallé
 
Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web developmentJohannes Brodwall
 
GDayX - Advanced Angular.JS
GDayX - Advanced Angular.JSGDayX - Advanced Angular.JS
GDayX - Advanced Angular.JSNicolas Embleton
 
Mitigating Advertisement Impact on Page Performance
Mitigating Advertisement Impact on Page PerformanceMitigating Advertisement Impact on Page Performance
Mitigating Advertisement Impact on Page PerformanceEdmunds.com, Inc.
 
Form demoinplaywithmysql
Form demoinplaywithmysqlForm demoinplaywithmysql
Form demoinplaywithmysqlKnoldus Inc.
 
Single page webapps & javascript-testing
Single page webapps & javascript-testingSingle page webapps & javascript-testing
Single page webapps & javascript-testingsmontanari
 

Tendances (20)

Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...
Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...
Building Persona: federated and privacy-sensitive identity for the Web (LCA 2...
 
Backbone - TDC 2011 Floripa
Backbone - TDC 2011 FloripaBackbone - TDC 2011 Floripa
Backbone - TDC 2011 Floripa
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
Discontinuing Reader Matches
Discontinuing Reader MatchesDiscontinuing Reader Matches
Discontinuing Reader Matches
 
Remy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQueryRemy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQuery
 
HTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymoreHTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymore
 
Aplicacoes dinamicas Rails com Backbone
Aplicacoes dinamicas Rails com BackboneAplicacoes dinamicas Rails com Backbone
Aplicacoes dinamicas Rails com Backbone
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
 
Rushed to Victory Gardens' stage, An Issue of Blood is more effusion than play
Rushed to Victory Gardens' stage, An Issue of Blood is more effusion than playRushed to Victory Gardens' stage, An Issue of Blood is more effusion than play
Rushed to Victory Gardens' stage, An Issue of Blood is more effusion than play
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
Joe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand DwrJoe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand Dwr
 
Practica n° 7
Practica n° 7Practica n° 7
Practica n° 7
 
DOM Scripting Toolkit - jQuery
DOM Scripting Toolkit - jQueryDOM Scripting Toolkit - jQuery
DOM Scripting Toolkit - jQuery
 
Acceptance Testing with Webrat
Acceptance Testing with WebratAcceptance Testing with Webrat
Acceptance Testing with Webrat
 
Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web development
 
GDayX - Advanced Angular.JS
GDayX - Advanced Angular.JSGDayX - Advanced Angular.JS
GDayX - Advanced Angular.JS
 
前端概述
前端概述前端概述
前端概述
 
Mitigating Advertisement Impact on Page Performance
Mitigating Advertisement Impact on Page PerformanceMitigating Advertisement Impact on Page Performance
Mitigating Advertisement Impact on Page Performance
 
Form demoinplaywithmysql
Form demoinplaywithmysqlForm demoinplaywithmysql
Form demoinplaywithmysql
 
Single page webapps & javascript-testing
Single page webapps & javascript-testingSingle page webapps & javascript-testing
Single page webapps & javascript-testing
 

En vedette

Foxgame introduzione all'apprendimento automatico
Foxgame introduzione all'apprendimento automaticoFoxgame introduzione all'apprendimento automatico
Foxgame introduzione all'apprendimento automaticoPyCon Italia
 
Monitoraggio del Traffico di Rete Usando Python ed ntop
Monitoraggio del Traffico di Rete Usando Python ed ntopMonitoraggio del Traffico di Rete Usando Python ed ntop
Monitoraggio del Traffico di Rete Usando Python ed ntopPyCon Italia
 
Django è pronto per l'Enterprise
Django è pronto per l'EnterpriseDjango è pronto per l'Enterprise
Django è pronto per l'EnterprisePyCon Italia
 
Undici anni di lavoro con Python
Undici anni di lavoro con PythonUndici anni di lavoro con Python
Undici anni di lavoro con PythonPyCon Italia
 
Feed back report 2010
Feed back report 2010Feed back report 2010
Feed back report 2010PyCon Italia
 
Spyppolare o non spyppolare
Spyppolare o non spyppolareSpyppolare o non spyppolare
Spyppolare o non spyppolarePyCon Italia
 
socket e SocketServer: il framework per i server Internet in Python
socket e SocketServer: il framework per i server Internet in Pythonsocket e SocketServer: il framework per i server Internet in Python
socket e SocketServer: il framework per i server Internet in PythonPyCon Italia
 
Qt mobile PySide bindings
Qt mobile PySide bindingsQt mobile PySide bindings
Qt mobile PySide bindingsPyCon Italia
 
Italian Conference on Nagios: Michael Medin on Windows Monitoring
Italian Conference on Nagios: Michael Medin on Windows MonitoringItalian Conference on Nagios: Michael Medin on Windows Monitoring
Italian Conference on Nagios: Michael Medin on Windows MonitoringWürth Phoenix
 
Nagios Conference 2011 - Tony Roman - Cacti Workshop
Nagios Conference 2011 - Tony Roman - Cacti WorkshopNagios Conference 2011 - Tony Roman - Cacti Workshop
Nagios Conference 2011 - Tony Roman - Cacti WorkshopNagios
 

En vedette (11)

Foxgame introduzione all'apprendimento automatico
Foxgame introduzione all'apprendimento automaticoFoxgame introduzione all'apprendimento automatico
Foxgame introduzione all'apprendimento automatico
 
Monitoraggio del Traffico di Rete Usando Python ed ntop
Monitoraggio del Traffico di Rete Usando Python ed ntopMonitoraggio del Traffico di Rete Usando Python ed ntop
Monitoraggio del Traffico di Rete Usando Python ed ntop
 
Effective EC2
Effective EC2Effective EC2
Effective EC2
 
Django è pronto per l'Enterprise
Django è pronto per l'EnterpriseDjango è pronto per l'Enterprise
Django è pronto per l'Enterprise
 
Undici anni di lavoro con Python
Undici anni di lavoro con PythonUndici anni di lavoro con Python
Undici anni di lavoro con Python
 
Feed back report 2010
Feed back report 2010Feed back report 2010
Feed back report 2010
 
Spyppolare o non spyppolare
Spyppolare o non spyppolareSpyppolare o non spyppolare
Spyppolare o non spyppolare
 
socket e SocketServer: il framework per i server Internet in Python
socket e SocketServer: il framework per i server Internet in Pythonsocket e SocketServer: il framework per i server Internet in Python
socket e SocketServer: il framework per i server Internet in Python
 
Qt mobile PySide bindings
Qt mobile PySide bindingsQt mobile PySide bindings
Qt mobile PySide bindings
 
Italian Conference on Nagios: Michael Medin on Windows Monitoring
Italian Conference on Nagios: Michael Medin on Windows MonitoringItalian Conference on Nagios: Michael Medin on Windows Monitoring
Italian Conference on Nagios: Michael Medin on Windows Monitoring
 
Nagios Conference 2011 - Tony Roman - Cacti Workshop
Nagios Conference 2011 - Tony Roman - Cacti WorkshopNagios Conference 2011 - Tony Roman - Cacti Workshop
Nagios Conference 2011 - Tony Roman - Cacti Workshop
 

Similaire à OpenERP e l'arte della gestione aziendale con Python

Creating Single Page Applications with Oracle Apex
Creating Single Page Applications with Oracle ApexCreating Single Page Applications with Oracle Apex
Creating Single Page Applications with Oracle ApexDick Dral
 
Spawithapex0 150815075436-lva1-app6891
Spawithapex0 150815075436-lva1-app6891Spawithapex0 150815075436-lva1-app6891
Spawithapex0 150815075436-lva1-app6891Mohamedcpcbma
 
Taking Web Apps Offline
Taking Web Apps OfflineTaking Web Apps Offline
Taking Web Apps OfflinePedro Morais
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
 
Java Web Development with Stripes
Java Web Development with StripesJava Web Development with Stripes
Java Web Development with StripesSamuel Santos
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For BeginnersJonathan Wage
 
Tools for Solving Performance Issues
Tools for Solving Performance IssuesTools for Solving Performance Issues
Tools for Solving Performance IssuesOdoo
 
[AngularJS] From Angular to Mobile in 30 minutes
[AngularJS] From Angular to Mobile in 30 minutes[AngularJS] From Angular to Mobile in 30 minutes
[AngularJS] From Angular to Mobile in 30 minutesGlobant
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVCAlive Kuo
 
Local SQLite Database with Node for beginners
Local SQLite Database with Node for beginnersLocal SQLite Database with Node for beginners
Local SQLite Database with Node for beginnersLaurence Svekis ✔
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup PerformanceJustin Cataldo
 
Micro app-framework - NodeLive Boston
Micro app-framework - NodeLive BostonMicro app-framework - NodeLive Boston
Micro app-framework - NodeLive BostonMichael Dawson
 
Introducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.jsIntroducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.jsRichard Rodger
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshowsblackman
 
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...SPTechCon
 

Similaire à OpenERP e l'arte della gestione aziendale con Python (20)

Creating Single Page Applications with Oracle Apex
Creating Single Page Applications with Oracle ApexCreating Single Page Applications with Oracle Apex
Creating Single Page Applications with Oracle Apex
 
Spawithapex0 150815075436-lva1-app6891
Spawithapex0 150815075436-lva1-app6891Spawithapex0 150815075436-lva1-app6891
Spawithapex0 150815075436-lva1-app6891
 
Angular Workshop_Sarajevo2
Angular Workshop_Sarajevo2Angular Workshop_Sarajevo2
Angular Workshop_Sarajevo2
 
Taking Web Apps Offline
Taking Web Apps OfflineTaking Web Apps Offline
Taking Web Apps Offline
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Java Web Development with Stripes
Java Web Development with StripesJava Web Development with Stripes
Java Web Development with Stripes
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For Beginners
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
 
Tools for Solving Performance Issues
Tools for Solving Performance IssuesTools for Solving Performance Issues
Tools for Solving Performance Issues
 
[AngularJS] From Angular to Mobile in 30 minutes
[AngularJS] From Angular to Mobile in 30 minutes[AngularJS] From Angular to Mobile in 30 minutes
[AngularJS] From Angular to Mobile in 30 minutes
 
Test upload
Test uploadTest upload
Test upload
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
Local SQLite Database with Node for beginners
Local SQLite Database with Node for beginnersLocal SQLite Database with Node for beginners
Local SQLite Database with Node for beginners
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup Performance
 
Micro app-framework - NodeLive Boston
Micro app-framework - NodeLive BostonMicro app-framework - NodeLive Boston
Micro app-framework - NodeLive Boston
 
Intro to Ember.JS 2016
Intro to Ember.JS 2016Intro to Ember.JS 2016
Intro to Ember.JS 2016
 
Introducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.jsIntroducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.js
 
20120816 nodejsdublin
20120816 nodejsdublin20120816 nodejsdublin
20120816 nodejsdublin
 
Private slideshow
Private slideshowPrivate slideshow
Private slideshow
 
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
 

Plus de PyCon Italia

zc.buildout: "Un modo estremamente civile per sviluppare un'applicazione"
zc.buildout: "Un modo estremamente civile per sviluppare un'applicazione"zc.buildout: "Un modo estremamente civile per sviluppare un'applicazione"
zc.buildout: "Un modo estremamente civile per sviluppare un'applicazione"PyCon Italia
 
Python: ottimizzazione numerica algoritmi genetici
Python: ottimizzazione numerica algoritmi geneticiPython: ottimizzazione numerica algoritmi genetici
Python: ottimizzazione numerica algoritmi geneticiPyCon Italia
 
Python in the browser
Python in the browserPython in the browser
Python in the browserPyCon Italia
 
PyPy 1.2: snakes never crawled so fast
PyPy 1.2: snakes never crawled so fastPyPy 1.2: snakes never crawled so fast
PyPy 1.2: snakes never crawled so fastPyCon Italia
 
PyCuda: Come sfruttare la potenza delle schede video nelle applicazioni python
PyCuda: Come sfruttare la potenza delle schede video nelle applicazioni pythonPyCuda: Come sfruttare la potenza delle schede video nelle applicazioni python
PyCuda: Come sfruttare la potenza delle schede video nelle applicazioni pythonPyCon Italia
 
New and improved: Coming changes to the unittest module
 	 New and improved: Coming changes to the unittest module 	 New and improved: Coming changes to the unittest module
New and improved: Coming changes to the unittest modulePyCon Italia
 
Jython for embedded software validation
Jython for embedded software validationJython for embedded software validation
Jython for embedded software validationPyCon Italia
 
Crogioli, alambicchi e beute: dove mettere i vostri dati.
Crogioli, alambicchi e beute: dove mettere i vostri dati.Crogioli, alambicchi e beute: dove mettere i vostri dati.
Crogioli, alambicchi e beute: dove mettere i vostri dati.PyCon Italia
 
Comet web applications with Python, Django & Orbited
Comet web applications with Python, Django & OrbitedComet web applications with Python, Django & Orbited
Comet web applications with Python, Django & OrbitedPyCon Italia
 
Cleanup and new optimizations in WPython 1.1
Cleanup and new optimizations in WPython 1.1Cleanup and new optimizations in WPython 1.1
Cleanup and new optimizations in WPython 1.1PyCon Italia
 

Plus de PyCon Italia (11)

zc.buildout: "Un modo estremamente civile per sviluppare un'applicazione"
zc.buildout: "Un modo estremamente civile per sviluppare un'applicazione"zc.buildout: "Un modo estremamente civile per sviluppare un'applicazione"
zc.buildout: "Un modo estremamente civile per sviluppare un'applicazione"
 
Python: ottimizzazione numerica algoritmi genetici
Python: ottimizzazione numerica algoritmi geneticiPython: ottimizzazione numerica algoritmi genetici
Python: ottimizzazione numerica algoritmi genetici
 
Python idiomatico
Python idiomaticoPython idiomatico
Python idiomatico
 
Python in the browser
Python in the browserPython in the browser
Python in the browser
 
PyPy 1.2: snakes never crawled so fast
PyPy 1.2: snakes never crawled so fastPyPy 1.2: snakes never crawled so fast
PyPy 1.2: snakes never crawled so fast
 
PyCuda: Come sfruttare la potenza delle schede video nelle applicazioni python
PyCuda: Come sfruttare la potenza delle schede video nelle applicazioni pythonPyCuda: Come sfruttare la potenza delle schede video nelle applicazioni python
PyCuda: Come sfruttare la potenza delle schede video nelle applicazioni python
 
New and improved: Coming changes to the unittest module
 	 New and improved: Coming changes to the unittest module 	 New and improved: Coming changes to the unittest module
New and improved: Coming changes to the unittest module
 
Jython for embedded software validation
Jython for embedded software validationJython for embedded software validation
Jython for embedded software validation
 
Crogioli, alambicchi e beute: dove mettere i vostri dati.
Crogioli, alambicchi e beute: dove mettere i vostri dati.Crogioli, alambicchi e beute: dove mettere i vostri dati.
Crogioli, alambicchi e beute: dove mettere i vostri dati.
 
Comet web applications with Python, Django & Orbited
Comet web applications with Python, Django & OrbitedComet web applications with Python, Django & Orbited
Comet web applications with Python, Django & Orbited
 
Cleanup and new optimizations in WPython 1.1
Cleanup and new optimizations in WPython 1.1Cleanup and new optimizations in WPython 1.1
Cleanup and new optimizations in WPython 1.1
 

Dernier

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 

Dernier (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

OpenERP e l'arte della gestione aziendale con Python

  • 1. OpenERP e l'arte della gestione azienda con Python Firenze - 8 maggio 2010 OpenERP e l'arte della gestione aziendale con Python relatore: Davide Corio < davide.corio@domsense.com > domsense srl - http://www.domsense.com - info@domsense.com
  • 2. OpenERP: cos'è? ...o meglio, cosa non è? OpenERP NON è un software gestionale domsense srl - http://www.domsense.com - info@domsense.com
  • 3. OpenERP: cos'è? OpenERP è prima di tutto un framework 2003 2009 domsense srl - http://www.domsense.com - info@domsense.com
  • 4. OpenObject: cos'è? A RAD framework to design OpenERP è prima di tutto un framework sexy applications in hours ! domsense srl - http://www.domsense.com - info@domsense.com
  • 5. OpenERP: sexy? domsense srl - http://www.domsense.com - info@domsense.com
  • 6. OpenERP: multi-piattaforma domsense srl - http://www.domsense.com - info@domsense.com
  • 7. OpenERP: multi-piattaforma domsense srl - http://www.domsense.com - info@domsense.com
  • 8. OpenERP: multi-piattaforma domsense srl - http://www.domsense.com - info@domsense.com
  • 9. OpenERP 6.0: countdown Nuovo Skin domsense srl - http://www.domsense.com - info@domsense.com
  • 10. OpenERP 6.0: countdown domsense srl - http://www.domsense.com - info@domsense.com
  • 11. OpenERP 6.0: countdown domsense srl - http://www.domsense.com - info@domsense.com
  • 12. OpenERP 6.0: countdown domsense srl - http://www.domsense.com - info@domsense.com
  • 13. OpenERP 6.0: countdown domsense srl - http://www.domsense.com - info@domsense.com
  • 14. OpenERP: oltre il look OpenObject: ORM, API, XML-RPC, Viste, ... domsense srl - http://www.domsense.com - info@domsense.com
  • 15. OpenObject: gli oggetti class project(osv.osv): _name = "project.project" _description = "Project" […] def onchange_partner_id(self, cr, uid, ids, part): if not part: return {'value':{'contact_id': False, 'pricelist_id': False}} addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['contact']) […] _columns = { 'name': fields.char("Project Name", size=128, required=True), 'complete_name': fields.function(_complete_name, method=True, string="Project Name", type='char', size=128), 'active': fields.boolean('Active'), 'category_id': fields.many2one('account.analytic.account','Analytic Account', help="..."), 'priority': fields.integer('Sequence'), […] _defaults = { 'active': lambda *a: True, 'manager': lambda object,cr,uid,context: uid, [...] domsense srl - http://www.domsense.com - info@domsense.com
  • 16. OpenObject: le viste <?xml version="1.0" encoding="utf-8"?> <openerp> <data> <menuitem icon="terp-project" id="menu_main" name="Project Management"/> <menuitem id="menu_tasks" name="Tasks" parent="menu_main"/> <menuitem id="menu_definitions" name="Configuration" parent="project.menu_main" sequence="1"/> <!-- Project --> <record id="edit_project" model="ir.ui.view"> <field name="name">project.project.form</field> <field name="model">project.project</field> <field name="type">form</field> <field name="arch" type="xml"> 'parent_id': fields.many2one('project.project', <form string="Project"> 'Parent Project', <group colspan="4" col="6"> help="If you have..."), <field name="name" select="1"/> <field name="parent_id"/> <field name="manager" select="1"/> <field name="date_start"/> <field name="date_end"/> <field name="progress_rate" widget="progressbar"/> domsense srl - http://www.domsense.com - info@domsense.com
  • 17. OpenObject: i widget <?xml version="1.0" encoding="utf-8"?> <openerp> <data> <menuitem icon="terp-project" id="menu_main" name="Project Management"/> <menuitem id="menu_tasks" name="Tasks" parent="menu_main"/> <menuitem id="menu_definitions" name="Configuration" parent="project.menu_main" sequence="1"/> <!-- Project --> <record id="edit_project" model="ir.ui.view"> <field name="name">project.project.form</field> <field name="model">project.project</field> <field name="type">form</field> <field name="arch" type="xml"> <form string="Project"> <group colspan="4" col="6"> <field name="name" select="1"/> <field name="parent_id"/> <field name="manager" select="1"/> <field name="date_start"/> <field name="date_end"/> <field name="progress_rate" widget="progressbar"/> domsense srl - http://www.domsense.com - info@domsense.com
  • 18. OpenObject: i wizard class wizard_close(wizard.interface): def _check_complete(self, cr, uid, data, context): task = pooler.get_pool(cr.dbname).get('project.task').browse(cr, uid, data['ids'])[0] if not (task.project_id and task.project_id.warn_customer): return 'close' return 'mail_ask' […] states = { 'init': { 'actions': [], 'result': {'type':'choice', 'next_state':_check_complete} }, 'mail_ask': { 'actions': [_get_data], 'result': {'type':'form', 'arch':mail_form, 'fields':mail_fields, 'state':[('end', 'Cancel'), ('close', 'Quiet close'), ('mail_send', 'Send Message')]}, }, [...] 'close': { 'actions': [_do_close], 'result': {'type':'state', 'state':'end'}, }, } domsense srl - http://www.domsense.com - info@domsense.com
  • 19. OpenObject: i reports domsense srl - http://www.domsense.com - info@domsense.com
  • 20. OpenObject: XML-RPC import xmlrpclib user = 'admin' pwd = 'admin' dbname = 'pycon4' model = 'res.partner' sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/common') uid = sock.login(dbname ,user ,pwd) sock = xmlrpclib.ServerProxy('http://localhost:8069/xmlrpc/object') # CREATE A PARTNER partner_data = {'name':'Acme SPA', 'active':True, 'vat':'IT0123456789213'} partner_id = sock.execute(dbname, uid, pwd, model, 'create', partner_data) domsense srl - http://www.domsense.com - info@domsense.com
  • 21. OpenObject: XML-RPC <? include('xmlrpc.inc'); $arrayVal = array( 'name'=>new xmlrpcval('Acme SPA', "string") , 'vat'=>new xmlrpcval('IT0123456789434' , "string") ); $client = new xmlrpc_client("http://localhost:8069/xmlrpc/object"); $msg = new xmlrpcmsg('execute'); $msg->addParam(new xmlrpcval("dbname", "string")); $msg->addParam(new xmlrpcval("3", "int")); $msg->addParam(new xmlrpcval("demo", "string")); $msg->addParam(new xmlrpcval("res.partner", "string")); $msg->addParam(new xmlrpcval("create", "string")); $msg->addParam(new xmlrpcval($arrayVal, "struct")); $resp = $client->send($msg); if ($resp->faultCode()) echo 'Error: '.$resp->faultString(); else echo 'Partner '.$resp->value()->scalarval().' created !'; ?> domsense srl - http://www.domsense.com - info@domsense.com
  • 22. OpenERP: Documentazione 1. http://www.openobject.com (Forum, Wiki, Planet...) 2. http://doc.openerp.com (Dev Book, Community Book, …) 3. Memento: http://www.openobject.com/memento domsense srl - http://www.domsense.com - info@domsense.com
  • 23. OpenERP: Risorse 1. IRC (freenode): #openobject, #openerp-it 2. Forum: http://www.openobject.com/forum 3. Forum IT: http://www.openerp-italia.org domsense srl - http://www.domsense.com - info@domsense.com
  • 24. OpenERP: Launchpad 1. https://launchpad.net/openobject-server 2. https://launchpad.net/openobject-client 3. https://launchpad.net/openobject-client-web 4. https://launchpad.net/openobject-addons domsense srl - http://www.domsense.com - info@domsense.com