Commit Graph
122137 Commits
Author SHA1 Message Date
Yenthe V.G b5e32b8318 [FIX] fleet: make fleet vehicle state translatable
closes odoo/odoo#28999
2018-11-27 13:48:23 +00:00
Laurent Smet eaf76bff5a [FIX] account: Fix regex matching rule in reconciliation model
Before:

Suppose 'invoices 2018/0002 and 2018/0003' that becomes '2018000220180003' after
REGEXP_REPLACE(st_line.name, '[^0-9]', '', 'g').

'2018000220180003' ~ '20180002' match: OK
'2018000220180003' ~ '2018' match: NOT OK
'2018000220180003' ~ '' match: NOT OK

After this commit:

move.name/move.ref giving an empty string are filtered out.

'invoices 2018/0002 and 2018/0003'
becomes ' 20180002 20180003' after REGEXP_REPLACE(st_line.name, '[^(0-9|\s)]', '', 'g')
and becomes {"",2018001,2018002} after the regexp_split_to_array.
Then, the matching is now done by a comparison instead of a pattern matching between the move
and this array of potential candidates.

'20180002' = ANY({"",2018001,2018002}) match: OK
'2018' = ANY({"",2018001,2018002}) not match: OK
'' is filtered out: OK

closes odoo/odoo#28962
2018-11-22 13:37:13 +00:00
Rémi Rahir 879a719478 [IMP] base: update phone codes on res.countries
closes odoo/odoo#28580
2018-11-27 13:03:58 +00:00
Rémi Rahir 191665f45a [FIX] crm_reveal: increase timeout of external server request
every request on the IAP-service server sends a batch of 25 views to
process. Each of them takes around 1.5 second to be processed, thus a
full batch will exceed the default timeout of 15 seconds.

In addition, we removed the config parameter that allowed to choose the
batch size as an high value could provoke another timeout error that
would evade the user's attention.

closes odoo/odoo#28967
2018-11-22 15:19:44 +00:00
Xavier Morel 14ff69a46c [IMP] web: keep ?query on becoming superuser
Being in debug mode is necessary to become superuser (whether on the
login page or within the client), however because the becoming
endpoint would straight redirect to the _login_redirect result the
debug mode would be lost, which is commonly inconvenient.

Replace the redirect_with_hash call by local_redirect, which goes
through great pains to conserve the ?debug by default.

Task 1908202

closes odoo/odoo#29058
2018-11-27 09:32:57 +00:00
Alexandre Kühn 9df8e88046 [FIX] mail, test_mail: make mail_tour work
This tour was broken since the following refactoring:
https://github.com/odoo/odoo/commit/cd34f6de727d5b3858420cff3c9d3c5995c4e75c

With this commit, mail_tour should work correctly, and
is automatically run on runbot.

Note that the tour is automatically run in the module `test_mail`,
so that the tips are not displayed by installing Discuss.

Task-ID 1912730

closes odoo/odoo#29040
2018-11-26 16:26:34 +00:00
Goffin Simon 00bf6709a8 [FIX] mrp: BOM recursion with different variants
Let's consider two variants V1 and V2

The function check_cycle was too restrictive, it didn't allow
to create a BOM for V1 with a dependence to V2.

But a common use case could be for example:

A black T-shirt made  from a white T-shirt and black color.

opw:1911622

closes odoo/odoo#29038
2018-11-26 14:22:17 +00:00
Lucas Perais (lpe) 034a27f630 [FIX] web: customizing filter doesn't close dropdown
Have a many2one, click on search more

Open the filter menu of the search view

Add custom filter

Click to select a field

Before this commit, the whole dropdown closed

After this commit, it doesn't

OPW 1911337

closes odoo/odoo#28969
2018-11-26 14:47:44 +00:00
Alexandre Kühn 6f7a04be0b [FIX] mail: reply message from inbox
Revision on https://github.com/odoo/odoo/commit/cd34f6de727d5b3858420cff3c9d3c5995c4e75c

