Commit Graph
40 Commits
Author SHA1 Message Date
Aaron Bohy f7ddaf4de9 [FIX] mail: activate test of Discuss in mobile
This test couldn't be executed within the classic JS web suite,
because it relies on mobile specific files that are rejected in
desktop. Now that a second web suite (for mobile) has been
introduced (see 9bc500948), we can activate this test.
2018-01-16 09:16:29 +01:00
Christophe Simonis b42b9c936b [MERGE] forward port branch saas-16 up to 3b7bf3a4b8 2018-01-12 18:15:23 +01:00
tbe-odoo ea90491789 [FIX] mail: m2m tag email test fixed
- The test for m2m tag email was not expecting an array as the result.
2018-01-11 10:12:06 +01:00
Christophe Simonis 6e25eb9b05 [MERGE] forward port branch saas-16 up to 4c410ee6a1 2018-01-09 17:03:07 +01:00
Nicolas Lempereur bc8f7a44d6 [FIX] mail,web: adapt email in m2m tags b92aaf1
Adapt commit b92aaf1 for framework changes in saas-16.

That commit made Many2ManyTagsEmail widget display name_get gotten
dynamically. This allow to have 'show_email' context key working and
having the email displayed.

This commit use the new views (as of saas-16) to do the same change.

opw-801558
fixes #21812 fixes #21523
closes #21969
2018-01-04 18:09:56 +01:00
Martin Geubelle e63c550ed1 [FIX] mail: display chatter inside the sheet
Before this revision, it was not possible to display a chatter inside a <sheet>.

As the chatter is reused (when switching in edit, records, etc.), it is detached
(to keep its handlers) before updating the form $el.

The problem here is that the chatter was detached in `_updateView` from
`$form.contents()` where the chatter is a root element ; when setting the form
view html, the chatter was thus still present. This was thus only working
correctly if the chatter was a direct child of <form>.

To keep it displayed in all cases, we now detach it at the chatter node
rendering.

Closes #20032
2017-11-29 11:47:44 +01:00
Christophe Simonis 179abc3c5e [MERGE] forward port branch saas-16 up to 11ff01af9b 2017-11-17 13:40:18 +01:00
Martin Geubelle ab900bb62a [FIX] mail: keep model informed of new messages
Do not forward-port this after 11.0

After sending a message, if one switched in edit mode in the form view, the
created message disappeared.

This is because the model is not aware of messages (they are created through
their own routes, message are not handled as other one2many fields with commands)
and the widget was reset with a new datapoint instance when switching in edit mode.

In this rev. we keep the model informed of the new messages by directly writing
the message ids in the datapoint.

Note that the includes on FormController and BasicModel are one in the
form_renderer.js file to fix this issue in existing database without adding
files. Another revision will be done in master to add the correct files.

opw-781353
2017-11-17 10:47:49 +01:00
qsm-odoo da11387587 [FIX] web, mail: complete commit https://github.com/odoo/odoo/commit/87f1e360a89eb7617d5fd60cad58a143bea441df
Tests are overridding the `config` object directly but this was wrongly
done. Also, tests had to be adapted to set the `isMobile` value
correctly.
2017-09-29 16:39:06 +02:00
qsm-odoo 2506a9564b [FIX] web: review UI tag color system
- Kanban colors and tag colors are now the same
- Tag color 0 (default) is now back to be the invisible kanban one
- Same colorpicker for kanban and tags
- Define correct number of colors (12 not 13)
- Color 0 should be a neutral one (gray)
- ...
2017-09-28 13:29:56 +02:00
qsm-odoo 7b965a9673 [FIX] mail, web: chat window and emojis
- Fix several contexts where the emoji popover was hidden by a webclient
  element (control panel / ...). To solve this bug, the design has been
  improved to not use popover but instead use custom design (better
  integrated with new chatter design)

- Chat window is now still usable when a modal is opened

