Hi,
I have installed OpenErp 6.1 and Ireport 3.7.5.
I can`t send some information from a wizard to Ireport. After reading a lot I could send the Ids of the selected products, but I coldn't send some data that hasn't got a model.
I have this wizard :
class product_catalog_builder(osv.osv_memory):
_name = "product.catalog.builder"
_description = "Product Catalog Builder"
_columns = {
'price' : fields.selection([('no_price','No price'),('sale_price', 'Sale price'), ('partner_pricelist', 'Partner pricelist')], 'Price', help =''),
'res_partner_id' : fields.many2one('res.partner','Partner', help=''),
'cover' : fields.boolean('Add cover', help=''),
'backcover' : fields.boolean('Add backcocer', help=''),
}
_defaults = {
'cover' : lambda *x: 1,
'backcover' : lambda *x: 1,
}
and i want to send :
'cover': 'backcover' 'price' 'res_partner_id'
For doing that I try this :
def do_catalog(self, cr, uid, ids, context={}):
catalog_builder = self.browse(cr,uid,ids[0])
product_ids =context.get('active_ids',False)
data = {
'model': 'product.product',
'ids': product_ids,
}
return {
'type': 'ir.actions.report.xml',
'report_name': 'pruebas',
'datas': data,
'parameters':{
'cover':catalog_builder.cover,
'backcover':catalog_builder.backcover,
'price':catalog_builder.price,
'res_partner_id':catalog_builder.res_partner_id.id},
}
In the report I have a parameter called cover and other called BOOLCOVER:
<parameter name="cover" class="java.lang.Object"/> <parameter name="COVERBOOL" class="java.lang.String"> <defaultvalueexpression> </parameter>
I can't pass that as parameter.
Thanks for your help.