Commit Graph
6330 Commits
Author SHA1 Message Date
Xavier BOL (xbo) dea3517a55 [REM] project: remove unused view
This commit removes a tree view of `project.task` because this view is
not used at all even in the Project app.

closes odoo/odoo#103702

Related: odoo/upgrade#3982
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-21 12:05:56 +02:00
maximilien(malb) 2ed62effd2 [FIX] project: improvement on the config view
Before this commit a content-group was useless it is now removed, moreover the setting for the default plan needed to be changed to look like the other setting of the page.

closes odoo/odoo#103633

Task-id: 2992668
X-original-commit: 8245ad33217531ab046d463d8fb91c8aa91066b7
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Maximilien La Barre (malb) <malb@odoo.com>
2022-10-20 14:14:51 +02:00
Xavier BOL (xbo) d8fecf4c1c [FIX] project: manage true and false domain for project sharing
Before this commit, when the domain used in `read_group` and `search` to
check if the portal user can access to the fields used in the domain
does not take into account the `TRUE_LEAF` (that is, `(1, '=', 1)`) and
`FALSE_LEAF` (that is, `(0, '=', 1)`). In other words, when the
`TRUE_LEAF` or `FALSE_LEAF` is in the domain, an access error is raised
saying the field name `1` or `0` cannot be accessible by the portal user.

This commit allows to add `TRUE_LEAF` and `FALSE_LEAF` in the domain to
avoid having an access error because of that.

close #103214

closes odoo/odoo#103465

X-original-commit: 953033e1ab20a01918dae7ca495654cddef14af3
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-18 20:49:26 +02:00
Prakash Prajapati 7a366abb40 [FIX] project: fix search result for users in task search view
Steps to reproduce:
    - Install the project app
    - Create user A
    - Go to the project
    - Create a task with assignees A
    - Archived user A
    - Go to the project > task
    - Search: Assignees for >  user A

Actual behavior:
  We cannot search tasks of the archived user.

Expected behavior:
  We can search tasks of the archived user.

task-2978632

closes odoo/odoo#103166

X-original-commit: d87eacb26ae73d3836e03311ff40b361e9819b47
Related: odoo/enterprise#32788
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-15 15:01:22 +02:00
Julien Mougenot 5a7fd7fe96 [FIX] web: Enhance draggable edge scrolling
This commit does 2 things for the draggable hook builder:

- the scrollable feature will apply on the nearest scrollable parent if
the current element cannot be scrolled (removes the need to pass a
parent ref which is not the target container);

- the dragged element is now strictly bound to the current viewport or
the container ref, whichever is the smallest.

closes odoo/odoo#103137

X-original-commit: 70bdf940cc1491fd0cdbae0240d930e8a1d5b25e
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-10-12 10:34:55 +02:00
Pratik Awasthi baf1adb128 [FIX] project: fix the tag filtering based on project
Before this commit, the tags on project sharing view does not
filtered accordiing to the project's tags.

So in this commit, added context to filter the tags based on
project on project sharing task view.

task-2920494

closes odoo/odoo#103134

X-original-commit: 0ce2cc7e9dab41b69f89c7d4de048097fb36ee51
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-12 10:34:53 +02:00
Kartik Chavda 85951d7974 [IMP] project: remove tooltip from stage_id field of project
This commit remove tooltip from stage_id field of project model
from project app.

task-2999323

X-original-commit: 1e81116ea28de33ac54b99601ef5dd6048cef378
Part-of: odoo/odoo#103032
2022-10-11 20:25:20 +02:00
Kartik Chavda 06e1072dae [FIX] project: fix company_id issue in multi edit
Before this commit when env is not in multi company and user
try set parnter of multiple project it show company_id is not
defined because of group multi company on company_id field.

This commit add company_id field as invisible in list view
of project to fix the issue.

task-2999323

X-original-commit: a365ba849208b531dec3a3ad05d2fd061906736d
Part-of: odoo/odoo#103032
2022-10-11 20:25:20 +02:00
Kartik Chavda b50182d5b1 [FIX] project: fix rating template button's action
Before this commit rating template button action to redirecting to
stage was wrong and because of this clicking on that button does
not showing any stages.