- Simplify chatter LESS
2017-09-20 15:03:56 +02:00
qsm-odoo 26e079f246 [FIX] mail: make clicking on chat window's emoji button properly work
Before this commit, clicking on the button opened the emoji popover
then closed it immediately. This was because of a handler which said
that clicking on any part of the composer should focus the input
element. This is indeed required when the UI is blocked (thanks to
the `blockUI` function). Solution is to not force this focus when
clicking on any composer's button element.

To prevent breaking those two behaviors (blockUI focus and emoji), two
tests were implemented.
2017-09-20 15:03:56 +02:00
Aaron Bohy 7a91d87614 [IMP] im_livechat, mail: Discuss UI in mobile
- Extract mobile specific code for the client action to a specific
  file
- Massive clean of less rules
- Unify channels preview of the systray dropdown and the mobile UI
  of Discuss
- Ensure to only load the last message of each channel in mobile,
  as this is not used in desktop (unless the user opens the systray
  menu)
- Make livechat available in Discuss mobile UI
2017-09-15 15:25:06 +02:00
Dharmang Soni 4685e4bc7f [IMP] mail: improve Discuss UI for mobile devices
- Brand new UI for Discuss client action (with tabs for Inbox,
  chats, channels...)
- In mobile, conversations always open in Chat Windows
- Chat window UI improved (both mobile and desktop)
- Channels preview (used in the systray menu, and now in the mobile
  UI of Discuss) improved
- Other minor less tweaks
2017-09-15 15:25:06 +02:00
Kishan Gajjar c1fa3b8ab3 [IMP] mail: pdf preview and small improvement
When you click on pdf it should show preview of pdf.
Don't show the previous/next arrows if there is only one attachment.
2017-09-13 12:46:52 +02:00
Christophe Simonis c5f680200c [MERGE] forward port branch saas-17 up to d08b4407be 2017-09-12 12:09:11 +02:00
Tejas Shahu 17e432d9a6 [FIX] mail: systray: next activity not closed on click
Before this commit, when you clicked on the dropdown, the action
was executed but the dropdown wasn't closed.
This issue was very annoying on mobile because the dropdown is in fullscreen
and we couldn't see the result of the action.

Now, we removed the "stopPropagation" which stops the bootstrap event
to close this dropdown.
2017-09-08 11:12:36 +02:00
Christophe Simonis d5382abeaa [MERGE] forward port branch saas-17 up to b8dd34fcbb 2017-09-06 17:40:59 +02:00
Christophe Simonis b8dd34fcbb [MERGE] forward port branch saas-16 up to 64d56995e0 2017-09-06 13:29:05 +02:00
jpr-odoo 46699c5214 [IMP] mail: Add a preview popup for attachments
Purpose
=======

The goal is that when you click on an attachment, you should get a preview of it and then you get the possibility to download it.
2017-09-05 15:52:15 +02:00
Aaron Bohy 0694caabfb [FIX] mail: FieldMany2ManyTagsEmail: apply changes
The FieldMany2ManyTagsEmail requires that the records in the
relation have an email address set. However, it didn't take into
account the changes that might have been done on the field's
value (i.e. the check wasn't applied on subrecords that just had
been added to the relation).
2017-09-01 14:29:55 +02:00
Christophe Simonis 71f370903c [MERGE] forward port branch saas-16 up to 600d015938 2017-08-30 18:18:59 +02:00
Aaron Bohy d93726f9ac [FIX] web,mail: only send fields in view for onchanges
The field 'display_name' is automatically added to the list of
fields to fetch when fetching a record. Before this rev., its
value was also sent alongside the fields in the view for onchange
RPCs. It shouldn't: only the fields in the view should be sent.

It produced a weird bug in the res.partner form view: open a
contact (company), add a sub-contact, save -> the display_name of
the contact was then '' (and 'Contacts' was displayed in the
breadcrumbs instead of the display_name of the opened contact).
This is because 'display_name' was sent to the onchange, which
returned '' as value (because of another bug python side). So as
it's value changed, when saving, the new display_name was sent to
the server (even if this field was actually readonly).

