Commit Graph
122828 Commits
Author SHA1 Message Date
Alexandre Kühn fa756bc63d [FIX] mail: adapt discuss mobile from cp refactoring
Since a recent ControlPanel/Search view refactoring [1],
all client actions must be adapted [2]. Discuss was updated,
but not discuss mobile, which this commit fixes.

[1] https://github.com/odoo/odoo/commit/4cd379cf6ecffa00e0085a9833228128b484d48a
[2] https://github.com/odoo/odoo/commit/b1ef0001f61d29fc3d3be384422c0fb35a09806f

Task-ID 1918722

closes odoo/odoo#29601
2018-12-18 10:27:34 +00:00
Thanh Dodeur 73d9b9588f [IMP] mail: adds delete and upload to chatter
This commit adds the ability to upload and delete
attachments from the chatter.

Task: #1911277

closes odoo/odoo#29702
2018-12-21 15:25:27 +00:00
Aaron Bohy 5545787e2c [FIX] web: fetch toolbar info for target=current actions
The 'Actions' menu displayed in the control panel (aka sidebar, or
toolbar), wasn't displayed anymore since the control panel
refactoring of 4cd379cf6e. Rev. c1752b834 correctly made it appear
again in list and form views. However, there was another issue as
the additional model-related items (like Print, or custom actions)
weren't fetched anymore. Thus, the sidebar only contained the
default 'Export' and 'Delete' actions. This rev. fixes the second
issue.

fixes #29546

closes odoo/odoo#29633
2018-12-19 07:40:31 +00:00
Alexandre Kühn 906183ac0b [FIX] mail: bigger emojis in composer emoji menu
Before this commit, emojis from the emoji menu in the
composer were small. This is especially true in mobile.

The cause of this issue was the style of bootstrap button
links. This commit fixes the issue by no longer considering
each emojis as button for their style, so that they do not
inherit bootstrap styles.

Task-ID 1918767

closes odoo/odoo#29606
2018-12-18 12:14:15 +00:00
Martin Geubelle 243734e64b [FIX] web: backspace in empty searchbar input
Before this rev. a crash occurred when pressing backspace in the control panel
view searchbar input if there was no facet to remove.

The use case is now correctly handled and nothing happens.

Task 1902826

closes odoo/odoo#29602
2018-12-18 12:55:19 +00:00
Martin Geubelle ca89594215 [FIX] sale: correctly test all files
The rev. odoo/odoo@3aa6c94 has recently been forward-ported but was in conflict
with the rev odoo/odoo@856c2e9 ; both have created a inherited view to add their
test file in the qunit_suite view.

As both inherited views have the same id, one of the two files was not correctly
loaded in the test suite.

closes odoo/odoo#29586
2018-12-17 15:30:33 +00:00
Martin Geubelle ae2dbc60c5 [FIX] web: handle context in ControlPanel <filter>
The `context` key wasn't correctly taken into account when computing the search
query for `filter``tags.

It is now correctly handled.

Task 1917628

closes odoo/odoo#29529
2018-12-17 10:39:03 +00:00
qsm-odoo 0794a3c956 [FIX] website_forum: allow themes to customize navbar area
Before the forum redesign, the .container element which contains the
forum navbar had the 'website_forum' class. Now this class was moved
to encapsulate the whole forum page.

Problem is that themes were styling that container element specifically
and the `#wrap` element of the forum by respectively targeting
`.website_forum` and `.website_forum + #wrap`. This commit solves this
by adding a 'o_wforum_navbar_container' class on the element allowing
to modify the themes selector with `.o_wforum_navbar_container` and
`.website_forum #wrap`.

closes odoo/odoo#29581
2018-12-17 14:21:50 +00:00
Alexandre Kühn 1645b2f8e3 [FIX] mail, test_mail: fix mail_tour
This commit fixes the following issues regarding the mail tour:

1. Start from discuss app (not app switcher)
2. Adapt from recent changes on discuss app https://github.com/odoo/odoo/commit/9f6f9c71d3258ce3652b4a5793b7dcfef6f01d25

Note there is an error if we let runbot run this tour automatically:

```
Tour mail_tour failed at step Messages can be <b>starred</b> to remind you to check back later.
(trigger: .o_mail_discuss .o_mail_thread .o_thread_message_star)
```

This comes from the mail tour requiring longpolling to work, which is
intentionally disabled when running tours automatically on runbot.
We plan making this tour run without longpolling in the future, which
requires a design change from the client code (e.g. reduce reliance
on the longpolling).

Task-ID 1916093

closes odoo/odoo#29575
2018-12-17 12:48:10 +00:00
David Beguin f0741b3f3e [FIX] im_livechat : fix random operator and channel name mismatch
Before, the name of the channel was not always matching the real channel operator,
as a second random was made on operators.

This commit fix this.

Task ID : 1918350
Closes PR #29570
2018-12-17 09:54:08 +00:00
Sébastien Theys 1fa10cbc5d [FIX] base,website_google_map: fix partner address not showing
Following commit 983c7e8152.

`_compute_display_name` is overridden in partner to force `show_adress` and some
other context variables to None. When those values are in the context, calling
`display_name` can give a different result than calling `name_get()[0][1]`.

This commit reverts the changes of the mentioned commit where the behavior is
actually different, that is, when `show_address` is in the context.

It also adds a comment on the `_compute_display_name` method to avoid further
mistakes.

closes odoo/odoo#29510
2018-12-13 11:17:23 +00:00
Romain Estievenart 287136b85e [FIX] web: empty kanban view on mobile
Due to the recent refactoring in control panel 40dd12193,
some css rules have been broken in mobile.

To fix this, we need to set 'o_current' class inside the
displayed column because we need to know which one to
display in mobile.

This issue doesn't occur in desktop because all kanban columns
are displayed.

closes odoo/odoo#29457
2018-12-13 09:03:23 +00:00
svs-odoo 4abdfc35d3 [FIX] web: wait many2many tags' fetches for rendering
Before this commit, we don't assure fetch's deferreds were resolved to
return _readGroup. Thus, in some conditions, kanban was rendered before
records data was updated so many2many tags could be missing.
Now, we return _readGroup when fetch's deferreds were resolved.

Task #1910805

closes odoo/odoo#29508
2018-12-13 10:44:32 +00:00
svs-odoo 1fef5c6b6e [FIX] web: delete duplicated search_filter_menu_tests.js
closes odoo/odoo#29500
2018-12-12 16:36:06 +00:00
Christophe Simonis 31d67119db [FIX] crm,pos_sale,sales_team: force empty domains and contexts
Theses records used to have a domain/context set [1]. Force a empty one
for updated databases.

[1] see 1da63f0ab0

closes odoo/odoo#29487
2018-12-12 18:30:22 +00:00
Geoffroy Larue e28ec7e22b [FIX] crm: restore original design
In task 1893160, we wanted to shorten the 'planned_revenue' and
'probability' fields on the crm.lead formview.

For simplicity's sake, we are reverting this change.

closes odoo/odoo#29476
2018-12-12 14:29:22 +00:00
Romain Derie 46d57e5600 [IMP] website: add key in ir.ui.view list view if multi-websites
With multi-website support, the key field is more important than ever as it
kind of replace the xml_id behavior.

Thus, on the ir.ui.view list view it is usefull to see the key.

closes odoo/odoo#29419
2018-12-12 15:45:09 +00:00
Raphael Collet 3bd587ed4b [FIX] account: two m2m fields using the same table
The fields `analytic_tag_ids` and `second_analytic_tag_ids` on model
'account.reconcile.model' were accidentally using the same table and columns,
because of the automatic generation of the table name.  Make them explicitly
use distinct table names.

