I want to the user to upload an excel file using an HTML form (input type="file") and then process it in a controller and make records based on its rows. how can I achieve it? Thanks in advance.
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
I've figured it out myself.
xml:
<form class="o_form_binary_form" method="POST" enctype="multipart/form-data" action="/my/order/excel/uploaded">
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
<label class="control-label" for="file">File:</label>
<input accept="xls, .xlsx" class="o_input_file" type="file" name="file"/>
<button type="submit" class="btn btn-primary pull-left">Submit</button>
</form>
// do what you do
Hi you can check this:
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
InscribirsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
0
feb 21
|
2304 | ||
|
3
nov 20
|
4677 | ||
|
1
jul 20
|
15383 | ||
|
1
ene 21
|
2910 | ||
|
2
oct 24
|
3285 |