Before this rev., we also always fetched 'display_name' when
fetching list of records (read or search_read). This wasn't a bug
per se, but it might be a computed field, and it isn't necessary,
so we stop fetching it in that case if it isn't in the view (as
it was done in saas-15, before the new views).
2017-08-29 10:38:36 +02:00
Aaron Bohy f24c83efcc [FIX] web,mail: keep changes when scheduling an activity
The problem occurred in form view, in edit mode, when the user
did some changes in the form, and then clicked on 'Log or schedule
an activity'. When validating the activity, the fields mail_activity
and mail_thread were reloaded but all changes were discarded in the
process.

This rev. ensures to reload the requested field without discarding
the changes.
2017-08-29 10:38:36 +02:00
Thibault Delavallée e1b954f066 [FIX] mail: do not put context as feedback when marking an activity as done
Backport of 9fb86d6fac
2017-08-08 17:58:10 +02:00
Christophe Simonis db2f82d5f1 [MERGE] forward port branch saas-16 up to 4ca3d9cadf 2017-07-14 15:51:59 +02:00
Géry Debongnie 60ee6bbda5 [FIX] mail: add test to proper module
Because of a rebase, I erroneously added the test in a new
FieldMany2ManyTagsEmail module.  It then failed, because the demo data
were not the same.
2017-07-13 12:37:07 +02:00
Géry Debongnie 9ee00dd265 [FIX] mail: prevent crash when chat system is not ready
When a chatter is created, appended, and destroyed before being ready,
bad things could happen.  This is because the code in start/other
deferred was executed regardless if the widget was still alive.  And,
some mechanisms, such as _getBus, depends on the event system.  If the
widget is destroyed, it will be remove from the component tree and such
functions will then return undefined.

To protect agains those issues, we simply make sure that the deferred
are only resolved when the widget is still alive.
2017-07-12 13:41:51 +02:00
Thibault Delavallée 9fb86d6fac [FIX] mail: do not put context as feedback when marking an activity as done 2017-07-12 09:54:00 +02:00
Martin Geubelle 8881e61ec8 [FIX] mail: make many2many_tags_email widget work
This widget hasn't been rewritten with the new views.

