summaryrefslogtreecommitdiff
path: root/addons/mail/static/src
AgeCommit message (Collapse)Author
2019-04-12[MOV/IMP] web, mail: update attachment widget and moved the common scss code ↵jpr-odoo
from mail to web with this commit, we have updated the attachment widget view same as like chatter attachment view moved the common scss code from mail to web for many2many_binary widget, which is used for attachment and update test case according to the widget Task ID: 1930087
2019-04-17[FIX] mail: Don't display message if only subtypeLucas Lefèvre
Currently, if a message does not have any tracking value, any attachment and no body BUT has a subtype with a description, the message is not considered as empty. The message subtype should not influence its "emptyness".
2019-04-15[IMP] mail: follower name in confirmation dialog on unfollowKaushalya Mandaliya
Also fixing test so that it uses an existing follower. Task-ID 1919551 closes odoo/odoo#31139 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-04-15[IMP] mail: improve document chat windowPrakash Prajapati
1. In the systray messaging menu, when hovering on a notification linked to a document chat, it now shows an "expand" icon. Clicking on icon opens the corresponding form view with the chatter. 2. Messages in a document chat window no longer show linked document in their header, as this is redundant with title of chat window. 3. Font size of words "on" and "from" in header of message in chat windows have been reduced in order to closely match font size of document link. Task-ID 1929169 closes odoo/odoo#30957 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-04-12[MERGE] forward port branch saas-12.3 up to 120359bf0c9Christophe Simonis
2019-04-10[IMP] mail: chat window send messagePierre Paridans
On a chat window on mobile, the keyboard can be closed by clicking in the conversation, then there's no way to send your message. This commit add a "send" icon in the input, after emoji and attachments icon. Actually the button was already present on mobile but hidden because of the class o_composer_button_send (used for multiple "send" buttons). This is fixed by restricting the hidding only to the desired button. It also removes an unused 1px top/bottom margin on the thread composer (wasn't visible as the buttons' background color is the same as their parent's background). Finally applying the brand-primary text color on the "send" button only when not being in a "mini composer" mode instead of globally. Task ID: 1943863 closes odoo/odoo#32568 Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-04-10[MERGE] forward port branch saas-12.2 up to 2694174b410Christophe Simonis
2019-04-09[MERGE] forward port branch saas-12.1 up to af313858b4bChristophe Simonis
2019-04-09[MERGE] forward port branch 12.0 up to c1c322dd401Christophe Simonis
2019-04-08[FIX] mail: chatter's button alignment and composer width on mobilePierre Paridans
Buttons "Send message / Log note / Activity" are on two lines instead of one. In addition there is a 1px glitch on the attachment icon. Also long attachment name on tiny screens (i.e. iPhone 5) breaks the composer layout: horizontal scrollbar appears. The two-line buttons effect is related to a change (fix) in Bootstrap 4.2 which removes the white-space: nowrap on .btn. It was originally introduced in Odoo through https://github.com/odoo/odoo/pull/29949. Reference: Original Bootstrap PR https://github.com/twbs/bootstrap/pull/27010 Task ID: 1946573 closes odoo/odoo#31939 Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-04-05[MERGE] forward port branch saas-12.2 up to f2be461f090Christophe Simonis
2019-04-05[FIX] mail: reload the record when uploading attachments if post_refresh is ↵Nans Lefebvre
set to always When post_refresh is set to 'always', the displayed record is entirely reloaded each time a message is posted in the chatter. However no such thing exists for when attachments are uploaded. This is of use e.g. when in the view there are fields that have attributes that depend on computed fields, themselves dependent on the record's attachments. One such case is the OCR. opw 1950403
2019-04-05[MERGE] forward port branch saas-12.1 up to f2d0995362cChristophe Simonis
2019-04-04[FIX] mail: fixes document viewer's url previewThanh Dodeur
This commit fixes the document viewer: the document viewer was altering the `type` key of attachment objects, this issue was causing matching errors in some cases. With this commit, the document viewer widget uses its own key `attachment.fileType` to store the information that used to override `attachment.type` closes odoo/odoo#32414 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-03-29[MERGE] forward port branch saas-12.1 up to c0cf4049b2aChristophe Simonis
2019-03-28[FIX] mail: fixes the download urlThanh Dodeur
Following the changes to the document viewer to make it more flexible for use in documents (89f20d2c297d99d4eb0ded8be78fbf86b8ec45d3), the download route wasn't changed accordingly. This commit fixes this issue so the download route is based on the model of the viewer. closes odoo/odoo#32207 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-03-21[FIX] mail: offline status iconAlexandre Kühn
Revision on https://github.com/odoo/odoo/commit/07a261db7196d3f7aa7d50d98575c5b6efca9242 When a user is offline, the icon status should be an outline bullet. However, since the commit above, the offline icon was a plain bullet. Also, the offline icon is hidden when displayed next to user avatar. Task-ID 1957966 closes odoo/odoo#31970 Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-03-14[MERGE] forward port branch 12.0 up to a26496b6e79Christophe Simonis
2019-03-14[MERGE] forward port branch saas-11.3 up to f5ab04ce509Christophe Simonis
2019-03-14[MERGE] forward port branch saas-12.1 up to ff1bca32f3aChristophe Simonis
2019-03-13[MERGE] forward port branch 11.0 up to c23d1186e7bChristophe Simonis
2019-03-11[MERGE] forward port branch saas-12.1 up to 2b3296bbf8bChristophe Simonis
2019-03-08[MERGE] forward port branch 12.0 up to c023d0784f2Christophe Simonis
2019-02-28[MERGE] forward port branch saas-12.1 up to f9d3b5b7dfeChristophe Simonis
2019-02-22[MERGE] forward port branch saas-12.1 up to 0f4abc5c228Christophe Simonis
2019-02-21[MERGE] forward port branch 12.0 up to 84143a34b31Christophe Simonis
2019-02-21[FIX] mail: keep input focus on emoji selectionAlexandre Kühn
Before this commit, when adding an emoji from the emoji menu next to the composer, the focus was not automatically set on the input. The input was correctly focused during the event handler of the clicked emoji, but the browser default behaviour applied right after was focusing out the input. Task-ID 1943770 closes odoo/odoo#31325
2019-02-19[FIX] mail: small UI changes with 'seen' iconAlexandre Kühn
- correctly align 'seen' icon - purple 'seen' icon closes odoo/odoo#31240
2019-02-19[FIX] mail: no traceback on receiving seen notificationAlexandre Kühn
Before this commit, when we post a message and someone has received it, there could be a traceback. Steps to reproduce: 1. Two users are logged in. 2. On one user: - open any app except Discuss - From systray messaging menu, click on "New messages" - Open Discuss - Post a message in a direct chat with other User. > traceback `Cannot read property 'getID' of null` closes odoo/odoo#31228
2019-03-27[IMP] mail: add a different layout for inactive followersJulien Giannone
When displaying the followers of a document, followers who are set as inactive will be displayed in a different layout than the active ones. The purpose is to mark a clear difference between active and inactive followers. Task #1957849 closes odoo/odoo#32084 Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-04-01[MERGE] forward port branch saas-12.2 up to 18c735361a6Christophe Simonis
2019-03-28[IMP] mail: add show more button on partner suggestion.XavierDo
When sending a message from chatter, a list of suggested partners appears on the top of the text area. With the previous commit, cc will be added to this list. This commit adds a show more/show less button in case there is more than 3 suggested recipients to display. Task: 1925001
2019-03-22[FIX] *: pass context in kwargs in rpc callsRaphael Collet
2019-03-25[MERGE] forward port branch saas-12.2 up to 230ad8c381eChristophe Simonis
closes odoo/odoo#32088 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-19[IMP] mail: bigger attachment previews in chat windowKaushalya Mandaliya
Purpose of the task is to increase the size of attachment previews in chat windows. Task-ID 1941601 closes odoo/odoo#31904 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-03-13[MERGE] forward port branch saas-12.2 up to c9f832d9f03Christophe Simonis
closes odoo/odoo#31790 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-06[REF] mail: stop using jQuery animateAaron Bohy
Problem is that jQuery animate uses jQuery deferreds, so it may happen in tests that we fold a thread window, and we have to wait for 2 (?) nextTick to see that the window is actually folded. We use a css transition instead, which produces the exact same result.
2019-03-06[REF] mail: adapt code after jQuery updateVincent Schippefilt
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-02-19[IMP] mail : autofocus items in autocomplete inputsmgh-odoo
With this commit, when using autocomplete inputs in Discuss or chat windows, the 1st item is automatically auto-focused. Example of autocomplete inputs: - Discuss: "Add or join a channel" in sidebar - Chat window: when clicking on "New Message" from systray messaging menu. As a result, we can use keyboard keys to navigate and select the desired item. Task-ID 1894447 closes odoo/odoo#30207
2019-03-12[FIX] mail: translate global variableMartin Trigaux
As the message was set globally in the file, a _lt was needed for a lazy translation Fixes odoo/odoo#26288 closes odoo/odoo#31761 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-02-14[IMP] Add employee profileRobot Odoo
[IMP] hr_*: introduce the employee profile ================================ ## General Purpose We want an 'Employee profile' gathering every data about an employee. The main form view is modified to become this employee profile. A user can also see his own profile through the Preferences menu. The new profile replaces the current Preferences view if the `hr` module is installed and the current user is linked to an employee. The Profile will show the employee of the current company. A user should be able to see and edit his own profile. *Problem*: Many fields on hr.employee are protected by `groups="hr.group_hr_user"`. Therefore, a regular user cannot see or edit those fields. This protection must be bypassed to allow read/write access to the regular user's own data. A similar mechanism already exists for `res.users` (for Preferences) The better (least worst) solution found is to reuse this mechanism by adding related fields on `res.users`. Pros: - Don't change security access on hr.employee - Don't implement yet another custom security layer, risking to add new security breaches - A lot of fields are added by other modules on hr.employee. It would have required to integrate them with the custom security layer. - Fields added by other modules on the user's preferences view (normal view, not the profile) are automatically included in the employee's profile view. - Allow the hr.employee form view to be different than the user profile accessible through the Preferences menu. E.g. add custom buttons only relevant to the logged in user such as "Request a leave". Cons: - Each field from hr.employee that you want to appear on its profile must be added as a related field on res.users - Those related fields must be added to user's preferences view (duplicate views) - They also must be added to `SELF_[READABLE | WRITABLE]_FIELDS` Note: When the front-end loads the views it gets the list of available fields for the user (according to its access rights). Later, when the front-end wants to populate the view with data, it only asks to read those available fields. However, in this case, we want the user to be able to read/write its own data, even if they are protected by groups (groups are kept on the related fields on res.users). The front-end need to be made aware of those fields by sending all field definitions. ## Changed modules ### hr_attendance Adds a stat button to this employee profile showing the number of hours worked last month. Remove the Boolean computed field `manual_attendance`. This field is just a shortcut to add/remove the employee's user in the "Manual Attendance" group. The checkbox is confusing on the employee's form and this should be done through the normal group management screens. ### hr_presence Display the presence status on the employee kanban template. The status is a colored chip which can be green (present), orange (to define) or red (absent). Currently, the presence status is only computed when accessing the report view. As this commits displays it on the employee kanban, it should be updated more frequently. The state should not be updated every time the kanban view is loaded since the computation is a bit heavy. Instead: add a cron to update status every hour. -> The status is accurate on the report view (status is still updated when loading the view) -> The status in accurate at 1 hour on the kanban view ### [ADD] hr_attendance_presence Bridge module between `hr_attendance` and `hr_presence`. This PR integrates `hr_presence` module in the employee profile and adds the presence status on the employee kanban view. But `hr_attendance` adds at the same place a similar status icon for checkin/checkout. This bridge module makes the status from `hr_presence` invisible as `hr_attendance` should be the main presence control mechanism. Also, this commit adds the ability (through a new setting option) for `hr_presence` to take into account checkin/checkout to determine the presence status. ### l10n_be_hr_payroll integration with employee profile [ADD] hr_skills: Introduce a new module for employee resumé and skills ======================================================= Purpose ----------- Consultancy companies need resumé and skills of their consultants. For big projects, they often need to send them to their customers. These information are also useful to statistics. Specification ----------------- ### New models #### `hr.resume.line.type` Types of resumé lines. e.g. *Experience*, *Education*, *Hobbies* #### `hr.resume.line` It is a line in the resumé of an employee. #### `hr.skill` Name of a skill. e.g *French*, *Python*, *Piano* #### `hr.skill.type` Skills can belongs to a particular type. A skill type has skill levels associated. e.g. *Languages*, *Dev*, *Music* #### `hr.skill.level` Levels available for a particular skill type. Each level has a label and a progress (between 0 and 100) associated. e.g. *Intermediary (20%)*, *Advanced (85%)*, *Expert (100%)* #### `hr.employee.skill` These are skills which employees have. It links an employee with a particular skill and level. e.g. Mitchell has an *Intermediary* level in *Python* ### Access Rights Only a `hr_user` can create/edit `hr.resume.line.type`, `hr.skill`, `hr.skill.level`, `hr.skill.type`. If employees are allowed to edit their infos (setting), they can also create/edit `hr.resume.line`, `hr.employee.skill` for themselves. ### UI Resumé lines are displayed, grouped by type, in a new 'Resumé' tab in the employee form. Resumé lines can be reordered (handle widget) Emloyee skills are displayed in the Resumé tab, grouped by skill type. [IMP] hr, hr_holidays, hr_expense: Change onchange parent_id behaviour ========================================================= Purpose ----------- When the manager (parent_id) of an employee changes, it doesn't always mean that other responsibles (Leave responsible, expense responsible, coach) should also change. Specification ----------------- When changing the employee's manager, the leave responsible, the expense responsible and the coach should be changed only if the field was not set or if the responsible is the previous manager. In that case, they should be set to the new manager. Otherwise, it means the field was most probably set manually and it should be left unchanged. Task 1913089 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr closes odoo/odoo#30502
2019-02-13[IMP] mail: allow tracking on groups protected fieldsLucas Lefèvre
Purpose ======= Currently fields with a `groups` attribute can't be tracked. Otherwise changes would be visible by all in the chatter, including users which normally don't have the access rights because they are not members of `groups`. Specification ============= Filter tracking field values according to the `groups` attributes. Users without the access rights should not see them. If a message is only composed of tracking values and the user doesn't have the rights to see them, an empty message should not be displayed.
2019-02-14[FIX] mail: enable seen feature only on direct chatsAlexandre Kühn
Revision on https://github.com/odoo/odoo/commit/844fb2b51ea7cfa557b19466c0a53dde19433e7a There were performance issue with the seen feature in multi- user channnels, therefore it has been disabled for them. As a result, only direct chats have this feature.
2019-02-12[FIX] mail: throttle batched `channel_fetched` RPCsAlexandre Kühn
Revision on https://github.com/odoo/odoo/commit/844fb2b51ea7cfa557b19466c0a53dde19433e7a The commit above added the seen icon on messages in a channel. However, since this feature, there was a performance issue when opening the systray messaging menu with several pinned channels: lots of RPCs are made, almost 1 for each preview in the messaging menu. The RPCs comes from the reception of the last message in the channel, to let the current user notify that he has received the messages in the channel. Those RPCs were made for each channel, thus the more pinned channels the more RPCs were made when opening the messaging menu. This commit fixes the issue by throttling and batching the RPCs. To do so, instead of letting the channel model handle the RPC `channel_fetched`, the mail service now handles it. This has the advantage to throttle the RPC globally and to batch the requests to notify that messages have been received on channels. closes odoo/odoo#31026
2019-02-11[MERGE] forward port branch 12.0 up to 6e8dff1952eChristophe Simonis
2019-02-13[IMP] web, *: remove explicit references to `session_id`Martin Geubelle
Since rev. odoo/odoo@f4d541e the `session_id` cookie uses the `httponly` flag so it cannot be accessed through client side script. But before this rev. the `session_id` was still provided by the server to the webclient (in session_info, mostly) and was stored and accessible. This made XSS injection more dangerous than they should be as it was very easy to steal the `session_id`. As the browser automatically set the `session_id` on every request to the server, the webclient shouldn't need any explicit reference.
2019-02-11[MERGE] forward port branch saas-12.1 up to 93d736e905eChristophe Simonis
2019-02-19[FIX] mail: chatter attachments without threadThanh Dodeur
This fix prevents the chatter and attachment box from assuming that there is a mail_thread on the record; Reason: if a chatter is set on a record that doesn't inherit mail_thread, the attachment box will generate errors. closes odoo/odoo#31206
2019-02-08[FIX] mail: translate activity nameMartin Trigaux
This commit fixes two untranslated terms in the activity view. From the cohort view, when clicking on a cell to see details, the title was not translated (missing _t call). The content was not translated either as the language was not present in the context. 36d45175b087 was a first step to fix it but while self.record contained data, self.record.getContext() returns an empty dictionnary (no context is set in the cohort view). When computing the context, check that it is not empty, otherwise, fallback on the session context. opw-1936855 closes odoo/odoo#30942
2019-02-07[IMP] mail: correctly patch mail status manager timersXavierDo
We want to avoid that a `setTimeout` started in one test has an impact on other tests. This is especially true with the status update loop. Since mail_service is used in multiple tests, the safest solution is to patch timeouts everytime we make a call to getMailServices. There is no need for an unpatch, the patch become the default behaviour until the page is refresh at the end of tests. It is possible to manually add the patch after calling `getMailServices` ``` this.services = mailTestUtils.getMailServices(this); this.timeoutMock = mailTestUtils.patchMailTimeouts(); ``` This can be usefull if we want to get the timeoutMock to simulate time changes. Task: 1856205