This commit change button's action from project stage action to all
stage action to fix issue.

task-2999323

X-original-commit: ac7e8e85214a75943a5467e2a2ae61d0d3f31dde
Part-of: odoo/odoo#103032
2022-10-11 20:25:19 +02:00
stefanorigano (SRI) d53d432361 [IMP] *: adapt for dark-mode
*: hr, hr_holidays, project, purchase, point_of_sale, rating,
spreadsheet_dashboard, stock, survey

This commit adapts modules and components in order to correctly handle
color-scheme variations.

task-2710677

Part-of: odoo/odoo#102868
2022-10-11 13:15:54 +02:00
Xavier BOL (xbo) 000e43840f [REF] project,hr_timesheet: review assets for project sharing
Before this commit, the assets used in project sharing takes almost all
assets in `web.assets_backend`, this way is not a good idea since only
the kanban view and list are used and the chatter is not the backend
one. So the assets could be filtered to minize the size of the bundle
for project sharing to also reduce the loading when the user goes to
project sharing feature.

This commit reviews the assets used in the project sharing to reduce
the size.

task-2947516

X-original-commit: 6805f5c9b5efa55aca711951d05bd51ea2fc8c0d
2022-10-10 17:03:07 +02:00
Xavier BOL (xbo) 8904dbd522 [REF] project: convert project sharing form view in OWL
Before this commit, the form view in project sharing was always in
legacy. Moreover, in that view, the chatter used is the portal one
and so it is also a legacy widget.

This commit converts the form view and then convert the chatter in
OWL to be able to correctly compile and add the chatter in the form
view.
Also, some styling has been done to remove the overflow. Only the
overflow on the y axis in the chatter can be scrolled on the page.

task-2947516

X-original-commit: 175430f3593337ce582cbec644b9d630894c074b
2022-10-10 17:03:06 +02:00
Xavier BOL (xbo) 136328eb89 [REF] project: convert the project sharing list in OWL
This commit converts the list view used in project sharing in OWL and
remove the legacy definition.

task-2947516

X-original-commit: 79159c0c6b715c3acbfb370523b73a664648deb2
2022-10-10 17:03:00 +02:00
Jensi Chovatiya ca913fe69a [FIX] project: fix the avatar on task quick create
Before this commit,  project task kanban quick create does not
display the avatar on user_ids due to m2m tags widget.

so in this commit, replace the many2many_tags widget with many2many_avatar_user.

task-2871552

closes odoo/odoo#102771

X-original-commit: 02226e70f0367033e279e937dc439422ef8956f5
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-08 14:22:43 +02:00
Pratik Awasthi 8918e5a2c4 [FIX] project: remove duplicate recurring_task field from task form view
task-3000758

X-original-commit: 80487dc6d505fcc3fc4e141648ce2a91f133f8c7
Part-of: odoo/odoo#102768
2022-10-08 13:30:23 +02:00
Pratik Awasthi 142b1d45f2 [FIX] project: fix list view of task analysis
Before this Commit, project > reporting > tasks analysis > drill down the
graph/pivot view > list view was editable and allowed creation of new records

After this Commit,  project > reporting > tasks analysis > drill down the
graph/pivot view > list view is not editable and does not allow creating
new records.

task-3000758

X-original-commit: ff2bed424064ef5cf049ae8ad0d47f65d33bf5b9
Part-of: odoo/odoo#102768
2022-10-08 13:30:23 +02:00
Simon Genin (ges) 2e8d9cdf18 [FIX] web,*: fix kanban useSortable screen width limit
Reproduce:
Go on a kanban view, with enough columns so it goes off the screens.
Scroll on the right, try to drag anything beyond the original (before
scrolling) limit of the screen. The cards are stuck floating at that
limit. Note it didn't prevent the drop to work properly where the mouse
was.

Issue:
The useSortable hook gets an owl ref, which is used as a limit to where
things can be dragged and dropped. Originaly and logically, it was the
current component ref, the renderer. But for some unknown reason, this
space was not getting wider than the initial screen size. It may be a
problem with the flexbox layout.

Tried solutions:
- A first solution was to add the overflow-x-scroll css property to the
renderer. It works, but now the horizontal scroll bar is no longer
always visible. You have to scroll all the way down to see it. UX wise
this is not acceptable.

