Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2996 Lượt xem

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.


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 11 24
7797
0
thg 3 16
4802
1
thg 4 25
1196
2
thg 3 25
1329
4
thg 11 24
7051