It seems, that context content updating after fields_view_get-method invoke. This is problem. When I open my module view int the Odoo, first it is empty, but when I refresh the browser, then there is data in the view. Data comes from fields_view_get-method. This method run sql script and makes html nodes. One parameter in the sql script comes from the context. Odoo main design pattern is MVC and this is problem with realtional databases, because it is too strict for dynamic views. One view belongs to one database table. You have problem when you trying to make user interface where is for example some kind of data table where is data from many models and user can customize is. Odoo pivot table can resolve this problem but it can do this only when you have data groups what you can show in the "pivot mode".
I think that Odoo needs some design pattern who supports dynamic views. MVC pattern is not enought.
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
2277
Vistas
I made other kind of solution.
In the model:
your_field = fields.Html( 'Your field', compute='_your_method_it_using_sql' )
In the view:
field name="your_field" readonly="1"
So this way, I can get data from many models to one view. Let see how rich user interface I can make this way.
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
RegistrarsePublicaciones relacionadas | Respuestas | Vistas | Actividad | |
---|---|---|---|---|
|
0
jul 25
|
51 | ||
|
1
jul 25
|
97 | ||
|
0
jul 25
|
276 | ||
|
1
jun 25
|
287 | ||
|
1
jun 25
|
312 |