- We could remove the clamp mecanism inside useSortable to let the drag
and drop motion go anywhere. This works, but decrease the quality of the
interaction. It looks cheap and not polished.

Final Solution
Finally, we decided to pass a ref to the o_content div from the layout
component down to the kanban renderer. If the useSortable is given this
ref, it works as intended. While it may seem too much, it is not
unreasonable to propose a reference to the most parent element of the
view contents to the renderer.

X-original-commit: a569305acaa1c812ede739c267e2e9530945f65f
Part-of: odoo/odoo#102756
2022-10-08 13:30:07 +02:00
Prakash Prajapati a59459ad69 [IMP] project: restrict the visibility of displayed_image_id in project_sharing
This commit prevent showing the `displayed_image_id` to non internal users.

task-2895909

X-original-commit: 6da6fc00d332b823d8694059cf80e10620b9d47d
Part-of: odoo/odoo#102633
2022-10-08 10:41:43 +02:00
Antoine (anso) 106602f7e0 [REM] project : remove unused SCSS
Some SCSS is not used anymore in the module and can be removed

closes odoo/odoo#102686

X-original-commit: 38fe11aa545dcf121acbeaac4a72649461d7f89a
Related: odoo/enterprise#32524
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-10-07 18:48:08 +02:00
Antoine (anso) fa048082f2 [IMP] project : optimize SCSS
SCSS optimization of the right side panel in project module.

Remove custom SCSS and use Bootstrap classes instead.

task : 2977963

X-original-commit: 9045dfbaece4e2cef153597632fd473cbb6cdb6f
Part-of: odoo/odoo#102686
2022-10-07 18:48:08 +02:00
Aaron Bohy 8540aad29f [REM] *: remove legacy views converted to owl
This commit removes legacy views that are not used anymore as they
have been converted to owl. They could actually have been removed
in the commit that converted them, as we never needed to have a
double implementation of views, unlike we need to (field) widgets.

The LazyColumnList is a special case. This view hasn't been
converted. Instead, it has been decided not to use it anymore.
So it was dead code, and this commit removes it.

The form/list/kanban views are no longer necessary in the view
registry, since their owl version exists. However, we kept them
in the test asset, as they are massively used in legacy tests
(in field tests for instance).

closes odoo/odoo#102634

X-original-commit: 186a8b31161fc8c75b346ff97f9403dca1ae677e
Related: odoo/enterprise#32501
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-07 17:47:58 +02:00
Vincent Larcin 49d59a20c5 [FIX] {sale_}project,hr_timesheet: fix project form CSS
This commit fixes some css issues in the "Settings" tab
of the project form view. The settings descriptions were
wrapping at half the width they were supposed to, and
the settings were misaligned compared to the sections titles.

closes odoo/odoo#102399

Enterprise: https://github.com/odoo/enterprise/pull/32359
X-original-commit: 74bd1e6af0e3410fc1a474c5f85b1dbb46ceba6e
Related: odoo/enterprise#32384
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Larcin Vincent (vila) <vila@odoo.com>
2022-10-07 17:47:53 +02:00
Panagiotis Kyriakou b7a7fb5655 [IMP] project: add "view tasks" button in project list view
In this commit we introduce a button in the project list view
which, if clicked, redirects the user to the project task
kanban, where they can see the project's tasks.

This change gives the user the posibility of directly viewing
a project's tasks from the project list view without needing
to go through the form view, thus increasing efficiency.

Task-2969697

closes odoo/odoo#99892

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-07 16:45:42 +02:00
Romeo Fragomeli 9f0bdc121d [FIX] project: recurrent task layout
The main goal of this commit, is to add missing `colspan="2"`.
We also hide the div and its label at the same time.

Steps to reproduce:
* Open Project
* Select a project
* Select a task
* Click on Recurrent checkbox (if not checked)
* Select the Recurrent Notebook => BUG

closes odoo/odoo#102444

