Commit Graph
5702 Commits
Author SHA1 Message Date
Martin TrigauxandXavier Morel 49838338e0 [FIX] *: sanitize action content reading
The open_action_with_context was not using _for_xml_id, producing an
error when reading the action content.

In open_action, the action_name was taken from the context and needs
sanity checks. Ensure only actions from the account module can be
read and only if the user has access to the target model.
This is a limitation of the previous behaviour but, at the moment, all
known calls are made refering to an action from the account module.
Limit the scope of this method while the 14.0 is still early to avoid
having a door open to ready any action, and difficult to close later.

Remove old action fetching from the context in create_move that is no
longer used.

closes odoo/odoo#61602

X-original-commit: a39e94f7e4dc74e850650ac90bbc5f85af130bc8
Related: odoo/enterprise#14695
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: Xavier Morel <xmo@odoo.com>
2020-11-10 16:04:29 +00:00
Goffin Simon c555cdca62 [FIX] point_of_sale, project: Smart buttons to count on partner
Unify the behavior for smart buttons on res.partner view form

Let's consider generic records R on a specific model M

- All the R of the children and archived children of a contact C must be counted in smart button of M
in the form of C

- Clicking on the smart button of a contact C must display all R of the children and archived
children of C

closes odoo/odoo#61241

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-11-03 10:30:44 +00:00
Pedro (pno) a0ebb46098 [FIX] {base, coupon, crm, event, mass_mailing, product, project, sales_team, utm, web}: prevent long texts from overflowing
Previously, in multiple modules, long names would result in an overflow of text.
With this commit long texts should appear like this: [aaaaa...] instead of
going out of their boxes.

Various views are updated, depending on which fields we wanted to prevent
from overflowing and the probability they do so.

Task ID-2325219
PR odoo/odoo#57713
PR odoo/enterprise#13226

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-04 07:32:27 +00:00
IEL 3c7694b409 [FIX] *: fix image parsing error on saving res config
WHAT: apply 93a7695f65baf00d1f82481d6a2a97e6c11940a8 for all res.config.settings
menus

WHY: the same reason as in 93a7695f65baf00d1f82481d6a2a97e6c11940a8:

	When saving, a read is called. By default, read has
	bin_size to true to avoid performances issues.
	It will return the image size instead of the content

it may lead to image dissapearing or "Incorrect padding" error

HOW:

    find . -iname "*.xml"|xargs grep "\"context\".*'module'" -l | xargs sed -i "s/\(\"context\".*'module'.*\)\}/\1, 'bin_size': False}/"
    git checkout  -- addons/base_setup/views/res_config_settings_views.xml

---

PR for General Settings: https://github.com/odoo/odoo/pull/47297

opw-2346644

closes odoo/odoo#61215

X-original-commit: 7c55efa88b72bd1f3f0f32f7f738e2fda5aa4abd
Related: odoo/enterprise#14547
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2020-11-02 18:25:20 +00:00
Martin Trigaux c59c10f1bc [FIX] *: correct typos and bad English
Courtesy of translators
Reexport .pot of modified modules

closes odoo/odoo#61010

X-original-commit: 62a18bdb372e234107fd2099a2df5f9e3a442c96
Related: odoo/enterprise#14489
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-29 19:23:41 +00:00
Nicolas Martinelli 227bd5d8bf [FIX] project: add follower as project user
- Create a user A with access rights to Project set as 'User'
- As user A, add a follower to a task

An AccessError is raised.

It happens because `allowed_user_ids` has the group
`project.group_project_manager`.

Since a Project User is allowed to set followers on a task, it is
legitimate to set the appropriate portal user as allowed.

opw-2369674

closes odoo/odoo#60725

X-original-commit: 5ee045b2532ce97094dea2fe6b5e354585d67691
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-26 11:01:58 +00:00
Nicolas Martinelli 4d809c543f [FIX] project: remaining_days widget
The widget is intended for informative fields only, i.e. the
fields do not need to be editable. It is not the case for the
date_deadline.

closes odoo/odoo#60317

X-original-commit: a455999588053d528cc779b070cac31ab3b273df
Related: odoo/enterprise#14223
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-20 06:08:32 +00:00
Nasreddin (bon) f224da276c [FIX] project: wrong subtask count
Issue

	- Install "Project" module
	- Active "Sub Task" feature in settings
	- Create a new project `X`
	- Go to settings of project `X` and activate "sub task" feature
	- Add a Task `A` in project `X`
	- Add a subtask `B` to task `A`
	- In menu, click on `Tasks` to list all tasks
	- Edit view and add `subtask_count` field then save

	Wrong value in `subtask_count` field.

