Odoo Help


'order' object has no attribute '_line_no' while making custom reports

Amit Patel
on 12/9/13, 12:04 PM 881 views
def _blank_line(self,nlines):
 res = ""
 for i in range(nlines - self.line_no):
     res = res + '\n'
     return res 
def _line_no(self):
   self.line_no = self.line_no + 1
   return self.line_no

This is my orper.py In my RML code :

      <para style="terp_default_8">[[ repeatIn(o.order_line,'line') ]][[ line_no() ]][[ line.name or ' ' ]] </para>
    <blockTable colWidths="20.0,100.0,150.0,80.0,50.0,20.0,60.0,50.0" style="Table_Order_Pur_line_Content">
        <para style="terp_default_8"><font color="white">[[ blank_line(10) ]][[ setTag('para','xpre') ]]</font></para>
      <td> ........

i can not generate report. what is the error.

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: 12/9/13, 12:04 PM
Seen: 881 times
Last updated: 3/16/15, 8:10 AM