X-original-commit: 398d5bc03adf040968494b526ba1f34b8e2cc227
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2022-10-07 10:07:38 +02:00
Radhika Shyara 9b07a00fb4 [FIX] project: fix the delete icon on chatter attachment
Before this commit, on project sharing chatter attachment delete
icon is displayed on the middle of attachment thumbnail instead it
should be displayed on right top corner of thumbnail when we hover
on attachment.

So in  this commit, added a class for project sharing view so delete
icon should be displayed properly

task-2904015

closes odoo/odoo#102298

X-original-commit: c9609c62efe163901f8c2b1a30355b60dd34ad51
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-06 15:57:44 +02:00
Martin Trigaux fde3f4d4b9 [I18N] *: export 16.0 source terms
closes odoo/odoo#102163

X-original-commit: 011d7aac5aacedb3ab373f247471ba69d67f50f3
Related: odoo/enterprise#32288
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-10-06 14:56:52 +02:00
Mathieu Duckerts-Antoine 6086fb664c [FIX] project: Project Stages record style
After the update of the bootstrap lib, the kanban records to be found in
the menu Project Stages of Project > Configuration (after activation of
a setting option) had each two weird borders. Here, we simplify the
kanban-box template in order to get only one border as it is in 15.0.

closes odoo/odoo#102249

X-original-commit: 839bdd0a853f88bfaeb0dd698d60e2168dc54188
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-10-06 00:37:22 +02:00
Barad Mahendra 0f9296e001 [FIX] project: fix the tag groupby result
Before this commit, when we go to a Task. Click on the Tags field
> Search More. Group by Projects.
We get a list of projects groups. Click on them and they go from
(x) to (0) due to invalid group result from read_group without
valid domain same as search_read.

So in this commit, override the read_group method to pass the valid
domain same as search_read.

task-2959382

closes odoo/odoo#102236

X-original-commit: f9e9964c7138485ba328ce5cd4c4c8905c392adc
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-06 00:37:02 +02:00
Radhika Shyara 1d9598fd08 [FIX] project: fixes missing stage changed notifications
Steps :
 - When the user is subscribed to the `Stage changed` subtype
   but not `Task in progress` and on change of stage, the users only
   subscribed to stage changed will not receive stage changed notification.

Cause :
 - When the stage is changed it will also change the kanban_state to
   in progress and due to that, it will track the kanban_state from
   _track_subtype, and the user who subscribed only stage_changed will not
   get notified.

Fix :
 - So in this commit, prioritize the stage_id changed notification so that
   when the stage_id is changed we use that one, and the in-progress won't
   be triggered, but when we change the kanban state back to progress it
   will be triggered. As in progress is implicit when changing the stage_id.

task-2818058

closes odoo/odoo#102172

X-original-commit: 4d952d679629a4a225ff208a6d018e11f14bf47e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-10-05 07:38:44 +02:00
Dossogne Bertrand 7c4da16b59 [IMP] mail, various: improve mail template usability
Allow our users to modify mail template more easily

- make the list accessible from the settings
- give them a link to update relevant views to update header/footer
- make the list and form of templates more readable
- add a description on templates, allowing to describe their usage

In order to better filter templates, a new category field is added that
is computed based on active flag, description being set and the template
having an xml ID. Master templates are active, with a description and an
xml ID.

Update master data to add description on some templates.

task-2944770

closes odoo/odoo#101730

X-original-commit: dfa867343ee8842f3f127ac62584fd471b41dde1
Related: odoo/enterprise#32079
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-10-04 09:55:46 +02:00
Yolann Sabaux bece0fb675 [FIX] project: filter stages based on the user_id
Steps to reproduce:
- have a project with a stage having the user_id set to Mitchell Admin (in this scenario you would have to add the field in the view)
- create a task in this stage
- log in with Marc Demo
- Try to open the project

Issue:
There will be an access error

Cause:
The domain allows to fetch all tasks from a project; even those from a prohibited stage

Solution:
- As in d4252825f5, we'll restrict the domain and "hide task stages if user is set".
- Prevent the user to create/modify a record to it with with a `user_id` and `project_ids`

opw-2917631

closes odoo/odoo#101965

