← Back to team overview

openerp-dev-web team mailing list archive

lp:~openerp-dev/openobject-addons/training_coures_lecturese_osv_memory into lp:~openobject-training/openobject-addons/training

 

gpa(Open ERP) has proposed merging lp:~openerp-dev/openobject-addons/training_coures_lecturese_osv_memory into lp:~openobject-training/openobject-addons/training.

Requested reviews:
  Bhumika (OpenERP) (sbh-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/training_coures_lecturese_osv_memory/+merge/60488

Converted the Top Course and Top Lecturer report to osvmemory
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/training_coures_lecturese_osv_memory/+merge/60488
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/training_coures_lecturese_osv_memory.
=== modified file 'training_evaluation/__openerp__.py'
--- training_evaluation/__openerp__.py	2011-05-03 05:54:50 +0000
+++ training_evaluation/__openerp__.py	2011-05-10 11:23:30 +0000
@@ -36,6 +36,8 @@
         'training_evaluation_demo.xml',
     ],
     'update_xml' : [
+        'wizard/top_lecturer_view.xml',
+        'wizard/top_course_view.xml',
         'security/training_evaluation_security.xml',
         'security/ir.model.access.csv',
         'sequence.xml',

=== modified file 'training_evaluation/training_evaluation_view.xml'
--- training_evaluation/training_evaluation_view.xml	2011-04-27 06:42:22 +0000
+++ training_evaluation/training_evaluation_view.xml	2011-05-10 11:23:30 +0000
@@ -510,15 +510,5 @@
             </field>
         </record>
 
-        <menuitem id="training_evaluation_top_lecturer_report_mi"
-            parent="base.menu_training_report"
-            type="wizard"
-            action="training_evaluation_top_lecturer_report_wizard" />
-
-        <menuitem id="training_evaluation_top_course_report_mi"
-            parent="base.menu_training_report"
-            type="wizard"
-            action="training_evaluation_top_course_report_wizard" />
-
     </data>
 </openerp>

=== modified file 'training_evaluation/training_evaluation_wizard.xml'
--- training_evaluation/training_evaluation_wizard.xml	2011-04-20 06:01:12 +0000
+++ training_evaluation/training_evaluation_wizard.xml	2011-05-10 11:23:30 +0000
@@ -37,17 +37,5 @@
             name="training.evaluation.lecturer.course.report"
             string="Evaluation Reports"/>
 
-        <wizard id="training_evaluation_top_lecturer_report_wizard"
-            model="training.evaluation"
-            menu="False"
-            name="training.evaluation.top.lecturer.wizard"
-            string="Top Lecturers Report" />
-
-        <wizard id="training_evaluation_top_course_report_wizard"
-            model="training.evaluation"
-            menu="False"
-            name="training.evaluation.top.course.wizard"
-            string="Top Courses Report" />
-
     </data>
 </openerp>

=== modified file 'training_evaluation/wizard/__init__.py'
--- training_evaluation/wizard/__init__.py	2010-08-30 14:39:10 +0000
+++ training_evaluation/wizard/__init__.py	2011-05-10 11:23:30 +0000
@@ -1,3 +1,5 @@
 import wizard_print_evaluation
 import wizard_preview_evaluation
 import wizard_organization_report
+import training_top_course
+import training_top_lecturer
\ No newline at end of file

=== added file 'training_evaluation/wizard/top_course_view.xml'
--- training_evaluation/wizard/top_course_view.xml	1970-01-01 00:00:00 +0000
+++ training_evaluation/wizard/top_course_view.xml	2011-05-10 11:23:30 +0000
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+	<data>
+	    <record model="ir.ui.view" id="top_courses_form">
+	        <field name="name">top.courses.form</field>
+	        <field name="model">top.courses</field>
+	        <field name="type">form</field>
+	        <field name="arch" type="xml">
+	            <form string="Top Courses">
+	            	<label string="Do you want to print the Top Courses Report?" />
+	                <newline/>
+	                <separator colspan="4"/>
+	                <group colspan="4">
+                        <label colspan="2"/>
+	                    <button type="special" special="cancel" string="Cancel" icon="gtk-cancel"/>
+	                    <button type="object" name="print_report" string="Print" icon="gtk-print"/>
+	                </group>
+	            </form>
+	        </field>
+	    </record>
+
+	    <record id="action_top_course" model="ir.actions.act_window">
+             <field name="name">Top Courses Report</field>
+             <field name="res_model">top.courses</field>
+             <field name="type">ir.actions.act_window</field>
+             <field name="view_type">form</field>
+             <field name="view_mode">tree,form</field>
+             <field name="view_id" ref="top_courses_form"/>
+             <field name="target">new</field>
+       </record>
+
+        <menuitem
+            name="Top Courses Report"
+            action="action_top_course"
+            id="menu_top_course"
+            parent="base.menu_training_report"
+            />
+>
+	</data>
+</openerp>

=== added file 'training_evaluation/wizard/top_lecturer_view.xml'
--- training_evaluation/wizard/top_lecturer_view.xml	1970-01-01 00:00:00 +0000
+++ training_evaluation/wizard/top_lecturer_view.xml	2011-05-10 11:23:30 +0000
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+	<data>
+	    <record model="ir.ui.view" id="top_lectuers_form">
+	        <field name="name">top.lectuers.form</field>
+	        <field name="model">top.lectuers</field>
+	        <field name="type">form</field>
+	        <field name="arch" type="xml">
+	            <form string="Top Courses">
+	            	<label string="Do you want to print the Top Lectuers Report?" />
+	                <newline/>
+	                <separator colspan="4"/>
+	                <group colspan="4">
+                        <label colspan="2"/>
+	                    <button type="special" special="cancel" string="Cancel" icon="gtk-cancel"/>
+	                    <button type="object" name="print_report" string="Print" icon="gtk-print"/>
+	                </group>
+	            </form>
+	        </field>
+	    </record>
+
+	    <record id="action_top_lectuers" model="ir.actions.act_window">
+             <field name="name">Top Lectuers Report</field>
+             <field name="res_model">top.lectuers</field>
+             <field name="type">ir.actions.act_window</field>
+             <field name="view_type">form</field>
+             <field name="view_mode">tree,form</field>
+             <field name="view_id" ref="top_lectuers_form"/>
+             <field name="target">new</field>
+       </record>
+
+        <menuitem
+            name="Top Lecturers Report"
+            action="action_top_lectuers"
+            id="menu_top_lectuers"
+            parent="base.menu_training_report"
+            />
+>
+	</data>
+</openerp>

=== added file 'training_evaluation/wizard/training_top_course.py'
--- training_evaluation/wizard/training_top_course.py	1970-01-01 00:00:00 +0000
+++ training_evaluation/wizard/training_top_course.py	2011-05-10 11:23:30 +0000
@@ -0,0 +1,43 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import osv
+from osv import fields
+
+class top_courses(osv.osv_memory):
+    _name = 'top.courses'
+
+    def print_report(self, cr, uid, ids, data, context=None):
+        datas = {}
+        if context is None:
+            context = {}
+        data = self.read(cr, uid, ids)[0]
+        datas = {
+             'ids': context.get('active_ids',[]),
+             'model': 'training.course',
+             'form': data
+             }
+        return {'type': 'ir.actions.report.xml', 'report_name': 'training.evaluation.top.course.report', 'datas': datas}
+
+top_courses()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'training_evaluation/wizard/training_top_lecturer.py'
--- training_evaluation/wizard/training_top_lecturer.py	1970-01-01 00:00:00 +0000
+++ training_evaluation/wizard/training_top_lecturer.py	2011-05-10 11:23:30 +0000
@@ -0,0 +1,43 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
+#    $Id$
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from osv import osv
+from osv import fields
+
+class top_lecturers(osv.osv_memory):
+    _name = 'top.lectuers'
+
+    def print_report(self, cr, uid, ids, data, context=None):
+        datas = {}
+        if context is None:
+            context = {}
+        data = self.read(cr, uid, ids)[0]
+        datas = {
+             'ids': context.get('active_ids',[]),
+             'model': 'training.evaluation',
+             'form': data
+             }
+        return {'type': 'ir.actions.report.xml', 'report_name': 'training.evaluation.top.lecturer.report', 'datas': datas}
+
+top_lecturers()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== modified file 'training_evaluation/wizard/wizard_print_evaluation.py'
--- training_evaluation/wizard/wizard_print_evaluation.py	2010-09-11 17:58:43 +0000
+++ training_evaluation/wizard/wizard_print_evaluation.py	2011-05-10 11:23:30 +0000
@@ -74,30 +74,3 @@
     }
 wizard_seance_report('training.evaluation.global.wizard')
 
-class wizard_top_lecturer_report(wizard.interface):
-    states = {
-        'init' : {
-            'actions' : [],
-            'result' : {
-                'type' : 'print',
-                'report' : 'training.evaluation.top.lecturer.report',
-                'state' : 'end',
-            }
-        }
-    }
-
-wizard_top_lecturer_report('training.evaluation.top.lecturer.wizard')
-
-class wizard_top_course_report(wizard.interface):
-    states = {
-        'init' : {
-            'actions' : [],
-            'result' : {
-                'type' : 'print',
-                'report' : 'training.evaluation.top.course.report',
-                'state' : 'end',
-            }
-        }
-    }
-
-wizard_top_course_report('training.evaluation.top.course.wizard')