Commit Graph
124195 Commits
Author SHA1 Message Date
Alexandre Kühn f372ac541f [IMP] mail: rename DM conversation
This commit adds the possibility to customize the name
of a DM conversation. To do so, click on the gear icon
when hovering on a DM in the discuss sidebar.

This feature intentionally removes the access to the
settings of a DM, because the settings view only makes
sense for non-DM conversations.

Task-ID 1881001
2018-12-06 14:51:28 +00:00
Alexandre Kühn ef1c342b7c [IMP] mail: put emoji in composer based on cursor position
Before this commit, when selecting an emoji from the composer,
the emoji was put at the end of the composer content.

With this commit, the selected emoji is now put in the composer
based on the position of the cursor. It also focuses the input
and set the cursor just after the newly inserted emoji.

Task-ID 1881001
2018-12-06 14:51:28 +00:00
Alexandre Kühn 64f044761a [IMP] bus, mail, mail_bot: improved native notification
With this commit, no push notification is sent to user when
to acknowledge that he just has accepted them. Also, on native
push notifications, the Odoo Bot icon now has a transparent
background.

Task-ID 1881001
2018-12-06 14:51:28 +00:00
Alexandre Kühn f3bd34b870 [IMP] mail: merge private and public channels in discuss
Discuss sidebar now has a single category for public and
private channels called "Channels". Private channels are
prefixed with a keylock icon.

Task-ID 1881001
2018-12-06 14:51:28 +00:00
Alexandre Kühn a669d89565 [IMP] im_livechat, mail: quick search when several channels
Discuss sidebar now shows a quick search when there are
at least 20 channels or DMs or Livechats that are pinned.

Task-ID 1881001
2018-12-06 14:51:28 +00:00
Alexandre Kühn 7ad45a04e1 [IMP] im_livechat, mail: improved "is typing" notification
With this commit, the UI for "is typing..." notifications
has changed.

** before **:

In Discuss & chat windows, "is typing..." notification bar
at the bottom of the thread, inside the conversation.

** after **

In chat windows, animated '...' next to conversation name.
In Discuss, animated '...' next to conversation name in sidebar,
and text below the composer.

Task-ID 1881001
2018-12-06 14:51:28 +00:00
Alexandre Kühn 9117d968e0 [FIX] mail: get members on channel_info
Before this commit, when accessing a channel after a page reload,
the list of members in a channel was not known until the composer
on this channel has the focus, either in the Discuss app or in a
chat window.

This was a good-enough condition when information about members
was limited to mention suggestions, which requires having the
focus on the composer. However, with the 'is typing' features
on channels, it requires being aware of the members of the channel
at the moment of the rendering in discuss or in a chat window.

This commit fixes the issue by providing the list of channel
members when retrieving information about the channel.

Without this fix, the 'is typing' notifications could sometimes
not determine the name(s) and email(s) of user(s) typing something.
2018-12-06 14:51:28 +00:00
Alexandre Kühn ae5d22fa07 [FIX] bus,mail:tests: do not use deprecated test helpers
`testUtils.addMockEnvironment` is deprecated since https://github.com/odoo/odoo/commit/abf32b8b21394491040e5c11c1fea809c1d7c62c
We should use `testUtils.mock.addMockEnvironment` instead.
2018-12-06 14:51:28 +00:00
David Beguin a12f693b21 [IMP] im_livechat : set admin as default operator in demo data
To avoid having to configure the livechat channel when testing on runbot,
the admin is already set as operator of the livechat channel.

Task ID : 1912056
Closes PR #29020
2018-12-06 13:01:39 +00:00
Nicolas Martinelli 66704d3d1f [FIX] delivery: cast to float
Some providers (e.g. Fedex) return a `decimal.Decimal` instead of a
`float`, which causes a crash.

opw-1903784

closes odoo/odoo#29311
2018-12-06 12:50:00 +00:00
Odoo Translation Bot 77e7d952b4 [I18N] Update translation terms from Transifex 2018-12-09 03:15:09 +01:00
Humberto Arocha 9d2d539a16 [IMP] account: Adding a method to allow the change of amount_mnt var
used to fetch debit & credit recorded in Tax Cash Basis Journal Entries

Main
-

By allowing to change the `amount_mnt` var we will be able to change the
values recorded in Tax Cash Basis Journal Entries, i.e, debit & credit
values.

Explanation
-
We want to keep the `amount` just the way it has been computed because
that is right. We don't want to change that.

