openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #04649
lp:~openerp-dev/openobject-addons/addons-training-intra-report-fix-ysa into lp:~openobject-training/openobject-addons/training
Yogesh(Open ERP) has proposed merging lp:~openerp-dev/openobject-addons/addons-training-intra-report-fix-ysa into lp:~openobject-training/openobject-addons/training.
Requested reviews:
OpenObject Training (openobject-training)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/addons-training-intra-report-fix-ysa/+merge/54859
training_intra :- fix problem in report.
training :- other some issue fix.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/addons-training-intra-report-fix-ysa/+merge/54859
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/addons-training-intra-report-fix-ysa.
=== modified file 'training_exam/wizard/training_exam_question_validate.py'
--- training_exam/wizard/training_exam_question_validate.py 2011-03-15 13:00:49 +0000
+++ training_exam/wizard/training_exam_question_validate.py 2011-03-25 13:20:51 +0000
@@ -81,7 +81,7 @@
context = {}
wkf = netsvc.LocalService('workflow')
if context.get('active_id'):
- self.pool.get('training.exam.question').write(cr, uid, [qid], {'state': 'validated'}, context=context)
+ self.pool.get('training.exam.question').write(cr, uid, [context.get('active_id')], {'state': 'validated'}, context=context)
for qwiz in self.browse(cr, uid, ids, context=context):
for qz in qwiz.questionnaire_ids:
wkf.trg_validate(uid, 'training.exam.questionnaire', qz.id, 'signal_teq_validate', cr)
=== modified file 'training_exam/wizard/training_exam_question_validate_view.xml'
--- training_exam/wizard/training_exam_question_validate_view.xml 2011-03-21 09:06:32 +0000
+++ training_exam/wizard/training_exam_question_validate_view.xml 2011-03-25 13:20:51 +0000
@@ -14,7 +14,7 @@
<group colspan="2" col="6">
<field name="state" invisible="1"/>
<button type="special" special="cancel" string="Cancel" icon="gtk-cancel"/>
- <button type="object" icon="gtk-go-foward" name="action_validate_wo_qz" string="Validate (without Quizz)"/>
+ <button type="object" icon="gtk-ok" name="action_validate_wo_qz" string="Validate (without Quizz)"/>
<button type="object" icon="gtk-ok" name="action_validate_w_qz" string="Validate (with Quizz)"/>
</group>
</form>
=== modified file 'training_intra/report/detail_offer_intra.py'
--- training_intra/report/detail_offer_intra.py 2011-03-21 09:06:32 +0000
+++ training_intra/report/detail_offer_intra.py 2011-03-25 13:20:51 +0000
@@ -23,6 +23,7 @@
import time
from report import report_sxw
import netsvc
+import pooler
from report.pyPdf import PdfFileReader, PdfFileWriter
try:
from cStringIO import StringIO
@@ -55,7 +56,8 @@
def create_single_pdf(self, cr, uid, ids, data, report_xml, context=None):
if context is None:
context = {}
- offer_pool = self.pool.get('training.offer')
+
+ offer_pool = pooler.get_pool(cr.dbname).get('training.offer')
sale_order_report = netsvc.LocalService('report.sale.order')
def merge_data(dest, source_data):
=== modified file 'training_intra/report/detail_offer_intra.rml'
--- training_intra/report/detail_offer_intra.rml 2010-04-27 08:37:37 +0000
+++ training_intra/report/detail_offer_intra.rml 2011-03-25 13:20:51 +0000
@@ -168,12 +168,12 @@
<para style="terp_default_8">[[ offer.name ]]</para>
</td>
</tr>
- <tr>[[ ( offer.location_id and ' ' ) or removeParentNode('tr') ]]
+ <tr>[[ ( offer.location_id and ' ' ) or removeParentNode('tr') ]]
<td>
<para style="terp_tblheader_General">Location</para>
</td>
<td>
- <para style="terp_default_8">[[ offer.location_id.partner_id.name or removeParentNode('tr') ]] ( [[ offer.location_id.name ]] )</para>
+ <para style="terp_default_8">[[ offer.location_id.partner_id and offer.location_id.partner_id.name or removeParentNode('tr') ]] ( [[ offer.location_id.name ]] )</para>
</td>
</tr>
<tr>[[ ( offer.lecturer_id and ' ' ) or removeParentNode('tr') ]]
@@ -184,20 +184,20 @@
<para style="terp_default_8">[[ offer.lecturer_id.contact_id.name ]] [[ offer.lecturer_id.contact_id.first_name ]]</para>
</td>
</tr>
- <tr>[[ ( offer.responsible and ' ' ) or removeParentNode('tr') ]]
+ <tr>[[ ( offer.responsible and ' ' ) or removeParentNode('tr') ]]
<td>
<para style="terp_tblheader_General">Project Manager</para>
</td>
<td>
- <para style="terp_default_8">[[ offer.responsible.name ]]</para>
+ <para style="terp_default_8">[[ offer.responsible and offer.responsible.name ]]</para>
</td>
</tr>
- <tr>[[ ( offer.coordinator and ' ' ) or removeParentNode('tr') ]]
+ <tr>[[ ( offer.coordinator and ' ' ) or removeParentNode('tr') ]]
<td>
<para style="terp_tblheader_General">Coordinator</para>
</td>
<td>
- <para style="terp_default_8">[[ offer.coordinator.name ]]</para>
+ <para style="terp_default_8">[[ offer.coordinator and offer.coordinator.name ]]</para>
</td>
</tr>
</blockTable>
@@ -289,7 +289,7 @@
<font color="white"> </font>
</para>
- <section>[[ offer.remark_intra or removeParentNode('section') ]]
+ <section>[[ offer.remark_intra or removeParentNode('section') ]]
<para style="terp_tblheader_Details">Remark(s)</para>
<blockTable colWidths="530.0">
<tr>
=== modified file 'training_intra/report/offer_intra.rml'
--- training_intra/report/offer_intra.rml 2011-02-23 12:44:45 +0000
+++ training_intra/report/offer_intra.rml 2011-03-25 13:20:51 +0000
@@ -189,7 +189,7 @@
<para style="terp_tblheader_General">Lecturer</para>
</td>
<td>
- <para style="terp_default_8">[[ offer.lecturer_id.contact_id.title ]] [[ offer.lecturer_id.contact_id.name ]] [[ offer.lecturer_id.contact_id.first_name or removeParentNode('tr') ]]</para>
+ <para style="terp_default_8">[[ offer.lecturer_id and offer.lecturer_id.contact_id.title and offer.lecturer_id.contact_id.title.name or removeParentNode('tr') ]] [[ offer.lecturer_id.contact_id.name ]] [[ offer.lecturer_id.contact_id.first_name ]]</para>
</td>
</tr>
<tr>
@@ -197,7 +197,7 @@
<para style="terp_tblheader_General">Location</para>
</td>
<td>
- <para style="terp_default_8">[[ offer.location_id.partner_id.name or removeParentNode('tr') ]] ( [[ offer.location_id.name ]] )</para>
+ <para style="terp_default_8">[[ offer.location_id and offer.location_id.partner_id and offer.location_id.partner_id.name or removeParentNode('tr') ]] ( [[ offer.location_id.name ]] )</para>
</td>
</tr>
</blockTable>
@@ -228,7 +228,7 @@
<para style="terp_tblheader_General">Contact</para>
</td>
<td>
- <para style="terp_default_8">[[ offer.job_id.contact_id.title ]] [[ offer.job_id.contact_id.name or removeParentNode('tr') ]] [[ offer.job_id.contact_id.first_name ]], [[ offer.job_id.contact_id.function_id.name ]]</para>
+ <para style="terp_default_8">[[ offer.job_id and offer.job_id.contact_id.title and offer.job_id.contact_id.title.name or removeParentNode('tr')]] [[ offer.job_id.contact_id.name ]] [[ offer.job_id.contact_id.first_name ]], [[ offer.job_id.contact_id.function ]]</para>
</td>
</tr>
<tr>
@@ -276,7 +276,7 @@
<para style="terp_default_Right_8">[[ formatLang(course.course_id.duration) ]]</para>
</td>
<td>
- <para style="terp_default_8">[[ course.course_id.lang_id.name ]]</para>
+ <para style="terp_default_8">[[ course.course_id.lang_id and course.course_id.lang_id.name or '' ]]</para>
</td>
</tr>
</blockTable>
@@ -330,7 +330,7 @@
<font color="white"> </font>
</para>
- <section>[[ offer.note_intra or removeParentNode('section') ]]
+ <section>[[ offer.note_intra or removeParentNode('section') ]]
<para style="terp_tblheader_Details">Remark(s)</para>
<blockTable colWidths="530.0">
<tr>
Follow ups