Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2473 Widoki

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", {})

Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
2
lut 24
5009
1
cze 23
5266
2
maj 22
14934
2
lip 24
4027
2
maj 25
9647