closes odoo/odoo#29376
2018-12-11 13:19:11 +00:00
Xavier Morel fe0a27d240 [FIX] doc: P2 bits forgotten in 758382b3a7
closes odoo/odoo#29438
2018-12-12 10:36:37 +00:00
Christophe Simonis 47dee16d65 [FIX] web: correct (another) forward-ported test 2018-12-12 14:35:12 +01:00
Christophe Simonis 151414f27b [FIX] web: correct forward-ported test 2018-12-12 12:21:33 +01:00
Christophe Simonis f351dd8cab [MERGE] forward port branch 12.0 up to 047e2b28de 2018-12-12 11:38:25 +01:00
qsm-odoo 1144235d06 [FIX] website_forum, *: remove underline on icon buttons hovering
* portal

In our default theme, when hovering links (or .btn-link elements), the
text is underlined. This effect is however not desired for links which
contain only an icon, especially in the forum.
This commit removes that underline effect for all icon buttons in the
frontend (at least by default, this is a theme choice). Icon buttons are
defined as link or .btn-link elements which directly use the "fa" class
on them.

This commit also solves the flag button of the forum which did not have
any effect because of bad bootstrap use.

closes odoo/odoo#29434
2018-12-11 14:31:42 +00:00
Géry Debongnie 13aae100e2 [FIX] web: do not render invisible filters in search view
In some cases, the web client may receive a search view with invisible
filters.  This is due to the way field_view_get works.  For
example, if there is a group on a filter, then this will be transformed
into an invisible attribute.

In that case, the search view should simply ignore the filter and not
display it.  This was broken in the recent control panel refactoring
(note that the search view lacked the possibility of testing that kind
of situation).

closes odoo/odoo#29430
2018-12-11 13:54:26 +00:00
Nicolas Martinelli 047e2b28de [FIX] mail: keep context when sending a message
When sending a message through the chatter, the user context (including
the language) is not sent to the server. This causes issues to render
the mail templates in the appropriate language.

closes odoo/odoo#29422
2018-12-11 13:32:37 +00:00
Christophe Simonis 34d35632b6 [FIX] sale: correct value in context used by test 2018-12-11 20:13:08 +01:00
Christophe Simonis 069278b652 [MERGE] forward port branch saas-11.3 up to 55dafc20f6 2018-12-11 18:51:05 +01:00
Christophe Simonis 55dafc20f6 [MERGE] forward port branch 11.0 up to 7e5d5045bf 2018-12-11 17:06:48 +01:00
Christophe Simonis 7e5d5045bf [MERGE] forward port branch saas-15 up to 1ace2ed88b 2018-12-11 16:20:34 +01:00
Christophe Simonis 1ace2ed88b [MERGE] forward port branch saas-14 up to 5a147acf1b 2018-12-11 15:11:32 +01:00
Goffin Simon 43b86aa704 [FIX] website_sale_comparison: Tuple index out of range
Some product template with attributes never have variants because
the attributes have the field 'create_variant' set to 'no_variant'
So "Tuple index out of range" was raised due to these kind of products.

opw:1911962

closes odoo/odoo#29428
2018-12-11 13:35:53 +00:00
Christophe Simonis 5a147acf1b [MERGE] forward port branch 10.0 up to f69c004795 2018-12-11 14:33:39 +01:00
Géry Debongnie 6c1445b24e [FIX] base_import: adapt import client action
With the recent control panel refactoring, abstract actions had to be
adapted.  The base import action is actually quite
complicated, it relies on introspection and is fragile.  With this
commit, I attempt to make it work again.  The main issue is that now,
the root of the abstractaction is a div, which contains the root of the
content template, so most of the code was assuming that the $el of the
import action was the form tag, and not a parent.

Note that there are no meaningful tests for import actions, because
testing iframes are tricky.

