Commit Graph
844 Commits
Author SHA1 Message Date
Nicolas Bayet 9731e9be6d [FIX] web_editor,project,note: ensure same history
This commit add a mechanism to ensure that someone could never save
changes from an history that diverge (in case there is a partition in
the RTC network or a person A was disconnected while another person B
saved changes that were not transmitted to person A).

task-3002163

closes odoo/odoo#112099

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-02-09 10:49:00 +01:00
Rémy Voet (ryv) 2e2ca3dac0 [REM] base: remove useless field field_parent of ir.ui.view.
This field is useless since 905e01921f.
Remove it and all occurence of it in view records.

Part-of: odoo/odoo#109420
2023-01-10 18:54:47 +01:00
Jorge Pinna Puissant 5b68871097 [IMP] * : kanban, unify dropdown definition in archs
This commit separate the templates, one for the card and another one for
the menu (the ellipsis dropdown).

The new template, called 'kanban-menu', will only contain the dropdown.
Note that, this behaviour is the same as the one used for the kanban
tooltips.

closes odoo/odoo#107589

Task-id: 3096776
Related: odoo/documentation#3284
Related: odoo/enterprise#34962
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-01-05 15:37:04 +01:00
Barad Mahendra d571b7bbe3 [FIX] note: fix the width of form sheet
Currently, the form sheet of the note is not displayed in
full screen due to the max-width set as 1320px inside the
o_form_sheet.

So in this commit set the max-width as 100% to display the
sheet view in whole sheet area.

task-3052597

X-original-commit: 851fe4b2d163a20e3cd9cb129a42b96690e5b908
Part-of: odoo/odoo#108440
2022-12-21 19:34:55 +01:00
Malay Khamar 77ff6348b2 [FIX] note: fix the export all xlsx report error
When the user exports the note records, an error is raised because the
'__count' key does not exist in the result of the 'read_group' method.

Steps to reproduce:
------------------
- Go to the Notes
- Click on the list view of notes and filter group by Stage.
- Click on the export all button to print the excel report and see the
error.

Expected behavior:
-----------------
The data should be exported in `csv` file.

Current behavior:
----------------
An error is raised when the user wants to export the data.

closes odoo/odoo#108394

X-original-commit: 3bd979421744a11b6f10c95f47cf378720079ffb
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2022-12-20 17:36:00 +01:00
Aaron Bohy 4ed9c18199 [FIX] note,web(_editor): fix html field style
Commit [1] added a div around the `.note-editable` node of the html
editor. This broke some css rules. For instance, the html field in
form view's notebooks should have a transparent bottom border when
focused, this was no longer the case (e.g. crm lead form view).
Moreover, we sometimes want to control the height of the editor
(e.g. in Notes or in the mail full composer). That was broken as
well due to the added div.

This commit fixes those issues.

We also ensure to set the border-radius to 0 when the editor only
has a bottom border.

In notes, we do not want to have borders, but the rule didn't
apply due to selector precedence, we fix that as well.

Finally, we fix a typo in a selector in the web_editor addon.

[1] https://github.com/odoo/odoo/commit/60ac6be0d3545#

closes odoo/odoo#107740

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-12-19 12:43:09 +01:00
Mahamadasif Ansari 51ac493044 [IMP] note: add default random color in tag
Currently, when we creating a tag, it does not appear in the Kanban
view because the tag does not have a default color. 

This commit solve above problem by adding default random color in tag.

task-3089296

closes odoo/odoo#107800

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-12-19 09:28:13 +01:00
Pierre-Yves Dufays e1082af5be [FIX] note: support link in note created from the systray
The URLs in notes created from the systray were not transformed into links.
This solves the problem.

Task-3052952

closes odoo/odoo#108147

X-original-commit: 00fbfab9b7dedc2b5917e7807d8abd2995253919
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-12-16 13:48:34 +01:00
Alexandre Kühn 0422c94a90 [IMP] mail, *: rename registerModel/Patch to Model/Patch
closes odoo/odoo#105096

Related: odoo/enterprise#33679
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-11-06 02:16:48 +01:00
Alexandre Kühn 56e854471a [IMP] mail, *: introduce @mail/model module
Introduce the '@mail/model' module that gathers all the stuff involved
in model definitions. This allows us to reduce the number of imports.

* = calendar, crm, hr, im_livechat, note, rating, sms, snailmail,
website, website_livechat, website_slides