The purpose of this widget is to open a popup for each invalid partners
(without email) in a many2many to fill the email. If the email is not set, the
partner will not appear in the tags and its id will not be sent (which should
not be the role of a widget but that's the way it is).
2017-07-11 17:22:43 +02:00
pgu-odoo 07f1e9025d [IMP] mail: ease activities management by adding a shortcut-counter in top menu
This commit improves the use of activities through various applications
by adding a counter of activities displaying next activities grouped by
application. For each application activities are divided into late, today
and future activities in order to achieve a better management.

This commit also merges Inbox and Messaging icons in topbar to keep only
one displaying All / Chat / Channels messages.
2017-07-05 16:50:27 +02:00
Deepak Geriani 6ea3b8de38 [IMP] mail: close chat window with Esc key
Closes task 32316
2017-05-17 12:48:44 +02:00
Aaron Bohy b0e51ffade [FIX] mail: Chatter: crash when mentionning non followers
Caused by a stupid programming error.

Also refactor a bit the code that performs mention RPCs (that are
throttled) to allow to override the throttling value for the tests.
2017-05-16 11:16:03 +02:00
qsm-odoo 250e716c3a [REF] web, *: restore views design
Since the new views merge, a lot of design elements were broken. This
was particularly impacting the fields in the editable list view; indeed
the editable list view is not using an inline form view anymore so the
fields in the list were not properly styled as the LESS was still
defined assuming the form view environment (for example the invalid
fields were red for o2m fields in form view but not in editable list
view even though they got the right CSS class).

This commit refactor the LESS following these rules:
- No more division of non-layout and layout rules. Dividing LESS rules
  in x_layout.less and x.less was a mistake. Many rules can be
  considered to be layout and not layout at the same time, developers
  always have to switch from one file part to the other, many CSS
  selectors (and rules!) are duplicated for nothing, ...
- Field style is extracted from x_view.less and put in the new
  fields.less file. As before, the fields_extra.less will contain the
  rules specific to community so that the enterprise repo can override
  those by replacing the whole file.
- Many classes have been renamed so that o_form_x_y becomes o_x_y as
  many classes can now be applied outside of form view. These classes
  should not be used in templates anyway.

The commit also changes the DOM of fields so that it is more minimalist
(no useless parent div, etc).

Input elements are not automatically styled anymore, they have to get
the o_input class explicitely. This allows to fix lots of small style
bugs of previous versions (required monetary field had not the proper
style, readonly m2m tags appeared as editable, ...). This also improves
the LESS code.

The editable list view should also completely stop flickering on chrome
and firefox.

The commit also removes the orange outline on list view dirty cells.

The commit also removes deprecated static xml, LESS and other code.

Notice there are still styles to restore/fix and LESS to improve.
2017-05-04 12:07:30 +02:00
Aaron Bohy 790206d12c [FIX] mail: followers: don't list followers twice
Before this rev., if concurrent calls to 'read_follower' were
performed, it might happen that the read followers appearead twice
in the follower dropdown.

This was for example the case when validating an invoice: the
customer was listed twice as follower.

Note: in this particular case, the record shouldn't be reloaded
twice: this is another bug to adress.
2017-04-27 15:53:16 +02:00
Aaron Bohy 764127357c [FIX] mail: re-bind handlers on chatter buttons
When a user opens a record in a form view, the chatter is
displayed. Then, if he clicks on 'Create', the chatter is removed
from the DOM (there is no chatter in create mode). After saving
the newly created record, the chatter is displayed again, but the
same widget's instance is kept.

However, when being removed from the DOM, the event handlers bound
on elements of the chatter (e.g. 'New Message', 'Log a Note'...
buttons) are automatically unbound.

So before this rev., the buttons didn't work anymore once the form
view had switched to create mode. In this commit, we detach the
chatter's $el before updating the view, so that its handlers aren't
unbound when the old content is replaced by the new one.
2017-04-25 08:07:17 +02:00
Siddharth Gajjar bd5709c1d5 [ADD] mail: re-introduce recommended next activity
Activities now have recommended next activities. Based on next activities
configured on activity types, it allows to implement light workflows
using next activities feature.

This feature was removed when refactoring crm activities to generic
activities. People asking to remove it were visibly wrong and it is
now implemented back as it was in v10.
2017-04-24 12:31:43 +02:00
Aaron Bohy 11a17f7bb9 [FIX] mail: activity feedback: port odoo/odoo@63167fc5
to the new views
2017-04-11 19:44:38 +02:00
Géry Debongnie dde1223a14 [REF] *: remove manualDestroy options for tests
With the new JS test framework, we had experimented with an autodestroy
feature, meaning that all views/widgets are automatically destroyed
after a while.  By default, it was 50ms, because we could not hook some
code to run after the end of the current test.

For various reasons, this was not a good idea: some side effects, such
as modifications of the session or of the DOM (with modals) could
interfere with other tests.  This commit disable the feature.

From now on, we will have to destroy each widgets created in a test.
2017-04-11 19:44:38 +02:00
Géry Debongnie 905e01921f [REF] web, *: redesign all JS views
This commit introduce a full redesign of all JS views.  We started
basically from scratch.  The goal was to unify all the various views
under a common framework, to make them testable, to make then usable in
different conditions (in studio, or in the frontend), and to make our
lives easier.

Some important points are:
- we introduced new coding guidelines (camelCase, 80 chars width, ...)
- we have a brand new testing framework (still QUnit based)
- kanban view moved to the web addon
- calendar view (formerly web_calender) moved to web as well
- the tree view was removed
- all new code should be documented

We hope that this code is the start of a new era for the Odoo web
client, we want to have a high quality codebase, well documented, well
tested, well designed.

Work done by the framework team: mostly aab, ged, chm, dmo, qsm
2017-04-11 19:44:38 +02:00