Commit Graph
36 Commits
Author SHA1 Message Date
Pierre-Yves Dufays f54cb53df2 [REM] project_todo: remove add todo from the systray
In order to simplify the systray, we remove the action "Add a To-do" from the
activity menu in the systray.

Technical note: We remove the following code in project_todo:
- static/src/web/activity: which add the "Add a To-do" in activity menu in the
systray with its logic
- controllers: which add specific controller for the "Add a To-do" in the
systray
- static/tests: which test the todo from the activity menu
- static/tests/helpers: that supports the test that we have removed (ex.:
simulate the removed controller)

Task-3085077

Part-of: odoo/odoo#138135
2023-10-19 19:08:12 +00:00
Pierre-Yves Dufays 725e7ffae3 [IMP] various: improve custom activity views
The following summary view of the record in the activity views have been
improved:
- project_task: task state added
- project_project: project manager added
- event_event: responsible and the dates (date_begin_located and
date_end_located) added
- account_move: total amount, customer and state added
- sale_order: total amount and the state added
- purchase_order: total amount and the state added
- crm_lead: customer and stage added
- hr_applicant (hr_recruitment): recruiter added
- survey_survey: responsible added
- maintenance.request: added equipment and responsible
- stock.picking: added scheduled_date
- repair.order: responsible, schedule_date and product_id added
- mrp.production: added responsible
- hr_leave (hr_holidays): status is added and default deadline modified see
below

Ensures that "Schedule activity" is in one line by adding a colspan.

hr_leave activity: When a time off approval activity is created as a
consequence of the creation of a hr.leave, the deadline of the activity is set
to the date_from of the hr.leave minus activity type delay_count (default 15)
except if it leads to a date anterior to today. In that case it is set to
today. That way, in the activity view, the time off approval activities are
more or less sorted by related hr.leave date_from and the cell date is an
indication of when the time off is planned.

Technical note: on most activity view, the activity record was not occupying
all the horizontal space. To solve that problem the css has been modified and
the max-width (200) that was imposed on the sub div has been removed. And as
it was impossible to impose a max-width for a flex div (which is the common
case for the activity record), the max width is imposed on each text that might
be too long using the class o_text_block. That class has been modified to
impose a max-width. That's why that class has been added in most view.
Alternativly, we could have modified the activity compiler to add that class
when the attribute full was set (not done because not sure of the consequence).

Task-3300854

Part-of: odoo/odoo#138135
2023-10-19 19:08:12 +00:00
Pierre-Yves Dufays 3f2f3c1beb [IMP] mail, various: simplify the systray
The system tray has been simplified:
- only one clickable area per activity group
- by default, a click on an activity group open the list view, except for some
model (ex.: journal entries, project, task, documents where the activity view
is opened). This can be defined per model using the _systray_view attribute on
the model.
- the clock icon providing access to the activity view has been removed. As it
is the only action, we also remove "actions" returned by systray_get_activities
in res_users.
- the KPIs are no longer clickable

The tests have been updated (for example, because we open the list view instead
of the kanban view) and one removed "activity menu widget: activity view icon"
as we only have one clickable area now and no more icons.

Task-3300854

Part-of: odoo/odoo#138135
2023-10-19 19:08:12 +00:00
FrancoisGe bb09cf76e3 [REF] *: remove legacy time.js
The purpose of this commit is to delete the legacy/js/core/time.js file.
We have therefore replaced all calls to time.js with the l10N/date.js utilities.

Part of task 3439226

closes odoo/odoo#138609

Related: odoo/enterprise#48918
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-10-18 08:56:06 +00:00
Brieuc-brd 538fdab99b [IMP] *: fine-tune app icons
The aim of this commit is to improve the impact and rendering of app
icons in bright and dark mode. It also reduces the size of svg files.

To achieve that, this commit updates the colors to flat colors. This
change will make the icons stand out and improve their readability.

task-3072562

X-original-commit: 667a19162b74fb6554a2389ba9c6e69de4ff5113
Part-of: odoo/odoo#138279
2023-10-16 09:21:17 +00:00
Abderraouf Ghrissi (abgh) 56073896a6 [IMP] project: merge date_deadline and planned_date_end
Before this commit:
- The existing of two dates behaving as and end date for project_task
(date_deadline and planned_date_end) is confusing.

