Commit Graph
5597 Commits
Author SHA1 Message Date
Rémy Baranx (bar) 7485177be1 [IMP] various: add documentation links in res.config
Purpose
=======

A 'book icon' link to the documentation of a feature has been
added in its settings panel, when it is useful (complex feature).

Add a nightly test that parses all the res_config_settings views
from the base one and checks that all documentation links are still valid.

Add the o_doc_link class to all documentation links to be able to easily
catch them if needed.

closes odoo/odoo#45813

Taskid: 2180574
Related: odoo/enterprise#8601
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-28 10:47:15 +00:00
Barad Mahendra b13cee7989 [FIX] crm_iap_lead,project: Fix invalid client-side domain
Since the commit https://github.com/odoo/odoo/commit/e95ccf0908c263f6cf23c91c477a8e252e936ff1
invalid client-side domain will raise the error

so fix the incorrect domain in attrs.

Taskid:2196805

closes odoo/odoo#46116

Closes: #45680
X-original-commit: 4279a6bdd4041ff643c3ff5c55f55c93cf4f774f
Related: odoo/enterprise#8708
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-24 14:05:34 +00:00
Martin Trigaux 0cc8610923 [I18N] export saas-12.3 source terms
closes odoo/odoo#45285

X-original-commit: bb281e98f52a2716f00d43a07446a08df698c1dd
Related: odoo/enterprise#8413
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-13 11:45:39 +00:00
mcm-odooandThibault Delavallée de1743ab12 [REF] mail, various: remove user_signature field from mail.template
RATIONALE

Mail template model holds a field telling odoo mail engine to automatically
add the current user's signature to the body. Its use depends on the use
case

  * using the template in the composer on a single record: it is displayed
    in the rendered template in the composer, meaning people could change it.
    This behavior is interesting as it allows to see the email content;
  * using the template in the composer in mass mail mode: it is not displayed
    as only the raw jinja is displayed. It is therefore not obvious that it
    will be appended to the body of the mail. People could add it manually and
    have 2 signatures as a result;

A mechanism automatically adding a signature to sent emails when posting a
message is already implemented and is based on template existence. If a
template has been used when posting, no signature is added in sent emails.
Otherwise it is automatically added. This behavior should not change.

Behavior will therefore be

  * use a template -> specify signature usage in it manually through jinja;
  * do not use a template -> signature added in sent emails;

SPECIFICATIONS

Remove user_signature.

Update template body accordingly. In customer oriented templates that are using
it and do not already contain it, manually add a call to user.signature within
the jinja code. When set to False, just remove its declaration.

Quickly clean some signature integration.

LINKS

Task ID 2089252
Community PR odoo/odoo#39482
Enterprise PR odoo/enterprise#6459
Upgrade PR odoo/upgrate#761

Related: odoo/enterprise#6459
Related: odoo/upgrade#761
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2020-02-11 14:01:13 +00:00
Victor Feyens d4e0fe018d [IMP] *: use ref= instead of eval="ref(' in xml field tags.
* Code cleanup
* Avoid a safe evaluation of the field value when loading those records.

closes odoo/odoo#44883

Related: odoo/enterprise#8283
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-11 13:07:06 +00:00
oco-odoo 5b74306a17 [REF] mass_mailing, project: remove deprecated '_period_number' attribute
This parameter declared on mailing and project classes is not used anymore.
Let us remove it to clean model definitions.

closes odoo/odoo#39401

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-10 11:11:55 +00:00
Kevin BaptisteandYannick Tivisse 2ac06038dd [IMP] project, industry_fsm: Improve subtasks and configuration UX
Purpose
=======

In Project, the configuration has to be done twice: in the settings of the
app and on each project.

During the onboarding, the user won't understand that a feature has to be
enabled at both places and will think that the system just doesn't work.

If the user enabled a feature, he most likely intends on using it for most
of his projects. Therefore, having to do a double configuration for each
new project is annoying.

By the way, sub-tasks is the only global feature (it can't be enabled or
disabled by project), so we are breaking it down by project to remain
consistent with the rest.

Specification
=============

1/ Enable subtasks per project
Before this commit, sub-tasks were a global feature (i.e. once enabled
they were enabled for all projects). This commit gives the ability to
enable/disable sub-tasks per project.

2/ Make project_id on planning required

3/ Change default rating status on new projects

4/ Default value for allow_subtasks

5/ Enable timesheets on existing projects

6/ Hide Total Hours if subtasks are disabled

7/ Create project in the company context.
Otherwise some records generation could use a default company which is not
the company for which we want to create a project.

8/ Default value for allow_forecast, is_fsm

9/ Change reference to timesheet product

10/ Fix tracback on industry_fsm_report.
Before this commit, there was a traceback when enabling "Worksheets"
(industry_fsm_report) after "Time and Material" (industry_fsm_sale).

11/ Convert some onchange method into computed editable stored fields

closes odoo/odoo#41218

Taskid: 2146474
Related: odoo/enterprise#6998
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
2020-01-31 15:35:54 +00:00
Martin Trigaux a74a648030 [IMP] *: use ast.literal_eval
When simply need to parse a domain, it is easier

Add .strip() on ir.ui.view as ast.literal_eval produces an syntax
error if the node starts with spaces (as done in the xpath of
hr_attendance.view_employee_form_inherit_hr_attendance)

closes odoo/odoo#43831

Related: odoo/enterprise#7894
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-01-28 13:58:05 +00:00
jbm-odoo 00b2046460 [IMP] calendar: Adapt views and test for new color and filters
closes odoo/odoo#41573

Taskid: 2153249
Related: odoo/enterprise#7157
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-27 16:08:34 +00:00
Nisha patel f75f56e5cd [IMP] crm,project,utm: modify color of tags in list view
Purpose of this task is to change the color of Tags field in tree view in the
same way as it show in form view.

TaskId : 2172123

closes odoo/odoo#43442

Closes: odoo#43442
Related: odoo/enterprise#7769
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-17 05:58:11 +00:00
Lucas Lefèvre 7bce19fa88 [IMP] sale_timesheet: Improve project overview UI
1)  Add the following stat buttons on the right of the Tasks one:
- (fa-tasks) Late Tasks: tasks whose deadline is exceeded (do not include tasks that
  don't have a deadline set)
- (fa-tasks) Tasks in Overtime: tasks whose Effective hours are strictly greater than
  their Planned hours (if the latter is stricly greater than 0)

2) Remove the sheet view (should be like financial reports)

3) Add an 'Other Revenues' metric under the Profitability section below 'To Invoice'
- It should represent all the revenues other than from timesheets linked to the analytic
  account of the project.
- Only visible if greater than 0

Task 2119567
2020-01-21 13:16:58 +01:00
51b36c3dbb [IMP] base: add default image for users + placeholder if unassigned
1/ When the new database is created without demo data, the admin has a
   'silhouette' as a default picture. When a new user is created without
   picture given by the current user, the new user will have a 'silhouette'
   as a default profile picture.

2/ web: image for fa-user-slash. This image will be used when a record is
   unassigned.

3/ web, *: Change placeholder by default when record is unassigned.
   We want to have a fa-user-slash icon when a record is unassigned instead
   of 'placeholder.png'. A method is created in the BaseModel to have a
   generic method to change easily the placeholder for other models.

4/ Adapt kanban test to keep the same behaviour. Attention the behaviour is
   a bit different. Because, now the default image is given by the server to
   change easily the default image when a record doesn't have an image.
   Thus, we don't say if it's the default placeholder, but we can say it's
   not the same image of the record (in this test, the record, it's the
   partner).

5/ misc: display 'Unassigned' in the hover on kanban cards if record is unassigned

closes odoo/odoo#41356

Taskid: 2060206
Related: odoo/enterprise#7758
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: jdoutreloux <jud@odoo.com>
Co-authored-by: Yannick Tivisse <yti@odoo.com>
2020-01-21 09:22:46 +00:00
Odoo's Mergebot 5f65d9c9fc [FW][MERGE] project, hr_expense: Fix several multi-company issues + tests
Purpose
=======

Fix multi-company access issues following the big changes that happened
(the 13.0). Make the usability better in order to avoid potential
multi-company issues for the user.

Specification
=============

Check the related commits to see the different fixes that have been
made. For more information about the technical/functional considerations,
check the related task.

closes odoo/odoo#43321

Taskid: 2088891
Forward-port-of: odoo/odoo#43230
Forward-port-of: odoo/odoo#42418
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-16 14:20:37 +01:00
Barad Mahendra d16aa4cd39 [IMP] (hr, sale)_timesheet, pad(_project): improve project general UX
Purpose fo the task is to improve the UX of timesheet, project and task.

