Hello,
I want to open form view through template in controller.
Controller.py
class SurveyCreate(http.Controller): 
    
    @http.route('/survey/create',type='http',auth='public')
    def createsurvey(self):
        return request.render('survey_dash.template_survey_create')
template.xml
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
	<template id="template_survey_create" name="Survey Create">
	<t t-call="survey.layout">
		<div class="wrap">
		  <a t-att-action="%(survey.survey_form)d"/>
		</div>
	</t>
	</template>
</data>
</odoo>
but nothing will display.can any one please tell me how to display form view.is it possible?
If yes, how? Or any  alternative way.
Odoo is the world's easiest all-in-one management software.
 It includes hundreds of business apps:
- CRM
- e-Commerce
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
            
                1
                
                    Responder
                
            
        
        
            
                6404
                
                    Vistas
                
            
        
    No, you can not open form view in frontend because it's not designed that way, the architecture of both are very different.
backend is a single page application with all the resource and model/controller/renderer etc.. while frontend has a web page with minimal resources. 
An alternative is you can redirect the user to the backend (user have to log in with username/password :()
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Registrarse| Publicaciones relacionadas | Respuestas | Vistas | Actividad | |
|---|---|---|---|---|
|  | 0 ago 20  | 5115 | ||
| 
            
                No data in POST
            
            
                    Resuelto
            
         |  | 1 oct 20  | 3348 | |
| 
            
                How to render mail.template ?
            
            
                    Resuelto
            
         |  | 1 abr 20  | 8925 | |
|  | 2 feb 24  | 16119 | ||
|  | 2 sept 22  | 5561 | 
