odoo17创建项目时,有一个比较实用的功能,就是根据不同项目特点预置示例模板,如下图:
要实现预置示例模板功能,可能过通过下面两个步骤实现
1、扩展js文件:
{
name: _t('ERP项目'),
columns: [_t('Backlog'), _t('Specifications'), _t('Development'), _t('Tests')],
foldedColumns: [_t('Delivered')],
get description() {
return renderToMarkup("project.example.erp");
},
bullets: [greenBullet, orangeBullet, star],
}
2、扩展对应的xml文件
<t t-name="project.example.erp">
Prioritize your tasks by marking important ones using the <a style="color: gold;" class="fa fa-star"></a> button.
<br/><br/>
Use the <span class="o_status d-inline-block o_status_green"></span> state to inform your colleagues that a task is approved for the next stage.
<br/>
Use the <span class="o_status d-inline-block bg-warning"></span> state to indicate a request for changes or a need for discussion on a task.
<br/><br/>
Use the <span class="fa fa-check-circle text-success d-inline-block"></span> state to mark the task as complete.
<br/>
Use the <span class="fa fa-times-circle text-danger d-inline-block"></span> state to mark the task as canceled.
<br/><br/>
Look for the <span class="fa fa-hourglass-o d-inline-block"></span> icon to see tasks waiting on other ones. Once a task is marked as complete or canceled, all of its dependencies will be unblocked.
<br/><br/>
Use the <a class="fa fa-clock-o"></a> icon to organize your daily activities.
</t>
3、最终效果: