Odoo Help


Can't Print RML with some fields.many2one EMPTY

Dion Martin
on 2/24/14, 12:39 AM 1,344 views

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


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'),


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


                <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>



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

Evert Dausy
On 2/24/14, 3:56 AM

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.. :(

Dion Martin
on 2/25/14, 10:51 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 2/24/14, 12:39 AM
Seen: 1344 times
Last updated: 3/16/15, 8:10 AM