Our issue is the`rounded_amt` which is the value that is passed to the
debit and credit downwards.

We have only hooked a new method to allow us later inherit that method
and make our own computations regarding the `rounded_amt` which is the
main subject of this PR and later pass it down to the debit & credit
fields as need for localizations that could be facing the problem of
having the computation of taxes at date of invoicing instead of date of
payment.

`amount` var is used here:

`
'amount_currency': self.amount_currency and
line.currency_id.round(-line.amount_currency * amount / line.balance) or
0.0,`

and we are not intending to change that because the value written to the
`amount_currency` field is right.

What we intend is to compute the values for debit and credit fields
which were computed in this method at invoice date, some l18n need them
at payment date, e.g, l18n_mx.

Be aware
-

Do not be mislead by the fact that `rounded_amt` var is the one taken to
do those computations. It is just a mean to the final goal. Rounding is
not an issue and has never been.

Background
-

By allowing this merge to flow we will be able to address the following issues:
https://github.com/odoo/odoo/issues/25057
https://github.com/odoo/odoo/pull/17196
https://github.com/odoo/odoo/issues/9972

Final Goal
-
Being able to perform the computation of the debits and credits
according to l10n_mx in odoo/enterprise#3137

closes odoo/odoo#28991
2018-12-06 19:39:16 +00:00
Frederic Junod 614adc0198 [CLA] Add fredj to Camptocamp CLA
closes odoo/odoo#29307
2018-12-06 10:41:24 +00:00
Frederic Junod 181ec4fe49 [FIX] doc: correct spelling mistake in javascript reference 2018-12-06 10:32:32 +00:00
Sergio Zanchetta bdf2711f01 [FIX] account: fix untranslatable strings
The "customer invoice" and "vendor bill" string was untranslated.
Instead of adding a _ call, properly translate it.
No need to try saving bytes by splitting the sentences, this makes it very
difficult to translate in some languages where the order of words are not the
same as English

closes odoo/odoo#29690
2018-12-26 07:28:39 +00:00
Atul Patel c5cb1a6b38 [FIX] website: remove faulty decorator
copy_menu_hierarchy is not a model function since it expects
to iterate on a recordset of websites

closes odoo/odoo#29723
2018-12-24 18:05:51 +00:00
Swapnesh Shah 41da55f58e [IMP] stock_account: Fixed typo in field's help
closes odoo/odoo#29692
2018-12-21 08:37:36 +00:00
Martin Trigaux f92cddcf1c [I18N] fix bad comment
f8dad1bb4 added the terms in the .pot with an incorrect syntax in the comment
The pulled translation have this incorrect syntax as well which produces a warning

closes odoo/odoo#29729
2018-12-24 12:45:21 +00:00
Odoo Translation Bot b234af04c1 [I18N] Update translation terms from Transifex 2018-12-24 12:51:19 +01:00
Odoo Translation Bot 47aae6faba [I18N] Update translation terms from Transifex 2018-12-23 01:29:13 +01:00
Romain Derie 88242d6a15 [FIX] website: simplify filter_duplicate
The `filter_duplicate()` method was introduced with b0b6b9afb5 for
website_version.
The module was removed on Odoo 12.0 with https://github.com/odoo/enterprise/commit/51c1bb3cca9ae02fc55cb49ba98cec2901a8e273

`filter_duplicate()` can now fit the multi-website behavior more simply.

Closes #29347
2018-12-19 18:24:50 +00:00
Romain Derie e0c67651db [FIX] website: prevent customize options to be reordered
With multi-website, activating a customize option (customize_show view) will
actually duplicate the customize view to make it specific.
By doing so, the duplicated view will have a higher ID than the original, and
the original's siblings customize options.

Before this fix, two issues could be seen:
1. When toggling a customize option, it would appear last in the dropdown
   afterward. This is because of the views being sorted by (priority, id)
   (if the views have the same priority).
2. When toggling, sometimes the views header would be duplicated. This comes
   from the JS code that loop through the returned views and create the DOM
   by adding a header when the view inherit_id is different than the previous.
   Obviously, as 2 views with the same inherit_id could not be grouped together
   now that the specific one has a bigger ID, it will create twice the DOM.

=> Check tests in this commit, they have schemas that will explain it clearly

Note: We don't take priority into account for customize menu view order as it
      would create the same problem as (2.)
      We could have sorted by (inherit_id, priority, name) to avoid the issue
      and give the user possibility to order options in header but it was
      decided we dont.