In this commit:
- The main goal is to simplify the interface by having one field/widget
that acts as both the deadline and the end date, instead of having two separate fields.
So we removed planned_date_end (changes can be seen in the enterprise related pr (link at
the end) and changed the date_deadline type from date to datetime in project_task and
report_project_task_user

Related PRs:
Enterprise: odoo/enterprise#40866

task-3084978

closes odoo/odoo#120953

Related: odoo/upgrade#4654
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-06 08:25:14 +00:00
nikj-odoo bc953225dc [IMP] project_todo: improve todo title color and eliminate hover flicker
Before this commit, in the form view of todo the title was light grey and there
was a small flicker when hovering the title.

In this commit, the color of the title is changed to dark grey and flicker is
eliminated.

Task-347920

closes odoo/odoo#135247

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-03 19:20:00 +00:00
nikj-odoo 4a1fed52db [ADD] project_todo: Add default 'reminder' action for 'todo' category type
Before this commit, when we set the activity type to 'todo' in our project, the
default action was set to 'none.' This configuration made the 'todo' category
type less intuitive and less useful.

In this commit, we have improved the default behavior. Now, when you select the
'todo' category type, it will automatically have the 'reminder' action assigned
by default. This change enhances user experience and ensures that 'todo' items
have a meaningful default action.

task-3500700

closes odoo/odoo#135767

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-10-03 17:53:17 +00:00
Hugo Carlier (Huca) 5098f4e2f4 [FIX] project_todo: remove filter on project when converting a to-do
Before this commit, the conversion of to-do to task is performed through
a form view on the project.task record. This view let the user pick a
project for the current record. A domain is applied on the project_id
field to only let the user select a project from the current selected
companies. This commit removes that filter to only rely on the ir.rule
of project.project instead.

task-3458909

closes odoo/odoo#137111

X-original-commit: 8adc4e2f08e6e704c314cda21494bb3486a32fd2
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-29 14:48:20 +00:00
Bastien (bvdn) 52d1bc9ca6 [IMP] project_todo: write test for the create_todo_activity command
We check that both an activity and a task has been created by the create_todo_activity call
We check that the task has the same description as the activity.todo.create note

We check that the activity and the task have the same:
- name
- user
- deadline

Task-3492155

closes odoo/odoo#135134

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-27 14:57:05 +00:00
Sébastien Theys aee3cb8929 [REF] mail, *: tests: remove last occurences of jQuery in contains()
* = im_livechat, project_todo, test_mail, web

closes odoo/odoo#136425

Related: odoo/enterprise#47825
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-27 07:28:08 +00:00
rajh-odoo aa592f69de [IMP] project_todo: add todo button in list view for open form view
Before this commit:
in list view when click on any field it was editable and so can not see the form
view of that record.

After this commit:
a view button is added to the list view  to see the form view of the
particular record

task-3471910

closes odoo/odoo#133698

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-09-27 01:50:51 +00:00
Sébastien Theys 7a90938a70 [REF] mail, *: tests: simplify text option of contains
* = bus, calendar, im_livechat, hr, project_todo, sms, snailmail,
    test_mail, web, website_livechat

The current implementation often led to tests relying on DOM structure
to properly target the correct element with the text.

It is now easier to simply check if a parent contains some text.

closes odoo/odoo#136295

Related: odoo/enterprise#47770
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-09-23 10:33:04 +00:00
Sébastien Theys 7ea370fce7 [REF] mail, *: tests: refactor contains to further remove jQuery
* = account, base_iban, bus, calendar, crm_livechat, hr, hr_holidays,
    im_livechat, mrp, project, sms, snailmail, test_mail,
    test_mail_full, web, website_livechat, website_slides

Add support in `contains` for most operations that we use in tests.
Remove return value from `contains`.
Move into `web` module.
Remove import/export chains, directly import from correct module.

closes odoo/odoo#134652

Related: odoo/enterprise#47064
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-09-14 11:22:47 +00:00
Goffin Simon d7a387a07a [FIX] project_todo: Impossible to install project_todo
Typo error

opw:3478943

closes odoo/odoo#134346

X-original-commit: 0db170b851c994a1102d894172cc59af37936873
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Simon Goffin (sig) <sig@odoo.com>
2023-09-06 11:50:59 +00:00
Goffin Simon 0be605d22a [FIX] project_todo: Impossible to chose a project with no company
Steps to reproduce the issue:

- Go to the To-do app
- Open a task and try to convert it to a task
- Look for P

Bug:

P was not suggested

opw:3478943

X-original-commit: e0e3d35c7f53b9a87de366bf2cca96c1ca3be960
Part-of: odoo/odoo#134346
2023-09-06 11:50:59 +00:00
Sébastien Theys 3ce461cc51 [REF] mail, *: move contains count to named parameter
* = calendar, hr, im_livechat, mrp, project_todo, sms, snailmail,
    test_mail

The parameter is too often specified with its default value to be worth
being a positional parameter.

Part-of: odoo/odoo#133717
2023-09-01 13:21:01 +00:00
Sébastien Theys 78897c1890 [REF] mail, *: tests: use native code for most contains/text
* = calendar, im_livechat, project_todo, sms, snailmail, test_mail,
    website_slides

The choice was made to have "trimmed text" check rather than "contains"
to have more robust tests, at the cost of slightly more effort to write
complete and unique asserts.

There is no direct speed improvement from this one, but it is one step
closer to removing jQuery.

Moreover, it will fix infinite loops in some situations, because jQuery
selectors would write attributes on the body, which would trigger the
mutation observer, which itself will call the selector again.

Part-of: odoo/odoo#133717
2023-09-01 13:21:01 +00:00
dise 723ea29937 [IMP] project_todo: add a create to-do command on the command palette
This task will add a new command on the command palette, which will
allow the user to create a to-do and schedule an activity for it.

The command will open a new wizard to create a to-do.

task-3330177

closes odoo/odoo#125644

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-24 18:36:48 +02:00
Sébastien Theys d08a18b791 [IMP] mail, *: tests: use contains in click and insertText
* = account, calendar, im_livechat, mrp, project_todo, sms, snailmail,
    test_mail, web, website_livechat

`contains` is more efficient than `afterNextRender` as it does not wait
for several extra animation frames, and it is functionally more
meaningful.

closes odoo/odoo#130451

Related: odoo/enterprise#44999
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-21 21:00:03 +02:00
Pierre Pulinckx (pipu) c07181b20b [REF] *: Replace env._t() by _t()
In this commit, all usages of env._t() are replaced by _t().
In templates files, env._t() didn't work because terms used
in attributes where not extracted into the translation files.
Only string are exported from .xml files to translation files.
So, to make it works, we set a variable that is then used
in attributes.
For example :

<t t-set="string_to_translate">String to translate</t>
<Dialog title="string_to_translate>...</Dialog>

task-3292454

closes odoo/odoo#131390

Related: odoo/enterprise#45631
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-08-18 19:17:16 +02:00
Gorash 774a3fad0e [REF] base,all: Update modifier syntax: view migration
Apply of the migration script to update all view modifiers.

Part-of: odoo/odoo#104741
2023-08-18 09:49:13 +02:00
Jorge Pinna Puissant e338487028 [REF] *: remove owl="1" from the templates
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.

Part of task~3443861

Part-of: odoo/odoo#130467
2023-08-11 14:32:30 +02:00
Bastien (bvdn) 1cddd58fbb [FIX] project_todo: change model.actionService references
the default model 'useAction' service is now named 'action' no longer 'actionService'
Changed the reference where needed

closes odoo/odoo#131452

Related: odoo/enterprise#45583
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-10 09:13:01 +02:00
Michael (mcm) 9d6b380a24 [REF] *: adapt patches after new patch function
In the commit [1], the patch has been refactored to support the
native keyword `super`. The current commit just adapts the codebase
to that change.

task 3410198

[1]: 19ea1ac08043e22a811630968e44715cc3bfc495

Part-of: odoo/odoo#125716
2023-08-02 17:29:05 +02:00
Pierre Pulinckx (pipu) 60fe2e9b17 [REF] *: remove _lt()
In a previous commit 8bfa76a, _lt() returns _t().
So, in this commit, all usages of _lt() are replaced by _t().

task-3292454

closes odoo/odoo#130179

Related: odoo/enterprise#44906
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-08-01 13:51:17 +02:00
Bastien PIERRE 65242e31e9 [IMP] *: Remove alias in JS files
Rename all imports with alias old system to the new js module system
Task ID: 3266759

closes odoo/odoo#127414

Related: odoo/design-themes#671
Related: odoo/enterprise#43716
Signed-off-by: Bastien Pierre (ipb) <ipb@odoo.com>
2023-07-27 11:58:34 +02:00
Elisabeth Dickinson 0f0fc727da [FIX] project_todo: fix input height and reduce notepad padding
This commit aims to give the same height to both
`o_field_many2many_tags` and `o_field_many2many_avatar_user` when side
by side.
To remove some visual clutter inside the inputs, we've removed the
input's line (and the caret; without the line it seemed to be floating).

The padding in the notepad area (`.o_form_sheet`) has been reduced.

Note that this commit does not fix the status bar issue which should be
done in a separate commit.

task-3420954
part of task-3326263

closes odoo/odoo#129630

X-original-commit: bf3fc5dc76d4cea224255149c8a71b42c37b7d48
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-07-26 09:22:15 +02:00
Hugo Carlier (Huca) 5aa9a69b56 [FIX] project_todo: avoid evaluation of equivalent ir.rule
Since the introduction of project_todo, access to the model project.task
for interal users has been extended to read/write/create/unlink. The
basic record rule for task visibility does in consequence need to manage
only the read access. A new record rule was introduced to manage
write/create/unlink access for project users. However, the read access
for this group was also managed by this new rule, which led to
evaluation of both ir.rule for project user.

related-https://github.com/odoo/odoo/pull/115390

closes odoo/odoo#129058

X-original-commit: 0808286feb463f7618fdc2e72f010d151db8c9a3
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-20 05:03:05 +02:00
Hugo Carlier (Huca) 0afd96e669 [IMP] project_todo: keep the breadcrumb after to-do conversion
When a to-do is converted to task, the breadcrumb was reseted
preventing the user to go back to the to-do app in one click after
conversion. This commit reintroduces the full breadcrumb after
conversion.

task-3369510

closes odoo/odoo#126966

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-12 16:52:44 +02:00
stefanorigano (SRI) b0baac6fc4 [FIX] web, mail: Dropdown and PopoverWowl, increase contrast
This commit adapt several components and utility-classes in order to
increase visual contrast.

In the case of `o-mail-ActivityGroup` and `o-mail-NotificationItem`
templates, these has been reworked in order to use default BS components
and consequently automatically inheriting the improved design.

task-3338419

closes odoo/odoo#124903

Part-of: task-3326263
X-original-commit: 190ec1c947e17b2b4aa8614e9e0a04d00cb38d90
Related: odoo/enterprise#42507
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-21 00:13:49 +02:00
Bastien (bvdn) 1a44b84997 [IMP] project: improve various mark as done features
New features developed in this PR:

- Write Javascript tests for the project.task.state widget
  - Tests are in the project_task_state_selection.js
- rewrite Research & Development demo data
- Created a digest tip for task state selection (in Settings > technical > digest tips)
  - Tip: Use task state to keep track of the task progression
- Fix Sharingview (Readonly) icons for the project.task.state widget, previously only the color bubble were displayed in readonly sharing views, now all of the icons are displayed
- Display state in the Calendar view
  - Display the same widget as in the kanban/list views
- Remove is_closed References
- Adapt Kanban stages Exemples
  - Kanban exemples are available when creating a new stage in kanban view
- improve Progressbar colors (different color for approved/done, in_progress/waiting)

Task-3213526

closes odoo/odoo#117968

Related: odoo/enterprise#39714
Related: odoo/upgrade#4548
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-13 18:20:44 +02:00
Sébastien Theys 9dba4e0d77 [REF] mail, *: reorganize JS files
Remove "fake" feature sub-folders that make files harder to find.

Note: If there are too many files in the main folder now, a new split
that actually makes sense can be done at a later time: this would not
just be code move, but removing coupling between said feature and the
rest of the code.

Apply consistent structure, where the top level folder is a feature (or
core), and sub-folders are subdivision of the feature depending on
context (closely related to assets bundles).

```
- core
    - common
    - public
    - web
- feature
    - common
    - public
    - web
```

The opportunity is taken to reorganize the top of the files and imports:
- Always use absolute path in imports to be able to find all usages of a
  file with a single search.
- Reorganize imports to group them by module, and to sort them
  alphabetically by path/feature.
- Always use single asterisk (*) for `odoo-module`: less characters yay!
  And double asterisk should be used for JSDoc comments, not for custom
  instructions.

Part of task-3265211

closes odoo/odoo#124168

Related: odoo/enterprise#42121
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-06-08 21:52:44 +02:00
Martin Trigaux 2afdda2576 [I18N] *: export saas-16.3 source terms
closes odoo/odoo#123046

X-original-commit: 137f5ca0cb703ee953cb01db525362f7a778e6bd
Related: odoo/enterprise#41703
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-01 11:43:51 +02:00
Brieuc-brd ee75969979 [IMP] *: app icons: replace svg to png
The introduction of Milk has brought new app icons.
Using the svg format creates a lack of anti-aliasing on the edges of the
shapes, which makes the icons look bad.
Since the png size has been reduced, we can afford to use the png format
to have the best possible quality without having a lack of performance.

task-3326633
Part of task-3326263

X-original-commit: e07cb722f2b11407a3ad093bd688b7d37afd5a88
Part-of: odoo/odoo#121886
2023-05-22 13:54:07 +02:00
Hugo Carlier (Huca) 44ebc03bde [MOV] project_todo: rename module todo to project_todo
To avoid confusion with the generic name "todo" and to emphasize the
link with the module project, this module is renamed to "project_todo".

task-3085077
2023-05-15 09:01:27 +02:00