Done the chages for below point:
  - improve the stage demo data to unified the project stage
  - on the task timesheet 'sub-tasks hours spent' should be clickable
and on click, it will display the list of subtask timesheet.
  - display in warning tasks for which Remaining Hours < 0 if Planned Hours > 0 in task list view
  - improve the settings of collabrative pad and planning and project form view

Task-2129052

closes odoo/odoo#41092

Closes: #41092
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-16 10:56:05 +00:00
fw-bot fccaa703c4 [MERGE] project, hr_expense: Fix several multi-company issues + tests
Purpose
Fix multi-company access issues following the big changes that happened
(the 13.0). Make the usability better in order to avoid potential
multi-company issues for the user.

Specification
Check the related commits to see the different fixes that have been
made. For more information about the technical/functional considerations,
check the related task.

Taskid: 2088891
X-original-commit: 5c8df3a5e5f7960e5eab6439e0a32a06224ba826
2020-01-15 15:11:50 +01:00
Lucas Lefèvre 7059b177ee [IMP] project: Following a private project no longer required
=======
Purpose
=======

Currently for a user to be allowed to see a private project they must follow the
project. This means that they will be added as a follower of all new tasks in the
project which causes them to receive 1000000 notifications, especially if there are a
lot of tasks in a project.

==============
Specifications
==============

1) Add an Employee m2m field on project next to 'Invited Employees'
    - only visible if the 'Invited Employees' option is selected
    - the project should only be visible to employees selected there (regardless if they
      are followers or not)
2) Add an Employee m2m field on tasks below the 'Email cc' one in debug mode
    - only visible if the 'Invited Employees' option is selected on the related project
    - should be pre-filled with what is set on the project
    - the task should be visible to employees selected there (regardless if they are
      followers or not)
3) Add a Portal users m2m field on project next to 'Portal users and all employees'
    - only visible if the 'Portal users and all employees' option is selected
    - the project should only be visible to portal users selected there (regardless if
      they are followers or not)
    - rename the option into 'Invited portal users and all employees'
4) Add a Portal users m2m field on tasks below the 'Email cc' one in debug mode
    - only visible if the 'Portal users and all employees' option is selected
    - should be pre-filled with what is set on the project
    - the task should be visible to portal users selected there (regardless if they are
      followers or not)
5) Following a project/task should not grant the user/employee the ability to see the
   project/task

Task 2031527

closes odoo/odoo#40505

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-14 16:26:32 +00:00
Jason Van Malder c76c1dd30c [FIX] project: fix can't edit attachment with studio
Issue

    - Install Projects & Studio
    - Go into projects app
    - Edit a project (... => Edit)
    - Click on x attachments stat button

    You can't edit with studio

Cause

    Writing the action manually instead of using the base one
    result with an empty xml_id (and a lot of missing data).

Solution

    Use base.action_attachment like others modules do (e.g. helpdesk).

OPW-2146741

closes odoo/odoo#43263

X-original-commit: 856b09d7055ebbfebbe3b5dc3093e429c8c930ff
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
2020-01-14 10:37:36 +00:00
Martin Trigaux b7cdd05bf9 [FIX] project: translate kanban examples
Using a lazy translator as this file is processed when loading the web
client, no during rendering (the translation memory was not ready yet).
Turn escFormat into a lazymethod to evaluate it only after translation
resolution.

Fixes odoo/odoo#36494

t push de#

closes odoo/odoo#43038

X-original-commit: 05429ca9d09ad49f5f214b082ef524b74c25eeeb
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-01-09 12:09:59 +00:00
Vishnu Thuletiya 32d6c69b7d [FIX] project: fix sub tasks issue when callback through the breadcrum
Purpose of the task is that when creating a multi level sub-task
and going back on click of sub-task breadcrumb, sub task is not
going to visible. We need to refresh or go to the parent task
than after its visible.

so display all the sub task when click is press on sub-task
breadcrumb.
replaced action domain with 'child_of' instead of 'in' because the
child_of will return the same result as method returns.

closes odoo/odoo#42916

Task: 2157055
Closes: #42163
X-original-commit: befdce11075753d7530c8b15d1ae2b536c3caace
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-01-08 10:44:00 +00:00
Kevin Baptiste b7856d6ea7 [IMP] project: display remaining hours on tasks
The remaining hours on a task are now displayed unless there are no
planned hours defined.

 - Between 0 and 79%: green border
 - Between 80 and 100%: yellow border
 - Above 100%: red border

