Hello,
I have a button, which call a wizard when we click on it. The button function was declared as follows:
@api.multi
def call_confirmation_wizard(self):
return {
'name': 'Confirmation',
'type': 'ir.actions.act_window',
'view_type': 'form',
'view_mode': 'form',
'res_model': 'affichage2.wizard_confirmation',
#'res_id': self.id,
#'view_id': self.env.ref("affichage2.confirm_wizard_form").id,
'view_id': False,
'target': 'new',
'nodestroy': True,
}
This Wizard call function from the previous class, as follows :
class Wizard_confirmation(models.TransientModel):
_name = "affichage2.wizard_confirmation"
@api.multi
def call_vente(self):
self.env["affichage2.vente_packs"].vendre_cap()
In the XML, the wizard is defined as follows:
<record model="ir.ui.view" id="confirm_wizard_form">
<field name="name">affichage2.wizard_confirmation.form</field>
<field name="model">affichage2.wizard_confirmation</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Confirm dialog">
<group>
<label string="Êtes vous sur de vouloir mettre ce produit en vente?"/>
</group>
<group>
<ul>
<li>Valeur actual</li>
<li>Valeur min</li>
<li>Valeur max</li>
<li>Le temps de valeur min</li>
<li>Le temps de valeur max</li>
</ul>
</group>
<footer>
<button class="oe_highlight" type="object" name="call_vente" string="Yes" />
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
</form >
</field>
</record>
The problem is a get an erreur when i cliking in Yes from the wizard.
Any help please?