Before the commit above, it was possible to reply to a message
from Inbox. Those messages were linked to a document, and replying
to any of them put a response in the related document.

This feature has been broken since the commit above: the reply
icon was only shown on messages linked to a channel, instead of
message linked to a document. Also, it was erroneously prompting
that the message was sent to the channel, even though it was not
the case.

This commit fixes the issue by toggling the visibility of the
reply icon, so that it is shown only for messages that come from
a document. Also, since posting a message requires a thread, this
commit added the possibility to post a message from a mailbox,
which instead posts the message to the related document thread.

Task-ID 1912647

closes odoo/odoo#29028
2018-11-26 14:12:50 +00:00
Lucas Perais (lpe) 889bdd3569 [FIX] web: fielddate[time] should select their value when entering them
Before this commit, when focusing on a date[time] field, the value was not selected
In v11.0, it was

This is due mostly because of the migration to BootStrap 4

After this commit, the value inside the input is selected

OPW 1911333

closes odoo/odoo#28989
2018-11-26 14:51:09 +00:00
Goffin Simon b27c5e0c36 [FIX] base: Wrong view displayed
Steps to reproduce the bug:

- Go to Contact app
- click on Configuration > Bank accounts
- Create a new one

Bug:

It was impossible because the field partner_id was hidden.
The form view view_company_partner_bank_form was displayed instead
of view_partner_bank_form.

opw:1908114

closes odoo/odoo#28916
2018-11-26 12:25:11 +00:00
Goffin Simon a9c9a3d8e4 [FIX] maintenance: Access rights with admin
When only installing in a new instance the app maintenance,
the admin was not in the group 'group_equipment_manager'.
So when going to Maintenance > Equipment, the button create
was not available

opw:1912453

closes odoo/odoo#29026
2018-11-26 12:06:10 +00:00
Nicolas Lempereur 6d7a085040 [FIX] sale: de translation can ecommerce wired
There was an issue in translation that broke the mail template "Sales
Order: Send by email" in german. This prevented to do a wired sale on
the ecommerce in german.

This has been fixed in https://transifex.com/odoo/ but is done in this
PR to fix it more speedily than next week.

opw-1911419
opw-1911696
closes #29033
2018-11-26 17:21:02 +00:00
Jeremy Kersten 18e3746969 [FIX] website_sale: uniform multi-website public users handling
When determining the last order for a given user, public users from
other websites need to be properly ignored. The previous behavior was
broken by 9d72263717
2018-11-23 12:14:13 +00:00
Alexandre Kühn b4f132ca21 [FIX] bus: elect master tab when master tab is unloaded
Before this commit, chat windows could not be sync'ed
between browser tabs for about 10 to 20 seconds.

This issue is caused by the implementation of the
crosstab longpolling, which uses a master-slave
architecture with a single tab being the master tab.
The master tab is responsible for performing the
longpolling RPC, so that it keeps a single HTTP request
for all Odoo tabs. Other tabs are synchronized through
the local storage.

When the master tab was closed, a new master tab election
must occur. However, this process was taking up to 20 seconds,
due to the tab waiting for their next tick on the local
storage to initiate a new election. The tick for a slave
tab is 10 seconds, and it may jumps a tick in case the master
tab is closed exactly before the tick, hence extending the
duration to 20 seconds.

This commit fixes the problem by ensuring that the tab
election for the longpolling is done right after the master
tab is closed. As a result, a new master tab should follow
right away.

Steps to reproduce:

1. open two tabs.
2. open a chat window in one tab: it opens in both tabs.
3. fold/unfold chat window in one tab: both tab should sync.
4. refresh both tabs.
5. fold/unfold chat window in one tab: both tab should not sync.
6. after 10 or 20 seconds, both tabs should again sync.

Task-ID 1911437