Cause

	Retrieving childs of self instead of "current" task (`for task in self:`).

Solution

	Use "current" task instead of self.

opw-2361013

closes odoo/odoo#60230

X-original-commit: c961638d49a392468ac4a521bcb208dd9d68a99d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-10-19 07:45:47 +00:00
Swapnesh Shah b07f2d31d2 [FIX] *: update document links
Before this commit, links to the documentation were referenced the
previous version, 13.0, instead of the current one, 14.0.

Eventhough there is a redirection done by NGINX of a "versionless" URL
to the latest one (e.g. /documentation/user/general/auth/google.html
-> /documentation/user/14.0/general/auth/google.html as of today), the
goal is to keep links owrking for users that will still be using the
14.0 in three years (and should not endup on the 17.0 doc).

closes odoo/odoo#60228

X-original-commit: 7ac08486d91d0ff0151abeeda057ffa6beda72e8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-19 07:03:01 +00:00
Adrian Torres b7017e58cc [FIX] *: adapt business code to function-redefined error
This commit adapts the business code in which
class/module/function/method redefinition took place so that it no
longer happens and the pylint test passes.
2020-10-16 12:56:52 +00:00
Paul Morelle 99a7978b5d [FIX] project: fix duplicate filter name
odoo/odoo@dadcec593d introduced a duplicate name in the filters of the
view project.view_project_project_filter.

This commit renames the new filter from my_projects to own_projects.

closes odoo/odoo#60137

X-original-commit: a372d34a4c98e459c5170369fd90cbd4181ba4a3
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
2020-10-15 20:22:00 +00:00
Dominik RuboandKevin Baptiste a93f1e8d9b [IMP] project: enable config-selected features in projects
This change ensures that when the user activates optional features of the
project app, they are enabled in existing projects as well as newly created
projects automatically, which is likely what the user expects.

For most optional features, this behavior was already in place. It was not in
place yet for the sub-tasks and timesheets features, which this change fixes.

Two added tests check the behavior described above for features that are
activated through a `group_*` field on `res.config.settings` (sub-tasks,
recurring tasks and ratings). The tests do not cover features that are
activated through a `module_*` field, as such fields require the installation
of further modules and we cannot simulate this.

Task 2297054

closes odoo/odoo#60106

X-original-commit: 8dd0edae898a532dbe7e4f18c9118b9b68e57900
Related: odoo/enterprise#14119
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Co-authored-by: Kevin Baptiste <50135801+kba-odoo@users.noreply.github.com>
2020-10-15 14:18:30 +00:00
Jorge Pinna Puissant 811444829f [FIX] project: access token on task
- Create a new Project with 'Portal user and all employees' as
  visibility;
- Add a portal user as customer;
- Create a new task in the Project, without assigning the task to
  anybody;
- Connect to the portal as the portal user;
- Send a message on the task.

Before this commit, an Error 403 forbidden was raised, this error occurs
because the task don't have an access token created, this token will be
created when an internal user send a message on the task.

Now, the access token is created if the project has a 'Portal user and
all employees' visibility, and the portal user can post a message on
the task.

opw-2345070

closes odoo/odoo#59733

X-original-commit: 64e93794efb4193b3dfa7aa43360a1ef274e623d
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-10-12 11:00:37 +00:00
Martin Trigaux e79531c136 [I18N] *: export 14.0 source terms
Including demo data this time

closes odoo/odoo#58862

X-original-commit: 575abde110acb3d12b25f177a863374becef0894
Related: odoo/enterprise#13705
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-29 17:52:02 +00:00
jdoutreloux b8d71b799d [FIX] project : fix issue with alias and display issue in portal
When the alias had been set, if the user wanted to disable it
he had to erase the email first. Otherwise unchecking the check box
didn't work.

Task-2299286

closes odoo/odoo#58634

X-original-commit: 45cd13e14fef0bab6921a1fff79335df9015cbf0
Related: odoo/enterprise#13613
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-28 10:57:13 +00:00
Mathieu Duckerts-Antoine e56a095f16 [FIX] *: disable linking on some graph views
For the graph views based on reporting models (e.g sale.report), click
on a group in the chart redirects the user to an "empty" list view. Here
we use the attribute disable_linking to avoid that redirection for those
views.

