Skip to Content
Menu
This question has been flagged
1218 Views

Hello ,

I have created a wizard inherited from the class "res.users",  this wizard allows me to use the user registration formula :

class Wizard_client_ferm(models.TransientModel):

_name = "affichage2.wizard_client_ferm"
_inherit = "res.users"


@api.multi
def call_creation_ferm(self, vals):


ferme_form = self.env.ref('affichage2.creation_ferme_wizard', False)




next_step = self.env['res.users'].create({
'name': self.name,
'email': self.email,
'password' : self.password,
'partner_id' : self.name,
'login' : self.login,
'alias_id' : self.alias_id,
'password_crypt' : self.password_crypt,
'write_date' : self.write_date,
'company_id' : self.company_id,
'action_id' : self.action_id,
'sale_team_id' : self.sale_team_id
#'x_Adresio2' : self.x_Adresio2
})


next_step2 = self.env['affichage2.wizard_ferm'].create({
'farm_name': None,
'farm_adress2': None,
'wilaya': None,
'list_packs': None
#'approved_by': self.next_step.id
})



return {
'name': 'Creation de ferme',
'type': 'ir.actions.act_window',
'view_type': 'form',
'view_mode': 'form',
'res_model': 'affichage2.wizard_ferm',
'view_id': ferme_form.id,
#'res_id': next_step2.id,
# 'res_id' : self.id,
# 'context': {'current_id': self.id},
# 'target': 'current',
'nodestroy': True,
}


The problem is when i run the action which is defined from my wizard, i get this erreur :


ProgrammingError: ERREUR:  la colonne « alias_id » de la relation « affichage2_wizard_client_ferm » n'existe pas
LINE 1: ...fichage2_wizard_client_ferm" ("id", "partner_id", "alias_id"...
Avatar
Discard