Closes #29347
2018-12-19 18:24:50 +00:00
Romain Derie ae8232136d [FIX] website: get only specific view children on _views_get()
Before this comit:
The `_views_get()` method would be called recursively for every
`inherit_children_ids`.
At the end of the method, we would get the complete view hierarchy, including
duplicate hierarchies for website specific copies (COW).

Then, the `get_related_views` that is calling `_views_get()` would be overriden
in website module to keep only most specific views.

But this would not be enough as it would leave orphans from other trees:
  - Have a base view 'B'
  - That has an inherited view 'I'
  - That has itself an inherited view 'II'
  - Now make the hierarchy specific on a website from 'I'
  - And add another inherited view to 'I' on the generic tree
This become:
              B
             / \
            /   \
           I     I'
          / \     |
        II  II2   II'

As explained, filtering duplicates would not be enough as it would correctly
remove 'I' and 'II' from the generic tree but would not remove 'II2'.

At the end, it would return "B", "II2", "I'" and "II'".

Now, we correctly return only "B", "I'" and "II'" by ignoring generic trees
when there is a specific one.

Closes #29347
2018-12-19 18:24:53 +00:00
Romain Derie 9411ac0acd [FIX] website_*: get specific view over generic one
Before this commit, self.env.ref would always find the generic view loaded from
the assets.
Disabling a customize_show view on a website would not hide completely the
feature as the self.env.ref would retrieve the active generic one and not the
inactive specific one.

Step to reproduce (on one of the module):
  - Install website_sale_wishlist
  - Disable "Wishlist" on the Customize menu of /shop
  - Go to a product page, the wishlist hearth icon is still there

opw-1914576
Closes #29347
2018-12-19 18:24:50 +00:00
Romain Derie f7df35540b [FIX] web_editor, website(_theme_install): avoid theme.ir.ui.view crash
In a particular case, `_views_get` was mixing apples and oranges, ir.ui.view
and theme.ir.ui.view.

