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
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
1637
Views
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.
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
Wrong url for my models
Solved
|
|
1
Dec 24
|
69 | |
|
0
Dec 24
|
41 | ||
|
1
Dec 24
|
49 | ||
|
0
Dec 24
|
57 | ||
|
0
Nov 24
|
64 |