Odoo Help


printing report but fields dont appeaar ????

kais dkhili
on 5/12/14, 7:21 PM 1,032 views

i have a class Terme that contains a foreign key to the class contrat, Terme and Contrat are defined by 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'),
    'titreContrat': fields.char('Titre contrat',size=64),
    'descriptionContrat':fields.text('Description contrat'),
    'lst_termes':fields.one2many('terme','id_terme','Liste des termes'),

class terme(osv.osv):
_name = 'terme'
_rec_name = 'intituleterme'
_columns = {
    'id_terme':fields.integer('Numero Terme'),
     'intituleterme': fields.char('Intitule Terme',size=64),
     'descriptionterme':fields.text('Description du Terme'),


i want to print a contrat that contains many termes, i use openoffice, but the probleme that the fields of termes dose not appear , please someone help me this is the code of the class new_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', 'contratcommercial',

Please someone help me

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/12/14, 7:21 PM
Seen: 1032 times
Last updated: 3/16/15, 8:10 AM