Task ID: 2336960

closes odoo/odoo#57622

X-original-commit: 0b0ae92b6bdac25843ba24d767dbcab3b75703e5
Related: odoo/enterprise#13192
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-09-14 10:01:49 +00:00
jbm-odoo 90b46ce3b2 [FIX] hr_timesheet: Widget for planned hours
Before this commit:
The field `planned_hours` and `subtask_planned_hours` are present
twice. This causes problems with widget: different widgets are put
on different fields, but only the last on was put on all of them.
Code to edit label with hours/days is not flexible, we need to
write each possibilities.

After this commit:
All fields are present only once in the view. A new widget is
created to manage days with a factor. In this new widget, instead
of having a toggle button, we can insert a float.
When the widget timesheet_uom is set on a field, we modify his string
with hours/days.

closes odoo/odoo#57557

Taskid: 2326216
X-original-commit: 5b3804402b3ebee5abe7004b8f8caccadaabfe1e
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-11 15:00:33 +00:00
Victor Feyens 2da7bc2adb [REM] portal, *: remove archive_groups dead code
PURPOSE

Clean code and be and more performance oriented.

SPECIFICATIONS

Various portal pages hold references to archive_groups. It was a summary
of customer documents for portal, containing a count of all documents split
by model.

Currently its computation is not used. Indeed archive_groups is displayed
only in 'my_details' page that does not hold any document-based reference
or code call. Other calls to archive_groups are dead code as the result is
not used. Since 13.0 it is even not computed on standard pages to speedup
their load (as it was not used).

It is not used anymore and its computation and references can be removed
safely, especially with v14 in mind for which we want to remove dead code
to maintain.

Followup of odoo/odoo#55228

LINKS

Task ID-2329081
PR odoo/odoo#55800
PR #12368

closes odoo/odoo#56859

X-original-commit: e75086000ee4317b2ad2994db5d906fbcbd5081f
Related: odoo/enterprise#12830
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-09-01 10:30:32 +00:00
Victor Feyens 594ccdcbf4 [FIX] *: typos and english incoherences
Mainly transifex issues but also some errors found through 'grep' checks.

