diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/project/views | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/project/views')
| -rw-r--r-- | addons/project/views/analytic_views.xml | 21 | ||||
| -rw-r--r-- | addons/project/views/digest_views.xml | 15 | ||||
| -rw-r--r-- | addons/project/views/mail_activity_views.xml | 14 | ||||
| -rw-r--r-- | addons/project/views/project_assets.xml | 21 | ||||
| -rw-r--r-- | addons/project/views/project_portal_templates.xml | 273 | ||||
| -rw-r--r-- | addons/project/views/project_views.xml | 1155 | ||||
| -rw-r--r-- | addons/project/views/rating_views.xml | 221 | ||||
| -rw-r--r-- | addons/project/views/res_config_settings_views.xml | 104 | ||||
| -rw-r--r-- | addons/project/views/res_partner_views.xml | 22 |
9 files changed, 1846 insertions, 0 deletions
diff --git a/addons/project/views/analytic_views.xml b/addons/project/views/analytic_views.xml new file mode 100644 index 00000000..48f968d7 --- /dev/null +++ b/addons/project/views/analytic_views.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <!-- + Analytic Accounts with project + --> + <record id="account_analytic_account_view_form_inherit" model="ir.ui.view"> + <field name="name">account.analytic.account.form.inherit</field> + <field name="model">account.analytic.account</field> + <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/> + <field eval="18" name="priority"/> + <field name="arch" type="xml"> + <div name="button_box" position="inside"> + <button class="oe_stat_button" type="object" name="action_view_projects" + icon="fa-puzzle-piece" attrs="{'invisible': [('project_count', '=', 0)]}"> + <field string="Projects" name="project_count" widget="statinfo"/> + </button> + </div> + </field> + </record> + +</odoo> diff --git a/addons/project/views/digest_views.xml b/addons/project/views/digest_views.xml new file mode 100644 index 00000000..92071da7 --- /dev/null +++ b/addons/project/views/digest_views.xml @@ -0,0 +1,15 @@ +<?xml version='1.0' encoding='utf-8'?> +<odoo> + <record id="digest_digest_view_form" model="ir.ui.view"> + <field name="name">digest.digest.view.form.inherit.project.task</field> + <field name="model">digest.digest</field> + <field name="inherit_id" ref="digest.digest_digest_view_form"/> + <field name="arch" type="xml"> + <xpath expr="//group[@name='kpi_general']" position="after"> + <group name="kpi_project" string="Project" groups="project.group_project_user"> + <field name="kpi_project_task_opened"/> + </group> + </xpath> + </field> + </record> +</odoo> diff --git a/addons/project/views/mail_activity_views.xml b/addons/project/views/mail_activity_views.xml new file mode 100644 index 00000000..33ff9455 --- /dev/null +++ b/addons/project/views/mail_activity_views.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<odoo> + <!-- Activity types config --> + <record id="mail_activity_type_action_config_project_types" model="ir.actions.act_window"> + <field name="name">Activity Types</field> + <field name="res_model">mail.activity.type</field> + <field name="view_mode">tree,form</field> + <field name="domain">['|', ('res_model_id', '=', False), ('res_model_id.model', '=', 'project.task')]</field> + <field name="context">{'default_res_model': 'project.task'}</field> + </record> + <menuitem id="project_menu_config_activity_type" + action="mail_activity_type_action_config_project_types" + parent="menu_project_config"/> +</odoo>
\ No newline at end of file diff --git a/addons/project/views/project_assets.xml b/addons/project/views/project_assets.xml new file mode 100644 index 00000000..4a520675 --- /dev/null +++ b/addons/project/views/project_assets.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <template id="assets_backend" name="project assets" inherit_id="web.assets_backend"> + <xpath expr="." position="inside"> + <link rel="stylesheet" href="/project/static/src/css/project.css"/> + <script type="text/javascript" src="/project/static/src/js/project_kanban.js"></script> + <script type="text/javascript" src="/project/static/src/js/project_rating_reporting.js"></script> + <script type="text/javascript" src="/project/static/src/js/project_task_kanban_examples.js"></script> + <script type="text/javascript" src="/project/static/src/js/tours/project.js"></script> + <script type="text/javascript" src="/project/static/src/js/project_calendar.js"></script> + <link rel="stylesheet" type="text/scss" href="/project/static/src/scss/project_dashboard.scss"/> + </xpath> + </template> + + <template id="assets_frontend" inherit_id="web.assets_frontend" name="Rating Project Assets"> + <xpath expr="." position="inside"> + <link rel="stylesheet" type="text/scss" href="/project/static/src/scss/portal_rating.scss"/> + <script type="text/javascript" src="/project/static/src/js/portal_rating.js"/> + </xpath> + </template> +</odoo> diff --git a/addons/project/views/project_portal_templates.xml b/addons/project/views/project_portal_templates.xml new file mode 100644 index 00000000..3c4298ce --- /dev/null +++ b/addons/project/views/project_portal_templates.xml @@ -0,0 +1,273 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <template id="portal_layout" name="Portal layout: project menu entry" inherit_id="portal.portal_breadcrumbs" priority="40"> + <xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside"> + <li t-if="page_name == 'project' or project" class="col-lg-2" t-attf-class="breadcrumb-item #{'active ' if not project else ''}"> + <a t-if="project" t-attf-href="/my/projects?{{ keep_query() }}">Projects</a> + <t t-else="">Projects</t> + </li> + <li t-if="project" class="breadcrumb-item active text-truncate col-8 col-lg-10"> + <t t-esc="project.name"/> + </li> + <li t-if="page_name == 'task' or task" t-attf-class="breadcrumb-item #{'active ' if not task else ''}"> + <a t-if="task" t-attf-href="/my/tasks?{{ keep_query() }}">Tasks</a> + <t t-else="">Tasks</t> + </li> + <li t-if="task" class="breadcrumb-item active col-8 col-lg-10 text-truncate"> + <span t-field="task.name"/> + </li> + </xpath> + </template> + + <template id="portal_my_home" name="Show Projects / Tasks" customize_show="True" inherit_id="portal.portal_my_home" priority="40"> + <xpath expr="//div[hasclass('o_portal_docs')]" position="inside"> + <t t-call="portal.portal_docs_entry"> + <t t-set="title">Projects</t> + <t t-set="url" t-value="'/my/projects'"/> + <t t-set="placeholder_count" t-value="'project_count'"/> + </t> + <t t-call="portal.portal_docs_entry"> + <t t-set="title">Tasks</t> + <t t-set="url" t-value="'/my/tasks'"/> + <t t-set="placeholder_count" t-value="'task_count'"/> + </t> + </xpath> + </template> + + <template id="portal_my_projects" name="My Projects"> + <t t-call="portal.portal_layout"> + <t t-set="breadcrumbs_searchbar" t-value="True"/> + + <t t-call="portal.portal_searchbar"> + <t t-set="title">Projects</t> + </t> + <t t-if="not projects"> + <div class="alert alert-warning mt8" role="alert"> + There are no projects. + </div> + </t> + <t t-if="projects" t-call="portal.portal_table"> + <tbody> + <tr t-foreach="projects" t-as="project"> + <td> + <a t-attf-href="/my/project/#{project.id}?{{ keep_query() }}"><span t-field="project.name"/></a> + </td> + <td class="text-right"> + <a t-attf-href="/my/tasks?{{keep_query(filterby=project.id)}}"> + <t t-esc="project.task_count" /> + <t t-esc="project.label_tasks" /> + </a> + </td> + </tr> + </tbody> + </t> + </t> + </template> + + <template id="portal_my_project" name="My Project"> + <t t-call="portal.portal_layout"> + <t t-set="o_portal_fullwidth_alert" groups="project.group_project_user"> + <t t-call="portal.portal_back_in_edit_mode"> + <t t-set="backend_url" t-value="'/web#model=project.project&id=%s&view_type=form' % (project.id)"/> + </t> + </t> + + <t t-call="portal.portal_record_layout"> + <t t-set="card_header"> + <h5 class="mb-0"> + <span t-field="project.name" class="text-truncate"/> + <span class="float-right"> + <a role="button" t-attf-href="/my/tasks?filterby=#{project.id}" class="btn btn-sm btn-secondary"> + <span class="fa fa-tasks" role="img" aria-label="Tasks" title="Tasks"/> + <span t-esc="project.task_count" /> + <span t-field="project.label_tasks" /> + </a> + </span> + </h5> + </t> + <t t-set="card_body"> + <div class="row"> + <div t-if="project.partner_id" class="col-12 col-md-6 mb-2 mb-md-0"> + <h6>Customer</h6> + <div class="row"> + <div class="col flex-grow-0 pr-3"> + <img t-if="project.partner_id.image_1024" class="rounded-circle mt-1 o_portal_contact_img" t-att-src="image_data_uri(project.partner_id.image_1024)" alt="Contact"/> + <img t-else="" class="rounded-circle mt-1 o_portal_contact_img" src="/web/static/src/img/user_menu_avatar.png" alt="Contact"/> + </div> + <div class="col pl-sm-0"> + <address t-field="project.partner_id" t-options='{"widget": "contact", "fields": ["name", "email", "phone"]}'/> + </div> + </div> + </div> + <div t-if="project.user_id" class="col-12 col-md-6"> + <h6>Project Manager</h6> + <div class="row"> + <div class="col flex-grow-0 pr-3"> + <img t-if="project.user_id.image_1024" class="rounded-circle mt-1 o_portal_contact_img" t-att-src="image_data_uri(project.user_id.image_1024)" alt="Contact"/> + <img t-else="" class="rounded-circle mt-1 o_portal_contact_img" src="/web/static/src/img/user_menu_avatar.png" alt="Contact"/> + </div> + <div class="col pl-sm-0"> + <address t-field="project.user_id" t-options='{"widget": "contact", "fields": ["name", "email", "phone"]}'/> + </div> + </div> + </div> + </div> + </t> + </t> + </t> + </template> + + <template id="portal_my_tasks" name="My Tasks"> + <t t-call="portal.portal_layout"> + <t t-set="breadcrumbs_searchbar" t-value="True"/> + + <t t-call="portal.portal_searchbar"> + <t t-set="title">Tasks</t> + </t> + <t t-if="not grouped_tasks"> + <div class="alert alert-warning mt8" role="alert"> + There are no tasks. + </div> + </t> + <t t-if="grouped_tasks"> + <t t-call="portal.portal_table"> + <t t-foreach="grouped_tasks" t-as="tasks"> + <thead> + <tr t-attf-class="{{'thead-light' if not groupby == 'none' else ''}}"> + <th class="text-left">Ref</th> + <th t-if="groupby == 'none'">Name</th> + <th t-if="groupby == 'project'"> + <em class="font-weight-normal text-muted"><span t-field="tasks[0].sudo().project_id.label_tasks"/> for project:</em> + <span t-field="tasks[0].sudo().project_id.name"/></th> + <th t-if="groupby == 'stage'"> + <em class="font-weight-normal text-muted"><span t-field="tasks[0].sudo().project_id.label_tasks"/> in stage:</em> + <span class="text-truncate" t-field="tasks[0].sudo().stage_id.name"/></th> + <th t-if="groupby != 'project'" class="text-center">Project</th> + <th t-if="groupby != 'stage'" class="text-center">Stage</th> + </tr> + </thead> + <tbody> + <t t-foreach="tasks" t-as="task"> + <tr> + <td class="text-left"> + #<span t-esc="task.id"/> + </td> + <td> + <a t-attf-href="/my/task/#{task.id}?{{ keep_query() }}"><span t-field="task.name"/></a> + </td> + <td t-if="groupby != 'project'" class="text-center"> + <span class="badge badge-pill badge-info" title="Current project of the task" t-esc="task.project_id.name" /> + </td> + <td t-if="groupby != 'stage'" class="text-center"> + <span class="badge badge-pill badge-info" title="Current stage of the task" t-esc="task.stage_id.name" /> + </td> + </tr> + </t> + </tbody> + </t> + </t> + </t> + </t> + </template> + + <template id="portal_my_task" name="My Task"> + <t t-call="portal.portal_layout"> + <t t-set="o_portal_fullwidth_alert" groups="project.group_project_user"> + <t t-call="portal.portal_back_in_edit_mode"> + <t t-set="backend_url" t-value="'/web#model=project.task&id=%s&view_type=form' % (task.id)"/> + </t> + </t> + + <t t-call="portal.portal_record_layout"> + <t t-set="card_header"> + <div class="row no-gutters"> + <div class="col-12"> + <h5 class="d-flex mb-1 mb-md-0 row"> + <span t-field="task.name" class="col-9 text-truncate"/> + <small class="text-muted d-none d-md-inline"> (#<span t-field="task.id"/>)</small> + <div class="col-3 col-md-2 text-right"> + <small class="text-right">Status:</small> + <span t-field="task.stage_id.name" class=" badge badge-pill badge-info" title="Current stage of this task"/> + </div> + </h5> + </div> + </div> + </t> + <t t-set="card_body"> + <div class="mb-1" t-if="user in task.sudo().project_id.allowed_user_ids"> + <strong>Project:</strong> <a t-attf-href="/my/project/#{task.project_id.id}" t-field="task.project_id.name"/> + </div> + + <div class="row mb-4"> + <div class="col-12 col-md-6 mb-1"> + <strong>Date:</strong> <span t-field="task.create_date" t-options='{"widget": "date"}'/> + </div> + <div class="col-12 col-md-6" t-if="task.date_deadline"> + <strong>Deadline:</strong> <span t-field="task.date_deadline" t-options='{"widget": "date"}'/> + </div> + </div> + + <div class="row mb-4" t-if="task.user_id or task.partner_id"> + <div class="col-12 col-md-6 pb-2" t-if="task.user_id"> + <strong>Assigned to</strong> + <div class="row"> + <div class="col flex-grow-0 pr-3"> + <img t-if="task.user_id.image_1024" class="rounded-circle mt-1 o_portal_contact_img" t-att-src="image_data_uri(task.user_id.image_1024)" alt="Contact"/> + <img t-else="" class="rounded-circle mt-1 o_portal_contact_img" src="/web/static/src/img/user_menu_avatar.png" alt="Contact"/> + </div> + <div class="col pl-md-0"> + <div t-field="task.user_id" t-options='{"widget": "contact", "fields": ["name", "email", "phone"]}'/> + </div> + </div> + </div> + <div class="coll-12 col-md-6 pb-2" t-if="task.partner_id"> + <strong>Reported by</strong> + <div class="row"> + <div class="col flex-grow-0 pr-3"> + <img t-if="task.partner_id.image_1024" class="rounded-circle mt-1 o_portal_contact_img" t-att-src="image_data_uri(task.partner_id.image_1024)" alt="Contact"/> + <img t-else="" class="rounded-circle mt-1 o_portal_contact_img" src="/web/static/src/img/user_menu_avatar.png" alt="Contact"/> + </div> + <div class="col pl-md-0"> + <div t-field="task.partner_id" t-options='{"widget": "contact", "fields": ["name", "email", "phone"]}'/> + </div> + </div> + </div> + </div> + <div class="row" t-if="task.description or task.attachment_ids"> + <div t-if="task.description" t-attf-class="col-12 col-lg-7 mb-4 mb-md-0 {{'col-lg-7' if task.attachment_ids else 'col-lg-12'}}"> + <hr class="mb-1"/> + <div class="d-flex my-2"> + <strong>Description</strong> + </div> + <div class="py-1 px-2 bg-100 small" t-field="task.description"/> + </div> + <div t-if="task.attachment_ids" t-attf-class="col-12 col-lg-5 o_project_portal_attachments {{'col-lg-5' if task.description else 'col-lg-12'}}"> + <hr class="mb-1 d-none d-lg-block"/> + <strong class="d-block mb-2">Attachments</strong> + <div class="row"> + <div t-attf-class="col {{'col-lg-6' if not task.description else 'col-lg-12'}}"> + <ul class="list-group"> + <a class="list-group-item list-group-item-action d-flex align-items-center oe_attachments py-1 px-2" t-foreach='task.attachment_ids' t-as='attachment' t-attf-href="/web/content/#{attachment.id}?download=true&access_token=#{attachment.access_token}" target="_blank" data-no-post-process=""> + <div class='oe_attachment_embedded o_image o_image_small mr-2 mr-lg-3' t-att-title="attachment.name" t-att-data-mimetype="attachment.mimetype" t-attf-data-src="/web/image/#{attachment.id}/50x40?access_token=#{attachment.access_token}"/> + <div class='oe_attachment_name text-truncate'><t t-esc='attachment.name'/></div> + </a> + </ul> + </div> + </div> + </div> + </div> + </t> + </t> + + <div class="mt32"> + <h4><strong>Message and communication history</strong></h4> + <t t-call="portal.message_thread"> + <t t-set="object" t-value="task"/> + <t t-set="token" t-value="task.access_token"/> + <t t-set="pid" t-value="pid"/> + <t t-set="hash" t-value="hash"/> + </t> + </div> + </t> + </template> +</odoo> diff --git a/addons/project/views/project_views.xml b/addons/project/views/project_views.xml new file mode 100644 index 00000000..cde9ae46 --- /dev/null +++ b/addons/project/views/project_views.xml @@ -0,0 +1,1155 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + + <!-- Top menu item --> + <menuitem name="Project" + id="menu_main_pm" + groups="group_project_manager,group_project_user" + web_icon="project,static/description/icon.png" + sequence="50"/> + + <menuitem id="menu_project_config" name="Configuration" parent="menu_main_pm" + sequence="100" groups="project.group_project_manager"/> + + <record id="view_task_search_form" model="ir.ui.view"> + <field name="name">project.task.search.form</field> + <field name="model">project.task</field> + <field name="arch" type="xml"> + <search string="Tasks"> + <field name="name" string="Task"/> + <field name="tag_ids"/> + <field name="user_id"/> + <field name="partner_id" operator="child_of"/> + <field name="stage_id"/> + <field name="project_id"/> + <field name="parent_id" groups="project.group_subtask_project"/> + <filter string="My Tasks" name="my_tasks" domain="[('user_id', '=', uid)]"/> + <filter string="Followed Tasks" name="my_followed_tasks" domain="[('message_is_follower', '=', True)]" /> + <filter string="Unassigned" name="unassigned" domain="[('user_id', '=', False)]"/> + <separator/> + <filter string="Starred" name="starred" domain="[('priority', 'in', [1, 2])]"/> + <filter string="Late Tasks" name="late" domain="[('date_deadline', '<', context_today().strftime('%Y-%m-%d'))]"/> + <filter string="Rated tasks" name="rating_task" domain="[('rating_last_value', '!=', 0.0)]" groups="project.group_project_rating"/> + <separator/> + <filter string="Unread Messages" name="message_needaction" domain="[('message_needaction', '=', True)]"/> + <separator/> + <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/> + <separator/> + <filter invisible="1" string="Late Activities" name="activities_overdue" + domain="[('my_activity_date_deadline', '<', context_today().strftime('%Y-%m-%d'))]" + help="Show all records which has next action date is before today"/> + <filter invisible="1" string="Today Activities" name="activities_today" + domain="[('my_activity_date_deadline', '=', context_today().strftime('%Y-%m-%d'))]"/> + <filter invisible="1" string="Future Activities" name="activities_upcoming_all" + domain="[('my_activity_date_deadline', '>', context_today().strftime('%Y-%m-%d'))]"/> + <group expand="0" string="Group By"> + <filter string="Stage" name="stage" context="{'group_by': 'stage_id'}"/> + <filter string="Assigned to" name="user" context="{'group_by': 'user_id'}"/> + <filter string="Project" name="project" context="{'group_by': 'project_id'}"/> + <filter string="Creation Date" name="group_create_date" context="{'group_by': 'create_date'}"/> + </group> + </search> + </field> + </record> + + <record id="act_project_project_2_project_task_all" model="ir.actions.act_window"> + <field name="name">Tasks</field> + <field name="res_model">project.task</field> + <field name="view_mode">kanban,tree,form,calendar,pivot,graph,activity</field> + <field name="domain">[('project_id', '=', active_id)]</field> + <field name="context">{ + 'pivot_row_groupby': ['user_id'], + 'default_project_id': active_id, + }</field> + <field name="search_view_id" ref="view_task_search_form"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + No tasks found. Let's create one! + </p><p> + To get things done, use activities and status on tasks.<br/> + Chat in real time or by email to collaborate efficiently. + </p> + </field> + </record> + + <record id="project_task_action_sub_task" model="ir.actions.act_window"> + <field name="name">Sub-tasks</field> + <field name="res_model">project.task</field> + <field name="view_mode">tree,kanban,form,calendar,pivot,graph,activity</field> + <field name="search_view_id" ref="project.view_task_search_form"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + No tasks found. Let's create one! + </p><p> + To get things done, use activities and status on tasks.<br/> + Chat in real time or by email to collaborate efficiently. + </p> + </field> + </record> + + <!-- Task types --> + <record id="task_type_search" model="ir.ui.view"> + <field name="name">project.task.type.search</field> + <field name="model">project.task.type</field> + <field name="arch" type="xml"> + <search string="Tasks Stages"> + <field name="name" string="Tasks Stages"/> + <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/> + </search> + </field> + </record> + + <record id="task_type_edit" model="ir.ui.view"> + <field name="name">project.task.type.form</field> + <field name="model">project.task.type</field> + <field name="arch" type="xml"> + <form string="Task Stage" delete="0"> + <field name="active" invisible="1" /> + <sheet> + <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}" /> + <group> + <group> + <field name="name"/> + <field name="mail_template_id"/> + <field name="rating_template_id" groups="project.group_project_rating"/> + <div class="alert alert-warning" role="alert" colspan='2' attrs="{'invisible': ['|', ('rating_template_id','=', False), ('disabled_rating_warning', '=', False)]}"> + <i class="fa fa-warning" title="Customer disabled on projects"/><b> Customer Ratings</b> are disabled on the following project(s) : <br/> + <field name="disabled_rating_warning" class="mb-0" /> + </div> + <field name="auto_validation_kanban_state" attrs="{'invisible': [('rating_template_id','=', False)]}" groups="project.group_project_rating"/> + </group> + <group> + <field name="fold"/> + <field name="is_closed" groups="base.group_no_one"/> + <field name="project_ids" widget="many2many_tags" groups="base.group_no_one"/> + <field name="sequence" groups="base.group_no_one"/> + </group> + </group> + <group string="Stage Description and Tooltips"> + <p class="text-muted" colspan="2"> + At each stage employees can block or make task/issue ready for next stage. + You can define here labels that will be displayed for the state instead + of the default labels. + </p> + <label for="legend_normal" string=" " class="o_status oe_project_kanban_legend" + title="Task in progress. Click to block or set as done." + aria-label="Task in progress. Click to block or set as done." role="img"/> + <field name="legend_normal" nolabel="1"/> + <label for="legend_blocked" string=" " class="o_status o_status_red oe_project_kanban_legend" + title="Task is blocked. Click to unblock or set as done." + aria-label="Task is blocked. Click to unblock or set as done." role="img"/> + <field name="legend_blocked" nolabel="1"/> + <label for="legend_done" string=" " class="o_status o_status_green oe_project_kanban_legend" + title="This step is done. Click to block or set in progress." + aria-label="This step is done. Click to block or set in progress." role="img"/> + <field name="legend_done" nolabel="1"/> + + <p class="text-muted" colspan="2"> + You can also add a description to help your coworkers understand the meaning and purpose of the stage. + </p> + <field name="description" placeholder="Add a description..." nolabel="1" colspan="2"/> + </group> + </sheet> + </form> + </field> + </record> + + <record id="task_type_tree" model="ir.ui.view"> + <field name="name">project.task.type.tree</field> + <field name="model">project.task.type</field> + <field name="arch" type="xml"> + <tree string="Task Stage" delete="0" sample="1"> + <field name="sequence" widget="handle" optional="show"/> + <field name="name"/> + <field name="fold" optional="show"/> + <field name="mail_template_id" optional="show"/> + <field name="rating_template_id" optional="show"/> + <field name="auto_validation_kanban_state" optional="hide" /> + <field name="description" optional="hide"/> + <field name="project_ids" optional="show" widget="many2many_tags" options="{'color_field': 'color'}" /> + </tree> + </field> + </record> + + <record id="view_project_task_type_kanban" model="ir.ui.view"> + <field name="name">project.task.type.kanban</field> + <field name="model">project.task.type</field> + <field name="arch" type="xml"> + <kanban class="o_kanban_mobile" sample="1"> + <field name="name"/> + <field name="fold"/> + <field name="description"/> + <templates> + <t t-name="kanban-box"> + <div t-attf-class="oe_kanban_global_click"> + <div class="row"> + <div class="col-12"> + <strong><t t-esc="record.name.value"/></strong> + </div> + </div> + <t t-if="record.description.value"> + <hr class="mt8 mb8"/> + <t t-esc="record.description.value"/> + </t> + </div> + </t> + </templates> + </kanban> + </field> + </record> + + <record id="open_task_type_form" model="ir.actions.act_window"> + <field name="name">Stages</field> + <field name="res_model">project.task.type</field> + <field name="view_mode">tree,kanban,form</field> + <field name="view_id" ref="task_type_tree"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a new stage in the task pipeline + </p><p> + Define the steps that will be used in the project from the + creation of the task, up to the closing of the task or issue. + You will use these stages in order to track the progress in + solving a task or an issue. + </p> + </field> + </record> + + <record id="open_task_type_form_domain" model="ir.actions.act_window"> + <field name="name">Stages</field> + <field name="res_model">project.task.type</field> + <field name="view_mode">tree,kanban,form</field> + <field name="domain">[('project_ids','=', project_id)]</field> + <field name="view_id" ref="task_type_tree"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + Create a new stage in the task pipeline + </p><p> + Define the steps that will be used in the project from the + creation of the task, up to the closing of the task or issue. + You will use these stages in order to track the progress in + solving a task or an issue. + </p> + </field> + </record> + + <record id="unlink_task_type_action" model="ir.actions.server"> + <field name="name">Delete</field> + <field name="model_id" ref="project.model_project_task_type"/> + <field name="binding_model_id" ref="project.model_project_task_type"/> + <field name="binding_view_types">form,list</field> + <field name="state">code</field> + <field name="code">action = records.unlink_wizard(stage_view=True)</field> + </record> + + <!-- Project --> + <record id="edit_project" model="ir.ui.view"> + <field name="name">project.project.form</field> + <field name="model">project.project</field> + <field name="arch" type="xml"> + <form string="Project" delete="0"> + <header> + <button name="%(portal.portal_share_action)d" string="Share" type="action" class="oe_highlight oe_read_only"/> + </header> + <sheet string="Project"> + <div class="oe_button_box" name="button_box" groups="base.group_user"> + <button class="oe_stat_button" name="attachment_tree_view" type="object" icon="fa-file-text-o"> + <field string="Documents" name="doc_count" widget="statinfo"/> + </button> + <button class="oe_stat_button" type="action" + name="%(act_project_project_2_project_task_all)d" icon="fa-tasks"> + <field string="Tasks In Progress" name="task_count" widget="statinfo" options="{'label_field': 'label_tasks'}"/> + </button> + <button name="action_view_all_rating" type="object" attrs="{'invisible': ['|', ('rating_active', '=', False), ('rating_percentage_satisfaction', '=', -1)]}" class="oe_stat_button oe_percent oe_read_only" icon="fa-smile-o" groups="project.group_project_rating"> + <div class="o_field_widget o_stat_info"> + <span class="o_stat_value"> + <field name="rating_percentage_satisfaction" nolabel="1"/> + % + </span> + <span class="o_stat_text"> + Customer Satisfaction + </span> + </div> + </button> + </div> + <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/> + <div class="oe_title"> + <h1> + <field name="name" placeholder="Project Name"/> + </h1> + <div name="options_active"> + <div> + <label for="label_tasks" class="oe_inline" string="Name of the tasks:"/> + <field name="label_tasks" class="oe_inline oe_input_align"/> + </div> + </div> + </div> + <notebook> + <page name="description_page" string="Description"> + <field name="description" nolabel="1" placeholder="Describe your project..." type="html"/> + <div class="d-none oe_clear"/> + </page> + <page name="settings" string="Settings"> + <group> + <group> + <field name="active" invisible="1"/> + <field name="user_id" string="Project Manager" widget="many2one_avatar_user" attrs="{'readonly':[('active','=',False)]}" domain="[('share', '=', False)]"/> + <field name="partner_id" string="Customer" widget="res_partner_many2one"/> + <field name="partner_phone" widget="phone" + attrs="{'invisible': [('partner_id', '=', False)]}"/> + <field name="partner_email" widget="email" + attrs="{'invisible': [('partner_id', '=', False)]}"/> + <div name="alias_def" colspan="2" attrs="{'invisible': [('alias_domain', '=', False)]}"> + <!-- Always display the whole alias in edit mode. It depends in read only --> + <label for="alias_enabled" class="font-weight-bold" string="Create tasks by sending an email"/> + <field name="alias_enabled" invisible="1"/> + <span> + <span class="font-weight-bold oe_read_only" attrs="{'invisible': [('alias_name', '=', False)]}">to </span> + <span class="font-weight-bold oe_edit_only">to </span> + <field name="alias_name" class="oe_inline"/> + <span class="oe_read_only" attrs="{'invisible': [('alias_name', '=', False)]}">@</span> + <span class="oe_edit_only">@</span> + <field name="alias_domain" + attrs="{'invisible': [('alias_name', '=', False)]}" + class="oe_inline oe_read_only" + readonly="1"/> + <field name="alias_domain" + class="oe_inline oe_edit_only" + readonly="1"/> + </span> + </div> + <!-- the alias contact must appear when the user start typing and it must disappear + when the string is deleted. --> + <field name="alias_contact" class="oe_inline oe_edit_only" string="Accept Emails From" + attrs="{'invisible': ['|', ('alias_name', '=', ''), ('alias_name', '=', False)]}"/> + </group> + <group> + <field name="analytic_account_id" domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]" context="{'default_partner_id': partner_id}" groups="analytic.group_analytic_accounting"/> + <field name="privacy_visibility" widget="radio"/> + <field name="allowed_internal_user_ids" widget="many2many_tags" attrs="{'invisible': [('privacy_visibility', '!=', 'followers')]}"/> + <field name="allowed_portal_user_ids" widget="many2many_tags" options="{'no_create': True}" attrs="{'invisible': [('privacy_visibility', '!=', 'portal')]}"/> + + <field name="company_id" groups="base.group_multi_company"/> + </group> + <group name="extra_settings"> + </group> + </group> + <div class="row mt16 o_settings_container"> + <div id="rating_settings" class="col-lg-6 o_setting_box" groups="project.group_project_rating"> + <div class="o_setting_left_pane"> + <field name="rating_active"/> + </div> + <div class="o_setting_right_pane"> + <label for="rating_active" /> + <div class="text-muted"> + Get customer feedback + </div> + <div class="mt16" attrs="{'invisible':[('rating_active','==',False)]}"> + <field name="rating_status" widget="radio" /> + <div attrs="{'required': [('rating_status','=','periodic')], 'invisible': [('rating_status','!=','periodic')]}"> + <label for="rating_status_period"/> + <field name="rating_status_period"/> + </div> + <div class="content-group"> + <div class="mt8"> + <button name="%(project.open_task_type_form_domain)d" context="{'project_id':id}" icon="fa-arrow-right" type="action" string="Set a Rating Email Template on Stages" class="btn-link"/> + </div> + </div> + </div> + </div> + </div> + <div class="col-lg-6 o_setting_box" id="subtask_settings" groups="project.group_subtask_project"> + <div class="o_setting_left_pane"> + <field name="allow_subtasks" /> + </div> + <div class="o_setting_right_pane"> + <label for="allow_subtasks" /> + <div class="text-muted"> + Split your tasks to organize your work into sub-milestones + </div> + <div class="mt8" attrs="{'invisible': [('allow_subtasks', '=', False)]}"> + <label for="subtask_project_id" /> + <field name="subtask_project_id" /> + </div> + </div> + </div> + <div class="col-lg-6 o_setting_box" id="recurring_tasks_setting" groups="project.group_project_recurring_tasks"> + <div class="o_setting_left_pane"> + <field name="allow_recurring_tasks" /> + </div> + <div class="o_setting_right_pane"> + <label for="allow_recurring_tasks" /> + <div class="text-muted"> + Auto-generate tasks for regular activities + </div> + </div> + </div> + </div> + </page> + </notebook> + + <div class="oe_chatter"> + <field name="message_follower_ids" options="{'post_refresh':True}" help="Follow this project to automatically track the events associated to tasks and issues of this project." groups="base.group_user"/> + </div> + </sheet> + </form> + </field> + </record> + + <record id="view_project_project_filter" model="ir.ui.view"> + <field name="name">project.project.select</field> + <field name="model">project.project</field> + <field name="arch" type="xml"> + <search string="Search Project"> + <field name="name" string="Project"/> + <field name="user_id" string="Project Manager"/> + <field name="partner_id" string="Customer" filter_domain="[('partner_id', 'child_of', self)]"/> + <filter string="My Favorites" name="my_projects" domain="[('favorite_user_ids', 'in', uid)]"/> + <separator/> + <filter string="Followed" name="followed_by_me" domain="[('message_is_follower', '=', True)]"/> + <filter string="My Projects" name="own_projects" domain="[('user_id', '=', uid)]"/> + <separator/> + <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/> + <group expand="0" string="Group By"> + <filter string="Project Manager" name="Manager" context="{'group_by': 'user_id'}"/> + <filter string="Customer" name="Partner" context="{'group_by': 'partner_id'}"/> + </group> + </search> + </field> + </record> + + <record id="view_project" model="ir.ui.view"> + <field name="name">project.project.tree</field> + <field name="model">project.project</field> + <field name="arch" type="xml"> + <tree decoration-muted="active == False" string="Projects" delete="0" multi_edit="1" sample="1"> + <field name="sequence" optional="show" widget="handle"/> + <field name="message_needaction" invisible="1"/> + <field name="active" invisible="1"/> + <field name="name" string="Name" class="font-weight-bold"/> + <field name="user_id" optional="show" string="Project Manager" widget="many2one_avatar_user"/> + <field name="partner_id" optional="show" string="Customer"/> + <field name="analytic_account_id" optional="hide"/> + <field name="privacy_visibility" optional="hide"/> + <field name="subtask_project_id" optional="hide"/> + <field name="label_tasks" optional="hide"/> + <field name="company_id" optional="show" groups="base.group_multi_company"/> + </tree> + </field> + </record> + + <record id="project_project_view_form_simplified" model="ir.ui.view"> + <field name="name">project.project.view.form.simplified</field> + <field name="model">project.project</field> + <field name="arch" type="xml"> + <form string="Project"> + <group> + <field name="name" class="o_project_name oe_inline" + string="Project Name" placeholder="e.g. Office Party"/> + <field name="user_id" invisible="1"/> + <field name="allow_recurring_tasks" groups="project.group_project_recurring_tasks" /> + </group> + <div name="alias_def" colspan="2" attrs="{'invisible': [('alias_domain', '=', False)]}"> + <label for="alias_name" class="oe_inline" string="Create tasks by sending an email to"/> + <field name="alias_enabled" invisible="1"/> + <span> + <field name="alias_name" class="oe_inline" placeholder="e.g. office-party"/>@<field name="alias_domain" class="oe_inline" readonly="1" /> + </span> + </div> + </form> + </field> + </record> + + <record id="project_project_view_form_simplified_footer" model="ir.ui.view"> + <field name="name">project.project.view.form.simplified</field> + <field name="model">project.project</field> + <field name="inherit_id" ref="project.project_project_view_form_simplified"/> + <field name="mode">primary</field> + <field name="arch" type="xml"> + <xpath expr="//group" position="after"> + <footer> + <button string="Create" name="action_view_tasks" type="object" class="btn-primary o_open_tasks"/> + <button string="Discard" class="btn-secondary" special="cancel"/> + </footer> + </xpath> + </field> + </record> + + <record id="open_create_project" model="ir.actions.act_window"> + <field name="name">Create a Project</field> + <field name="res_model">project.project</field> + <field name="view_mode">form</field> + <field name="view_id" ref="project_project_view_form_simplified_footer"/> + <field name="target">new</field> + </record> + + <record model="ir.ui.view" id="view_project_kanban"> + <field name="name">project.project.kanban</field> + <field name="model">project.project</field> + <field name="arch" type="xml"> + <kanban class="oe_background_grey o_kanban_dashboard o_project_kanban o_emphasize_colors" on_create="project.open_create_project" sample="1"> + <field name="name"/> + <field name="partner_id"/> + <field name="color"/> + <field name="task_count"/> + <field name="label_tasks"/> + <field name="alias_id"/> + <field name="alias_name"/> + <field name="alias_domain"/> + <field name="is_favorite"/> + <field name="rating_percentage_satisfaction"/> + <field name="rating_status"/> + <field name="rating_active" /> + <field name="analytic_account_id"/> + <templates> + <t t-name="kanban-box"> + <div t-attf-class="#{kanban_color(record.color.raw_value)} oe_kanban_global_click o_has_icon"> + <div class="o_project_kanban_main"> + <div class="o_kanban_card_content"> + <div class="o_kanban_primary_left"> + <div class="o_primary"> + <span><t t-esc="record.name.value"/></span> + <span t-if="record.partner_id.value"> + <strong><t t-esc="record.partner_id.value"/></strong> + </span> + </div> + <div t-if="record.alias_name.value and record.alias_domain.value"> + <span><i class="fa fa-envelope" role="img" aria-label="Domain Alias" title="Domain Alias"></i> <a t-att-href="'mailto:' + record.alias_id.value" title="Send an email"><t t-esc="record.alias_id.value"/></a></span> + </div> + <div t-if="record.rating_active.raw_value" class="mt8 text-primary" title="Percentage of happy ratings over the past 30 days." groups="project.group_project_rating"> + <b> + <a name="action_view_all_rating" type="object" context="{'search_default_rating_last_30_days':1}"> + <t t-if="record.rating_percentage_satisfaction.value != -1"> + <i class="fa fa-smile-o" role="img" aria-label="Percentage of satisfaction" title="Percentage of satisfaction"/> <t t-esc="record.rating_percentage_satisfaction.value"/>% + </t> + </a> + </b> + </div> + </div> + </div> + <div class="o_kanban_card_manage_pane dropdown-menu" groups="project.group_project_manager" role="menu"> + <div class="o_kanban_card_manage_section o_kanban_manage_reports"> + <div role="menuitem"> + <a name="%(portal.portal_share_action)d" type="action">Share</a> + </div> + <div role="menuitem"> + <a type="edit">Edit</a> + </div> + </div> + <div role="menuitem" aria-haspopup="true" class="o_no_padding_kanban_colorpicker"> + <ul class="oe_kanban_colorpicker" data-field="color" role="popup"/> + </div> + </div> + <a class="o_kanban_manage_toggle_button o_left" href="#" groups="project.group_project_manager"><i class="fa fa-ellipsis-v" role="img" aria-label="Manage" title="Manage"/></a> + <span class="o_right"><field name="is_favorite" widget="boolean_favorite" nolabel="1" force_save="1" /></span> + </div> + + <div class="o_project_kanban_boxes"> + <a class="o_project_kanban_box" name="action_view_tasks" type="object"> + <div> + <span class="o_value"><t t-esc="record.task_count.value"/></span> + <span class="o_label"><t t-esc="record.label_tasks.value"/></span> + </div> + </a> + <a t-if="record.analytic_account_id.raw_value" class="o_project_kanban_box o_project_timesheet_box" name="action_view_account_analytic_line" type="object" groups="analytic.group_analytic_accounting"> + <div> + <span class="o_label">Profitability</span> + </div> + </a> + </div> + </div> + </t> + </templates> + </kanban> + </field> + </record> + + <record id="open_view_project_all" model="ir.actions.act_window"> + <field name="name">Projects</field> + <field name="res_model">project.project</field> + <field name="domain">[]</field> + <field name="view_mode">kanban,form</field> + <field name="view_id" ref="view_project_kanban"/> + <field name="search_view_id" ref="view_project_project_filter"/> + <field name="target">main</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + No projects found. Let's create one! + </p><p> + Projects regroup tasks on the same topic and each have their own dashboard. + </p> + </field> + </record> + + <record id="open_view_project_all_config" model="ir.actions.act_window"> + <field name="name">Projects</field> + <field name="res_model">project.project</field> + <field name="domain">[]</field> + <field name="view_mode">tree,kanban,form</field> + <field name="view_ids" eval="[(5, 0, 0), + (0, 0, {'view_mode': 'tree', 'view_id': ref('view_project')}), + (0, 0, {'view_mode': 'kanban', 'view_id': ref('view_project_kanban')})]"/> + <field name="search_view_id" ref="view_project_project_filter"/> + <field name="context">{}</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + No projects found. Let's create one! + </p><p> + Projects regroup tasks on the same topic and each have their own dashboard. + </p> + </field> + </record> + + <!-- Task --> + <record id="view_task_form2" model="ir.ui.view"> + <field name="name">project.task.form</field> + <field name="model">project.task</field> + <field eval="2" name="priority"/> + <field name="arch" type="xml"> + <form string="Task" class="o_form_project_tasks"> + <field name="allow_subtasks" invisible="1" /> + <field name="is_closed" invisible="1" /> + <field name="allow_recurring_tasks" invisible="1" /> + <field name="repeat_show_dow" invisible="1" /> + <field name="repeat_show_day" invisible="1" /> + <field name="repeat_show_week" invisible="1" /> + <field name="repeat_show_month" invisible="1" /> + <field name="recurrence_id" invisible="1" /> + <header> + <button name="action_assign_to_me" string="Assign to Me" type="object" class="oe_highlight" + attrs="{'invisible' : [('user_id', '!=', False)]}"/> + <field name="stage_id" widget="statusbar" options="{'clickable': '1', 'fold_field': 'fold'}" attrs="{'invisible': [('project_id', '=', False)]}"/> + </header> + <div class="text-center alert alert-primary" role="alert" attrs="{'invisible': ['|', ('ribbon_message', '=', False), ('ribbon_message', '=', '')]}"> + <field name="ribbon_message"/> + </div> + <div class="alert alert-info oe_edit_only" role="status" attrs="{'invisible': ['|', ('recurring_task', '=', False), ('recurrence_id', '=', False)]}"> + <p>Edit recurring task</p> + <field name="recurrence_update" widget="radio"/> + </div> + <sheet string="Task"> + <div class="oe_button_box" name="button_box"> + <button name="action_subtask" type="object" class="oe_stat_button" icon="fa-tasks" + attrs="{'invisible' : ['|', ('allow_subtasks', '=', False), ('id', '=', False)]}" context="{'default_user_id': user_id, 'default_parent_id': id, 'default_project_id': subtask_project_id}"> + <field string="Sub-tasks" name="subtask_count" widget="statinfo"/> + </button> + <button name="%(rating_rating_action_task)d" type="action" attrs="{'invisible': [('rating_count', '=', 0)]}" class="oe_stat_button" icon="fa-smile-o" groups="project.group_project_rating"> + <field name="rating_count" string="Rating" widget="statinfo"/> + </button> + <button name="action_recurring_tasks" type="object" attrs="{'invisible': [('recurrence_id', '=', False)]}" class="oe_stat_button" icon="fa-repeat" groups="project.group_project_recurring_tasks"> + <div class="o_field_widget o_stat_info"> + <span class="o_stat_value"> + <field name="recurring_count" widget="statinfo" nolabel="1" /> + Tasks + </span> + <span class="o_stat_text">in Recurrence</span> + </div> + </button> + </div> + <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/> + <div class="oe_title pr-0"> + <h1 class="d-flex flex-row justify-content-between"> + <field name="priority" widget="priority" class="mr-3"/> + <field name="name" class="o_task_name text-truncate" placeholder="Task Title..."/> + <field name="kanban_state" widget="state_selection" class="ml-auto"/> + </h1> + </div> + <group> + <group> + <field name="project_id" required="1" domain="[('active', '=', True), ('company_id', '=', company_id)]"/> + <field name="user_id" + class="o_task_user_field" + domain="[('share', '=', False)]"/> + <field + name="parent_id" + domain="[('parent_id', '=', False)]" + attrs="{'invisible' : [('allow_subtasks', '=', False)]}" + /> + <field name="date_deadline" attrs="{'invisible': [('is_closed', '=', True)]}"/> + <field name="recurring_task" attrs="{'invisible': [('allow_recurring_tasks', '=', False)]}" /> + <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}"/> + </group> + <group> + <field name="active" invisible="1"/> + <field name="partner_id" widget="res_partner_many2one" class="o_task_customer_field"/> + <field name="partner_email" widget="email" invisible="1"/> + <field name="partner_phone" widget="phone" attrs="{'invisible': True}"/> + <field name="legend_blocked" invisible="1"/> + <field name="legend_normal" invisible="1"/> + <field name="legend_done" invisible="1"/> + </group> + </group> + <notebook> + <page name="description_page" string="Description"> + <field name="description" type="html"/> + <div class="d-none oe_clear"/> + </page> + <page name="recurrence" string="Recurrence" attrs="{'invisible': [('recurring_task', '=', False)]}"> + <group> + <group> + <label for="repeat_interval" /> + <div class="o_row"> + <field name="repeat_interval" attrs="{'required': [('recurring_task', '=', True)]}" /> + <field name="repeat_unit" attrs="{'required': [('recurring_task', '=', True)]}" /> + </div> + + <label for="repeat_on_month" string="Repeat On" attrs="{'invisible': [('repeat_unit', 'not in', ('month', 'year'))]}" /> + <div class="o_row"> + <field name="repeat_on_month" attrs="{'invisible': [('repeat_unit', '!=', 'month')], 'required': [('repeat_unit', '=', 'month')]}" /> + <field name="repeat_on_year" attrs="{'invisible': [('repeat_unit', '!=', 'year')], 'required': [('repeat_unit', '=', 'year')]}" /> + + <field name="repeat_day" attrs="{'invisible': [('repeat_show_day', '=', False)], 'required': [('repeat_show_day', '=', True)]}" /> + <field name="repeat_week" attrs="{'invisible': [('repeat_show_week', '=', False)], 'required': [('repeat_show_week', '=', True)]}" /> + <field name="repeat_weekday" attrs="{'invisible': [('repeat_show_week', '=', False)], 'required': [('repeat_show_week', '=', True)]}" /> + <span attrs="{'invisible': ['|', ('repeat_show_week', '=', False), ('repeat_show_month', '=', False)]}">of</span> + <field name="repeat_month" attrs="{'invisible': [('repeat_show_month', '=', False)], 'required': [('repeat_show_month', '=', True)]}" /> + </div> + + + <field name="mon" attrs="{'invisible': [('repeat_show_dow', '=', False)]}" /> + <field name="tue" attrs="{'invisible': [('repeat_show_dow', '=', False)]}" /> + <field name="wed" attrs="{'invisible': [('repeat_show_dow', '=', False)]}" /> + <field name="thu" attrs="{'invisible': [('repeat_show_dow', '=', False)]}" /> + <field name="fri" attrs="{'invisible': [('repeat_show_dow', '=', False)]}" /> + <field name="sat" attrs="{'invisible': [('repeat_show_dow', '=', False)]}" /> + <field name="sun" attrs="{'invisible': [('repeat_show_dow', '=', False)]}" /> + + <label for="repeat_type" /> + <div class="o_row"> + <field name="repeat_type" attrs="{'required': [('recurring_task', '=', True)]}" /> + <field name="repeat_until" attrs="{'invisible': [('repeat_type', '!=', 'until')], 'required': [('repeat_type', '=', 'until')]}" /> + <field name="repeat_number" attrs="{'invisible': [('repeat_type', '!=', 'after')], 'required': [('repeat_type', '=', 'after')]}" /> + </div> + </group> + </group> + <group attrs="{'invisible': ['|', ('recurring_task', '=', False), ('recurrence_message', '=', False)]}"> + <div class="alert alert-success o_form_project_recurrence_message" role="status"> + <p><span class="fa fa-check-circle"></span> Next Occurrences:</p> + <field name="recurrence_message" widget="html" class="mb-0" /> + </div> + </group> + </page> + <page name="extra_info" string="Extra Info" groups="base.group_no_one"> + <group> + <group> + <field name="sequence" groups="base.group_no_one"/> + <field name="email_from" invisible="1"/> + <field name="email_cc" groups="base.group_no_one"/> + <field name="project_privacy_visibility" groups="base.group_no_one"/> + <field name="allowed_user_ids" widget="many2many_tags" + groups="base.group_no_one" attrs="{'invisible': [('project_privacy_visibility', 'not in', ('followers', 'portal'))]}"/> + <field name="child_ids" invisible="1" /> + <field name="subtask_project_id" invisible="1" /> + <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}"/> + <field name="displayed_image_id" groups="base.group_no_one"/> + </group> + <group> + <field name="date_assign" groups="base.group_no_one"/> + <field name="date_last_stage_update" groups="base.group_no_one"/> + </group> + <group string="Working Time to Assign" attrs="{'invisible': [('working_hours_open', '=', 0.0)]}"> + <field name="working_hours_open" string="Hours"/> + <field name="working_days_open" string="Days"/> + </group> + <group string="Working Time to Close" attrs="{'invisible': [('working_hours_close', '=', 0.0)]}"> + <field name="working_hours_close" string="Hours"/> + <field name="working_days_close" string="Days"/> + </group> + </group> + </page> + </notebook> + </sheet> + <div class="oe_chatter"> + <field name="message_follower_ids" options="{'post_refresh':True}" groups="base.group_user"/> + <field name="activity_ids"/> + <field name="message_ids"/> + </div> + </form> + </field> + </record> + + <record id="portal_share_action" model="ir.actions.act_window"> + <field name="name">Share</field> + <field name="res_model">portal.share</field> + <field name="view_mode">form</field> + <field name="target">new</field> + <field name="binding_model_id" ref="model_project_task"/> + <field name="binding_view_types">form</field> + </record> + + <record id="unlink_project_action" model="ir.actions.server"> + <field name="name">Delete</field> + <field name="model_id" ref="project.model_project_project"/> + <field name="binding_model_id" ref="project.model_project_project"/> + <field name="binding_view_types">form,list</field> + <field name="state">code</field> + <field name="code">action = records.action_unlink()</field> + </record> + + <record id="quick_create_task_form" model="ir.ui.view"> + <field name="name">project.task.form.quick_create</field> + <field name="model">project.task</field> + <field name="priority">1000</field> + <field name="arch" type="xml"> + <form> + <group> + <field name="name" string = "Task Title"/> + <field name="user_id" options="{'no_open': True,'no_create': True}" domain="[('share', '=', False)]"/> + <field name="project_id" required="1" invisible="context.get('all_task', 1)"/> + <field name="company_id" invisible="1"/> + <field name="parent_id" invisible="1"/> + </group> + </form> + </field> + </record> + + <!-- Project Task Kanban View --> + <record model="ir.ui.view" id="view_task_kanban"> + <field name="name">project.task.kanban</field> + <field name="model">project.task</field> + <field name="arch" type="xml"> + <kanban default_group_by="stage_id" class="o_kanban_small_column o_kanban_project_tasks" on_create="quick_create" quick_create_view="project.quick_create_task_form" examples="project" js_class="project_kanban" sample="1"> + <field name="color"/> + <field name="priority"/> + <field name="stage_id" options='{"group_by_tooltip": {"description": "Description"}}'/> + <field name="user_id"/> + <field name="partner_id"/> + <field name="sequence"/> + <field name="is_closed"/> + <field name="partner_is_company"/> + <field name="displayed_image_id"/> + <field name="active"/> + <field name="legend_blocked"/> + <field name="legend_normal"/> + <field name="legend_done"/> + <field name="activity_ids"/> + <field name="activity_state"/> + <field name="rating_last_value"/> + <field name="rating_ids"/> + <progressbar field="kanban_state" colors='{"done": "success", "blocked": "danger", "normal": "muted"}'/> + <templates> + <t t-name="kanban-box"> + <div t-attf-class="{{!selection_mode ? 'oe_kanban_color_' + kanban_getcolor(record.color.raw_value) : ''}} oe_kanban_card oe_kanban_global_click"> + <div class="oe_kanban_content"> + <div class="o_kanban_record_top"> + <div class="o_kanban_record_headings"> + <strong class="o_kanban_record_title"><field name="name"/></strong> + <span invisible="context.get('default_project_id', False) or context.get('fsm_mode', False)"><br/><field name="project_id" required="1"/></span> + <br /> + <t t-if="record.partner_id.value"> + <span t-if="!record.partner_is_company.raw_value"> + <field name="commercial_partner_id"/> + </span> + <span t-else=""> + <field name="partner_id"/> + </span> + </t> + <t t-else="record.email_from.raw_value"><span><field name="email_from"/></span></t> + </div> + <div class="o_dropdown_kanban dropdown" t-if="!selection_mode" groups="base.group_user"> + <a role="button" class="dropdown-toggle o-no-caret btn" data-toggle="dropdown" data-display="static" href="#" aria-label="Dropdown menu" title="Dropdown menu"> + <span class="fa fa-ellipsis-v"/> + </a> + <div class="dropdown-menu" role="menu"> + <a t-if="widget.editable" role="menuitem" type="set_cover" class="dropdown-item" data-field="displayed_image_id">Set Cover Image</a> + <a name="%(portal.portal_share_action)d" role="menuitem" type="action" class="dropdown-item">Share</a> + <a t-if="widget.editable" role="menuitem" type="edit" class="dropdown-item">Edit</a> + <a t-if="widget.editable" role="menuitem" class="dropdown-item" name="toggle_active" type="object"> + <t t-if="record.active.raw_value">Archive</t> + <t t-if="!record.active.raw_value">Restore</t> + </a> + <a t-if="widget.deletable" role="menuitem" type="delete" class="dropdown-item">Delete</a> + <div role="separator" class="dropdown-divider"></div> + <ul class="oe_kanban_colorpicker" data-field="color"/> + </div> + </div> + </div> + <div class="o_kanban_record_body"> + <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" invisible="context.get('fsm_mode', False)"/> + <div t-if="record.displayed_image_id.value"> + <field name="displayed_image_id" widget="attachment_image"/> + </div> + </div> + <div class="o_kanban_record_bottom" t-if="!selection_mode"> + <div class="oe_kanban_bottom_left"> + <field name="priority" widget="priority"/> + <field name="activity_ids" widget="kanban_activity"/> + <b t-if="record.rating_ids.raw_value.length"> + <span style="font-weight:bold;" class="fa fa-fw mt4 fa-smile-o text-success" t-if="record.rating_last_value.value == 5" title="Latest Rating: Satisfied" role="img" aria-label="Happy face"/> + <span style="font-weight:bold;" class="fa fa-fw mt4 fa-meh-o text-warning" t-if="record.rating_last_value.value == 3" title="Latest Rating: Not Satisfied" role="img" aria-label="Neutral face"/> + <span style="font-weight:bold;" class="fa fa-fw mt4 fa-frown-o text-danger" t-if="record.rating_last_value.value == 1" title="Latest Rating: Higly Dissatisfied" role="img" aria-label="Sad face"/> + </b> + <div name="date_deadline" attrs="{'invisible': [('is_closed', '=', True)]}"> + <field name="date_deadline" widget="remaining_days"/> + </div> + </div> + <div class="oe_kanban_bottom_right" t-if="!selection_mode"> + <field name="kanban_state" widget="state_selection" groups="base.group_user" invisible="context.get('fsm_mode', False)"/> + <field name="user_id" widget="many2one_avatar_user"/> + </div> + </div> + </div> + <div class="oe_clear"></div> + </div> + </t> + </templates> + </kanban> + </field> + </record> + + <record id="view_task_tree2" model="ir.ui.view"> + <field name="name">project.task.tree</field> + <field name="model">project.task</field> + <field eval="2" name="priority"/> + <field name="arch" type="xml"> + <tree string="Tasks" multi_edit="1" sample="1"> + <field name="message_needaction" invisible="1" readonly="1"/> + <field name="is_closed" invisible="1" /> + <field name="sequence" invisible="1" readonly="1"/> + <field name="name"/> + <field name="project_id" optional="show" readonly="1"/> + <field name="partner_id" optional="hide"/> + <field name="parent_id" groups="project.group_subtask_project" optional="hide"/> + <field name="user_id" optional="show" widget="many2one_avatar_user"/> + <field name="company_id" groups="base.group_multi_company" optional="show"/> + <field name="activity_ids" widget="list_activity" optional="show"/> + <field name="date_deadline" optional="hide" widget="remaining_days" attrs="{'invisible': [('is_closed', '=', True)]}"/> + <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" optional="show"/> + <field name="kanban_state" widget="state_selection" optional="hide" readonly="1"/> + <field name="stage_id" invisible="context.get('set_visible',False)" optional="show" readonly="1"/> + </tree> + </field> + </record> + + <record id="project_task_view_tree_activity" model="ir.ui.view"> + <field name="name">project.task.tree.activity</field> + <field name="model">project.task</field> + <field name="arch" type="xml"> + <tree string="Next Activities" decoration-danger="not is_closed and activity_date_deadline < current_date" default_order="activity_date_deadline" multi_edit="1"> + <field name="is_closed"/> + <field name="name"/> + <field name="project_id"/> + <field name="activity_date_deadline"/> + <field name="activity_type_id"/> + <field name="activity_summary"/> + <field name="stage_id"/> + </tree> + </field> + </record> + + <record id="view_task_calendar" model="ir.ui.view"> + <field name="name">project.task.calendar</field> + <field name="model">project.task</field> + <field eval="2" name="priority"/> + <field name="arch" type="xml"> + <calendar date_start="date_deadline" string="Tasks" mode="month" color="user_id" event_limit="5" + hide_time="true" quick_add="False" js_class="project_calendar"> + <field name="user_id" avatar_field="image_128" filters="1"/> + <field name="date_deadline"/> + <field name="project_id"/> + <field name="priority" widget="priority"/> + <field name="stage_id"/> + </calendar> + </field> + </record> + + <record id="view_project_task_pivot" model="ir.ui.view"> + <field name="name">project.task.pivot</field> + <field name="model">project.task</field> + <field name="arch" type="xml"> + <pivot string="Project Tasks" sample="1"> + <field name="project_id" type="row"/> + <field name="stage_id" type="col"/> + <field name="color" invisible="1"/> + </pivot> + </field> + </record> + + <record id="view_project_task_graph" model="ir.ui.view"> + <field name="name">project.task.graph</field> + <field name="model">project.task</field> + <field name="arch" type="xml"> + <graph string="Project Tasks" sample="1"> + <field name="project_id"/> + <field name="stage_id"/> + </graph> + </field> + </record> + + <record id="project_task_view_activity" model="ir.ui.view"> + <field name="name">project.task.activity</field> + <field name="model">project.task</field> + <field name="arch" type="xml"> + <activity string="Project Tasks"> + <field name="user_id"/> + <templates> + <div t-name="activity-box"> + <img t-att-src="activity_image('res.users', 'image_128', record.user_id.raw_value)" t-att-title="record.user_id.value" t-att-alt="record.user_id.value"/> + <div> + <field name="name" display="full"/> + <field name="project_id" muted="1" display="full" invisible="context.get('default_project_id', False)"/> + </div> + </div> + </templates> + </activity> + </field> + </record> + + <record id="action_view_task" model="ir.actions.act_window"> + <field name="name">Tasks</field> + <field name="res_model">project.task</field> + <field name="view_mode">kanban,tree,form,calendar,pivot,graph,activity</field> + <field name="context">{'search_default_my_tasks': 1}</field> + <field name="search_view_id" ref="view_task_search_form"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + No tasks found. Let's create one! + </p><p> + To get things done, use activities and status on tasks.<br/> + Chat in real time or by email to collaborate efficiently. + </p> + </field> + </record> + + <record id="action_view_all_task" model="ir.actions.act_window"> + <field name="name">Tasks</field> + <field name="res_model">project.task</field> + <field name="view_mode">tree,kanban,form,calendar,pivot,graph,activity</field> + <field name="context">{'search_default_my_tasks': 1, 'all_task': 0}</field> + <field name="search_view_id" ref="view_task_search_form"/> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + No tasks found. Let's create one! + </p><p> + To get things done, use activities and status on tasks.<br/> + Chat in real time or by email to collaborate efficiently. + </p> + </field> + </record> + + <record id="open_view_task_list_kanban" model="ir.actions.act_window.view"> + <field name="sequence" eval="0"/> + <field name="view_mode">kanban</field> + <field name="act_window_id" ref="action_view_task"/> + </record> + <record id="open_view_task_list_tree" model="ir.actions.act_window.view"> + <field name="sequence" eval="1"/> + <field name="view_mode">tree</field> + <field name="act_window_id" ref="action_view_task"/> + </record> + + <menuitem name="Tasks" id="menu_project_management" parent="menu_main_pm" + action="action_view_all_task" sequence="2" groups="base.group_no_one,group_project_user"/> + + <record id="project_task_action_from_partner" model="ir.actions.act_window"> + <field name="name">Tasks</field> + <field name="res_model">project.task</field> + <field name="view_mode">kanban,tree,form</field> + <field name="search_view_id" ref="view_task_search_form"/> + </record> + + <record id="action_view_task_overpassed_draft" model="ir.actions.act_window"> + <field name="name">Overpassed Tasks</field> + <field name="res_model">project.task</field> + <field name="view_mode">tree,form,calendar,graph,kanban</field> + <field name="domain">[('is_closed', '=', False), ('date_deadline','<',time.strftime('%Y-%m-%d'))]</field> + <field name="filter" eval="True"/> + <field name="search_view_id" ref="view_task_search_form"/> + </record> + + <!-- Opening task when double clicking on project --> + <record id="dblc_proj" model="ir.actions.act_window"> + <field name="res_model">project.task</field> + <field name="name">Project's tasks</field> + <field name="view_mode">tree,form,calendar,graph,kanban</field> + <field name="domain">[('project_id', '=', active_id)]</field> + <field name="context">{'project_id':active_id}</field> + </record> + + <!-- Menu item for project --> + <menuitem id="menu_tasks_config" name="GTD" parent="menu_project_config" sequence="2"/> + + <menuitem action="open_task_type_form" id="menu_project_config_project" name="Stages" parent="menu_project_config" sequence="3" groups="base.group_no_one"/> + + <menuitem action="open_view_project_all" id="menu_projects" name="Projects" parent="menu_main_pm" sequence="1"/> + <menuitem action="open_view_project_all_config" id="menu_projects_config" name="Projects" parent="menu_project_config" sequence="10"/> + + <!-- User Form --> + <record id="act_res_users_2_project_task_opened" model="ir.actions.act_window"> + <field name="name">Assigned Tasks</field> + <field name="res_model">project.task</field> + <field name="view_mode">tree,form,calendar,graph</field> + <field name="context">{'search_default_user_id': [active_id], 'default_user_id': active_id}</field> + <field name="binding_model_id" ref="base.model_res_users"/> + <field name="binding_view_types">form</field> + </record> + + <!-- Tags --> + <record model="ir.ui.view" id="project_tags_search_view"> + <field name="name">Tags</field> + <field name="model">project.tags</field> + <field name="arch" type="xml"> + <search string="Issue Version"> + <field name="name"/> + </search> + </field> + </record> + + <record model="ir.ui.view" id="project_tags_form_view"> + <field name="name">Tags</field> + <field name="model">project.tags</field> + <field name="arch" type="xml"> + <form string="Tags"> + <sheet> + <group> + <field name="name"/> + <field name="color" widget="color_picker"/> + </group> + </sheet> + </form> + </field> + </record> + + <record model="ir.ui.view" id="project_tags_tree_view"> + <field name="name">Tags</field> + <field name="model">project.tags</field> + <field name="arch" type="xml"> + <tree string="Tags" editable="bottom" sample="1"> + <field name="name"/> + <field name="color" widget="color_picker"/> + </tree> + </field> + </record> + + <record id="project_tags_action" model="ir.actions.act_window"> + <field name="name">Tags</field> + <field name="res_model">project.tags</field> + <field name="help" type="html"> + <p class="o_view_nocontent_smiling_face"> + No tags found. Let's create one! + </p> + <p> + Tags are perfect to categorize your tasks. + </p> + </field> + </record> + <menuitem action="project_tags_action" id="menu_project_tags_act" parent="menu_project_config"/> + + <!-- Reporting menus --> + <menuitem id="menu_project_report" name="Reporting" + groups="project.group_project_manager" + parent="menu_main_pm" sequence="99"/> + + <menuitem id="menu_project_report_task_analysis" + name="Tasks Analysis" + action="project.action_project_task_user_tree" + parent="menu_project_report" + sequence="10"/> + + <menuitem id="rating_rating_menu_project" + action="rating_rating_action_project_report" + parent="menu_project_report" + groups="project.group_project_rating" + sequence="40"/> + +</odoo> diff --git a/addons/project/views/rating_views.xml b/addons/project/views/rating_views.xml new file mode 100644 index 00000000..48a01e90 --- /dev/null +++ b/addons/project/views/rating_views.xml @@ -0,0 +1,221 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <record id="rating_rating_view_tree_project" model="ir.ui.view"> + <field name="name">rating.rating.tree.project</field> + <field name="model">rating.rating</field> + <field name="inherit_id" ref="rating.rating_rating_view_tree"/> + <field name="mode">primary</field> + <field name="arch" type="xml"> + <field name="res_name" position="attributes"> + <attribute name="string">Task</attribute> + </field> + <field name="parent_res_name" position="attributes"> + <attribute name="string">Project</attribute> + </field> + <field name="rated_partner_id" position="attributes"> + <attribute name="string">Assigned to</attribute> + </field> + </field> + </record> + + <record id="rating_rating_view_form_project" model="ir.ui.view"> + <field name="name">rating.rating.form.project</field> + <field name="model">rating.rating</field> + <field name="inherit_id" ref="rating.rating_rating_view_form"/> + <field name="mode">primary</field> + <field name="arch" type="xml"> + <field name="res_name" position="attributes"> + <attribute name="string">Task</attribute> + </field> + <field name="resource_ref" position="attributes"> + <attribute name="string">Task</attribute> + </field> + <field name="parent_ref" position="attributes"> + <attribute name="string">Project</attribute> + </field> + <field name="parent_res_name" position="attributes"> + <attribute name="string">Project</attribute> + </field> + <field name="rated_partner_id" position="attributes"> + <attribute name="string">Assigned to</attribute> + </field> + <div name="rating_image_container" position="replace"> + <field name="rating_text" string="Rating"/> + </div> + <xpath expr="//field[@name='is_internal']" position="attributes"> + <attribute name="invisible">1</attribute> + </xpath> + </field> + </record> + + <record id="rating_rating_view_pivot" model="ir.ui.view"> + <field name="name">rating.rating.view.pivot.project</field> + <field name="model">rating.rating</field> + <field name="inherit_id" ref="rating.rating_rating_view_pivot"/> + <field name="mode">primary</field> + <field name="arch" type="xml"> + <xpath expr="//pivot" position="attributes"> + <attribute name="js_class">project_rating_pivot</attribute> + </xpath> + </field> + </record> + + <record id="rating_rating_view_graph" model="ir.ui.view"> + <field name="name">rating.rating.view.graph.project</field> + <field name="model">rating.rating</field> + <field name="inherit_id" ref="rating.rating_rating_view_graph"/> + <field name="mode">primary</field> + <field name="arch" type="xml"> + <xpath expr="//graph" position="attributes"> + <attribute name="js_class">project_rating_graph</attribute> + </xpath> + </field> + </record> + + <record id="rating_rating_view_search_project" model="ir.ui.view"> + <field name="name">rating.rating.search.project</field> + <field name="model">rating.rating</field> + <field name="inherit_id" ref="rating.rating_rating_view_search"/> + <field name="mode">primary</field> + <field name="arch" type="xml"> + <xpath expr="//filter[@name='resource']" position="after"> + <filter string="Project" name="groupby_project" context="{'group_by': 'parent_res_name'}"/> + </xpath> + <xpath expr="/search" position="inside"> + <filter string="Last 30 Days" name="rating_last_30_days" domain="[ + ('create_date', '>=', (datetime.datetime.combine(context_today() + relativedelta(days=-30), datetime.time(0,0,0)).to_utc()).strftime('%Y-%m-%d %H:%M:%S'))]" + /> + <separator/> + </xpath> + </field> + </record> + + <record id="rating_rating_action_view_project_rating" model="ir.actions.act_window"> + <field name="name">Rating</field> + <field name="res_model">rating.rating</field> + <field name="view_mode">kanban,tree,graph,pivot,form</field> + <field name="domain">[('consumed','=',True), ('parent_res_model','=','project.project')]</field> + <field name="search_view_id" ref="rating_rating_view_search_project"/> + <field name="help" type="html"> + <p class="o_view_nocontent_empty_folder"> + There are no ratings for this project at the moment + </p> + </field> + </record> + + <record id="rating_rating_action_view_project_rating_tree" model="ir.actions.act_window.view"> + <field name="sequence" eval="10"/> + <field name="view_mode">tree</field> + <field name="act_window_id" ref="rating_rating_action_view_project_rating"/> + <field name="view_id" ref="rating_rating_view_tree_project"/> + </record> + + <record id="rating_rating_action_view_project_rating_form" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">form</field> + <field name="act_window_id" ref="rating_rating_action_view_project_rating"/> + <field name="view_id" ref="rating_rating_view_form_project"/> + </record> + + <record id="rating_rating_action_view_project_rating_pivot" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">pivot</field> + <field name="act_window_id" ref="rating_rating_action_view_project_rating"/> + <field name="view_id" ref="rating_rating_view_pivot"/> + </record> + + <record id="rating_rating_action_view_project_rating_graph" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">graph</field> + <field name="act_window_id" ref="rating_rating_action_view_project_rating"/> + <field name="view_id" ref="rating_rating_view_graph"/> + </record> + + <record id="rating_rating_action_task" model="ir.actions.act_window"> + <field name="name">Customer Ratings on Task</field> + <field name="res_model">rating.rating</field> + <field name="view_mode">kanban,tree,pivot,graph,form</field> + <field name="domain">[('res_model', '=', 'project.task'), ('res_id', '=', active_id), ('consumed', '=', True)]</field> + <field name="search_view_id" ref="rating_rating_view_search_project"/> + <field name="help" type="html"> + <p class="o_view_nocontent_empty_folder"> + No customer ratings yet + </p><p> + Let's wait for your customers to manifest themselves. + </p> + </field> + </record> + + <record id="rating_rating_action_task_tree" model="ir.actions.act_window.view"> + <field name="sequence" eval="10"/> + <field name="view_mode">tree</field> + <field name="act_window_id" ref="rating_rating_action_task"/> + <field name="view_id" ref="rating_rating_view_tree_project"/> + </record> + + <record id="rating_rating_action_task_form" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">form</field> + <field name="act_window_id" ref="rating_rating_action_task"/> + <field name="view_id" ref="rating_rating_view_form_project"/> + </record> + + <record id="rating_rating_action_task_pivot" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">pivot</field> + <field name="act_window_id" ref="rating_rating_action_task"/> + <field name="view_id" ref="rating_rating_view_pivot"/> + </record> + + <record id="rating_rating_action_task_graph" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">graph</field> + <field name="act_window_id" ref="rating_rating_action_task"/> + <field name="view_id" ref="rating_rating_view_graph"/> + </record> + + <record id="rating_rating_action_project_report" model="ir.actions.act_window"> + <field name="name">Customer Ratings</field> + <field name="res_model">rating.rating</field> + <field name="view_mode">kanban,tree,pivot,graph,form</field> + <field name="domain">[('parent_res_model','=','project.project'), ('consumed', '=', True)]</field> + <field name="search_view_id" ref="rating_rating_view_search_project"/> + <field name="help" type="html"> + <p class="o_view_nocontent_empty_folder"> + No customer ratings yet + </p><p> + Let's wait for your customers to manifest themselves. + </p> + </field> + <field name="context">{}</field> + </record> + + <record id="rating_rating_action_project_report_tree" model="ir.actions.act_window.view"> + <field name="sequence" eval="10"/> + <field name="view_mode">tree</field> + <field name="act_window_id" ref="rating_rating_action_project_report"/> + <field name="view_id" ref="rating_rating_view_tree_project"/> + </record> + + <record id="rating_rating_action_project_report_form" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">form</field> + <field name="act_window_id" ref="rating_rating_action_project_report"/> + <field name="view_id" ref="rating_rating_view_form_project"/> + </record> + + <record id="rating_rating_action_project_report_pivot" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">pivot</field> + <field name="act_window_id" ref="rating_rating_action_project_report"/> + <field name="view_id" ref="rating_rating_view_pivot"/> + </record> + + <record id="rating_rating_action_project_report_graph" model="ir.actions.act_window.view"> + <field name="sequence" eval="40"/> + <field name="view_mode">graph</field> + <field name="act_window_id" ref="rating_rating_action_project_report"/> + <field name="view_id" ref="rating_rating_view_graph"/> + </record> + +</odoo> diff --git a/addons/project/views/res_config_settings_views.xml b/addons/project/views/res_config_settings_views.xml new file mode 100644 index 00000000..2e2164e0 --- /dev/null +++ b/addons/project/views/res_config_settings_views.xml @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <record id="res_config_settings_view_form" model="ir.ui.view"> + <field name="name">res.config.settings.view.form.inherit.project</field> + <field name="model">res.config.settings</field> + <field name="priority" eval="50"/> + <field name="inherit_id" ref="base.res_config_settings_view_form" /> + <field name="arch" type="xml"> + <xpath expr="//div[hasclass('settings')]" position="inside"> + <div class="app_settings_block" data-string="Project" string="Project" data-key="project" groups="project.group_project_manager"> + <h2>Tasks Management</h2> + <div class="row mt16 o_settings_container" id="tasks_management"> + <div id="use_collaborative_pad" class="col-12 col-lg-6 o_setting_box"> + <div class="o_setting_left_pane"> + <field name="module_pad"/> + </div> + <div class="o_setting_right_pane" name="pad_project_right_pane"> + <label for="module_pad"/> + <div class="text-muted"> + Edit tasks' description collaboratively in real time. See each author's text in a distinct color. + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box"> + <div class="o_setting_left_pane"> + <field name="group_subtask_project"/> + </div> + <div class="o_setting_right_pane"> + <label for="group_subtask_project"/> + <div class="text-muted"> + Split your tasks to organize your work into sub-milestones + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" id="track_customer_satisfaction_setting"> + <div class="o_setting_left_pane"> + <field name="group_project_rating"/> + </div> + <div class="o_setting_right_pane"> + <label for="group_project_rating"/> + <div class="text-muted"> + Track customer satisfaction on tasks + </div> + <div class="content-group" attrs="{'invisible': [('group_project_rating', '=', False)]}"> + <div class="mt8"> + <button name="%(project.open_task_type_form)d" icon="fa-arrow-right" type="action" string="Set a Rating Email Template on Stages" class="btn-link"/> + </div> + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" id="recurring_tasks_setting"> + <div class="o_setting_left_pane"> + <field name="group_project_recurring_tasks"/> + </div> + <div class="o_setting_right_pane"> + <label for="group_project_recurring_tasks"/> + <div class="text-muted"> + Auto-generate tasks for regular activities + </div> + </div> + </div> + </div> + <h2>Time Management</h2> + <div class="row mt16 o_settings_container" name="project_time"> + <div class="col-12 col-lg-6 o_setting_box" name="project_time_management"> + <div class="o_setting_left_pane"> + <field name="module_project_forecast" widget="upgrade_boolean"/> + </div> + <div class="o_setting_right_pane"> + <label for="module_project_forecast"/> + <div class="text-muted" name="project_forecast_msg"> + Plan resource allocation across projets and tasks, and estimate deadlines more accurately + </div> + </div> + </div> + <div class="col-12 col-lg-6 o_setting_box" id="log_time_tasks_setting"> + <div class="o_setting_left_pane"> + <field name="module_hr_timesheet"/> + </div> + <div class="o_setting_right_pane"> + <label for="module_hr_timesheet"/> + <div class="text-muted"> + Track time spent on projects and tasks + </div> + </div> + </div> + </div> + </div> + </xpath> + </field> + </record> + + <record id="project_config_settings_action" model="ir.actions.act_window"> + <field name="name">Settings</field> + <field name="type">ir.actions.act_window</field> + <field name="res_model">res.config.settings</field> + <field name="view_mode">form</field> + <field name="target">inline</field> + <field name="context">{'module' : 'project', 'bin_size': False}</field> + </record> + + <menuitem id="project_config_settings_menu_action" name="Settings" parent="menu_project_config" + sequence="0" action="project_config_settings_action" groups="base.group_system"/> +</odoo> diff --git a/addons/project/views/res_partner_views.xml b/addons/project/views/res_partner_views.xml new file mode 100644 index 00000000..1568dc4d --- /dev/null +++ b/addons/project/views/res_partner_views.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + + <!-- Partners inherited form --> + <record id="view_task_partner_info_form" model="ir.ui.view"> + <field name="name">res.partner.task.buttons</field> + <field name="model">res.partner</field> + <field name="inherit_id" ref="base.view_partner_form"/> + <field name="priority" eval="7"/> + <field name="groups_id" eval="[(4, ref('project.group_project_user'))]"/> + <field name="arch" type="xml"> + <div name="button_box" position="inside"> + <button class="oe_stat_button" type="action" name="%(project_task_action_from_partner)d" + context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}" attrs="{'invisible': [('task_count', '=', 0)]}" + icon="fa-tasks"> + <field string="Tasks" name="task_count" widget="statinfo"/> + </button> + </div> + </field> + </record> + +</odoo> |