X-original-commit: fdaef9276b89e2170128e205a4b7fd0b8defc2b1
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Signed-off-by: Xavier <xbo@odoo.com>
2022-10-03 17:18:31 +02:00
Damien Bouvy dc797aead0 [IMP] project: adapt tour to always edit
X-original-commit: 454f82e39e1cb4fb7b48db9470a58f304992a0c1
Part-of: odoo/odoo#101729
2022-09-30 15:33:05 +02:00
Martin Trigaux e856beb782 [I18N] *: export 16.0 source terms
closes odoo/odoo#101659

Related: odoo/enterprise#32040
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-30 09:31:52 +02:00
William Braeckman 6095eff9e2 [IMP] project: migrate project_calendar to wowl2
closes odoo/odoo#101603

X-original-commit: fb7c615fcec3743f31d34ebb79664f8a8eb5a50f
Related: odoo/enterprise#32012
Signed-off-by: Xavier <xbo@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-09-29 15:27:06 +02:00
std-odoo ce29b305b9 [IMP] project: add a properties field on task
Purpose
=======
To be able to customize the working flow on the task, based on their
project, we add a properties field on tasks, whose definition is stored
on their project.

Task-2965523

X-original-commit: 2f244769cbb1512875ae197aa8adc3efd34fd54b
Part-of: odoo/odoo#101487
2022-09-28 19:31:49 +02:00
Michael (mcm)andluvi 710271240f [IMP] web: remove readonly mode of form view
This commit does multiple things:
- The readonly mode of form view is removed but not for the fields.
  it means that the fields in the view are always in edit mode except
  if we force them to be readonly.
- The control panel is revamped to take less vertical space and shows now
  the record editing (dirtiness)/validity status after editing the record.
- The record is saved only when leaving the view or by clicking the save
  button when hovering the record status in the control panel.
- The record can still be discarded by clicking the discard button when
  hovering the status text in control panel.

task id: 2822553

X-original-commit: 77824ad44b6945a9811120380747f87ef6362ae2
Part-of: odoo/odoo#101118
Co-authored-by: luvi <luvi@odoo.com>
2022-09-27 12:43:50 +02:00
Bruno BoiandJorge Pinna Puissant ed9a9d024a [REF] *: calendar view in owl
This commit introduces the new calendar view written in owl.

closes odoo/odoo#101185

X-original-commit: e88988f58582d5b49a32d7102a74a176f40c4c69
Related: odoo/enterprise#31808
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2022-09-26 22:48:44 +02:00
luvi 1fa4f1dc10 [FIX] web,*: whitespaces in form/kanban templates
*: crm,link_tracker,project,sale,utm

Before this commit, in some form and kanban views, there were
missing whitespaces, typically between icons and texts. This was
due to the transition to owl views, because we simply ignored
`&amp;nbsp;` in archs. This commit also fixes a layout issue in
a project view, where the icon and the field should be displayed
in the same line.

closes odoo/odoo#101040

X-original-commit: f5813e348b6052436a4fabaa5837ecc37b15430e
Related: odoo/enterprise#31746
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-09-26 08:38:35 +02:00
Martin Trigaux 5150d003fd [I18N] *: export 16.0 source terms
closes odoo/odoo#101053

X-original-commit: 7d4c9d9736cc2ff0ee91dc17ea0f952c9a3dc65a
Related: odoo/enterprise#31752
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-24 15:00:56 +02:00
Pierre Paridans 062e7b1c21 [IMP] web,*: make ControlPanel, SearchView, SearchPanel responsive
This commit transfers responsive related customizations for
ControlPanel, SearchView and SearchPanel to community which allows them
to render properly on smaller devices.

Note: a page reload (aka. F5) is required to properly adapt the UI after
a resize to a mobile-like size.

X-original-commit: 26a755610da36b01ba07ca224cc5937a672eb6a8
Part-of: odoo/odoo#100759
2022-09-23 01:39:32 +02:00
Xavier BOL (xbo) 6da71c3de2 [FIX] project: cannot remove stage in my tasks menu
Before this commit, when the user wants to delete a stage in the My
Tasks menu, he got a user error because the context in the action cannot
be converted from string to a dictionary with literal_eval function. The
reason is `uid` is not replaced by the current user id before using the
`literal_eval` function.

This commit replaces the uid by the current user id and then apply the
literal_eval function.

Steps to reproduce the issue:

