Odoo Help


how printing report with openerp openoffice ?

kais dkhili
on 5/10/14, 1:33 PM 983 views

i have the class contrat that contains the following code:

class contrat(osv.osv):
_name = 'contrat'
_rec_name = 'titreContrat'
_columns = {
    'id_contrat':fields.integer('Numero Contrat'),
    'date_contrat':fields.date('Date Contrat'),
    'id_partenaire_physique':fields.many2one('partenairephysique','partenaire physique'),
    'titreContrat': fields.char('Titre contrat',size=64),
    'descriptionContrat':fields.text('Description contrat'),
    'lst_termes':fields.one2many('terme','id_terme','Liste des termes'),


i want to print report for this class , the attributes Numero Contrat, Date Contrat, titreContrat, descriptionContrat, appers successfully in the report, but the problem that the attriburìtes of partenaire physique and list termes don't appear. the code of class partenaire physique is the following:

class partenairephysique(osv.osv):
    'ncin': fields.integer('Numero CIN'),
    'nom': fields.char('Nom',size=64),


i use openoffice writer and i have followed all steps discribed in some tutorials like the fullowing: kiattipong.blogspot.com/2014/01/openerp-how-to-create-report_5850.html and i have defined the following class in /modulename/report

import time
from openerp.report import report_sxw
class new_report(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
    super(new_report, self).__init__(cr, uid, name, context=context)
    self.localcontext.update( {'time': time,})

   report_sxw.report_sxw('report.new_report', 'contrat',

Please someone help me, the problem that the attriburìtes of partenaire physique and list termes don't appear

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

1 follower(s)


Asked: 5/10/14, 1:33 PM
Seen: 983 times
Last updated: 3/16/15, 8:10 AM