Task-3056971

Part-of: odoo/odoo#105096
2022-11-06 02:16:48 +01:00
tsm-odoo 9e4a8dc43f [IMP] mail, *: split mock server by model/controller
*: bus, calendar, hr_holidays, im_livechat, note, rating, snailmail,
website_livechat.

The mail mock server is getting bigger and bigger. As a consequence,
navigating/keeping it up to date is quiet inconvenient.

This commit solves this issue by splitting it by model/controller.

closes odoo/odoo#98374

Related: odoo/enterprise#32314
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-10-06 19:03:49 +02:00
Louis Wicket (wil) d562840f69 [IMP] mail, *: refactor patch API to look like model definitions
Model patches are now defined using the `registerPatch` function. This
function takes an object as argument which keys match those of a model
definition.

Benefits:
+ More consistent shape between model definitions and patch definitions
+ No need to import one function to each type of patch
+ No need to repeat the model name for each type of patch
+ No need to import the original definition

Task-2998282.

* = calendar, crm, hr, im_livechat, note, rating, sms, snailmail,
    website_livechat, website_slides

closes odoo/odoo#101827

X-original-commit: 7d23491b44b7372209057ea2abc565a95710b316
Related: odoo/enterprise#32136
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2022-10-03 16:18:49 +02:00
Louis Wicket (wil) 960a4faa4c [IMP] mail, note: unwrap sorting rules array
Remove sorting rules arrays from the functions that wrap them as they
are unnecessary noise.

closes odoo/odoo#101039

X-original-commit: b37baf8996d65d639f0178651a7be0206d0679d0
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-24 00:33:11 +02:00
Alexandre Kühn 0ae4fadf08 [IMP] mail, *: convert all compute/sort method into inline field function
Task-2985304

closes odoo/odoo#100765

X-original-commit: e267d52cc4380c3acf7d2f9c9abf1acb59a598c1
Related: odoo/enterprise#31606
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-09-22 01:54:20 +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
Gorash 39ea7a1fab [IMP] web/all: XML templates are now declared into the python manifest.
Adapt all manifest, split some XML file and update JavaScript files.

Part-of: odoo/odoo#95500
2022-09-14 20:25:01 +02:00
Louis Wicket (wil) 10950d549d [IMP] mail: add support for inline definition of sort and compute
This commit allows compute and sort functions to be declared within a
field definition instead of providing a string with the name of the
record method to be used to compute/sort the field value.

Example of code with compute inline:
```javascript
registerModel({
    fields: {
        thread: one('Thread', {
            compute() {
                return {
                    id: this.id,
                    model: 'mail'.thread',
                };
            },
        }),
    },
});
```

Example of code WITHOUT:
```javascript
registerModel({
    recordMethods: {
        _computeThread() {
            return {
                id: this.id,
                model: 'mail.channel',
            };
        },
    },
    fields: {
        thread: one('Thread, {
            compute: '_computeThread',
        }),
    },
});
```

The aim of these changes is to empower a better separation of concerns,
by allowing to group together in one place the data related to a field.

Note that for technical reason (`Function.prototype.call` not working as
expected with arrow functions), compute/sort functions should not be
arrow functions.

closes odoo/odoo#99424

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-09-02 19:14:04 +02:00
Thibault Delavallée 115f5663f1 [PRF] mail, note: improve default activity type computation and remove useless ref
Change some ``ref`` to low level method ``_xmlid_to_res_id``. The latter one
does not call exists, which allows to gain one query that we do not need
here.

Default methods on activity / activity mixin to find the default activity
type (todo, model-based, generic) are cleaned. Notably code was duplicated
between mixin and activity, it now always call the same code.

Remove an unnecessary ref, probably a leftover of new rendering methods on Qweb.

Remove an unnecessary sudo.

Task-2883589 (Activity performance and cleaning)

Part-of: odoo/odoo#93682
2022-08-26 03:42:59 +02:00
Thibault Delavallée d13d251a2f [MOV] various: move and split mail data
Just doing the summer file cleaning. Move mail data into files named based on
their model, easing maintenance and searching for those data.

Spotted during Task-2207626 (Rating: Delay rating notification to ease feedback)

Part-of: odoo/odoo#98661
2022-08-25 10:31:56 +02:00
Thibault Delavallée 36239e1594 [MOV] calendar: move activity (type) code and views
Purpose is to have one file / model, easier when searching for inherited parts
of the code and see at a glance various usage of those models.

