Odoo Help


This community 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.


Creating report using Webkit in OpenERP 7 (Adding Inherit fields)

on 6/25/14, 3:22 AM 1,329 views

I am trying to print inherited fields it is giving error if i try to print them my code is here as under in mako file,

I got help from this https://openerp.my.openerp.com/forum/Help-1/question/Doubt-when-creating-report-using-aeroo-report-in-Openerp7Adding-Inherit-fields-39539, and try to print inherited fields code is as,

NOTE In my module asset.provision is base class and asset.provision.line is other class by which I am creating one2many relation and asset_line is the only one2many field i am trying to print :(

     <p> Department ID id   ${ o.id }    

     <p style="font-family:verdana;">    Provision Name is "${ o.name }"  </p>
     <p> Deadline Date is "${ o.deadline_date }"  </p>
     <p> Current state is "${ o.state }"  </p>

          <for each="line in o.one2many field in asset.provision">
<p>value is </p>
      <line.fieldname in="S{asset.provision.line}" one2many="asset.provision" field.columnname="asset_line" >


i am getting error Undefined object in line ,

     <line.fieldname in="S{asset.provision.line}" one2many="asset.provision" field.columnname="asset_line" >

if i remove ${} it do not show any error and do not print any thing

     <line.fieldname in="asset.provision" one2many="asset.provision.line" field.columnname="asset_line" >

Hopes for your positive reply

Timothy Solomon
On 7/8/14, 7:37 AM

You are mixing aeroo reporting with webkit/mako syntax - its not going to work. 

Try something like 

%for line in o.asset_line:


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 6/25/14, 3:22 AM
Seen: 1329 times
Last updated: 3/16/15, 8:10 AM