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
- Kirjanpito
- Varastointi
- PoS
- Project
- MRP
Tämä kysymys on merkitty
1
Vastaa
2173
Näkymät
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.
Nautitko keskustelusta? Älä vain lue, vaan osallistu!
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
RekisteröidyAiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
---|---|---|---|---|
|
1
toukok. 25
|
94 | ||
|
0
toukok. 25
|
406 | ||
|
1
toukok. 25
|
595 | ||
|
1
toukok. 25
|
708 | ||
|
1
huhtik. 25
|
602 |