Commit Graph
115600 Commits
Author SHA1 Message Date
Alexandre Kühn f40abe400a [FIX] mail: check not broken @ mention in discuss
Rev. on this commit: https://github.com/odoo/odoo/commit/02ec09cb1c3e2d7bc7968f40c18f2208d7f3f498

A consequence of the above commit is that @ mention were broken:
the dropup menu with partner propositions was not displaying when
the user typed the first characters to mention a user (e.g. by typing
"[at]demo" in order to show the proposed mention "[at]Demo User" in a dropup
menu).

This commit fixes the issue by reverting the logic of how mentions are provided
by the chat_manager, while removing some dead code.

note: [at] = @
2018-02-20 13:32:57 +01:00
Alexandre Kühn 22f04b4023 [FIX] mail: tests: improved mock_server mocked initMessaging
Before this commit, if we wanted to add channels on rpc initMessaging,
we had to mock this rpc completely.

Now, with this commit, we can use data 'initMessaging', whose keys
can overwrite the default mocked initMessaging.
For instance, if this.data.initMessaging has the key 'channel_slots',
then the mocked initMessaging rpc will return a new state for the
existing channels to the chat_manager.

This is needed in order to reduce the size of tests than need some custom
initMessaging state, such as any test that needs at least one non-static
channel (i.e. neither channel_inbox nor channel_starred).
2018-02-20 13:31:23 +01:00
Vincent Schippefilt 275910e38c [FIX] tests : avoid phantomjs to crash because of window.getSelection
Before this commit, phantomjs was crashing when some code manipulates
window.getSelection (such as the composer input in discuss or in the chatter).

This commit lets us mock window.getSelection in tests that need this function
in order to work properly.