Fix typos and obscure english strings in xml contents, fields strings/helps, some docstrings, ...
ensuring correct translations base (and fallback when translations isn't available).

closes odoo/odoo#57276

X-original-commit: 4214f05d454bca2b60fda3a288d529c098e84f77
Related: odoo/enterprise#13053
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-09-08 18:12:26 +00:00
Andrea Grazioso (agr-odoo) eda684fc61 [FIX] portal,project: allow other company users to correctly access my/tasks page
In multi-company configuration setup, Company A and Company B.
Have a project in Company A that I want to share with a user in
Company B. The user only has access to Company B.
Share using the project link and open using the user

Traceback error will raise.

Adding a default value to retrieve in case the filter option is used
but the user has no permissions on the records.

opw-2322236

closes odoo/odoo#57090

X-original-commit: bcb62e8f6e20bccc2f2350bdc1268c495b7103da
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2020-09-04 13:54:45 +00:00
Martin Trigaux 90d85eb9c5 [I18N] export saas-13.5 source terms
Without demo data

closes odoo/odoo#56869

X-original-commit: 33f251b6489455cd7221f2c62dee0400a69784b8
Related: odoo/enterprise#12836
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-01 11:18:00 +00:00
Victor Feyens c482fdbf05 [IMP] various: improve code style and performance by improve `all()` usage
PURPOSE

Clean code. Be more performance oriented.

SPECIFICATIONS

Improvements applied in this commit

  * not all() --> any(not) for earlier returns;
  * all([generator]) --> all(generator) to avoid unnecessary list casting.
    This code construct is better managed by all;

This commit will probably not have a big performance effect on standard
production databases. However each performance and cleaning improvement
is welcomed.

LINKS

Task ID-2328619

closes odoo/odoo#56810

X-original-commit: 1cc6bb1231401ea7f501d2f5b5e9641ec8734850
Related: odoo/enterprise#12802
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-08-31 13:59:27 +00:00
jbm-odoo fd6644e4cb [FIX] sale_timesheet: Billable project
taskID 2323997

closes odoo/odoo#56798

Related: odoo/enterprise#12793
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-31 12:02:56 +00:00
Arnaud Joset 9dd65cce3f [IMP] project: display information when editing project settings
Before this commit, it was not clear that allowed portal users could see all tasks, even when they were not the customer.

closes odoo/odoo#53962

Taskid: 2265562
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-27 15:16:42 +00:00
Fabrice Henrion fde391719e [FIX] project: rephrase franglish
Courtesy of the en_US police

closes odoo/odoo#47148

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-08-21 05:22:07 +00:00
jbm-odoo 49f8ee9e40 [IMP] sale_timesheet: Billable project
Split completely 'non billable' from 'task rate' for more clarity.
Simplify the task form view of non-billable projects.

TaskID 2032048

closes odoo/odoo#55972

Related: odoo/enterprise#12441
Related: odoo/upgrade#1662
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-19 15:52:35 +00:00
Kevin Baptiste 375bfc66c8 [FIX] project: remove constrains for multilevel subtasks
The commit 79132f6 allowed multiple level for the subtasks, but a
remnant from the ancient time was left.

closes odoo/odoo#56104

Taskid: 2317929
X-original-commit: ace68ceceb92f8d7c16155fd72acd469424accd0
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-19 08:38:57 +00:00
Francois (fge) 7e2ba8c999 [IMP] project: add helpers and sample data on views
Added new helpers and sample data for some views.

closes odoo/odoo#55643

Related: odoo/enterprise#12312
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-18 13:38:02 +00:00
Barad Mahendra 30adc183f8 [IMP] *: set sample="1" on reporting view archs
The purpose of this commit is to enable sample data on various graph and
pivot views.

Task ID: 2319606

closes odoo/odoo#55917

Related: odoo/enterprise#12415
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2020-08-18 14:24:10 +00:00
Jeremy Kersten 73b4e9b1b6 [IMP] portal,*: /my counter async
Before this commit, the time to compute all counters was making the rendering
of the portal page slow.

Now the count is done in rpc after the loading of the page.

Now you can decide which part you want to show on the portal, and only compute
for these one.

It is not because you have purchase installed for your internal process, that
it means that your supplier use your portal and it avoid the computation for
all end users.

We parallelize the counters in arbitrary 3 rpcs.

closes odoo/odoo#55999

Related: odoo/enterprise#12456
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-08-17 15:59:03 +00:00
Arnaud Joset f2a1a00081 [IMP] hr_timesheet,pad_project,project,rating,sale_timesheet: back2basics project
Multiple UI and UX changes

taskid: 2299401
2020-08-13 13:25:22 +00:00
Martin Trigaux 6156f98288 [FIX] *: adapt action content retrieval
Use _for_xml_id to replace all the self.env.ref().read()[0]
This has the advantage of having a single point of control and to add
the fields filtering and model verification.

Add sudo for other operations on ir.actions.*
2020-08-17 09:09:02 +00:00
Martin Trigaux d5c1649239 [IMP] base,web: _for_xml_id as a safe access point
/web/action/load is the public controller that Should be used by the
webclient to fetch actions
_for_xml_id is the default access method on actions that implements
fields filtering to avoid leaking server action code or other
information not needed by the webclient

Implementing whitelist of fields that can be access per model
2020-08-17 09:08:23 +00:00
Barad Mahendra 00a7f3aaad [IMP] various: Reseuence the module and module category
The purpose of this task is to improve the UI of the 'Apps', by
improving the clarity of the kanban, sequencing the apps and
simplifying the app categories in the searchpanel

So in this commit, Added the new sequences for ir.module.module
and ir.module.category records.

TaskID: 2240257
Related Enterprise: https://github.com/odoo/enterprise/pull/12413
Closes: #55907
2020-08-14 07:38:58 +00:00
Pierre Collinet (pic) 5aa7839d0b [FIX] project: only internal users in "Assigned To" field of task form
Values filled in "Assigned To" m2o were differing:
- if I "CREATE" task with "group by" then m2o is filled with
internal-users + portal-users
- if I "CREATE: task without group by then it filled with internal
users only.

In Project also same case.

To have a more coherent behaviour, we decided to put only internal
users in both cases.

Task ID #2229592
Community PR #54776

closes odoo/odoo#55820

X-original-commit: 8269c1958843002246c589cdd593417dec44f024
Related: odoo/enterprise#12376
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-12 14:19:10 +00:00
Anousone Phaysomphot 950f999dd6 [IMP] project: improve digest tips
PURPOSE

Review the tips and digest layout design to make sure they have a WOW effect
and increase trial conversion/retention.

SPECIFICATION

“Customize tasks and stages according to the project”

See code for specifications.

LINKS

Task ID-2274264
COM PR: odoo/odoo#53580
ENT PR: odoo/enterprise#1139

X-original-commit: bd2cd2ca4e4fd1fa99d6a97b8af291363e4b1d84
2020-08-12 12:23:00 +00:00
Barad Mahendra 63f239163a [IMP] *: set sample="1" on various graph archs
The purpose of this commit is to enable sample data in various
graph views.

TaskID: 2311486
2020-08-12 09:57:09 +00:00
Kevin Baptiste 1b62bd9508 [IMP] project: add recurring tasks
Some interventions are done on a regular basis (e.g. maintenance of
fire alarms, safety inspections). Having tasks auto-generate would
facilitate the process and would ensure that the next intervention
isn't missed/forgotten.

closes odoo/odoo#55517

Taskid: 2172156
Related: odoo/enterprise#12246
Related: odoo/upgrade#1604
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-12 08:39:32 +00:00
Nisha patel e0a7add01f [FIX] project: Fix sub-tasks stat button count
Currently, In the project module, the archived/deleted sub-task is
not deducted from the count of the 'sub-tasks' stat button.

Steps to reproduce:
 - Go to Project > Configuration > Settings > Enable 'sub-tasks'
 - Go to a Project with sub-tasks enabled, open a task and create a sub-task
 - Archive/Delete this sub-task

So in this commit, we applied filter on sub-task which show only active
sub-task on the stat button.

closes odoo/odoo#55347

Taskid: 2304887
Closes: #54904
X-original-commit: 81db237e3324922ff16f2b290922f21d98046738
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-08-03 15:49:52 +00:00
Victor Feyens 71f3fa991c [IMP] *: disable unused archive_groups feature in portal
The archive groups feature allows the user to have fast access to
records of a given month, under its details information.

But since the details section isn't shown anymore on portal sub-pages,
the feature is computed for nothing on (most) pages.
Removing this computation avoids a read_group call on portal subpages
(multiple potential queries).

This commit disables the feature until a total removal in master.
my_details is only truthy on the /my/account portal page, where no
archive_groups is given anyway (and the value is set to True only in the
rendered tempate itself).

X-original-commit: 40c57fafdd5651a522891ab68affe38933ea5202
2020-08-03 07:23:30 +00:00
Victor Feyens 34fb9f3159 [IMP] portal,*: do not compute record counts for portal subpages.
The record counts are only useful for the badges displayed in /my &
/my/home.
By avoiding those counts on subpages, we gain a lot of useless queries,
improving the loading speed of those sub-pages.

X-original-commit: 79c8384f1bcbcdede030e187008319a70c664571
2020-08-03 07:23:29 +00:00
Xavier Morel 6835aeb0de [REM] core, *: deprecate <act_window> and <report>
Convert deprecated tags through the codebase.
2020-07-28 13:03:13 +00:00
Victor Feyens 5dc8b7bdd8 [IMP] *: replace default_get overrides by default attribute on fields.
Leave the generic management of fields default to the orm as much as
possible.

* Default method is not called unless necessary.
* Default values are correctly post-processed by the orm when necessary.
2020-07-23 16:38:17 +00:00
Toufik Ben Jaa 04a757d596 [FIX] project: allow non manger to duplicate tasks
- The field `allowed_user_ids` is only accessible to Project Manager.
  When trying to duplicate a task, an access right issue is raised
  if you are not project manager.
  This is due to the fact that when trying to duplicate this field is
  read.

  To avoid this issue, we specify that this field should be copied thus
  not be read.

closes odoo/odoo#54509

X-original-commit: 95dedd23cc7a7d66d7a7dc17b9f9ac4f5473e226
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2020-07-15 12:42:59 +00:00
Simon Genin (ges) 8d02a85c1d [IMP] project: fix mail alias
Update mail alias layout, makes email address
clickable (mailto) and fix a couple of typos.

Task ID 2287394

closes odoo/odoo#53960

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-07-03 08:53:36 +00:00
snd cb26f1aabd [FIX] project - send rating mail by project
opws: 2269230, 2248760
When a database has a lot of projects with many tasks, and needs
to send a lot of feedback mails, the cron tries to send mails to
all tasks at the same time, thus it times out.

This fix will allow to treat projects one at a time so that when
the cron times out, it will not restart from the beginning.

closes odoo/odoo#53922

X-original-commit: 07c828b48741500573b4286480b23752a28163c7
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-07-01 15:36:56 +00:00
Martin Trigaux 400cc4f14e [FIX] *: correct all or improve code translation lookup
This commit fixes all issues detected by the new pylint
gettext-variable test.
It converts some calls to the new syntax
  _("Foo %s", bar)

to progressively migrate the code to the new syntax.

A few calls were not technically incorrect but still detected by the
linter.

  _("Foo" +
    "Bar")

has been converted to

  _("Foo"
    "Bar")

as it has the same effect and make sure the argument is of type
asteroid.Const instead of BinOp).