closes odoo/odoo#41222

Taskid: 2150121
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 07:45:13 +00:00
Nicolas Lempereur 525e3626be [FIX] project: access to portal task give access to attachment
If a visitor has access to a task through access_token, he should have
access to the task attachments. He already see the list of attachment
and their name, but since the task access_token is not propagated to the
attachment he doesn't have the rights to see them.

In this PR, we generate the attachments access_token and provide them to
the user that is viewing a task with an access_token.

opw-2125252
closes #41881

closes odoo/odoo#42121

X-original-commit: e7984c4968cde2019edca6c767d2acce2f7fe3f4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-12-17 17:27:26 +00:00
Martin Trigaux b5db1c61ee [I18N] *: export saas-13.1 source terms
Without demo data, for the odoo-master transifex project

closes odoo/odoo#41935

X-original-commit: dab7670b73506fb3a835695ee3bd735e0c5e5c2b
Related: odoo/enterprise#7287
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-16 12:49:55 +00:00
Nicolas Martinelli b0605b4adc [FIX] *: make ribbon text translatable
closes odoo/odoo#41749

X-original-commit: 64c259fc74a8181aa381b6647a9816b6f5530dfd
Related: odoo/enterprise#7216
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-12-04 12:01:16 +00:00
Ipsita Borisagar 83a5b691af [IMP] project: minimal chatter on project form view
Before this commit, chatter of project form view took about 1/3rd
of screen width on big screen, even though no discussion is possible.

This commit solves this issue by moving the chatter at the bottom of
the sheet, so that it isn't displayed at the right of the screen.

Task-2125078

closes odoo/odoo#41082

Related: odoo/enterprise#6959
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-12-10 09:02:02 +00:00
Martin Trigaux b7d91ba25b [I18N] *: remove es_AR translations
Followup of a425695e
The terms were back in 12.0
Courtesy of Juan José Scarafía

closes odoo/odoo#41624

X-original-commit: 85d0c7001a997748d7691205bbb8d066597591a5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-10 10:00:18 +00:00
laa 9cfb6c05a4 [FIX] Portal : missing url args
on the portal:
- in Timesheets, when search something, the text of the search must remain displayed
- in Tasks, when search something, the text of the search must remain displayed
- in Purchase Orders, "Sort By" and "Filter By" selectors shouldn't change when going to next page
- in Timesheets, the "Group By" selector shouldn't change when going to next page

closes odoo/odoo#40278

Related: odoo/enterprise#6787
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 15:39:03 +00:00
laa cbc93d0d11 [IMP] project: Add a group by stage for tasks on the portal
A group by stage on the portal would allow the customer to have an overview of his tasks' progress, which is especially useful in a multi-project setting.

- add a "Project" column
- rearrange columns in the order: Ref -> Task -> Project -> Stage

- add a group by stage for Tasks on the portal
- hide "Stage" column when group by stage is selected
- hide "Project" column when group by project is selected

- add a sort by project for Tasks on the portal
- when sort by Stage sub-sort by Project
- when sort by Project sub-sort by Stage

- add a 'Search in Project' for Tasks on the portal

- the "Group By" selector shouldn't change when going to next pages
2019-11-28 09:54:12 +00:00
Vishnu Thuletiya edf04f317c [IMP] project: improve the project kanban and task breadcrumb
Purpose of the task is, when some one remove the default filter
at that time kanban view is really a mess so when go though the
project always apply the domain of current project instead
of filter.

The breadcrumb should be the name of the project instead of name
of the action(tasks) so pass display_name from method to change the
breadcrum when view the task from kanban view.

closes odoo/odoo#40922

Task: 2124377
Closes: #40922
Related: odoo/enterprise#6903
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 13:12:32 +00:00
Yannick Tivisse 4efe0e3b16 [IMP] hr_timesheet, project, hr_expense: Introduce multi-edit lists
closes odoo/odoo#40048

Taskid: 2078161
Related: odoo/enterprise#6633
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 11:29:18 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Yenthe666 78ae3da902 [IMP] *: set name element on main containers in configuration views
This will improve the extendibility of view inheritance

closes odoo/odoo#41398

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-09 10:38:59 +00:00
Vishnu Thuletiya 13babd5c48 [FIX] project: fix traceback in project public rating
Purpose of the task is, clicking on rating from
publicly rating project dashboard it will produce the
traceback.

so fix the traceback by fixing typo in portal rating.

Task-2145507