1. Go to Project App
2. Click on `My Tasks` menu
3. Add a group by `Stage`
4. Try to remove a stage in which there is no recurrence task

Current Behavior:
A traceback is occurred because the literal_eval cannot convert the
context from the action.

Expected Behavior:
The stage should be archived and tasks contained in that stage.

Bug found task-2944742

closes odoo/odoo#100599

X-original-commit: f4198e497fba8d22231ce22ea148b73e6e207d4c
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-21 02:25:51 +02:00
Vishal Padhiyar 812644b120 [IMP] *.*: update the tooltips in various modules
The goal of this task is to review the copywriting of the tooltips
because some of them are not correct in English and others are not
valid anymore. This is also a good opportunity to make an inventory
of the tooltips we have and to add some that could be missing.

task-2862283

closes odoo/odoo#93261

Related: odoo/enterprise#28225
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-20 16:29:13 +02:00
Martin Trigaux 1a8772769e [I18N] *: export 16.0 source terms
closes odoo/odoo#100573

Related: odoo/enterprise#31507
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-09-20 13:48:49 +02:00
gawa-odooandHabib 7e3403068f [REF] *: Analytic Apocalypse
The goal of this commit is to get rid of the analytic tags as they were confusing, serving tag purposes as well as distribution on analytic accounts.

Everywhere analytic tags were used as a distribution have been replaced with a new widget that will dispatch distribution on analytic accounts. If there was an analytic account field next to the tags, it has been included in the distribution.

Analytic tags that were used simply as information tags have been removed.

To fill the new widget, there are now 2 kind of rules that will help fill and prefill it.
The first are applicability: previous groups have been removed, and have by replaced by plans. Each account is required to have a plan. These plans define when they are available in the widget: a default applicability per plan and applicability lines that can specify rules following the context of the widget.

The second one are distribution models, that will replace previous default rules but follow the same principles. The accounts (and so the plans) that will be given by the distribution model can override the applicability rules from before.

closes odoo/odoo#98914

Related: odoo/upgrade#3885
Related: odoo/enterprise#30743
Signed-off-by: William André (wan) <wan@odoo.com>
Co-authored-by: Habib (ayh) <ayh@odoo.com>
2022-09-20 12:36:01 +02:00
Laurent Stukkens (LTU) ab0bf5e46c [FIX] project: prevent selecting 'Set Status' as project status
Since odoo/odoo#98380, the `Set Status` can be selected in the `project.project`
kanban view, which was not previously feasible as considered as not suitable.

This commit prevents selecting that value.

task-2989015

closes odoo/odoo#100561

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-20 10:28:26 +02:00
Laurent Stukkens (LTU) bfbffff4eb [FIX] project: prevent traceback when creating a task in my task
The field personal_stage_type_id is dupplicated in the form view. It is once in
the status bar, once in the `Extra info` tab which is only displayed in debug mode.
This causes a traceback as this is not supported by the actual web client code.

closes odoo/odoo#100524

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-19 17:16:38 +02:00
Adesh Jolhe (adjo) da868d28e2 [IMP] hr_timesheet,sale_(project): bring generic improvements for project
Purpose of this PR to improve generic usage of project app.

So, in this PR done following changes:
 - In project.project form view :
 - Divided settings into sections
 - In project.update.search.view :
   - Added author, description and status in quick search
 - Added ancestor task in group by and replaced parent task with ancestor task
   in search view
 - In project.task search View:
   - the filter for unread messages should be visible only if the current user
     managing his notifications in Odoo
   - Added  my private task filter
 - In project_task_view_graph
   - Added a default project > stages group.
 - In project.task form view:
  - If stage is_closed added decoration-muted
 - Replace/Add parent task with ancestor task' in group by and quick search
 - analytic-tags set on project should be automatically applied to it's tasks

task-2844212

Part-of: odoo/odoo#93676
2022-09-19 17:16:27 +02:00
Audric Onockx (auon) 889597428a [REM] project: remove unused widget
HtmlWithActionWidget was used in Project Updates
to handle <a/> tags in the html description.
Since odoo/odoo#72736 removes all those tags,
this widget is no longer needed.

