Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3910 มุมมอง

heyy guyss,, i want to ask some question, i have a code like this

.py

class pelamar(osv.osv):

_name = "content.pelamar"

_description = "Pelamar"

'riwayat_pelamar_ids' : fields.one2many('content.riwayat_pelamar','pelamar_id','Riwayat Pekerjaan Pelamar',

required=True, ondelete='cascade'),

.rml

<blocktable style="table-custom-5" colwidths="1cm,4.4cm,5.4cm" repeatrows="1">

            <tr>

                <para>[[repeatIn(o.riwayat_pelamar_ids,'riwayat' or '')]]</para>

                <td><para style ="RATA_TENGAH"><seq id="nourut"/></para></td>

                <td><para style="RATA_KIRI">[[ riwayat.nama_perusahaan  or '-']]</para></td>

            </tr>

    </blockTable>

and got the validation AssertionError if i want to print it with 'riwayat_pelamar_ids' EMPTY

what should i do to handle this? can print with no data in 'riwayat_pelamar_ids'

thanks anyway

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Did you try using the <section> tag? I always use this if I create some loops.

อวตาร
ละทิ้ง
ผู้เขียน

i already try using that tag, but still can not, assertion error validation, cause no data in that many2one fields.. :(

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 15
8697
4
ธ.ค. 23
11639
0
ส.ค. 18
5100
1
มี.ค. 18
4354
0
ต.ค. 16
3483