closes odoo/odoo#28925
2018-11-21 16:43:27 +00:00
Toufik Ben Jaa dbd5cb48e2 [FIX] mail: check access rights on models when fetching messages
- When fetching messages (e.g. opening discuss), we do not check if the
  model associated to a message is accessible for the current user.
  This could result to access rights error messages when trying to read the
  main attachment of the associated record.

  To avoid to triggers this errors, we first check if the current user
  has read access to the specific model, if so we try to read the
  record's main attachment.

closes odoo/odoo#29025
2018-11-26 10:42:37 +00:00
Nicolas Martinelli fab4451c0e [FIX] account: account documentation
The example given when creating an account only applies to United
States. It is then confusing to users in other countries.

opw-1908241

closes odoo/odoo#29019
2018-11-26 08:23:42 +00:00
Robot Odoo 96506d1add [MERGE][FIX] mail: several discuss and messaging menu fixes
This merge fixes the following issues

1.  No prefix '#' on DM chats
2. Undated previews appear last in the messaging menu

It also adds a missing test for "[FIX] mail: add mention no set focus on subject" https://github.com/odoo/odoo/commit/6d5df714a7970f69a27296c157b08772ceac5b7d.

Task-ID 1911738
Task-ID 1912001

closes odoo/odoo#28926
2018-11-26 10:51:39 +01:00
Alexandre Kühn c45c5bb411 [FIX] mail: messaging menu show undated DM previews last
This commit fixes two related issues:

1. Previews without any message should not be dated.

Before this commit, when a channel or dm preview had no date,
it was displaying the current date. This commit fixes the issue
by not showing the date for those previews.

2. Dates previews should appear before undated previews.

Before this commit, undated previews were considered similarly
as dated previews in the ordering of previews in the messaging
menu. Since DMs are shown before Channels, any pinned DM without
any message were displayed on top of messages with some message.
This commit fixes the issue by putting undated previews after
dated ones. This rule is applied before considering type of the
thread (i.e. DMs before channels).

Task-ID 1912001
2018-11-26 08:51:34 +00:00
Alexandre Kühn c22539fd8c [ADD] mail:tests: add test for https://github.com/odoo/odoo/commit/6d5df714a7970f69a27296c157b08772ceac5b7d 2018-11-26 08:51:34 +00:00
Alexandre Kühn 341fb5f240 [FIX] mail: no '#' prefix in DM name
Before this commit, DMs had the prefix '#' in their
displayed name (e.g. '#Demo User').

This commit fixes the issue by putting this prefix
only on non-chat DMs. In particular, mailboxes, DMs
and Livechats no longer show this prefix. This change
is also visible in the breadcrumb of the discuss app.

Task-ID 1911738
2018-11-26 08:47:36 +00:00
Odoo Translation Bot 07f6b8ef57 [I18N] Update translation terms from Transifex 2018-11-25 01:26:32 +01:00
Christophe Simonis 2569bcc11d [FIX] crm: allow to filter leads by activities
This was possible do to it on opportunities, but not on leads (other
search view).
This is needed to allow effective search from activity dropdown.

closes odoo/odoo#29003
2018-11-23 17:42:22 +00:00
sri-odoo b6246b3a46 [FIX] * : add missing app icons
- Add missing SVGs files
- Add icons for new apps

closes odoo/odoo#28992
2018-11-23 15:28:32 +00:00
Jeremy Kersten 04a3d61954 [FIX] website: settings - related field are now RO by default
Following of 3f4f77f and 52a8ed3c0c

closes odoo/odoo#28997
2018-11-23 15:05:46 +00:00
Aaron Bohy 06b91b7658 [FIX] web: benchmarks: add missing test_utils
Without those, the benchmarks suite can't run.

closes odoo/odoo#28996
2018-11-23 15:00:17 +00:00
Aaron Bohy fad35964bf [IMP] web: backport of new asserts
This rev. is a complement to the partial backport 49e78f46 of
abf32b8. In addition to the helpers, we also backport the asserts
(like isVisible, containsOnce...).