closes odoo/odoo#53683

Related: odoo/enterprise#11467
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-06-30 10:19:59 +00:00
qho 1424a3839a [IMP] hr_timesheet: Improve the usability of timesheet portal
1. Generic timesheets improvements

    - Portal /my/timesheets
    - Add a group bys task, date, employee
    - Add search in project, name, employee, task
        * The task column should not be visible if none of the timesheets have the Task field set
    - If a group by task, date, employee or project is applied, the corresponding column should not be visible

2. Timesheets from sub-tasks on parent tasks

    - Portal /my/tasks
    - Display the 'Total Hours' spent on a task at the end of the list of timesheets
    - Below the list of timesheets for the task, display another table detailing the respective timesheets (and total hours) of each sub-task linked to this task (= 1 table/list per sub-task)
        * Title should be: 'Timesheets for sub-task: xyz'
        * only visible if there are sub-tasks linked to this task
        * only visible if total hours > 0

3. Timesheets on Invoices

    - Portal /my/invoices
    - Add Project + task fields
        * Task field only visible if set on one of the timesheet entries
        * Project field only visible if there are at least 2 different projects in these timesheet entries

4. Correct visibility for the portal users
    - Portal users is allowed to see timesheets if the users are added in allowed portal users list in the project
    - When a portal user is added as the message follower of the project, the user is added to allowed portal users as well
    - When a portal user is removed from allowed portal users, the user is also removed from message followers

