Commit Graph
802 Commits
Author SHA1 Message Date
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
Martin Trigaux c7bac3dee0 [IMP] *: make ir.model.data helper private
No reason to interfact with them directly in RPC
2021-08-10 13:49:04 +02:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Raphael Collet 1cd06491cf [FIX] note: broken kanban view
The view is broken because read_progress_bar() calls read_group() with
two groupbys in eager mode.  The method read_group() is overridden for
model `note.note` and does not handle that case: the returned result is
incorrect.  We modify the override to call the default read_group() in
that case, which eventually fails and makes read_progress_bar() fall
back on its naive implementation.

closes odoo/odoo#73839

X-original-commit: 6443e22feea914639f143a94a802b52a74a8ce19
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-07-16 11:16:34 +00:00
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +00:00
Fabien Pinckaers a65f6a5872 [IMP] various: clean most urls to odoo's website
Pages changed on odoo.com so let's update links.

closes odoo/odoo#72707

Related: odoo/enterprise#19239
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-24 15:14:29 +00:00
bit-odoo 800f9c499a [FW][FIX] mail, various: show only my activities shown through systray
Before this commit, suppose we have a scenario like below

  Task-A:
    Activity-1:
      name: Email ( Today )
      Assigned to: User-1
  Task-B:
    Activity-1:
      name: Email ( Today )
      assigned to: User-2
    Activity-2:
      name: Call ( Due in 3 Days )
      assigned to: User-1

When User-1 goes through the systray 'Today' filter shortcut he gets both
Task-A and Task-B in the list instead of only Task-A. Indeed currently
activities are not filtered based on current user with its deadlines.

However purpose of systray is to indicate activities current user has to
perform instead of global activities.

After this commit activities will be filtered based on deadlines as well as the
current user. In order to achieve this behavior we needed to pass a domain like
[
   ('activity_ids.date_deadline','=', fields.Date.today()),
   ('activity_ids.user_id','=', 1)
]

And for that purpose we introduced a non-stored compute field with a search
method.

Task ID-2438822
COM PR odoo/odoo#72219

X-original-commit: f4eaf4d8fb2f97240201104dcd4fc7e2674bce02
2021-06-21 07:51:00 +00:00
Leonardo Pavan Rocha c53724ebc3 [IMP] *: adds generic user avatar
Description of the issue/feature this PR addresses:
It is currently quite difficult to differentiate users. Most of the time, people
don't take the time to upload an actual avatar so everybody looks the same. This
PR generates a custom avatar with the users initials and random color to
differentiate them. For res.users, res.partner and hr.employee, image fields now
hold the binary image and avatar are used to show the image or svg.

Current behavior before PR:
Avatar had only random colors and was being saved in database, being inefficient

Desired behavior after PR is merged:
A new mixin defines image fields and in case no image is set, it generates an
SVG image with the user's initials and random color.

closes odoo/odoo#69819

Task: 2404630
Related: odoo/enterprise#18199
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-01 14:36:23 +00:00
Martin Trigaux 41d8b8cf68 [I18N] *: export saas-14.3 source terms
closes odoo/odoo#70673

X-original-commit: bcb9ff784e44462384b0a43a0a23eed7a1111bc5
Related: odoo/enterprise#18269
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-05-11 12:28:28 +00:00
dht-odoo 12469ef4d3 [IMP] various: improve the sequence of menu items
- Currently all menus are out of order in app switcher.
- For example, Sales app is 16 menu away from Accounting,
  Social Marketing app is 25 menu away from Email Marketing, etc.
  So, all menus should be reordered.

- This commit will reorder the menus of the app switcher in order to reduce
  the distance between correlated applications,
  and bring the most common apps upward.
- And in this commit we have left gap of 5 subsequent sequence for further new menus.

PR: #69984
TASK ID: 2513082

Related: odoo/enterprise#17989
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-07 05:54:18 +00:00
Antoine Guenet a502bb7223 [FIX] web_editor, note: autofocus the editor on load note form view edit
On creating a new note, the focus was automatically set into the "tags"
field. This was inconvenient and was replaced with an autofocus on the
note itself so we the user can immediately start typing.

closes odoo/odoo#70195