Spotted during Task-2207626 (Rating: Delay rating notification to ease feedback)

Part-of: odoo/odoo#98661
2022-08-25 10:31:56 +02:00
Stefan-Calin Crainiciuc (stcc) a2122ebce2 [FIX] notes: push new notes to top of the list
Steps to reproduce the issue:

- Notes app > Kanban view > Create a bunch of notes using
the + icon in the kanban view
- (optional) Modify the default order of the notes
- Add a new note using the quick add feature
- Don't modify the order of the notes and refresh the page
- The new note will be sent to the bottom of the note list
(off-screen if the list is long enough)

This happens because new notes have their sequence set to NULL, which
places them at the end of the list after ordering by sequence.

This commit sets the default sequence of a new note to 0, so that it
is placed at the top of the list and adds an additional sort on
'id desc' to consider the case where all notes have the same sequence.

opw-2924615

closes odoo/odoo#98427

X-original-commit: ec719b166635df9ed31c9c2b47fedadd2311765c
Signed-off-by: stcc-odoo <stcc@odoo.com>
2022-08-19 10:31:21 +02:00
tsm-odoo 75007b578e [MOV] bus, *: move startServer test helper to the bus module
*: calendar, hr, hr_holidays, im_livechat, note, rating, snailmail,
test_mail, test_mail_full, website_livechat, website_slides.

Part-of: odoo/odoo#97771
2022-08-10 14:43:41 +02:00
Fabien Pinckaers 3363e55cac [IMP] cleanup of help messages in all modules
This commit aims at removing unuseful help message to:
1/ reduce translators work, to focus on more useful translations
2/ not sending unuseful information in load_views
3/ reduce help message to useful messages, so that we can mark
   fields having a tooltip in the future UI.
4/ some cleanup of existing messages too

The main use cases:
- REMOVED: help redundant with the field name, providing no extra info
- MOVED TO COMMENT: technical help messages, that should not be in UX

closes odoo/odoo#97279

Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-08-02 00:26:53 +02:00
Antoine Guenet 7810fd5b25 [FIX] note: fix the layout of note's form view
New styles on forms had broken the full height / no sheet style of
note's form view.

closes odoo/odoo#96741

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-07-27 07:59:54 +02:00
Sébastien Theys b401ba6e2d [IMP] mail, *: remove legacy code from activity systray
* = calendar, crm, im_livechat, mass_mailing_sms, note, test_discuss_full,
    test_mail

task-2920645

closes odoo/odoo#96114

Related: odoo/enterprise#29794
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-27 02:18:15 +02:00
tsm-odoo 920b25f5e7 [IMP] mail, *: always add activity menu item during tests
*: calendar, note, test_mail.

In order to ease testing and to prepare for the ActivityMenu widget to be
converted into a component, let's add the sytray menu item into the registry
systematically when using the start helper.

closes odoo/odoo#96094

Related: odoo/enterprise#29529
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-18 18:41:39 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Romeo Fragomeli eee625bbb0 [REF] *: BS5: Migrate btn-block
Due to the removal of btn-block we need to change the display to grid

> Dropped .btn-block for utilities. Instead of using .btn-block on the
> .btn, wrap your buttons with .d-grid and a .gap-* utility to space
> them as needed

https://getbootstrap.com/docs/5.1/migration/#buttons

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:23 +02:00
Aaron Bohy 4f984568e1 [REF] *: adapt code to new kanban view
This commit makes various adapations in addons with respect to
the introduction of the owl kanban view. Mainly, some selectors
in scss and in tests needed to be adapted. Moreover, in some tests
that we haven't adapted yet, we must ensure that legacy form and
list views are still used (useLegacyViews).

It also contains some adaptations in kanban templates, e.g. the
replacement of moment by luxon, the removal of underscore...

Part-of: odoo/odoo#92475
2022-06-30 09:29:45 +02:00
tsm-odoo 3573a7fef4 [IMP] mail, *: use wowlEnv instead of the legacy one
*: bus, calendar, hr, hr_holidays, im_livechat, mail, mail_bot, note, project,
sms, snailmail, test_mail, web, website_livechat, website_slides.

task-2582313

closes odoo/odoo#83774

Related: odoo/enterprise#26493
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-30 19:40:53 +02:00
tsm-odoo e423618dca [IMP] mail, *: prepare activity menu tests to wowl env
*: calendar, note, test_mail.

