Odoo Help


how can i combination fields in reports OpenERP?

on 1/7/14, 2:56 AM 1,505 views

how can i combination fields (account.analytic.account) and (account.account) in reports ?

not: i have module _inhirt="account.analytic.account".

Please briefly explain your exact requirements.

on 1/7/14, 5:10 AM
On 1/7/14, 5:44 AM

i have module _inherit = 'account.analytic.account' i want get fields 'name.debit,credit' from account.account. and i want to union (account.analytic.account) and (account.account)


import time
from report import report_sxw
from osv import osv
from openerp import pooler

class iec_report_webkit(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
    super(iec_report_webkit, self).__init__(cr, uid, name, context=context)
    self.pool = pooler.get_pool(self.cr.dbname)
    self.cursor = self.cr

    name_obj= self.pool.get('account.account').browse(cr, uid, uid).name
    credit_obj= self.pool.get('account.account').browse(cr, uid, uid).credit
    debit_obj= self.pool.get('account.account').browse(cr, uid, uid).debit
    parent_obj= self.pool.get('account.account').browse(cr, uid, uid).parent_id

            'time': time,
            'uid': uid,

                  'addons/iec/report/iec_report_webkit.mako', parser=iec_report_webkit)

mako templet:

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
<head> </head>
<table width="500" border="0" align="center">
<td colspan="2" style="background-color:#FFA500;">
<h1 align="center">
  report webkit
 <td style="background-color:#eeeeee;height:200px;width:400px;">
<table dir="rtl" align="center" border="1"  bordercolor="#c1d3e1"  size="90*90" >
       <tr align="right">
       <th font-size="30" >field1</th>
       <th font-size="30" >field2</th>
      <th font-size="30" >field3</th>
       <th font-size="30" >field4</th>
      %for o in objects :
  <td colspan="2" style="background-color:#FFA500;text-align:center;">

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 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: 1/7/14, 2:56 AM
Seen: 1505 times
Last updated: 3/16/15, 8:10 AM