X-original-commit: 8fe89c5ebc138cb517938dbd6d975b8bec4eaf4d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-04-30 15:23:36 +00:00
Qiuyu (QHO) bd67479316 [REF] mail, mail_bot, im_livechat, *: convert JS files to ES6 modules
task id: 2487514

closes odoo/odoo#69376

Related: odoo/enterprise#17749
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-04-19 13:33:35 +00:00
Antoine Guenet 101a30d16b [IMP] web_editor, note: make note pads fill their container
X-original-commit: 1f9e2f37711a6da4b9f678c6f0750f8435ef948d
2021-04-16 16:54:30 +00:00
Antoine Guenet 6b01724c84 [IMP] web_editor, note: make notes fill their container
X-original-commit: 05d6f0cfdc35842c5847db70475da5e7c982ba06
2021-04-16 16:54:28 +00:00
Julien MougenotandSimon Genin 03641610c2 [REF] *: convert all modules to new asset system
Conversion of all modules to the new manifest assets declaration.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:18 +02:00
Thibault Delavallée 305af13279 [REF] mail, note, test_mail: remove now unused message_channel_ids field on MailThread
RATIONALE

Channel model is a mail.thread enabled model behaving strangely with followers,
notifications and discuss. Its code should however be simplified to be more
self contained and avoid unwanted side effects on other models.

SPECIFICATIONS

Remove ``message_channel_ids`` field from ``mail.thread``. As we removed
support of (un)subscribing channel-based followers there is no need anymore
to have a field to access them. We can now safely remove this field as it
has no use anymore.

LINKS

Task ID-2070632 (main task)
Task ID-2419762 (followup task)
COM PR odoo/odoo#62859
ENT PR odoo/enterprise#15172
UPG PR odoo/upgrade#2005
2021-03-17 18:16:13 +00:00
qsm-odoo e5572c317a [REV] web_editor, *: remove Jabberwock
*: barcodes, mail, mass_mailing, note, test_website, web, web_tour,
   website, website_blog, website_event, website_form, website_forum,
   website_mail_channel, website_mass_mailing, website_profile,
   website_sale, website_twitter, doc

New solutions are being investigated in master. For the moment, it seems
better to remove Jabberwock to unlock difficult forward-port between
14.0 and 14.1/master, until we decide what to do once and for all in
a later master. We may un-revert this later but that would be way easier
than reverting Jabberwock in a few months.

This was done as safely as possible by removing any commit related to
Jabberwock, then resolving conflicts, then reforcing commits from 14.0
that were hugely adapted for 14.1/master, then forcing the whole diff
over a rebased 14.1/master. The only possible miss (other than me making
a mistake) would be commits that were not forward-ported to 14.1 thanks
to Jabberwock handling the issue on its own (I know we had such commits
in website, which I manually included in this revert, see below).

For reference:

Commits which were reforced to their 14.0 version:
- https://github.com/odoo/odoo/commit/1a916fc2362c0b006460d94a219366ade1cce058
- https://github.com/odoo/odoo/commit/fd9e58a675bb7ec1bf97cb77b21b3c65369d51fe
- https://github.com/odoo/odoo/commit/bdfddace29b16404c06a7ebfc0cc242463a0e768
- https://github.com/odoo/odoo/commit/42b3ad10e0b32b7fc72f801e2c67d6baf938c566
- https://github.com/odoo/odoo/commit/710784da1f02d45cbe898da426ba7e2ac63dc711
- https://github.com/odoo/odoo/commit/597585c9b8b1350bcfd84e8433ea6c82060bcc3d
- https://github.com/odoo/odoo/commit/333a9124608ff655bd9ad5e63044a5cb7ef9c636

Commits that were not forward-ported to 14.1/master and now are:
- https://github.com/odoo/odoo/commit/55ff2d971b672dec5f103215be39101c88856b6c
- https://github.com/odoo/odoo/commit/ebbb3de1e5f363689a5ba1647bb4c26416e42d5b

+ Adapt this forward-port: https://github.com/odoo/odoo/pull/60976 (as
  it was simplified for non-stable master version relying to the
  Jabberwock implementation and now needed to be adapted to the
  summernote implementation).
  See `!$el.data('oe-expression') && $el.data('oe-xpath')`

