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 | etc.
I can't understand the way when you click on a project (on the dashboard) the new view display only the tasks of this project. I want to do something similar. Can anyone help me, explaining the mechanism or linking some documentation ?
Thanks a lot.
The developper doc says you can use a type "action" in kanban box:
Buttons and fields
While most of the Kanban templates are standard QWeb, the Kanban view processes field, button and a elements specially:
by default fields are replaced by their formatted value, unless they match specific kanban view widgets
buttons and links with a type attribute become perform Odoo-related operations rather than their standard HTML function. Possible types are:
action, object standard behavior for Odoo buttons, most attributes relevant to standard Odoo buttons can be used. ...
In the project_view.xml you find that the kanban project view is linked to an action called : act_project_project_2_project_task_all:
<a t-if="record.use_tasks.raw_value" name="%(act_project_project_2_project_task_all)d" type="action" style="margin-right: 10px">
<t t-raw="record.task_count.raw_value"/> Tasks
This action ( which is in the same module) filter the tasks of the active project :
<record id="act_project_project_2_project_task_all" model="ir.actions.act_window">
To use 'search_default_project_id', you must have a search view where one filter named "project_id" exists.
See more explanations here :https://www.odoo.com/forum/help-1/question/set-default-filter-value-in-search-view-5856
If I'm not wrong, the key 'default_project_id': active_id means that, if you create a task, its project_id will be automatically set to active_id ( ie the project you clicked in kanban view).
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 11/29/16, 3:30 AM|
|Seen: 362 times|
|Last updated: 11/30/16, 10:46 AM|