closes odoo/odoo#100397

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-17 00:51:54 +02:00
Odoo's Mergebot 4e82c45abd [IMP] core: store translated fields as JSONB columns
[IMP] core: store translated fields as JSONB columns

Translated fields no longer use the model ir.translation.  Instead they store
all their values as JSON, and store them into JSONB columns in the model's
table.  The field's column value is either NULL or a JSON dict mapping language
codes to text (the field's value in the corresponding language), and must
contain an entry for key 'en_US' (as it is used as a fallback for all other
languages).  Empty text is allowed in translation values, but not NULL.

Here are examples for a field with translate=True:

    `NULL`
    `{"en_US": "Foo"}`
    `{"en_US": "Foo", "fr_FR": "Bar", "nl_NL": "Baz"}`
    `{"en_US": "Foo", "fr_FR": "", "nl_NL": "Baz"}`

Like before, writing False to the field makes it NULL, i.e., False in all
languages.  However, writing "" to the field makes its value empty in the
current language, but does not discard the values in the other languages.

Here are examples for a field with translate=xml_translate:

   ` NULL`
    `{"en_US": "<div>Foo<p>Bar</p></div>", "fr_FR": "<div>Fou<p>Barre</p></div>"}`

Change for callable(translate) fields: one can now write any value in any
language on such a field.  The new value will be adapted in all languages, based
on the mapping of terms between languages in the old values.  Basically the
structure of the value must remain the same in all languages, like before.

Reading a translated field is now both simpler and faster than the former
implementation.  We fetch the value of the field in the current language by
coalescing its value with the 'en_US' value of the field:

    `SELECT id, COALESCE(name->>'fr_FR', name->>'en_US') AS name ...`

The raw cache of the field contains either None or a dict which is conceptually
a subset of the JSON value in database (except for missing languages).  For the
sake of simplicity, most cache operations deal with the dict and return the text
value in the current language.

Trigram indexes have been adapted to the new storing strategy, and should enable
to search in any language.  Before this change, only the source value of the
field ('en_US') could be indexed.

Computed stored translated fields are not supported by the framework, because of
the complexity of the computation itself: the field would need to be computed in
all active languages.  We chose to not provide any hook to compute a field in
all languages at once, and the framework always invokes a compute method once to
recompute it.

Code translations are no longer stored into the database.  They become static,
and are extracted from the PO files when needed.  The worker simply uses a cache
with extracted code translations for performance.  This is reasonable, since
fr_FR code translations for all modules takes around 2MB of memory, and the
cache can be shared among all registries in the worker.  Changing code
translations requires to update the corresponding PO file and reloading the
worker(s).

Performance summary:
(+) reading 'model' translated fields is faster
(+) reading 'model_terms' translated fields is much faster (no need to inject
     translations into the source value)
(+) searching translated fields with operator 'ilike' is much faster when the
     field is indexed with 'trigram'
(+) updating translated fields requires less ORM flushing
(-) importing translations from PO files is 2x slower

Some extra fixes:
- make field 'name' of ir.actions.actions translated; because of the PG
   inheritance, this is necessary to make the column definition consistent in
   all models that inherit from ir.actions.actions.
- add some backend API for the web/website client for editing translations
- move methods get_field_string() to model ir.model.fields
- move _load_module_terms to model ir.module.module
- adapt tests in test_impex, test_new_api
- because env.lang is injected into SQL queries, its returned value is
   now guaranteed to correspond to a valid active language or None
- remove wizard to insert missing translations (no longer makes sense)

closes odoo/odoo#97692

Task-id: 2081307
Signed-off-by: Raphael Collet <rco@odoo.com>
2022-09-16 14:25:13 +02:00
hiroh-odoo 85a485034b [IMP] sale_(project): improve ux' for project
Purpose of this PR to improve the generic usage of project app

So in this commit done the following changes:
 - when a project is archived, the 'tasks' stat button should
   count/show archived tasks
 - when delete project it's milestone should also be deleted automatically.
 - project.task > blocked by notebook: it should be possible to select tasks
   in projects that are not allowing 'task dependencies'
 - project.task portal form view: hide the description if it is empty

task-2853991

closes odoo/odoo#94138

Related: odoo/enterprise#28654
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-09-16 14:25:04 +02:00