This was the case if a theme has a theme.ir.ui.view t-calling another
theme.ir.ui.view.
(Only theme's sale bridge cause this issue, eg theme_kea_sale.products)
Then, having that theme installed on a website would make all other website
without that theme to crash when opening the /shop customize menu.

Indeed, the theme.ir.ui.view would have the xml_id theme_kea_sale.search.
The generic view `website_sale.products` would have `theme_kea_sale.products`
as inherit child which is website specific and t-call `theme_kea_sale.search`.

Then, on a website witout theme_kea installed, opening the customize menu would
call `get_related_views` that would call `_views_get` that would loop through
inherit children calling `_view_obj` that would not find a view with that key
and would fallback on self.env.ref, finding the theme.ir.ui.view.

Note: `_views_get` might return specific view for another website but that will
      be filtered on `get_related_views` override in website.

Step to reproduce:
  - Have at least 2 websites and website_sale installed
  - Install theme_kea on a website, it will also install theme_kea_sale
  - Go on the website that has not theme_kea installed
  - Go to /shop
  - Open Customize menu, it won't load because of python crash

opw-1914576
Closes #29347
2018-12-19 18:23:36 +00:00
Olivier Dony eb19016ba3 [REV] Revert "[FIX] modules: load demo data fallback"
This reverts commit 5f4a945182.
The cure is worse than the original disease.

The main installation cursor often holds exclusive locks (due to DDL
changes) on vital tables such as res_users. As a result, using
another cursor to perform changes while the main cursor is waiting
is extremely deadlock-prone. And these deadlocks can't be detected by
PostgreSQL as they mix Python-SQL locking, which leads to deadlocked
HTTP workers.

Related to:
- opw-1916918
- #29528
2018-12-21 16:01:31 +01:00
Martin Trigaux f4e7e06a1f [IMP] l10n_{be,ca}: translate the CoA in both base languages too
Same as ea747d23e4 for Belgium and Canada

If somebody chose nl instead of nl_BE as the language (e.g. on the SaaS on
odoo.com, only nl is proposed on startup), the chart of account was not
translated.
Now it will be in both languages.

Rename the translation file so it is loaded by any nl_* language
Add multiple spoken_languages to be sure to load each one via the
process_translation mechanism.

Apply same logic for fr_CA

closes odoo/odoo#29682
2018-12-20 14:35:30 +00:00
Xavier Morel 9dcca1aced [IMP] doc: convert xmlrpc python examples to P3
closes odoo/odoo#29485
2018-12-20 16:35:04 +00:00
Jorge Pinna Puissant 149e04b10d [IMP] website: Explain scope of language in keywords in seo
When there is a website with traduction (for exemple, Spanish and
French). In the Spanish website, at the SEO menu, you can add keywords
using any of the languages (Spanish or French), but these keywords are
only added to the Spanish website.

To avoid misunderstanding between the website language and the keyword
language a tooltip is added.

closes odoo/odoo#29683
2018-12-20 14:05:01 +00:00
Lucas Perais (lpe) f32cdb5ccf [FIX] web: exclude orderedBy when changing action
When activating a filter on a list view,
the environment of the action contained a context with an orderedBy key
which was then used by every controller and model in the various
parallel flows, i.e. changing actions

After this commit, we prevent it by excluding the key when executing an action

OPW 1913190, 1914019

closes #29190
2018-12-05 14:21:44 +01:00
Laurent Smet 379fc6b125 [FIX] account_accountant: Make transfer_account not required without chart template
required: [('chart_template_id','!=',False)] doesn't work because you need to fill the chart_template_id
to install a chart of accounts for your company. Then, the transfer_account becomes required before its installation
and then, you are not able to install a chart of accounts for your company.
2018-12-05 11:13:19 +01:00
RomainLibert 37212fe655 [FIX] lunch: fix lunch_supplier test
In https://github.com/odoo/odoo/commit/e8ac4d79964b852f21e272bc804d151b5b356791 we introduced an
error in the test_search_available_today which broke the test before 10
am everyday

closes odoo/odoo#29265
2018-12-05 10:10:09 +00:00
Jeremy Kersten 1c5ffe1737 [REF] website_forum: mass moderation, modern UI bs4 and clean type
Now forum only allow to post message of type 'question'.
New 'modern' UI with Bootstrap 4
New moderation modal for bulk spam

Co-authored-by: qha <qha@odoo.com>
Co-authored-by: qsm <qsm@odoo.com>
Co-authored-by: jke <jke@odoo.com>

Thanks to @qha-odoo for UI
Thanks to @qsm-odoo for reviewSsss

closes odoo/odoo#29235
2018-12-06 20:49:42 +00:00
qsm-odoo 08807fcba9 [IMP] website: keep social media popover on one row
Before this commit, the social media popover (used in forum but
available everywhere) may break over multiple rows if used on a relative
positioned small button. This however never occurred in standard <= 12.0
so we will consider this not a bug fix. This will however occur with
the upcoming forum refactoring, so we needed a fix for master.

This commit forces the social icons on one row and take the opportunity
to refactor the template to make a simpler and more beautiful popover
by using conventional icons and social media own colors.

closes odoo/odoo#29327
2018-12-06 18:09:54 +00:00
Christophe Simonis d4c65a7ede [MERGE] forward port branch 11.0 up to 2156af480f 2018-12-04 17:11:57 +01:00
Christophe Simonis 2156af480f [MERGE] forward port branch saas-15 up to 9bfc12cb3f 2018-12-04 16:17:49 +01:00
Christophe Simonis 9bfc12cb3f [MERGE] forward port branch saas-14 up to 69d342f54c 2018-12-04 14:59:04 +01:00
Christophe Simonis 69d342f54c [MERGE] forward port branch 10.0 up to 4629a4fb0e 2018-12-04 14:29:52 +01:00
Jairo Llopis 81c26383b0 [FIX] auth_ldap: Avoid sending email for newly created user
If installed along with `auth_signup`, it sends an email when creating a missing user authenticated through LDAP.

It is a confusing message that makes no sense, because the user is, from his POV, not actually creating a new user, but just authenticating with a new app with his known company-wide credentials.

Besides, that invitation leads the user to change his password in Odoo, although he probably doesn't want to do that and have a password for Odoo and another in the LDAP server.

The best option is to disable that email completely, which is what this commit does.

closes odoo/odoo#29243
2018-12-04 12:13:39 +00:00
Nicolas Martinelli d160454226 [FIX] base_vat: Albania
The module `vatnumber` (which is not maintained anymore) uses an
incorrect validation method for Albanian VAT numbers. Therefore, we use
the library `stdnum`, on which `vatnumber` relies for most cases.

opw-1912680

closes odoo/odoo#29280
2018-12-05 13:56:52 +00:00
Julien (juc) Castiaux 3b39c31adc [FIX] website_forum_doc: Not possible to change ToC order
opw-1913300

closes odoo/odoo#29263
2018-12-05 09:41:48 +00:00
Julien (juc) Castiaux fb1ef15a5a [FIX] l10n_be: Account 451200 must be reconciliable
opw-1913108

closes odoo/odoo#29251
2018-12-05 08:48:20 +00:00
Nathan de Pryck 7386292bce [FIX] account: access to aged receivable report leads to MemoryError
When analysing the code thanks to Pyflame it cames that the 'prefetch_fields()'
function was runing most of the time. In order to improve the global performance,
I change the context of the move_lines : 'prefetch_fields = False'. It permit to reduce the
time of computation of the prefetch_fields and to avoid the MemoryError.

N.B.: The database of the customer (on saas) contains 1.3 millions of entry and to reproduce the issue
I have to set the HardMemlimit to 0.9 Go and the SoftMemLimit to 0.5Go.

OPW-1910422

closes odoo/odoo#29231
2018-12-04 09:54:00 +00:00
Sébastien Theys dc4a9d3db7 [FIX] account,purchase,repair,sale,web: fix report layouts
Following BS4 migration and adding sections and notes.

=====

Document templates:

- Remove margin from <p> in "informations" to allow them to be
	correctly centered vertically on their container.

- Also add a mt- and mb- on their <div> to better handle them going to a new
	line when there are too many of them.

- Add class for section and note to be able to customize them in layouts.

- Add class for price_total to be able to customize it in layouts instead
	of relying on :last-child.

- Add "page-break-inside: avoid;" on the "total" table to not split it
	between pages when it can be avoided.

- Fix sale report template "Informations" to use col-auto just like invoice
	See 6b8d7bb6d6

=====

Boxed layout:
	- fix section & note style
	- fix borders in general
	- fix the total table

Background layout:
	- fix section style
	- fix the total table

Clean layout:
	- fix page number vertical align

task-1889346

closes odoo/odoo#27782
2018-12-03 13:16:52 +00:00
Laurent Smet 869f99b704 [FIX] account: Copy invoice reference to the move
The reference is not copied to the invoice move because the invoice needs the move to get the
right number and then, we need the invoice number to compute the reference.

So, this commit is required to copy the reference to the move after the invoice validation.

/!\ DO NOT FORWARD-PORT!
This behavior has been already fixed in 12.1 but with too much refactoring for a stable branch.

closes odoo/odoo#29391
2018-12-10 10:59:34 +00:00
Nicolas Lempereur b1dbe432f9 [FIX] web_editor: ace have line number+resize
After 11.0, in a code editor (ace editor) on the frontend we could not
resize the editor or see line numbers.

This happen since:

- in 64d47c0bc5 ace editor (used when editing code) was updated.
- in ajaxorg/ace@5bf78e09 the line number bar was set aria-hidden
- in 9de1bc0ee aria-hidden element were forcibly hidden

Thus the column of line number (and used for resizeing) in the code
editor was unwillingly hidden.

Since we don't want to make change in library, we fix this in our
custom CSS for the code editor.

opw-1912824
closes #29399
2018-12-10 16:39:44 +00:00
Christophe Monniez d9b49c8870 [FIX] web: allow string attribute on non stored fields in pivot view
Support for string attribute on fields in pivot view was added in 24f7c7ce7f
In some cases, the field is not stored and read_group method is
overridden to allow its use in a pivot view. Such a field does not
appear in the measures dict trying to set the string attribute, leading
to a client crash.

With this commit, the string attribute is set after the non stored
fields were added to the dict.

closes odoo/odoo#29393
2018-12-10 15:03:47 +00:00
Goffin Simon 0b12ad1260 [FIX] website_sale: Missing fields in the product form
Fine tuning of this commit: 7b20604f2e

Co-authored-by @atp-odoo

opw:1911612

closes odoo/odoo#29373
2018-12-10 08:23:49 +00:00
Juhil Somaiya 689cc4935c [FIX] mrp: fixed product inventory uom issue
Before this commit, we are getting error that product_uom must be
matched because when we're adding line to inventory after updating the
quantity, product_uom changes to Units.

After this commit, error will not be generated as the default value of
product_uom_id is removed.

Fixes #29305

closes odoo/odoo#29371
2018-12-10 09:14:14 +00:00
Lucas Perais (lpe) 17547c1717 [FIX] lunch: write function is multi
OPW 1912897

closes odoo/odoo#29281
2018-12-10 08:13:44 +00:00