+ Revert https://github.com/odoo/odoo/pull/60477 and reforce original
  14.0 fix https://github.com/odoo/odoo/commit/746bf53b4aecfc601f0581a948d7cb7153812c82

Note: this also means that any good refactoring that was done by the
Jabberwock-related commits is lost for now. Once the revert reaches
master, I'll try and restore what we want from those commits. Here
are their references (but obviously they have the opposite conflicts
than those resolved during this revert):

e766842a92b6 [REM] web_editor,website: empty summernote files
08c94c986e09 [REF] web_editor,web: adapt to new jabberwock editor
1546c1b74713 [REF] mass_mailing: adapt to new jabberwock editor
fd0b963c6028 [REF] website: adapt to new jabberwock editor
0113d05c6c94 [ADD] web_editor: add new Jabberwock editor lib
d0c88a396493 [FIX] web_editor: don't change background color out of the website editor
d52d3d67d4e1 [FIX] web_editor : better icon in text style dropdown
61cb2f0d21da [FIX] web_editor: should not ask if want to leave the page twice
c42012b863b5 [FIX] web_editor: trigger a resize when use the mobile preview
d934d05d6e39 [FIX] web_editor: need to build the snippet before commit it into vDom
495bea924745 [FIX] web_editor: remove box shadow on the #wrap container
bffb5612e689 [ADD] field_html: add resizer in most field_html
f3c94e40cccf [IMP] web_editor: update Jabberwock library to commit 41e4063
cc87dea3ef32 [FIX] web_editor: update header change position to work with JW
5d9b25f66704 [FIX] web_editor: do not insert chars around step icon on click
70d3f0e4630c [IMP] web_editor: update Jabberwock library to commit 0bd94881
a57f13891f82 [FIX] web_editor: open media modal in appropriate tab on dblclick media
5b7537397e08 [IMP] web_editor: update Jabberwock library to commit a7ba7c34
a8d7ec235eeb [FIX] web_editor: adapt iframe Qunit test to new editor
5f794eac7209 [FIX] mass_mailing: hide all panels on show themes
551d45641d19 [IMP] website: remove unused reference
10580e1c102f [IMP] wesbite: add comment in tour
c17049f6b764 [FIX] web_editor: Fix description toggle in pricelist snippet
18a428e854b1 [IMP] web_editor: update Jabberwock library to commit 43a10003
58a161c645a5 [REF] web_editor, website: use editor helper setClass
62dd0bd3bc66 [FIX] web_editor: properly deactivate snippets and reactivate the last
99eebcaa34cb [FIX] web_editor: disable snippet in preview mode on mouse leave options
a84216932958 [FIX] web_editor: fix the image gallery snippet
f8dd4ea3e7d5 [FIX] web_editor: fix shadow selector for Safari
e50a4f3a16de [IMP] web_editor: update Jabberwock library to commit de13ed7e
4a2718f7a5ba [FIX] web_editor: ensure dom is properly cleaned at end of save test
03684c004a4e [FIX] website: ensure reset of bg-image on add bg-video
d63397159708 [FIX] web_editor: fix image remove from images wall
82fa5142f1a5 [IMP] note: restyle note without sheet or resizer
8b9f1ce603d5 [FIX] web_editor: properly mock createWysiwygIntance (sic) in tests
fc2183b66305 [FIX] web_editor: image overlay did not update with changes
cd0d2f5791cd [FIX] web_editor: add color preview to color picker
28a168172454 [FIX] web_editor: restore removal of spinner
67c90dd3b946 [FIX] website_forum: properly initialize editor
920dfe2a430a [FIX] website_forum: better css in the JW toolbar
43f33fd651af [IMP] web_editor: update Jabberwock library to commit 6853b60
71246c92f8de [FIX] Web_editor: table options button should be inside the toolbar
12b9e5916692 [FIX] web_editor: properly update the image options on replace image
e889cf8583da [FIX] website, website_sale: properly save filter id of dynamic snippets
e0fd11e36e45 [IMP] web_editor: update Jabberwock library to commit 4b2c903b
8f2b7ba35614 [FIX] web_editor: properly stop snippet option changed event propagation
a30c2c4105c7 [FIX] website: fix megamenu snippet editor behavior
312091cf822b [FIX] web_editor: fix overlay that is not reappearing
9f1d03dda613 [FIX] web_editor: table picker not fully displayed
814ddada6124 [IMP] web_editor: remove message before leaving page if editor is destro
4f38e26af7da [FIX] web: allow saving copyright footer
01e947b6123b [FIX] web_editor: only save translations that changed
103676072c50 [FIX] web_editor: prevent traceback on open crop dialog
5844ff66d4a0 [FIX] web_editor: apply image crop in jw on save dialog
1b435652e4a0 [FIX] website_forum: ensure media modal opens on click button
4f4a6ca0b8ac [FIX] web_editor: ensure valid default html value
51e22026ac7b [IMP] web_editor: update Jabberwock library to commit ab1184f8
2413fa19be0e [FIX] web_editor: Qunit test properly wait for editor stop
aa89e1ea3e97 [FIX] web_editor: properly save view blocks with an id
e2e90b53992e [FIX] web_editor: ensure language selector is non editable
0efd72089d5c [IMP] web_editor: clean useless lines
f54dfc7631f9 [IMP] web_editor: remove useless comment
3995ab1b84f2 [IMP] web_editor: update Jabberwock library to commit b8d73691
0834b1e5740a [IMP] web_editor: withDomMutations
f1459fb7b45c [FIX] web_editor: fix non-deterministic error in QUnit wysiwyg tests
6e8acc6c8cc7 [IMP] web_editor: update Jabberwock library to commit 3bbb175c
18a0c95d51cb [FIX] website, web_editor: #wrapwrap in body
4686a92e742c [FIX] website_form: allow edition of success message
78cc4da075cc [FIX] web_editor: allow edition of branded nodes only
bcffa7353448 [FIX] web: dialog should not use field value footer items
67ff56e14746 [FIX] web_editor,website_mass_mailing: display the popup preview
3cb9bea50c20 [IMP] web_editor: update Jabberwock library to commit a20492ea
518f03e6f1c9 [FIX] web_editor: use withIntangibles to find ZoneNode
d0ad6a568f49 [FIX] website: move sidebar out of theme
d690f5da13ea [FIX] website: properly save popup id
43b3433df3e6 [FIX] web_editor: fix non-deterministic error in QUnit wysiwyg tests
4ee8f4dedc30 [FIX] web_editor: prevent deadlock when removing child snippet of popup
850be198ef6d [FIX] web_editor: prevent traceback on reposition background image
4c3eaba41f5d [FIX] mass_mailing: adapt tour to the new editor design.
496d3ea272ed [FIX] web_editor: properly position sidebar scrollbar
5be4de703074 [FIX] web_editor: Show the toolbar when select the text in forum edition