Another benefit of this commit is the possibility to simulate the state of
window.getSelection in our tests, which enables tests on the composer that
were not possible before (e.g. making sure that mentions and emojis are
correctly rendered in the input, after the user clicked on them in the dropup
menu or the bottom bar.
2018-02-20 13:31:22 +01:00
Alexandre Kühn 9f2ec57a7e [FIX] mail: tests: add basic rendering test for discuss
This commit adds a first test of discuss, which checks that the
essential DOM elements are present when we create a discuss widget.

In particular, there should be a sidebar that contains links to
channel_inbox and channel_starred.
2018-02-20 13:31:22 +01:00
Alexandre Kühn 2a09baf0ed [FIX] mail: tests: make createDiscuss function async
In order to test discuss, the service 'chat_manager' has to be ready.

We do not want to explicitly write discuss.call on any test with discuss,
so now the function createDiscuss returns a promise that is resolved with
the discuss widget when the chat_manager is ready.
2018-02-20 13:31:21 +01:00
Alexandre Kühn 9360a39dca [FIX] mail: tests: mock fetch messages rpc
Discuss has to perform a rpc to fetch messages of its channels.
Some tests do not care of the result of this rpc call, so we mock
it by default (by default, channels have no messages in our tests).
2018-02-20 13:31:20 +01:00
Alexandre Kühn ae2fa4d0d6 [FIX] web: pivot controller handles correct views attribute
From a recent action manager refactoring (https://github.com/odoo/odoo/commit/32b8cec5361174c92c45a4975d4e02f1fb448aa2),
the attribute 'views' in viewOptions is now structured as follow:

viewOptions: {
    action: {
        views: [{
            viewID: 1,
            type: 'list',
        }],
    }
}

instead of this:

viewOptions: {
    action: {
        views: [[1, 'list']],
    }
}

The pivot view was not updated correctly, so now it should be correct.
2018-02-20 09:45:52 +01:00
Aaron Bohy d3372e4f8e [FIX] web: ActionManager: don't rely on view_mode
When executing an act_window action, the ActionManager has to
determine whether or not the first view of the action is a form
view (typically, when this happens, this is also the only view of
the action, and most of the time, it is displayed in a dialog, i.e.
the action's target is 'new'). This ensures that the control panel
is correctly shown/hidden, that form buttons are correctly rendered
and displayed at the right place, and so on.

Before this rev., it uses the view_mode to do that, but there is no
guarantee that the view_mode is even defined (for instance, actions
returned from python methods don't have to define it), so from now
on, we use the 'views' attribute instead, which must always be set.
2018-02-20 09:39:44 +01:00
Martin Trigaux e7c142f6b4 [IMP] website_sale: update field tooltip
To reflect the real module name
2018-02-20 09:30:48 +01:00
Martin Trigaux a2e76bb7e3 [FIX] website: correct typo 2018-02-19 15:48:11 +01:00
Aaron Bohy 8aec3c9128 [FIX] web: WebClient: edit company data
Before this rev., a traceback was raised when the user tried to
edit the company data, by clicking on the company logo in the
submenu (community edition only). This was due to code not being
converted after the ActionManager refactoring of 7b6056a0.

Also ensures that the logo is properly reloaded by specifying the
timestamp in the img url as a query string parameter instead of an
hash param, since changing the hash doesn't seem to be enough to
fool the browser's cache anymore.
2018-02-19 13:05:36 +01:00
Arnold Moyaux e242ee5f74 [FIX] stock: log activity with SO without line
Use case to reproduce:
- Install sale_stock
- Create a SO
- Cancel it
Traceback

It happens because _log_activity_get_documents need at least
one entry in the dict orig_obj_changes.
2018-02-19 10:18:00 +01:00
Alexandre Kühn aa8745f1a8 [FIX] web,*: various nocontent helper fixes
* account, board, hr_holidays, mail, sale, website_sale

Small fixes on nocontent onboarding screens.

Initial commit: https://github.com/odoo/odoo/commit/a87d761fdbf345ada5dc93e0a686b08a0f5a0417

Details:

- list: centered;
- pivot/graph: centered + empty folder face;
- Dashboard app with nocontent helper;
- Discuss inbox/starred: centered without neutral/smiling faces;
    => no faces because it's too much with animated
       rainbow man when emptying the any of the boxes.
- hr_holidays: fixed onboarding screens;
- (technical) dropped obsolete 'o_view_nocontent_container' style;
- manual reconciliation 'nothing to reconcile': centered + inside form sheet;
    => renamed account's o_view_nocontent to o_view_noreconciliation,
       so that it doesn't use the style of views.less.
- kanban: nocontent helper above the columns (if any);
- texts "no order to upsell"/"abandonned cart" paragraph split in two.
2018-02-16 10:23:01 +01:00
Nikunj Ladava 4c186f30c3 [FIX] web: ActionManager: handle false actions
Server actions return an action to execute, or false. When they
return false, an 'ir.actions.act_window_close' must be executed,
such that the current dialog closes (if any) and mostly, the
'on_close' handler is executed, which ensures for example that the
current view is reloaded.

The case where server actions return false has been broken by rev.
32b8cec53. It produced tracebacks in several models, when clicking
on some actions in the 'Action' dropdown. For instance, in lunch,
go to Configuration > Products, open one in a form view, and click
on 'Lunch: Archive/Restore products' in the Action dropdown.
2018-02-15 17:25:00 +01:00
Alexandre Kühn 8b9e854be4 [FIX] im_livechat: livechat button not rely on JS services
Revision of https://github.com/odoo/odoo/commit/02ec09cb1c3e2d7bc7968f40c18f2208d7f3f498

One of the purposes of the previous commit was to test discuss.
There was an attempt to test im_livechat, but it has been aborted due to the possibility
to use livechat on an external website.

However, some bits remain from this attempt, such as LivechatButton becoming a JS service
provider in order to use those services with the external lib. LivechatButton was not working
for the following reasons:

    - ServiceProviderMixin.init was not called (so it couldn't load any service);
    - On website, there are two service providers (LivechatButton & websiteRootInstance).

This fix ensures that LivechatButton does not rely on JS services, such as the bus_service.
2018-02-15 13:24:37 +01:00
Martin Geubelle 995d08b79a [FIX] web: factorize some doAction preprocessing
This preprocessing also needs to be done in Studio so it's factorized in
a separate function.
2018-02-15 12:39:19 +01:00
Christophe Simonis 3b959c313d [MERGE] forward port branch saas-11.1 up to a277b58507 2018-02-15 11:52:10 +01:00
Christophe Simonis a277b58507 [MERGE] forward port branch 11.0 up to 259686ba78 2018-02-15 10:58:08 +01:00
jem-odoo 93da579623 [FIX] hr_expense: missing file in manifest 2018-02-15 09:56:54 +01:00
Christophe Simonis 259686ba78 [FIX] account_voucher: avoid double xml attribute definition 2018-02-14 19:00:22 +01:00
Christophe Simonis 72508cc241 [MERGE] forward port branch saas-16 up to 7792755946 2018-02-14 18:26:57 +01:00
Christophe Simonis 7792755946 [MERGE] forward port branch saas-15 up to d24bdbde81 2018-02-14 17:18:59 +01:00
RomainLibert b4bda28f0d [FIX] resource: _get_leave_intervals
We were using start_datetime instead of end_datetime. Which resulted
into wring results if we passed in datetimes with different date parts.
2018-02-14 16:53:00 +01:00
Christophe Simonis d24bdbde81 [MERGE] forward port branch saas-14 up to 9d0de61114 2018-02-14 16:34:13 +01:00
Christophe Simonis 9d0de61114 [MERGE] forward port branch 10.0 up to 73c2ac451a 2018-02-14 16:04:23 +01:00
Christophe Simonis 73c2ac451a [MERGE] forward port branch 9.0 up to b7b82f1267 2018-02-14 15:32:37 +01:00
Raphael Collet e9d944f960 [FIX] product: product with single value for a "nocreate" attribute
The use-case is: update a product template by setting an attribute with
create_variant=False and a single value.
2018-02-14 15:29:43 +01:00
Raphael Collet 90bfad0e34 [FIX] product: unshadow test 2018-02-14 15:29:43 +01:00
fda-odoo f2bcebb9f2 [FIX] payment_paypal: make IPN work again (revert fix) (#23048)
Revert fix from xmo
(https://github.com/odoo/odoo/commit/29b9b74ceac86a17897eff032a24416fb26b38d1) that broke the IPN flow.
2018-02-14 15:03:56 +01:00
Laurent Smet 0f4333ddf1 [FIX] account, account_voucher: fix payment generation in pay directly
-opw: 779688
2018-02-14 15:03:26 +01:00
Christophe Simonis b7b82f1267 [FIX] core: call migration end- scripts with the previous version number 2018-02-14 14:58:16 +01:00
Denis Ledoux 0db75089ef [FIX] base: prevent PhantomJS tests to send emails
The emails sending is skipped during the tests.
The mecanism to determine if the server was running tests
was to check if the attribute `testing` was set for the thread.

Unfortunately, this `testing` attribute is removed/set to false after the loading/installation
of the modules is done, and phantomJS tests are ran post-installation,
and therefore the emails that were potentialy sent following an action
performed in a PhantomJS tour were not skipped.

This occurred for instance in the tour `project.tour`,
when the responsible of a task was changed,
the sending of the assignation notification email was not skipped.

In the case the machine on which the tests are ran does
not have an smtp server (or mailcatcher) running on the port 25,
this resulted in a test fail.
2018-02-14 14:26:39 +01:00
Mehul Patel efe0112527 [FIX] account: recurring bills filter option always visible.
Previously, the installation of account_3way_match module was loosing these filters
2018-02-14 13:57:11 +01:00
Odoo Translation Bot 3809a8a41c [I18N] Update translation terms from Transifex 2018-02-14 13:43:39 +01:00
tbe-odoo c6a3e034dd [FIX] hr_holidays: Remove related on employee's manager
- In SaaS-16 we have added a related on the employee's manager as the manager of the leave.
    This cause access rights issues when changing the employee's manager.
    We do not want to rewrite all the old records, only the new ones should use the new manager.
2018-02-14 13:18:17 +01:00
Martin Trigaux fc6a04c622 [FIX] mass_mailing: don't specify search title
It is an inherited view.
It makes no sense and may be interprated as an xpath

Fixes #23014
2018-02-14 16:42:20 +05:30
RomainLibert bc86eb771d [FIX] mail: use config parameter as intended for alias_domain
Since commit a18bd499ac alias_domain was
not updating correctly in the settings.

This commit fixes the issue by updating to code to conform to the new
config_parameter interface.
2018-02-14 11:57:33 +01:00
Odoo Translation Bot 91f2209216 [I18N] Update translation terms from Transifex 2018-02-14 11:53:12 +01:00
Nicolas Lempereur 268443657e Revert "[FIX] project: follow stage change"
This reverts commit 5fa4f4cc31.

Explanation: https://github.com/odoo/odoo/commit/5fa4f4cc31#commitcomment-27551833
2018-02-14 09:53:46 +01:00
Jeremy Kersten c9edca7896 [FIX] website_sale: force int for qty in UI to stay coherent
Previously, some screen in front was casted in Integer, others not.

This commits closes #22443

To improve in master using precision decimal, t-field, ...
But avoid to change in dom tree in stable version
2018-02-14 09:00:02 +01:00
Christophe Simonis 19a37782fb [MERGE] forward port branch 9.0 up to 2d73ea9bed 2018-02-13 19:02:37 +01:00
Nicolas Martinelli 5fa4f4cc31 [FIX] project: follow stage change
- Create a project and a task
- Add a channel as follow of the project and task
- Set the channel to follow task stage change only

When changing the stage, the tracking is sometimes received in the
channel, sometimes it is not.

In the case of a stage change, the subtype returned for tracking depends
on the stage sequence. If the sequence is `<= 1`, the subtype for task
creation is returned. Therefore, if the channel is not following task
creation, the tracking message might or might not appear, depending on
the which stage is impacted.

We can remove this specific case, since the creation will be handled
when `user_id` is in the `init_values` or when `mail_create_nolog` is in
the context.

opw-802924
closes #22926
2018-02-13 17:38:25 +01:00
Goffin Simon 33e7c8d60c [FIX] website_event: Duplicating event with a menu
When duplicating an event.event record with a website_menu, the duplicated
event had also a website_menu pointing to the first record.

opw:813270
2018-02-13 17:19:17 +01:00
Raphael Collet 34c52e9938 [FIX] fields: performance of onchange on related fields
Optimize the copy of the cache being made by related fields to compute
themselves.  Instead of traversing records data in cache, follow the cache
structure itself and copy everything!

OPW 816125
2018-02-13 17:08:49 +01:00
Nicolas Martinelli f19e0f8047 [FIX] project: set as favorite
- Connect as a user with only 'User' rights on projects
- Set a project as favorite (click the star)

The project is not set as favorite.

Since only project managers are allowed to write on projects, the field
`is_favorite` is set as read-only. Therefore, it is filtered out by
`_generateChanges`, and nothing happens.

First step is to set the attribute `force_save` in the view, so the RPC
`write` call is forced. Second step is to compute directly the inverse
thus bypassing access rights.

Co-authored-by: Nicolas Lempereur <nle@odoo.com>
opw-814604
opw-801587
closes #22938
2018-02-13 16:07:21 +01:00
Goffin Simon 5ca0ef978f [FIX] account, point_of_sale, stock_account: POS Anglo-Saxon Accounting
Anglo-Saxon Accounting entries are not created when the POS session
was closed with button "Close and post entries

opw:802727
2018-02-13 15:52:54 +01:00
Goffin Simon 2d73ea9bed [FIX] point_of_sale, stock_account: POS Anglo-Saxon Accounting
Anglo-Saxon Accounting entries are not created when the POS session
was closed with button "Close and post entries

opw:802727
2018-02-13 15:46:21 +01:00
qsm-odoo 5e6c5d24be [FIX] mass_mailing, *: duplicating two-columns snippets
* web_editor, website

This commit fixes a bug with table duplication in mailing template:
- Click on a snippet with two columns
- Duplicate it
-> the snippet is duplicated but the two columns are transformed in two
   rows.

This was because there is an implemented behavior for column
duplication: if we duplicate a column which was alone on its row, we
duplicate the row instead. This code should however be triggered when
duplicating the column alone to be working, not the snippet that
contains it.

Note: this required a backport of a33ec972ab
which was fixing a non-critical "bug" for 11.0. This non-critical "bug" is
therefor fixed here too.

opw-807105
2018-02-13 14:19:07 +01:00
Goffin Simon d7fdb636b8 [FIX]mrp, mrp_byproduct: Qty is not "produced" for Byproducts
When producing a product as a BoM, the quantity for the byproduct was not increased in "produced".

opw:814768
2018-02-13 14:07:23 +01:00
tde-banana-odoo f78ebb33e3 [FIX] mail: no crash for portal url when not logged in
When portal user get email with portal url (like using
website_quote), it crashes because user is not logged.
For this case, we don't want to display the url with the
access token, but simply redirect it to messaging page.

The crash was about the "KeyError: 'view_type'" in
record_action dict, coming from website_quote.

opw-814647
2018-02-13 13:56:45 +01:00