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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

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

Andere mochten auch

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
 

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

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

Ähnlich wie OpenERP: 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...
 

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

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

Kürzlich hochgeladen

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Kürzlich hochgeladen (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 

OpenERP: 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