Μέρος Δεύτερο
Open OBJECT Το Framework του OPEN ERP MVC
addons/ Sample Module - med/ # The module directory - demo/ # Demo and unit test population data - i18n/ # Translation files - report/ # Report definitions - security/ # Declaration of groups and access rights - view/ # Views (forms,lists), menus and actions - wizard/ # Wizards definitions - workflow/ # Workflow definitions - init.py # Python package initialization (required) - openerp.py # module declaration (required) - med.py # Python classes, the module's objects
Model (.py) class patient (osv.osv): _name = "med.patient _order = lastname asc _columns = { 'firstname' : fields.char ('Όνομα', size=50,required=true, select=1), 'lastname' : fields.char ('Επώνυμο', size=50,required=true, select=1), 'borndate' : fields.date ('borndate',required=true), 'gender' : fields.selection ([('1','Αγόρι'),('2','Κορίτσι'),], 'gender',required=true), 'height' : fields.integer ('Ύψος (σε cm)'), 'episkepseis' : fields.one2many('med.patient.episkepsi','patient_id','επίσκεψη'), } _sql_constraints = [ ( height', 'CHECK (height>=0)', To ΥΨΟΣ πρέπει να είναι ΘΕΤΙΚΟΣ αριθμός!'), patient () ORM Methods on osv.osv objects create(cr, uid, values,context=none) search(cr, uid, args, offset=0, limit=none, order=none, context=none, count=false) write(cr, uid, ids, values, context=none) unlink(cr, uid, ids, context=none)
View Form View Tree View <record model="ir.ui.view" id="med_patient_view"> <field name="name">med.patient.form</field> <field name="model">med.patient</field> <field name="type">form</field> <field name="arch" type="xml"> <form string="patient"> <field name= firstname /> <field name= lastname /> <field name= borndate /> <newline/> <field name= gender /> <field name= height /> <field name= episkepseis colspan= 4 /> </form> </field> </record> Action <record model="ir.actions.act_window" id="med_action_tree_patient"> <field name="name">ασθενείς</field> <field name="type">ir.actions.act_window</field> <field name="res_model">med.patient</field> <field name="view_type">form</field> <field name="view_id" ref="med_patient_tree"/> </record> <record model="ir.ui.view" id="med_patient_tree"> <field name="name">med.patient.tree</field> <field name="model">med.patient</field> <field name="type">tree</field> <field name="arch" type="xml"> <tree string='ασθενείς'> <field name= firstname"/> <field name="lastname"/> <field name="borndate"/> </tree> </field> </record> Menu Entry <menuitem name="patients" parent="med_menu" id="med_edit_patient" action="med_action_tree_patient" sequence="1"/>
Screenshots Demo: http://bit.ly/openerp_demo
Inheritance
Customization Module base_module_record Start Recording Customization από τον Client (γραφικό περιβάλλον) Export των παραμετροποιήσεων ως module (.zip)
Workflow Παράδειγμα: Έγκριση Δαπάνης Προσωπικού Δυνατότητα επεξεργασίας μέσω του web client
User Access Rights Διαχείριση προνομίων με χρήση «Ρόλων» Διαχείριση ασφάλειας στο επίπεδο της εφαρμογής Πιο συγκεκριμένα δικαιώματα: Read, Write, Create, Delete, σε συγκεκριμένα αντικείμενα (πίνακες στη ΒΔ) Read, Write σε επίπεδο συγκεκριμένου πεδίου Read, Write σε επίπεδο row level με χρήση Record Rules
Reports Open Office Report Designer Pdf, odt, doc Reports
Document Management System Πρόσβαση μέσω ftp ή Open ERP Ως attachments σε εγγραφές Virtual Documents
Sales / Purchases CRM Διαχείριση Προσωπικού Project Management Manufacturing Document Management Custom (hotel, hospital etc) Open ERP Modules Third Party Integration Modules Magento connector Asterisk Integration Mail Gateway Thunderbird, outlook plugin Google Maps
Open ERP Demo: Open ERP Demo Ελληνικά: http://bit.ly/e0ktqh Αγγλικά: http://bit.ly/gubce1 VMWare Image με Ελληνικό Open ERP 6.0.1: http://hospital.forge.osor.eu/openerp_6- Hospital_Ubuntu10.04.rar
www.openerp.com www.openerp.tv doc.openerp.com Links Community resources: www.launchpad.net/open-object doc.python.org edu.openerp.com