closes odoo/odoo#28994
2018-11-23 14:51:49 +00:00
Robot Odoo df1fea4de1 [FIX] web_unsplash: new guidelines negociated with Unsplash
Unsplash CEO asked us to stop exposing our key client side (even if it was
only in the browser network and previously allowed by their API team leader).

Also, all our Odoo instances (on premise or not) should share the same
production key, which is not possible in our case obviously.

After multiple exchange, it has been negociated that:
1. Our non saas user won't be able to apply for a production key and should
   prefix they Unsplash application name by 'Odoo:'. Their key will remain in
   test mode.
   Indeed, Unsplash won't be able to review every Odoo application and ensure
   it respects the API terms and it is a real application.
2. Our saas user will query Unsplash server side so the key remain hidden.
3. The documentation should explain it all

task-1911345

closes odoo/odoo#28804
2018-11-23 17:04:50 +01:00
Robot Odoo cd2637cfdf [MERGE] Avoid some unnecessary ormcache invalidations
Avoid invalidating ormcache when possible.
There are currently too many invalidations, which makes the ormcache less effective in practice.

closes odoo/odoo#28993
2018-11-23 16:04:32 +01:00
Romain Derie 55073e3baa [FIX] web_unsplash: add unsplash searched terms in attachement name/url
Before this commit:
An unsplash image would be saved as an attachement with:
  - A name like 'x54ze78z.JPEG'
  - An url like '/unsplash/x54ze78z.JPEG'
  - A filename like 'x54ze78z.JPGED'
We would not store the searched terms in the name/url.
Then, we would not be able to search on local attachement in the media dialog
to retrieve the images based on what we searched.

Now:
We store the searched terms in the name/url so it can be used later in the
media dialog search:
  - Name like 'big_lion.jpg' (duplicates may be possible)
  - Url like '/unsplash/x54ze78z/big_lion.jpg'
  - Filename like 'unsplash_x54ze78z_big_lion.jpg'

Task-1911345
2018-11-23 14:58:48 +00:00
Romain Derie 8b1a05d9e0 [FIX] web_unsplash: don't expose client_id in network
Unsplash CEO asked us to stop exposing our key client side (even if it was
only in the browser network and previously allowed by their API team leader).

After multiple exchange, it has been negociated that:
1. Our non saas user won't be able to apply for a production key and should
   prefix they Unsplash application name by 'Odoo:'. Their key will remain in
   test mode.
   Indeed, Unsplash won't be able to review every Odoo application and ensure
   it respects the API terms and it is a real application.
2. Our saas user will query Unsplash with a dedicated enterprise key
3. The documentation should explain it all

Task-1911345
2018-11-23 14:51:07 +00:00
Raphael Collet c96d4cdbad [FIX] base: ormcache invalidation in ir.config.parameter
Writing on a parameter invalidates the ormcache and propagates the invalidation
to other workers.  Setting a parameter to its current value should not trigger
ormcache invalidations.
2018-11-23 14:02:17 +00:00
qsm-odoo 9049892152 [FIX] website: add some more BS3 compatibility
Completes https://github.com/odoo/odoo/pull/27981

- Correct `col-*-offset-*` support.

- Compatibility for BS3-deprecated `visible-*` classes (only not taking
  care of table/table-row/table-cell cases as difficult with sass and
  those classes were already BS3 deprecated anyway).

- Correct order for BS3 `visible-*-*` and `hidden-*` classes (otherwise
  their combination are not correctly working). Also, the 'inline'
  version was forgotten by previous PR.

- Compatibility for BS3 `btn-xs` class.

closes odoo/odoo#28842
2018-11-22 14:09:22 +00:00
RomainLibert 1111de6eb2 [FIX] hr_holidays: use display_name instead of name
In order to see the remaining days in the tree view we need to use
display_name instead of name, as display name will use the name_get
which is overriden to add this information.