closes odoo/odoo#29421
2018-12-11 13:06:09 +00:00
Géry Debongnie c1752b8347 [FIX] web: display action menu in form/list view
The recent refactoring of the control panel moved the sidebar management
from the action manager to the view itself.  However, the sidebar
parameter was forgotten, which resulted in the fact that it was no
longer created.

This fix was a little tricky, because the sidebar needs to be
instantiated in some tests, but not in most of them (in particular, the
document application changes its behaviour, which is annoying).

closes odoo/odoo#29389
2018-12-11 12:58:49 +00:00
Romain Derie f69c004795 [FIX] website_membership: correctly check if customize view is active
Commit 5804246e0f introduced some improvements to speed up performances.
One of them was to check if a customize_show view was active or not but the
condition was on view.customize_show instead of view.active.

Thus, as that view is always a customize_show, the condition would always be
met.

closes odoo/odoo#29414
2018-12-11 10:23:50 +00:00
Martin Geubelle c70a36961f [FIX] web: correct load act_window with empty id
There was a traceback when reloading the webclient with an act_window and an
empty id in the URL (ex: after saving Settings). A `read` without id was
peformed when loading data instead of a `default_get`.

Before rev. odoo/odoo@40dd121 the action environment was generated by the
ActionManagerActWindow, which was currently defaulting the `currentId`.

Now that this is not the case anymore, the `loadState` should have this responsability.

Task 1902826

closes odoo/odoo#29411
2018-12-11 10:02:03 +00:00
Martin Geubelle 0ba9daa2ce [FIX] mail: adapt activity view icon
Task 1889687 adds the activity view to Studio>Views, the view is represented by
icon fa-clock-o. Task 1894990 was supposed, among other things, to change the
current activity view icon (fa-th) to fa-clock-o. Since this task was not merged
it creates an inconsistency between the 'view switcher' and Studio.

Task 1902826

closes odoo/odoo#29392
2018-12-10 14:01:24 +00:00
Arnold Moyaux b0d79b9802 [FIX] stock, mrp: log less activity on PC type
Usecase to reproduce:
- Set manufacture step to 2 or 3 steps
- Create a MO
- Go on the PC picking and validate some quantities w/h BO

Traceback because there is no documents to log the activity.

It happens because the function used in groupby and sorted
(in the method _log_less_quantities_than_expected) expect a picking.
The purpose of _log_less_quantities_than_expected is to generate
an activity on the next picking in order to notify that some quantities
will be missing due to the cancelation of the back order. In order
to find the following picking it uses the destination moves from the
current's picking moves.

	Picking w/h BO		Next Picking (activity to post)
		|			|
	      moves -----------> destination moves

However in the case of 'pick components' picking type(PC) the destination
moves are linked to a manufacturing order and not a picking. So it
_log_activity_get_documents return an empty parent since picking_id is
False.

In order to fix it, _log_activity_get_documents only add the tuple
(object where the activity should be log, responsible for the activity)
if the object is not False. It also add a hook in order to add
(mo_id, repsonsible) during _log_less_quantities_than_expected on top
of (picking_id, repsonsible) in order to log activity on MO directly
linked to PC.

This commit also add a missing precision_rounding in backorder
confirmation

opw-1908753

closes odoo/odoo#29385
2018-12-10 12:43:39 +00:00
Nicolas Martinelli bc38850c96 [FIX] portal: missing translation
closes odoo/odoo#29413
2018-12-11 10:21:22 +00:00
Romain Derie 66c33c880d [FIX] website_membership: fix SQL error on non existing column
Since multi-website 4f6ec1cd2a, `website_published` became a computed field
and `is_published` was introduced for storing the old `website_published` value

Still, old SQL select was trying to read `website_published` instead of
`is_published`.

Step to reproduce:
  - Create a Membership Product
  - Create a Membership Customer
  - Add the Membership to the Customer (Buy Membership)
  - Publish the Customer
  - Go to /members, it will error 500

closes odoo/odoo#29412
2018-12-11 10:11:09 +00:00
Goffin Simon 52881d0f4a [FIX] payment: Traceback when configuring payment methods
Steps to reproduce the bug:

- Create a payment acquier PA with no journal
- Click on "Set payments" on your website dashboard
- On the wizard, choose "Custom payment instructions"
and select PA as Method
- Set a new bank name and a new account number
- Click on "Apply"

Bug:

A traceback was raised because no journal was set on PA.

opw:1916418

closes odoo/odoo#29378
2018-12-11 08:44:59 +00:00
Nicolas Martinelli 4344c44760 [FIX] mail: missing translation
closes odoo/odoo#29356
2018-12-10 13:27:20 +00:00
Nicolas Martinelli 3f72a8fab6 [FIX] purchase: View RFQ button
- Create a RFQ
- Send it to the customer

The email sent contains a 'View Purchase Order' button instead of 'View
Request for Quotation'.

We make use of the previous commit to correct the issue.

opw-1915230
2018-12-10 13:27:20 +00:00
Nicolas Martinelli 8cd7de2204 [IMP] mail: model description
Allow to specify the `model_description` when sending an email to take
into account for cases where the same model is used for different
business concepts.

opw-1915230
2018-12-10 13:21:21 +00:00
Nicolas Martinelli 9e71d228ed [FIX] mail: translation of custom layout
- Create a PO for a French customer
- Send by email

The body of the email is in French, but some parts (such as the View
button or the footer) are not translated.

The body is translated following the field `lang` of the email template,
in this case `${object.partner_id.lang}`. This is done when opening the
mail composer (so the message appears in French). However, other parts
are rendered only when sending: at this point, the language to be used
in the template is lost forever in the darkness.

To avoid this, we keep a specific context key `custom_layout_lang` that
we retrieve when rendering the custom layout.

opw-1908420
2018-12-10 13:21:21 +00:00
Nicolas Martinelli 0687f17622 [FIX] mail: model description
Do not use the model `_description` field which cannot be translated. Use
the `display_name` of the corresponding model instead.

Moreover, `<t t-esc="'%s' % model_description or 'document'"/>` gives
`'None'`, while `'document'` is expected.

This adds a query to some tests, which is expected since `display_name`
requires information stored in the DB, while `_description` is defined
at the Python level.

opw-1908420
2018-12-10 11:59:03 +00:00
Denis Ledoux fba844c732 [FIX] project, rating: project percentage satisfaction compute performance
This is basically a backport of revision
47479401cb
to gain the performance on the project
percentage satisaction computation

but without introducing the new parent mixin,
which would not be a stable change.

closes odoo/odoo#29354
2018-12-10 15:59:44 +00:00
jem-odoo f098c787c0 [IMP] rating: don't call compute method directly
The correct way to trigger a recomputation of a field is not
to call directly the compute method. The ORM offers mecanism
to do it: we have to flag the field as "recompute to do" and
then call `recompute` method (availble on every models). This
one will call the recompute method of all fields marked as
"to recompute".

This will optimize the performance by doing recomputation in
batch.

Task-1903565
2018-12-10 15:59:44 +00:00
Toufik Ben Jaa 007669feac [FIX] sale: do not schedule activity when no user_id
- The `_write` override on `sale.order` create a Next Activity for the
  SO's salesperson when changing the SO `invoice_status` to upselling.

  If the SO doesn't have a salesperson this code crashes since `user_id`
  is required on Next Activities.
  To avoid this crash we create the Next Activity only if a salesperson
  is set on the SO.

  OPW-1914087
2018-12-10 11:43:12 +01:00
Christophe Monniez 5e92adb39c [FIX] web: adapt clickeverywhere test to the controlpanel refactor
Since 4cd379cf6e the ControlPanel is now a child of the viewController.
This breaks the clickEveryWhere test.

With this commit, the view_controller selector is adapted in the clickEverywhere
test.

closes odoo/odoo#29383
2018-12-10 10:42:48 +00:00