问题
I need to know where Odoo saves the views that will be shown in (My Dashboard) when we click (Add to My Dashboard).
I looked in the table scheme and I could only find one related table: board_create which is used to save the custom dashboards the user creates.
But I only want to find out where the contents (the views not the data) of the default Dashboard are saved in the database.
回答1:
In OpenERP 7 and 8 you can find the view for dashboard in 'ir_ui_view_custom' table. The view will be saved inside 'arch' column.
From OpenERP web interface this is will happened when you click 'add to my dashboard'
- Javascript will invoke 'add_dashboard'
- Javascript will make rpc request using '/board/add_to_dashboard' to openerp server
- Openerp server will invoke "add_to_dashboard" function
- Openerp server will save the view inside 'ir_ui_view_custom' table
Openerp use these files to process 'add to my dashboard'
- /OpenErp7/addons/board/static/src/js/dashboard.js
- /OpenErp7/src/main/openerp/addons/board/controllers.py
I hope this help.
来源:https://stackoverflow.com/questions/36161623/where-does-odoo-save-the-contents-of-my-dashboard