This PR prepares the ground for the one introducing the new environment in the discuss app.
Indeed, the start helper won't be able to handle widget anymore. To solve this issues,
we're now adding the activityMenu widget to the systrayMenu.Items array, this will be
mapped by the createWebClient helper to component and added to the new systray item
registry.

task-2582313

closes odoo/odoo#91953

Related: odoo/enterprise#27614
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-23 16:27:54 +02:00
tsm-odoo c23f85903a [IMP] mail, *: use pyEnv in the mockServer
Now that pyEnv is available, using it in the mock_server lighten the syntax.

task-2582313

closes odoo/odoo#90783

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-13 11:59:58 +02:00
tsm-odoo bd02fcc8f6 [IMP] mail, *: remove useless widget destroy
*: calendar, hr, note, test_mail.

Since community#86338, widget destruction is registered in the start method. Thus,
explicit calls to widget.destroy during tests are useless. This PR prepares the ground
for the one introducing the new environment in the discuss app. Indeed, the former PR
will use createWebClient instead of createView/Widget constructor thus, we won't be able
to call destroy on the returned value anymore. In order to reduce the noise in the main PR,
all the calls to widget.destroy have been removed.

task-2582313

closes odoo/odoo#91082

Related: odoo/enterprise#27192
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-05-11 16:00:41 +02:00
Victor Feyens 42bad1a6d2 [IMP] *: remove useless keys from manifests
Remove most values uselessly specified because giving the same value as 
the default one (see _DEFAULT_MANIFEST in odoo/modules/module.py)

* auto_install is Falsy by default
* author is Odoo SA by default
* summary & description are empty strings by default
* application is False by default
* test, demo, depends and data are empty lists by default

This will reduce noise/inconsistencies between manifests specifications, 
simplify analysis of manifests content, ...

closes odoo/odoo#90209

Related: odoo/enterprise#26807
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-05-03 13:31:16 +02:00
tsm-odoo 96288beeb6 [IMP] mail, *: prepare mockServers for wowlEnv
*: calendar, hr_holidays, im_livechat, note, website_livechat.

This PR helps reducing the noise in the discuss new env PR. Indeed,
the new mockServer has the same method except that they are not prefixed
by any underscore. All calls have been changed, and the corresponding
methods created. They will be deleted later.

task-2582313

closes odoo/odoo#89659

Related: odoo/enterprise#26603
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-27 10:04:17 +02:00
Martin Trigaux 158b537c28 [I18N] *: export saas-15.2 source terms
closes odoo/odoo#89225

X-original-commit: 5925a83d87fa4702f4c0f22346304dc2da47c728
Related: odoo/enterprise#26435
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2022-04-23 08:33:43 +02:00
tsm-odoo 848e8d7ee4 [IMP] mail, *: adapt remaining tests data seeding
*: calendar, hr, hr_holidays, im_livechat, mail, note, sms, snailmail,
test_mail, website_livechat, website_slides.

task-2792108

closes odoo/odoo#87700

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-04 17:48:39 +02:00
tsm-odoo e5a9f77399 [IMP] mail, *: make activity menu tests rely on real behavior
*: calendar, note

In order to prepare the ground for test adaptation using the startServer method,
make the systray_activity_menu more realistic : instead of using a fake model, we
now rely on a  method in the mock server. This method mimics the behavior of the
`systray_get_activities` present on the res.users model.

task-2792108

closes odoo/odoo#87743

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-04-04 14:45:11 +02:00
Louis Wicket (wil) ee9759a144 [MOV] mail, *: move utils files up
* = calendar, hr, hr_holidays, im_livechat, note, sms, snailmail,
test_mail, website_livechat, website_slides
Task-2759586

closes odoo/odoo#86791

Related: odoo/enterprise#25491
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-03-23 13:39:56 +01:00
tsm-odoo b15959cd95 [IMP] mail, *: make start method handle cleanup
*: calendar, hr, hr_holidays, im_livechat, mail, mail_bot, note, sms, snailmail,
website_livechat, website_slides.

This commit prepares the removal of beforeEach function in the
mail test suite. Cleanup was relying on beforeEach adding widgets,
components, unpatch method 'this'. We need to clean things up without
using either beforeEach or 'this'.

task-2792108

closes odoo/odoo#86526