closes odoo/odoo#63768

Related: odoo/enterprise#15458
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-12-24 13:36:49 +00:00
Krina Oza b6e1261b37 [IMP] note: Default filter should be on "Today or Late Activities"
Purpose of the task is, to remove the behavior inconsistency with
"scheduled activities" on notes with other modules.

Currenlty, For all the other models, when clicking the line in the
"activities" top menu, you arrive in a kanban view which is filtered
to only list objects which actually have scheduled activities on them,
for notes it displayed all the user's notes regardless of any activity
scheduled or not.

So in this commit, Make the behaviour consistance with other modules and
remove the override of the method to open the all the notes.

closes odoo/odoo#60777

Taskid: 2312083
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-10-27 09:43:46 +00:00
Antoine Guenet 1547ea1985 [IMP] note: restyle note without sheet or resizer
This change of style is a special request from FP: full width, full
height, no <sheet>, no resizer.
I did end up using a <sheet> and restyling it specially for note because
the styles that allow us to have the note next to chatter is too
intricately linked to the style of the sheet in form view to make it
safe to remove the sheet. Indeed, fully removing the sheet implied
duplicating a lot of css from community and enterprise alike. This way
is the least intrusive even though semantically unsound.

closes odoo/odoo#61405

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2020-11-06 13:34:44 +00:00
Kamesh Patel 1d0ecb31fa [FIX]*: clear breadcrumb when redirecting to activities from systray
* mail,calendar,note

Before this commit:

