[MOV] project_todo: rename module todo to project_todo
To avoid confusion with the generic name "todo" and to emphasize the link with the module project, this module is renamed to "project_todo". task-3085077
This commit is contained in:
@@ -13,24 +13,24 @@
|
||||
'auto_install': True,
|
||||
'data': [
|
||||
'security/ir.model.access.csv',
|
||||
'security/todo_security.xml',
|
||||
'security/project_todo_security.xml',
|
||||
'data/mail_activity_type_data.xml',
|
||||
'data/todo_template.xml',
|
||||
'views/project_task_views.xml',
|
||||
'views/todo_menus.xml',
|
||||
'views/project_todo_menus.xml',
|
||||
],
|
||||
'installable': True,
|
||||
'application': True,
|
||||
'uninstall_hook': '_todo_uninstall',
|
||||
'assets': {
|
||||
'web.assets_backend': [
|
||||
'todo/static/src/components/**/*',
|
||||
'todo/static/src/scss/todo.scss',
|
||||
'todo/static/src/views/**/*',
|
||||
'todo/static/src/web/**/*',
|
||||
'project_todo/static/src/components/**/*',
|
||||
'project_todo/static/src/scss/todo.scss',
|
||||
'project_todo/static/src/views/**/*',
|
||||
'project_todo/static/src/web/**/*',
|
||||
],
|
||||
'web.qunit_suite_tests': [
|
||||
'todo/static/tests/**/*',
|
||||
'project_todo/static/tests/**/*',
|
||||
],
|
||||
},
|
||||
'license': 'LGPL-3',
|
||||
@@ -1,4 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import todo
|
||||
from . import project_todo
|
||||
@@ -21,9 +21,9 @@ class Task(models.Model):
|
||||
return super().create(vals_list)
|
||||
|
||||
def _ensure_onboarding_todo(self):
|
||||
if not self.env.user.has_group('todo.group_onboarding_todo'):
|
||||
if not self.env.user.has_group('project_todo.group_onboarding_todo'):
|
||||
self._generate_onboarding_todo(self.env.user)
|
||||
onboarding_group = self.env.ref('todo.group_onboarding_todo').sudo()
|
||||
onboarding_group = self.env.ref('project_todo.group_onboarding_todo').sudo()
|
||||
onboarding_group.write({'users': [Command.link(self.env.user.id)]})
|
||||
|
||||
def _generate_onboarding_todo(self, user):
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
+1
-1
@@ -55,7 +55,7 @@ export class TodoDoneCheckmark extends StateSelectionField {
|
||||
}
|
||||
}
|
||||
|
||||
TodoDoneCheckmark.template = 'todo.TodoDoneCheckmark';
|
||||
TodoDoneCheckmark.template = 'project_todo.TodoDoneCheckmark';
|
||||
|
||||
TodoDoneCheckmark.props = {
|
||||
...stateSelectionField.component.props,
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t t-name="todo.TodoDoneCheckmark" owl="1">
|
||||
<t t-name="project_todo.TodoDoneCheckmark" owl="1">
|
||||
<t t-if="!env.isSmall">
|
||||
<a title="Mark as done"
|
||||
t-on-click.stop="onDoneToggled"
|
||||
+1
-1
@@ -54,4 +54,4 @@ export class TodoEditableBreadcrumbName extends CharField {
|
||||
}
|
||||
}
|
||||
|
||||
TodoEditableBreadcrumbName.template = 'todo.TodoEditableBreadcrumbName';
|
||||
TodoEditableBreadcrumbName.template = 'project_todo.TodoEditableBreadcrumbName';
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t t-name="todo.TodoEditableBreadcrumbName" t-inherit="web.CharField" t-inherit-mode="primary" owl="1">
|
||||
<t t-name="project_todo.TodoEditableBreadcrumbName" t-inherit="web.CharField" t-inherit-mode="primary" owl="1">
|
||||
<xpath expr="//input[hasclass('o_input')]" position="attributes">
|
||||
<attribute name="class">o_input o_todo_breadcrumb_name_input</attribute>
|
||||
<attribute name="t-on-focus">_onFocus</attribute>
|
||||
+1
-1
@@ -3,5 +3,5 @@
|
||||
import { ControlPanel } from "@web/search/control_panel/control_panel";
|
||||
|
||||
export class TodoFormControlPanel extends ControlPanel {
|
||||
static template = "todo.TodoFormControlPanel";
|
||||
static template = "project_todo.TodoFormControlPanel";
|
||||
}
|
||||
+3
-3
@@ -1,16 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t t-name="todo.TodoFormControlPanel" t-inherit="web.ControlPanel" t-inherit-mode="primary" owl="1">
|
||||
<t t-name="project_todo.TodoFormControlPanel" t-inherit="web.ControlPanel" t-inherit-mode="primary" owl="1">
|
||||
<xpath expr="//div/t/t[@t-slot='control-panel-breadcrumb']" position="replace">
|
||||
<t t-slot="control-panel-breadcrumb">
|
||||
<t t-call="todo.TodoBreadcrumbs"/>
|
||||
<t t-call="project_todo.TodoBreadcrumbs"/>
|
||||
</t>
|
||||
</xpath>
|
||||
|
||||
</t>
|
||||
|
||||
<t t-name="todo.TodoBreadcrumbs" t-inherit="web.Breadcrumbs" t-inherit-mode="primary" owl="1">
|
||||
<t t-name="project_todo.TodoBreadcrumbs" t-inherit="web.Breadcrumbs" t-inherit-mode="primary" owl="1">
|
||||
<xpath expr="//div[hasclass('o_last_breadcrumb_item')]//span" position="replace">
|
||||
<t t-slot="control-panel-todo-name" />
|
||||
<t t-slot="todo-mark-as-done-button" />
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
/** @odoo-module **/
|
||||
|
||||
import { FormController } from "@web/views/form/form_controller";
|
||||
import { TodoEditableBreadcrumbName } from "@todo/components/todo_editable_breadcrumb_name/todo_editable_breadcrumb_name";
|
||||
import { TodoDoneCheckmark } from "@todo/components/todo_done_checkmark/todo_done_checkmark";
|
||||
import { TodoEditableBreadcrumbName } from "@project_todo/components/todo_editable_breadcrumb_name/todo_editable_breadcrumb_name";
|
||||
import { TodoDoneCheckmark } from "@project_todo/components/todo_done_checkmark/todo_done_checkmark";
|
||||
|
||||
import { onWillStart } from "@odoo/owl";
|
||||
|
||||
@@ -12,7 +12,7 @@ import { onWillStart } from "@odoo/owl";
|
||||
*/
|
||||
|
||||
export class TodoFormController extends FormController {
|
||||
static template = "todo.TodoFormView";
|
||||
static template = "project_todo.TodoFormView";
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
@@ -32,7 +32,7 @@ export class TodoFormController extends FormController {
|
||||
description: this.env._t("Convert to Task"),
|
||||
callback: () => {
|
||||
this.model.actionService.doAction(
|
||||
"todo.project_task_action_convert_todo_to_task",
|
||||
"project_todo.project_task_action_convert_todo_to_task",
|
||||
{
|
||||
props: {
|
||||
resId: this.model.root.resId,
|
||||
+1
-2
@@ -1,8 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates xml:space="preserve">
|
||||
|
||||
<t t-name="todo.TodoFormView" t-inherit="web.FormView" t-inherit-mode="primary" owl="1">
|
||||
|
||||
<t t-name="project_todo.TodoFormView" t-inherit="web.FormView" t-inherit-mode="primary" owl="1">
|
||||
<xpath expr="//div[hasclass('o_form_view_container')]/Layout" position="inside">
|
||||
<t t-set-slot="control-panel-todo-name">
|
||||
<t t-set="record" t-value="model.root"/>
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
<button type="button" class="btn text-center" t-on-click="() => this.state.addingTodo = true">Add a To-do</button>
|
||||
</div>
|
||||
<div t-if="state.addingTodo" class="o-mail-ActivityMenu-show d-flex p-2 border-bottom">
|
||||
<img src="/todo/static/description/icon.svg" alt="AddTodo"/>
|
||||
<img src="/project_todo/static/description/icon.svg" alt="AddTodo"/>
|
||||
<div class="flex-grow-1">
|
||||
<div class="d-flex px-2">
|
||||
<span class="o-mail-ActivityMenu-text flex-grow-1"><strong>Add a To-do</strong></span>
|
||||
+3
-3
@@ -10,7 +10,7 @@
|
||||
<kanban default_group_by="personal_stage_type_ids"
|
||||
class="o_kanban_small_column"
|
||||
on_create="quick_create"
|
||||
quick_create_view="todo.project_task_view_todo_quick_create_form"
|
||||
quick_create_view="project_todo.project_task_view_todo_quick_create_form"
|
||||
sample="1"
|
||||
js_class="project_task_kanban"
|
||||
default_order="state, priority desc, date_deadline asc, sequence, id desc">
|
||||
@@ -243,7 +243,7 @@
|
||||
<field name="domain">[('user_ids', 'in', [uid]), ('project_id', '=', False), ('parent_id', '=', False)]</field>
|
||||
<field name="view_mode">kanban,form,tree,activity</field>
|
||||
<field name="search_view_id" ref="project_task_view_todo_search"/>
|
||||
<field name="context">{'search_default_open_tasks': 1, 'tree_view_ref': 'todo.project_task_view_todo_tree'}</field>
|
||||
<field name="context">{'search_default_open_tasks': 1, 'tree_view_ref': 'project_todo.project_task_view_todo_tree'}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
No to-do found. Let's create one!
|
||||
@@ -284,7 +284,7 @@
|
||||
<field name="model_id" ref="project.model_project_task"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">
|
||||
model._ensure_onboarding_todo(); action = env["ir.actions.actions"]._for_xml_id("todo.project_task_action_todo")
|
||||
model._ensure_onboarding_todo(); action = env["ir.actions.actions"]._for_xml_id("project_todo.project_task_action_todo")
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
<menuitem
|
||||
id="menu_todo_todos"
|
||||
name="To-do"
|
||||
action="project_todo.project_task_preload_action_todo"
|
||||
web_icon="project_todo,static/description/icon.svg">
|
||||
</menuitem>
|
||||
</odoo>
|
||||
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
<menuitem
|
||||
id="menu_todo_todos"
|
||||
name="To-do"
|
||||
action="todo.project_task_preload_action_todo"
|
||||
web_icon="todo,static/description/icon.svg">
|
||||
</menuitem>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user