Odoo Help

Welcome!

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.

0

how printing report with openerp openoffice ?

By
kais dkhili
on 5/10/14, 1:33 PM 661 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

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)

Stats

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