When accessing activities from the systray, any existing breadcrumb-item should
be clearer.

After this commit:

Clear breadcrumb-item when access activities from the systray.

Task-2342246

closes odoo/odoo#59396

X-original-commit: 6dd181c789d22f99073fcd0a9b0fa2edccdfe0fc
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-10-07 11:17:38 +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
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
Sébastien Theys c2918c139b [IMP] web, *: improve mock server and replace most mail mockRPC
Improve mock server:

- add support for mocked `fetch`
- add support for `active_test`
- add support for x2m `in` in domains
- add support for default values computed from a function
- implement a more natural "next id" compute
- allow initial data without ids
- ensure write and x2m commands integrity
- improve bad data/bad commands error messages
- always warn for failing RPC, not only in debug mode
- fix all existing tests that had inconsistency data

Other changes done in mail (or dependents) that are not just related to tests:

- remove `direct_partner` from formatter result
  ->`correspondent` can be computed from other keys, especially `members`

- fix `livechat_visitor` convertData
  -> only process if there is value

- add `current_partner` and `current_user_id` as `init_messaging` result
  -> easier to mock than session

- remove usage of `need_moderation`
  -> that was just a search indirection to `moderation_status`

- adapt `partner_id` -> `res_partner_id` key in `_notification_format`
  -> to be consistent with field name

- add name in result of `mail_partner_format`
  -> sometimes display_name is not the same

- remove usage of `is_moderator`
  -> that was just an indirection to `moderation_channel_ids`

Enterprise counterpart: https://github.com/odoo/enterprise/pull/11523
task-2287171

closes odoo/odoo#55854

X-original-commit: 7ba3fecb3377a720d1eb70e7515a0c45da73836d
Related: odoo/enterprise#12391
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-13 16:26:35 +00:00
Xavier Morel 37a7aed189 [IMP] core: allow both action & children on root node
Reported by VFE, odoo/odoo#54564 missed one of the use cases in menus:
normally a menu can have *either* sub-menus or an action (aka only
"leaf" menu items can have actions), however there's an exception for
root (application) menus: those can have an action, which is used as
the application's action, that is, what gets executed when opening the
application itself.

* root menus were already special cased (to allow a ``web_icon``),
  expand this to allow both action and submenus
* modify the alternatives -- submenu-items and menuitems with a parent
  -- so they keep the behavior of allowing *either* an action or
  children

closes odoo/odoo#55144

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-07-30 05:37:05 +00:00
Csaba Tóth bc81853ba5 [IMP] note: Note module demo adjustment
Add checkboxes to some of the Note module's demo datas
Instead of an old text-only list, take advantage that the notes
contains HTML.

closes odoo/odoo#49368

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-06-25 05:23:31 +00:00
3fea5b2136 [REF] mail, *: refactor messaging with OWL
This commit is a significant rewriting of client-side discuss, chatter,
chat window, and messaging menu using OWL. The behavior should be broadly
the same, with some slight functional changes here and there.

From a technical standpoint, the code of messaging is mainly organized in 2
main groups of modules:

- models, which are logical entities that depict the client-side state of
  messaging as a whole.
- components, which are in charge of displaying information from models.

This refactoring also introduces new JS guidelines regarding folder structure
(/static) and naming rules for JS modules.

Community PR: https://github.com/odoo/odoo/pull/39023
Enterprise PR: https://github.com/odoo/enterprise/pull/6249

Task-1914207

This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier,
with the precious help of Lucas to speed it up towards the end.

closes odoo/odoo#39023

Related: odoo/enterprise#6249
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Alexandre Kühn <aku@odoo.com>
Co-authored-by: Julien Giannone <jgi@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Co-authored-by: Xavier Dubuc <xdu@odoo.com>
2020-06-15 18:12:21 +00:00
Aaron Bohy b4ba0fc340 [FIX] *: adapt tests to env rework
This commit adapts tests following recent changes on the helpers.
The main change is that addMockEnvironment (and all functions using
it) are now async, as they need to wait for services to be started.
2020-06-12 09:47:48 +00:00
shs-odoo 17ebd2e4bd [IMP] various: Remove depricated activity_exception widget from tree view
Purpose of the task is to remove the activity_exception widgets to
avoid redundancy. We have already added the activity on some list view
so activity expection widget on those list view is useless.