closes odoo/odoo#41132

Closes: #41005
X-original-commit: 9587ccc716c3e6d6c0a73acd22155b545d1638b8
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 08:53:05 +00:00
Thibault Delavallée e2b33f460d [REF] mail, various: rename subtype parameter of message_post to subtype_xmlid
PURPOSE

Clean posting process and improve mail.message definition and comprehension.

SPECIFICATIONS

In order to be more explicit subtype parameter is renamed to subtype_xmlid.
It therefore clearly indicates it should be a valid subtype Xml ID. Support
of ill formatted Xml IDs is removed because there is no reason to try to
add some random prefix. Give something that exists or go to hell, punk !

LINKS

Task ID 2071556
PR #38692
2019-12-02 15:18:44 +00:00
Jason Van Malder fd9c6bdcc6 [FIX] project: fix crash when no language selected
Reproduce the issue

    - Select a language (done by default)
    - Install Project
    - Create a project
    - Create a task with a formatted date
    - Reset the language
    - Go on the project

    Traceback

Cause

    In 7e42c663, I format the date_deadline based on the user's language
    but did'nt know that we could have no language selected.

This commit uses the `format_date` method from `odoo.tools.misc`
which fallback on the first language installed if there is no
language selected.

OPW-2146479

closes odoo/odoo#41057

X-original-commit: 7d06135712b6646816b0558a63e55bc10622e59c
Signed-off-by: Jason Van Malder <jasonvanmalder@users.noreply.github.com>
2019-11-28 12:18:39 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
fw-bot 40e8834b00 [FIX] project: invalid date format in kanban view
Reproduce the issue

    - Install Projects
    - Create a project
    - Create a task with a deadline

    The deadline format is correct in the form view but not in the
    kanban view.

Cause

    In the kanban view, there is some code applied on the `date_deadline`
    field to add a class when the deadline is near.

    As it uses a `span` with a `t-esc`, the only way to get the date
    is to do `record.date_deadline.raw_value` which return the raw
    value of the datetime object (a big string with all the infos).

This commit creates a char field for the formatted date and uses it
only for the display.

OPW-2122928

closes odoo/odoo#40707

Related: odoo/enterprise#6832
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-25 08:07:43 +00:00
Yannick Tivisse 4da5d88403 [IMP] project: Display tags under deadline
closes odoo/odoo#40332

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-22 09:29:43 +00:00
Yannick Tivisse f34f6ee3b6 [IMP] project: Allow multi levels on sub-tasks
Purpose
=======

Currently, it is only possible to have 1 level of sub-tasks per task.
The user may want several levels of granurality.

Specifications
==============

Allow having multi levels of sub-tasks
- Move the parent_id field out of the debug mode and display it above the
  Deadline field
- Remove the 'parent task' stat button
- Add the parent_id field to the project.task optional list view
- Display the sub-tasks stat button on sub-tasks
- The 'sub-tasks' stat button should only count/display tasks from the
  first level of sub-tasks
- The name of the sub-task should be
  parent task: sub task level 1: sub task level 2: sub task level 3...
- The sub-task should be created in the sub-task project set on the
  parent task's project
- The subtask_planned_hours and the subtask_effective_hours fields should
  take into account the planned hours of all sub-level tasks

TaskID: 2107078
2019-11-22 09:29:43 +00:00
Yannick Tivisse f3f75068c1 [IMP] hr_timesheet: Add demo data
Add a bunch of timesheets for the 2 main demo projects in the project module
+ for one of the billable projects in sale_timesheet

closes odoo/odoo#40280

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-22 09:13:52 +00:00
ryv-odoo c7a1a2d964 [REF] rating, various: improve rating.rating ACLs
PURPOSE

Rating model should be available only for internal users. External users
access them only through dedicated routes or controllers using sudo and/or
granting access through tokens. Therefore simplifying ACLs should be feasible.

SPECIFICATIONS

Remove access to rating.rating for public and portal users. Only employees
can access it, with full access given to system admins.

Update various functional flows to use sudo() and check that access is
verified before using sudo.

Impacted modules

  * rating / mail: add groups on some rating related fields as only
    internal users should access them now;
  * rating / mail: set some statistics fields using compute_sudo as their
    value should be accessible for external people even without access to
    the underlying rating.rating records;
  * project: makes some use of rating and has to be updated, notably for
    the public rating page;
  * website_{livechat, rating, slides}: add sudo in public routes as access
    is already granted;
  * website_slides: set statistics field using compute_sudo as their
    value should be accessible for external people;