Related: odoo/enterprise#25326
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-03-16 16:07:58 +01:00
Umesh Gupta 3af3abfe4d [IMP] note: display long title properly on kanban view
Currently in kanban view of the notes, if there is long content without space
(for example a very long URL), the content goes out of the kanban card.

This commit improves the behavior by breaking such content into multiple
lines and thus displaying full title on the kanban card.

taskID-2754915

closes odoo/odoo#84607

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2022-02-25 10:25:36 +00:00
tsm-odoo 0862f2fab0 [IMP] mail, *: make mail module's beforeEach functions async
*: calendar, hr, hr_holidays, im_livechat, note, sms, snailmail,
website_livechat, website_slides.

This commit prepares the ground for the model definitions PR.
In order to reduce the noise, all mail module's beforeEach
functions will be made async.

task-2767820

closes odoo/odoo#84845

Related: odoo/enterprise#24489
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-02-18 13:26:49 +00:00
Fabien Pinckaers 10a5796d4b [IMP] speed up load_menus() by using SVG icons instead of png
Reduces load_menus answer size by 32% (between 20kb and 200kb savings
for the initial loading of the backend, depending on the number of apps
installed). Support for SVG icons in the web client for menus/apps.

Reduced PNG icons for apps list (8 bits PNG instead of 24 as our icons
don't need more colors as they are flat designs)

closes odoo/odoo#84280

Related: odoo/enterprise#24200
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-02-12 08:55:18 +00:00
Yannick Tivisse e98e7d762b [IMP] note: Allow company specific notes
Purpose
=======

Allow to restrict note to users having access to a specific company

For example, when creating a new company, it create a "Useful Links" note
that is used on the payroll dashboard (With granted access to payroll officers
who belongs to this company).

This note should be restricted to people having access to the company,
and shouldn't be mixed all the time for people having multi company accesses.

closes odoo/odoo#84155

Related: odoo/enterprise#24128
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-02-08 11:08:05 +00:00
Yannick Tivisse 67713706b5 [IMP] note: Allow name edition on notes
closes odoo/odoo#83836

Related: odoo/enterprise#23928
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2022-02-07 19:03:43 +00:00
Sébastien Geelen (sge) 207a49275e [FIX] *: adapt some html fields in views
Some html field are not in their ideal style.
As the style for html fields is now dependent of
where you are in the xml view ( in group or not),
we have to adapt some views and flags some fields
to ensure they have the correct look.

This change is only be a visual enhancement
and should not prevent the function of said html fields
even if the views are not updated.

task-2637488

# Conflicts:
#	addons/mail/wizard/mail_compose_message_views.xml
#	addons/website_slides/views/slide_channel_views.xml

# Conflicts:
#	addons/sale/views/sale_views.xml

closes odoo/odoo#83792

Related: odoo/enterprise#23911
Signed-off-by: Antoine Guenet <age@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2022-02-02 09:03:44 +00:00
stefanorigano (SRI) c20be761a8 [FIX] note: kanban cards layout
Prior to this commits note's kanban inner components were not aligned
properly. Moreover followers' avatars and the activity widget button
position were not visually consistent with the rest of the UI.

This commit fixes the design and limits the maximum number of rendered
avatars, adding a "+ [number]" label when the followers number
crosses the threshold of 5 entries.

task-2658852

closes odoo/odoo#77653

X-original-commit: 372c5287213ae71ae59381150a190520f81cd420
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-10-06 12:39:43 +00:00
Sébastien Geelen (sge) e3a0a62622 [FIX] note, project, hr: collaboration opt-in on html fields
Activate the new opt-in option for the collaboration
on some html fields.

closes odoo/odoo#77160

X-original-commit: 504bbafc1d6183e7e8e0a326d1e90eddce6410d7
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-09-24 14:00:45 +00:00
Thibault Delavallée 2625d92b8b [IMP] mail, note: correctly name thread compute methods
Just cleaning those method names and removing unnecessary definition override
in note.

Task-2638444
PR odoo/odoo#76005
2021-09-08 07:56:03 +00:00
Zelong Lin 51ff8b09db [REF] *: convert JS files to ES6 modules
* = hr, hr_holidays, sms, snailmail, website_livechat, account_invoice_extract,
approvals, documents, mail_enterprise, calendar, crm, mrp, note, website_slides,
crm_enterprise, sign, social, voip

task-2510656

closes odoo/odoo#72712

Related: odoo/enterprise#19241
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-08-24 14:31:55 +00:00