So in this commit, remove the activity_exception widget from
following tree view
 - hr.expense.tree
 - hr.expense.sheet.tree
 - note.note.tree
 - project.task.tree
 - purchase.order.inherit.purchase.order.tree
 - sale.order.tree

closes odoo/odoo#52109

Taskid: 2266720
Closes: #52109
Related: odoo/enterprise#10846
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-29 04:25:35 +00:00
Yannick Tivisse 45f3659305 [IMP] project,...: Improve list views with new widgets
Purpose
=======

Task 2195254 introduced many wonderful widgets to pimp the list view.
This task aims at implemeting them into the Services apps: project,
timesheets, helpdesk, expense, planning and field service.

Remaining days: https://drive.google.com/file/d/1o4Wn47445GxLqBkw-ifH9MgtFU_437xz/view
Avatar: https://drive.google.com/file/d/1yDwJWP0MZCUKZbqCa8hte1ziVTYRMMtb/view
Activities: https://drive.google.com/file/d/1e_rXH50eZq4zY2HOzw7_pfgiD39SoRIl/view
Field-specific decorations: https://drive.google.com/file/d/1WFnqJ-jkyDFftRHxWW4bgomoWrOpOuaY/view
More control on buttons

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

You will find below a list of which widgets to apply to which fields by
model. Some changes have to be done in the form/kanban views as well.

1) project.task

remaining days -> date_deadline -> list + kanban + form views
hide this field if is_closed is true
avatar -> user_id -> list view
activities -> 'next activity' field to be added -> list view
field-specific decorations
https://nimb.ws/ACewrY remove the current orange/red decorations we have
if planned_hours > 0, display the remaining_hours field in (list view):
red if progress is > 100%
orange if progress is between 80% and 100%
green if progress is <80%
display unit_amount in red if > 24:00 -> form view

2) rating.rating

display the rating in:
green = satisfied
orange = not_satisfied
red = highly_dissatisfied
list + form views

3) project.project

avatar -> user_id -> list + form views

4) account.analytic.line

avatar -> employee_id -> list view
display unit_amount in red if > 24:00 -> list + kanban + form view
https://nimb.ws/eIWa7E merge the timer and duration fields together

5) helpdesk.ticket

avatar
user_id -> list view
employee_id under timesheet_ids -> form view
remaining hours -> sla_deadline
activities -> 'next activity' field to be added -> list view
field specific decoration -> display unit_amount in red if > 24:00 -> form view

6) hr.expense

avatar -> employee_id -> list view
activities -> 'next activity' field to be added -> list view
badge -> state -> list view
draft = blue
reported = green
approved = green
done = green
refused = red
combine the unit_amount and the currency_id fields (see the total_amount field for reference) -> list view (idem for the expense_line_ids one2many on hr.expense.sheet)
display the total_amount in bold
move 'company_id' before 'amount'

7) hr.expense.sheet

avatar
employee_id -> list view
user_id -> list view
activities -> 'next activity' field to be added -> list view
badge -> state -> list view
draft = blue
submit = green
approve = green
post = green
done = green
cancel = red
display the total_amount in bold
move 'company_id' before 'amount'

8) planning.slot

avatar -> employee_id -> list view
decoration
display the allocated_percentage field in red if > 100% -> list + form view
display the forecast_hours field in red if > planned hours and if planned_hours > 0 -> form view
display the effective_hours field in red if > forecast_hours and if forecast_hours > 0 -> form view

9) misc

calendar.event -> avatar -> user_id -> form view
mail.activity.type -> combine the delay_count and delay_unit fields together -> list view
note.note -> 'next activity' field to be added -> list view
crm.lead.mining.request
combine the lead_number and lead_type fields together -> list view
display the name in bold
badge -> state
draft = blue
done = green
error = red
planning.slot.template -> display the duration field in red if it is = 0

closes odoo/odoo#51271