closes odoo/odoo#28981
2018-11-23 10:52:42 +00:00
Yenthe V.G 5fd5c4095b [IMP] hr_recruitment: improve English in demo data
closes odoo/odoo#28970
2018-11-22 16:59:58 +00:00
Raphael Collet e181f592f3 [FIX] odoo: ormcache invalidation on loading registry
Do not propagate cache invalidations to other workers when simply loading the
registry.  Only do it when installing/upgrading/uninstalling modules.
2018-11-22 11:05:30 +00:00
Raphael Collet ad065093eb [FIX] models: ormcache invalidation on import
Do not propagate cache invalidations to other workers when changes must be
discarded, because of an import error or a dry run, which are both handled as
successful transactions.
2018-11-22 11:03:51 +00:00
len-odoo fff6c93830 [FIX] board: fix the domain of consecutive 'add to dashboard' operations
Add a search containing a domain to dashboard. Remove that domain.
Do a new search with a different domain.
Add that search to dashboard;
the domain sent would be the concatenation of the two domains.

We make it so that only the last domain is sent, with a test.

opw 1907650

closes odoo/odoo#28843
2018-11-20 13:44:56 +00:00
Christophe Simonis b3052b690f [FIX] point_of_sale: use pycompat.izip 2018-11-23 00:35:16 +01:00
Christophe Simonis 5de8842b31 [FIX] account: correct test
Let postgres do the casting...
2018-11-22 21:38:45 +01:00
Christophe Simonis 97f3f9d118 [FIX] point_of_sale: adapt code and test to version 12
Oversight of previous forward-port.
2018-11-22 21:36:53 +01:00
Christophe Simonis 4cbcbe9ea4 [FIX] base: adapt property field optimization to native date(time) fields
See b6d32de31e
2018-11-22 20:33:22 +01:00
Christophe Simonis 70f9cb33ac [FIX] base: remove leftover print statements 2018-11-22 20:19:06 +01:00
Christophe Simonis b4e1be8ab0 [MERGE] forward port branch saas-11.3 up to b09f624f20 2018-11-22 20:06:48 +01:00
Christophe Simonis b09f624f20 [MERGE] forward port branch 11.0 up to 263b388c50 2018-11-22 17:52:57 +01:00
Christophe Simonis 263b388c50 [MERGE] forward port branch saas-15 up to e44c35f407 2018-11-22 17:06:31 +01:00
Nicolas Lempereur 1c4d49330e [FIX] mail: notif manager positions date + check
By default in the notification manager we see something like:

```
record name     {a second ago}
summary                      V
```

but if for example the record name is long or the summary empty, we can
have something like:

```
record name so very long {a s}
V
---
record name so very very lo...
                             V
```

This is because the record name was not allowed to grow, and the
positionning of the check mark based itself on the existence of the
summary container (.o_last_message_preview).

With this change the date a message was sent is shown in any case and
the check mark is on the right.

opw-1911654
closes #28960
2018-11-22 14:45:33 +00:00
Raphael Collet 9d72263717 [FIX] base: partner.user_ids only shows active users
Returning inactive users breaks many features based on the partner's user ids
(among which the company switcher).

This reverts a small part of commit 14af2c7f2fe6c14afb96d7e9f2bb02b2a022eaae
which is related to #25939.  That part was not necessary and had some
unintended side-effects.

closes odoo/odoo#28947
2018-11-22 15:03:06 +00:00
Yannick Tivisse e3a4bfa1c6 [FIX] hr_payroll: Display currency on payslip pdf report
Purpose
=======

There is typo that doesn't display the currency next to the different amounts
on the payslip report.

closes odoo/odoo#28964
2018-11-22 14:46:45 +00:00
Christophe Simonis e44c35f407 [MERGE] forward port branch saas-14 up to a9752d3ad3 2018-11-22 15:03:01 +01:00