Skip to Content
Menu
This question has been flagged

Hello.

Into my wizard code I have this method:

class report_date_wizard(models.TransientModel):
.......
@api.multi
def report_infracciones_dates(self):
    clases = self.env['ing.acd.clase'].search(['&', ('alumnos_ids', '=', self.env.context['alumno_id']),
                        '&', ('fecha_fin', '<=', self.date_end),('fecha_ini', '>=', self.date_start)])
    data = clases.read()[0] if clases else False
    datas = {
        'ids': clases.ids if clases else False,
        'model': 'ing.acd.clase',
        'form': data, }
 
    return {
        'type': 'ir.actions.report.xml',
        'report_name': 'ing_academia.ing_aca_asistencia_alumno',
        'report_type': 'qweb-html',
        'datas': datas
        }


Report template,  XML file:

<template id="ing_aca_asistencia_alumno">
            
    <t t-call="report.html_container">
        <t t-call="report.external_layout">
            <t t-foreach="docs" t-as="cl">

                <span t-field="cl.mount" /> 

            </t>
        </t>
    </t>
</template>


This code: <span t-field="cl.mount" /> troug the next error:

File "/usr/lib/python2.7/dist-packages/openerp/fields.py", line 56, in get raise self.exceptionMissingError: ('MissingError', 'One of the documents you are trying to access has been deleted, please try again after refreshing')

Thanks in advance.


Avatar
Discard
Related Posts Replies Views Activity
2
Nov 24
6116
0
Mar 16
3911
4
Nov 24
5238
2
Jul 24
566
1
Jun 24
447