Taskid: 2248351
Related: odoo/enterprise#10605
Related: odoo/upgrade#1252
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-25 12:44:14 +00:00
Andrea Grazioso (agr-odoo) 4e5941624b [FIX] note: fix follower assignation permissions
- Have a standard V13 with note
- Connect as Admin A
- Create User U1 and U2 with password and email on partner
- As A, create a note N
- Add U1 as a follower
- Login as U1
- Open N and add U2 as a follower

We have a custom record rule that provide access to notes if
you are in the "message_partner_ids" of the Notes.
An override to the field in notes to compute as sudo fix the issue

opw-2223632

closes odoo/odoo#51082

X-original-commit: e1fbac466ff6c3abfd0de5760f43a3ff2e5cdb90
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-12 08:26:10 +00:00
Victor Feyens e8f3146ff3 [IMP] note: create users in batch
When note is installed, res.users are created one by one because its
create override isn't adapted to work in batched.

This commit ensures the create override is adapted to ensure users are
still created in batch when note is installed.

X-original-commit: 1cf7e1ac5dbf174e756a01f9b75abd09b168e52a
2020-04-30 12:33:42 +02:00
Julien Mougenot 48ee7272b6 [IMP] *: adapt qunit suite bundle inheritance
Since the test assets bundle name has been changed and its structure is different,
the inheriting assets need to be updated.

Task 2002399
2020-04-07 14:40:53 +00:00
Tiffany Chang (tic) 1ac243c21c [IMP] various: Replace incorrect use of "edition"
"Edition" is a French-English false friend word. "Edition" in English
means "version" whereas "edition" in French means "editing". This commit
updates user facing strings/documents that incorrectly use "edition" instead
of "edit" or "editing". Attempts were made to clean up English around
"edition" usage so please excuse any errors from lack of context
knowledge. Code comments and names incorrectly using "edition" were NOT
updated.
2020-03-31 10:31:35 +00:00
Victor Feyens a3ded9043d [IMP] *: declare ir.rule in noupdate
ir.rule are default values but can be customized based on the
company's policy and needs.
This is typically a record that is in noupdate as should be
customization-friendly.
2020-03-20 16:21:25 +01:00
Victor Feyens 532c083cbb [IMP] *: remove global field definition in ir rules xml
It is a computed field, there is no need to manually set its value.
2020-03-20 16:15:40 +01:00
Krupal Oza 5e4ddfaacf [IMP] note: Improve notes kanban card layout
Purpose of the task is to fix layout of kanban view in notes.

Currently the kanban view of the note is having bad layout of activity.
The activity is shown under the note and at left side.

After this commit, it will fixes the layout by setting the
float-right and mr4 in div of activity_ids and remove unnecessary
div of it and also adding the spaces above the images.

closes odoo/odoo#44445

Taskid: 2186292
Closes: #44445
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-20 09:05:11 +00:00
Yannick Tivisse 4c291e3f70 [IMP] base: Display searchpanel on ir.module.module views
Purpose
=======

The current kanban view is messy. It is difficult to identify which
apps are installed or not. The user can completely miss a module
that might have interested him. A search panel would make things way
more readable.

closes odoo/odoo#44401

Taskid: 2181557
Related: odoo/enterprise#8144
Related: odoo/upgrade#879
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-05 14:03:45 +00:00
Victor Feyens d4e0fe018d [IMP] *: use ref= instead of eval="ref(' in xml field tags.
* Code cleanup
* Avoid a safe evaluation of the field value when loading those records.

closes odoo/odoo#44883

Related: odoo/enterprise#8283
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-02-11 13:07:06 +00:00
Xavier Morel 11f2dde662 [IMP] note: denoise install logs
Log that note columns have been created for new users as debug rather than info
2020-01-21 06:56:14 +00:00
Martin Trigaux b5db1c61ee [I18N] *: export saas-13.1 source terms
Without demo data, for the odoo-master transifex project

closes odoo/odoo#41935

X-original-commit: dab7670b73506fb3a835695ee3bd735e0c5e5c2b
Related: odoo/enterprise#7287
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-16 12:49:55 +00:00
Martin Trigaux b7d91ba25b [I18N] *: remove es_AR translations
Followup of a425695e
The terms were back in 12.0
Courtesy of Juan José Scarafía

closes odoo/odoo#41624

X-original-commit: 85d0c7001a997748d7691205bbb8d066597591a5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-10 10:00:18 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00