← Back to team overview

openerp-dev-web team mailing list archive

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

 

gpa(Open ERP) has proposed merging lp:~openerp-dev/openobject-addons/fixed_error_examp_processing_report 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/fixed_error_examp_processing_report/+merge/55753

Fixed the error and correcting the report
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/fixed_error_examp_processing_report/+merge/55753
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/fixed_error_examp_processing_report.
=== modified file 'training_exam_processing/training_exam_processing.py'
--- training_exam_processing/training_exam_processing.py	2011-03-22 13:34:27 +0000
+++ training_exam_processing/training_exam_processing.py	2011-03-31 13:43:31 +0000
@@ -85,7 +85,7 @@
     _columns = {
         'name' : fields.char('Reference', size=32, required=True, readonly=True, select=1),
         'job_id' : fields.many2one('res.partner.job', 'Job', required=True, select=1,
-                                   domain="[('state', '=', 'current'),('function_id.code', '=', 'correcto')]",
+                                   domain="[('state', '=', 'current'),('function', '=', 'corrector')]",
                                    **WRITABLE_ONLY_IN_DRAFT),
         'contact_id' : fields.related('job_id', 'contact_id', type='many2one', relation='res.partner.contact',
                                       select=1, string='Contact', store=True, readonly=True),

=== modified file 'training_report/report/analytic_balance_year.py'
--- training_report/report/analytic_balance_year.py	2011-03-16 11:54:49 +0000
+++ training_report/report/analytic_balance_year.py	2011-03-31 13:43:31 +0000
@@ -91,7 +91,7 @@
 
     def _move_sum_debit(self, account_id, date1, date2):
         account_analytic_obj = self.pool.get('account.analytic.account')
-        year [int(date1[0:4])-1, int(date1[0:4])]
+        year = [int(date1[0:4])-1, int(date1[0:4])]
         ids = account_analytic_obj.search(self.cr, self.uid, [('parent_id', 'child_of', [account_id])])
         self.cr.execute("SELECT sum(amount)\
             FROM account_analytic_line \
@@ -170,9 +170,10 @@
         return self.cr.dictfetchall()
 
     def _sum_balance(self, accounts, date1, date2):
-        debit = self._sum_debit(accounts, date1, date2) or 0.0
-        credit = self._sum_credit(accounts, date1, date2) or 0.0
+        debit = self._sum_debit(accounts, date1, date2) or []
+        credit = self._sum_credit(accounts, date1, date2) or []
         result = []
+
         for index in range(len(debit)):
             result.append(debit[index]['sum'] - credit[index]['sum'])
         return result

=== modified file 'training_report/report/session_volume.rml'
--- training_report/report/session_volume.rml	2010-09-24 10:51:54 +0000
+++ training_report/report/session_volume.rml	2011-03-31 13:43:31 +0000
@@ -135,7 +135,7 @@
         </para>
         <section>
             <blockTable colWidths="160.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0" style="Table2" reapeatRows="1">
-                <tr style="Table_Header_Tile">
+                <tr>
                     <td><para style="terp_tblheader_Details">Product Line</para></td>
                     <td><para style="terp_tblheader_Details_Right">Subscriptions</para></td>
                     <td><para style="terp_tblheader_Details_Right">Revenues</para></td>
@@ -155,7 +155,7 @@
                     <td><para style="terp_default_Right_8">[[ formatLang(pl['average_price'], grouping=True) ]]</para></td>
                     <td><para style="terp_default_Right_8">[[ formatLang(pl['yield'], grouping=True) ]]</para></td>
                 </tr>
-                <tr style="Table_Header_Tile">
+                <tr>
                     <td><para style="terp_tblheader_Details">Total</para></td>
                     <td><para style="terp_tblheader_Details_Right">[[ data['form']['selected_period_standard']['total']['subscription'] ]]</para></td>
                     <td><para style="terp_tblheader_Details_Right">[[ formatLang(data['form']['selected_period_standard']['total']['input'], grouping=True) ]]</para></td>
@@ -236,7 +236,7 @@
         </para>
         <section>
             <blockTable colWidths="160.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0" style="Table2" repeatRows="1">
-                <tr style="Table_Header_Tile">
+                <tr>
                     <td><para style="terp_tblheader_Details">Product Line</para></td>
                     <td><para style="terp_tblheader_Details_Right">Subscriptions</para></td>
                     <td><para style="terp_tblheader_Details_Right">Revenues</para></td>
@@ -256,7 +256,7 @@
                     <td><para style="terp_default_Right_8">[[ formatLang(pl['average_price'], grouping=True) ]]</para></td>
                     <td><para style="terp_default_Right_8">[[ formatLang(pl['yield'], grouping=True) ]]</para></td>
                 </tr>
-                <tr style="Table_Header_Tile">
+                <tr>
                     <td><para style="terp_tblheader_Details">Total</para></td>
                     <td><para style="terp_tblheader_Details_Right">[[ data['form']['selected_period_intra']['total']['subscription'] ]]</para></td>
                     <td><para style="terp_tblheader_Details_Right">[[ formatLang(data['form']['selected_period_intra']['total']['input'], grouping=True) ]]</para></td>
@@ -271,7 +271,7 @@
         <para style="terp_default_space">
             <font color="white"> </font>
         </para>
-	<section>[[ data['form']['year'] == 0 and removeParentNode('section') ]]
+		<section>[[ data['form']['year'] == 0 and removeParentNode('section') ]]
         <condPageBreak height="300"/>
         <blockTable colWidths="482.0" style="Table_Header_analytic">
             <tr>
@@ -283,7 +283,7 @@
         </para>
         <section>
             <blockTable colWidths="160.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0" style="Table2" repeatRows="1">
-                <tr style="Table_Header_Tile">
+                <tr>
                     <td><para style="terp_tblheader_Details">Product Line</para></td>
                     <td><para style="terp_tblheader_Details_Right">Subscriptions</para></td>
                     <td><para style="terp_tblheader_Details_Right">Revenues</para></td>
@@ -303,7 +303,7 @@
                     <td><para style="terp_default_Right_8">[[ formatLang(pl['average_price'], grouping=True) ]]</para></td>
                     <td><para style="terp_default_Right_8">[[ formatLang(pl['yield'], grouping=True) ]]</para></td>
                 </tr>
-                <tr style="Table_Header_Tile">
+                <tr>
                     <td><para style="terp_tblheader_Details">Total</para></td>
                     <td><para style="terp_tblheader_Details_Right">[[ data['form']['old_period_standard']['total']['subscription'] ]]</para></td>
                     <td><para style="terp_tblheader_Details_Right">[[ formatLang(data['form']['old_period_standard']['total']['input'], grouping=True) ]]</para></td>
@@ -329,7 +329,7 @@
         </para>
         <section>
             <blockTable colWidths="160.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0" style="Table2" repeatRows="1">
-                <tr style="Table_Header_Tile">
+                <tr>
                     <td><para style="terp_tblheader_Details">Product Line</para></td>
                     <td><para style="terp_tblheader_Details_Right">Subscriptions</para></td>
                     <td><para style="terp_tblheader_Details_Right">Revenues</para></td>
@@ -349,7 +349,7 @@
                     <td><para style="terp_default_Right_8">[[ formatLang(pl['average_price'], grouping=True) ]]</para></td>
                     <td><para style="terp_default_Right_8">[[ formatLang(pl['yield'], grouping=True) ]]</para></td>
                 </tr>
-                <tr style="Table_Header_Tile">
+                <tr>
                     <td><para style="terp_tblheader_Details">Total</para></td>
                     <td><para style="terp_tblheader_Details_Right">[[ data['form']['old_period_exam']['total']['subscription'] ]]</para></td>
                     <td><para style="terp_tblheader_Details_Right">[[ formatLang(data['form']['old_period_exam']['total']['input'], grouping=True) ]]</para></td>
@@ -375,7 +375,7 @@
         </para>
         <section>
             <blockTable colWidths="160.0,50.0,50.0,50.0,50.0,50.0,50.0,50.0" style="Table2" repeatRows="1">
-                <tr style="Table_Header_Tile">
+                <tr>
                     <td><para style="terp_tblheader_Details">Product Line</para></td>
                     <td><para style="terp_tblheader_Details_Right">Subscriptions</para></td>
                     <td><para style="terp_tblheader_Details_Right">Revenues</para></td>
@@ -395,7 +395,7 @@
                     <td><para style="terp_default_Right_8">[[ formatLang(pl['average_price'], grouping=True) ]]</para></td>
                     <td><para style="terp_default_Right_8">[[ formatLang(pl['yield'], grouping=True) ]]</para></td>
                 </tr>
-                <tr style="Table_Header_Tile">
+                <tr>
                     <td><para style="terp_tblheader_Details">Total</para></td>
                     <td><para style="terp_tblheader_Details_Right">[[ data['form']['old_period_intra']['total']['subscription'] ]]</para></td>
                     <td><para style="terp_tblheader_Details_Right">[[ formatLang(data['form']['old_period_intra']['total']['input'], grouping=True) ]]</para></td>


Follow ups