TASK ID 2053096
PR #36592

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-11-19 15:46:51 +00:00
Barad MahendraandShreya Thakrar b6af1f368d [IMP] rating: improve rating feedback user interface
Before this commit, when user land after clicking on the smiley in the
e-mail for rating, user cannot change its rating. Its click limits the
available choice.

Now users will be able to choose rating and write feedback before submitting
its rating.

Task ID 1936849
Closes PR #33979

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Shreya Thakrar<sht@odoo.com>
2019-11-19 16:29:55 +00:00
jdoutreloux 700a81feca [IMP] project: Merge project/fsm form views
Purpose
=======

Merge the form views of project tasks and fsm tasks so that it is
consistent and coherent wherever the user is in odoo.

closes odoo/odoo#40273

Taskid: 2070964
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-19 09:36:50 +00:00
laa 70c370b01e [IMP] project,hr_expense,hr_timeshee: Add optional fields in list view
Add and modify multiple fields in tree view for next next model:
- hr.expense
- hr.expense.sheet
- project.project
- planning.slot
- Field Service project.task

closes odoo/odoo#39441

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-18 12:56:10 +00:00
jdoutreloux d6812b90b8 [IMP] project: Display 'project' on quick create for All Tasks action
Purpose
=======

Do it only when the project is not set

closes odoo/odoo#37420

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-13 09:43:27 +00:00
jdoutreloux d34939a521 [IMP] project: Display commercial partner on tasks kanban card
TaskID: 2075174
2019-11-13 09:43:15 +00:00
jdoutreloux 06d5103c38 [IMP] project: Improve layout and wording on task form
Change some wording and layout things to be more in line with what
already exists, and add a tooltip to the deadline for clarity.
Additionally, much like the date whose data and format are controlled by
template variables so that the industry_fsm module can modify them, so
is the tooltip so that it can be modified by that module to reflect that
it represents the starting date or hour instead of the deadline.

TaskID: 2075174
2019-11-13 09:43:06 +00:00
Yannick Tivisse bae2d9f717 [IMP] crm, product, ...: Clean some common test classes 2019-11-12 11:34:36 +00:00
Yannick Tivisse 8caf00378c [IMP] project: Don't display stages if project is not set
Purpose
=======

If the user creates a task and if the project isn't set, then all the
stages that are not linked to a project are displayed, which is polluting
the form view.

Specifications
==============

If no project is set on the task form view, do not display any stages
in the statusbar.

closes odoo/odoo#40041

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-08 14:00:18 +00:00
Lucas LefèvreandMaxLarue 2dccf4d6cd [IMP] project: Use stored computed fields for parent to children task
Purpose
=======
When you create a task independently and link it to a Parent task later on,
several changes are applied: the person assigned on the sub-task switches
to the one set on the parent task, same for the customer, and so on.
This creates frustration because the user most likely set specific data on the
sub task for a reason. In addition, the changes are made implicitely, so the
user might not notice it or get confused as to what changed from the original
task.

Specification
=============
Values for fields `partner_id`, `email_from`, `project_id`, `sale_line_id` should be
transfered from parent task to children task, only if the value is not already set
on the child.

This was already partially implemented by 749810a and 45396f7.
But to achieve it, similar code was duplicated in several methods:
default_get, onchanges, write, create.

Since the new ORM, the same behavior can be achieved with only computed fields
with store=True and readonly=False. This commit changes the previous implementation
to take advantage of this which greatly improves code readability and maintainability.

Tests by Maximilen Larue
Business code by Lucas Lefèvre

closes odoo/odoo#39369

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: MaxLarue <mla@odoo.com>
2019-10-25 14:22:36 +00:00
jvm-odoo c27ba2af1c [FIX] project: fix multi level subtask
- Create a project
- Create 3 tasks in the project (top, middle, bottom)
- Set top as the parent of middle
- Set middle as the parent of bottom

We don't want to allow multi level subtasks. The behavior is not the
same if you set middle as the parent of bottom first. The "parent task"
field will not be displayed.

This commit remove the tasks who have a parent from the m2o field.

OPW-2087921

closes odoo/odoo#39810

X-original-commit: c7966b64c42940b606eaf3d985c49549928056bd
Signed-off-by: Jason Van Malder <jasonvanmalder@users.noreply.github.com>
2019-11-05 13:55:26 +00:00