Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2584 Vizualizări

Hi everyone,

I´ve created a custom website form where collect data from people. These people could be already contact so one field of the form is contact_related. I can get contact and show it in a datalist but I can´t save it the controller to create a new record.

Note: I´m able to record all the others fields but not contact related


 
@http.route('/crear/registro', type="http", auth='public', website=True)
def create_registry(self, **kw):
image = kw.get('attachment', False)
kw.update({
'attachment': base64.encodestring(image.read()) if image else False

})
request.env['feria.registro'].sudo().create(kw)

return request.render("feria.registry_thanks", {})

Imagine profil
Abandonează
Cel mai bun răspuns

You have to create a form in your view and then connect the form to the controller method to pass the values to be saved in database.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
feb. 24
5185
1
iun. 23
5437
2
mai 22
15027
2
iul. 24
4117
2
mai 25
9713