Reputation: 63
i'm currently using odoo v8 , and ive been trying to call my wizard inside an old api function
here my wizard definition :
from openerp import models, fields, api, _
class cancel_reason (models.TransientModel):
_name = 'notify'
_description = "notify"
raison = fields.Text(default='')
@api.multi
def wizard_view(self, created_id):
view = self.env.ref('product_end_life.notify')
return {
'name': 'Remplacement du produit',
'view_mode': 'form',
'view_id': view.id,
'views': [(view.id, 'form')],
'view_type': 'form',
'res_model': 'notify',
'type': 'ir.actions.act_window',
'target': 'new',
'res_id': created_id,
}
and here's the old api function , where i need to call my wizard i wont transform it to new api its gonna took much time :
def product_id_change(self, cr, uid, ids, pricelist, product,
qty=0, uom=False, qty_uos=0,
uos=False, name='', partner_id=False,
lang=False, update_tax=True,
date_order=False,
packaging=False, fiscal_position=False,
flag=False, context=None):
res = super(sale_order_line, self).product_id_change(
cr, uid, ids,
pricelist, product,
qty, uom, qty_uos,
uos, name, partner_id,
lang, update_tax,
date_order, packaging,
fiscal_position,
flag, context=context)
here i need to call my wizard
return res
merci
Upvotes: 0
Views: 595
Reputation: 63
after a lot of research and reflection , we can't call wizard inside onchange methode not in odoo v8 thnx
Upvotes: 1