This question has been flagged
2386 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'),

}contrat()

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):
_inherit='partenaire'
_name='partenairephysique'
_rec_name='nom'
_columns={
    'ncin': fields.integer('Numero CIN'),
    'nom': fields.char('Nom',size=64),
    'prenom':fields.char('Prenom',size=64),


}partenairephysique()

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',
                  'addons/partnership/report/contratpartner.rml',
                   parser=new_report,header="internal")

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

Avatar
Discard