closes odoo/odoo#47248

Taskid: 2201908
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-29 11:56:36 +00:00
Hardik Prajapati 63cbe8678a [IMP] project,sale,hr(_timesheet): Generic improments for project
Done the below several improvement on project:

- move the stage description and tooltips to the debug mode
- remove the 'need assistance' tag
- Change the app description in manifest file 'Organize and
plan your projects.'
- Change the burger menu sequence into: Edit/Delete/Share/Set Cover Image
- change the description of the pad feature into, 'edit tasks
  description collaboratively in real time. see each author's
  text in a distinct color.'
- add the following tooltip for the allow_billable field,
  'invoice your time and material from tasks.'
- add an fa-stopwatch icon in front of the Start & the Stop buttons
  in task's form view
- rename the 'validate time spent' modal into 'confirm time spent '
  + increase the size of the description field
  + this field should not be required
- project overview: rename 'Hours recorded' into' Recorded Hours'
- project form view: disable the creation for the portal users field
- Rename the 'ready for next stage' kanban state into 'Ready'

TaskID: 2232051
Related Enterprise PR: https://github.com/odoo/enterprise/pull/9961

closes odoo/odoo#49694

Closes: #49694
Related: odoo/enterprise#9961
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-24 11:10:33 +00:00
Rémy Baranx (bar) 972e097dbe [IMP] project: convert onchange to stored-editable computed fields.
The 'stage_id' field is now a stored-editable computed field.

The 'company_id' has been converted to a stored-editable computed field.

The modification of the 'partner_id' field in the onchange method has been
moved and merged into the _compute_partner_id method.

Remove the empty 'onchange' method from the project.task model and also remove
this method call from the sale_timesheet module, which inherits from the project.task model.

Adapt the _compute_partner_id to retrieve exactly the behaviour before the onchange
method deletion.

Update code and tests of the task/subtask partner_id management after discussion with Alexandra to clarify the behavior.

Add the 'multi_edit' attribute to tree views.
2020-06-23 08:57:08 +00:00