Commit Graph
140385 Commits
Author SHA1 Message Date
Antoine Prieels 9ed73b23d7 [ADD] adyen_platforms,pos_adyen: Add support for Adyen for Platforms
The goal is to add a nice payment solution to our users.

- Why Adyen?
  - Worldwide
  - Manages local payment solutions
  - Easy onboarding
  - For both PoS and eCommerce

- Why Adyen for Platforms?
  - The onboarding will be done directly from the customer's DB.
  - It's quite complicated for SMEs to get a partnership with Adyen as
  they have high requirements for transaction volume. By registering
  Odoo as a Platform with Adyen Marketpay, we allow our users to
  register as sub-merchants under a common account, removing this
  constraint.

As all users are grouped under a common account, all requests need to
provide the same API key. As this key cannot be shared, all requests to
the Adyen API will need to be proxied. A new proxy will be created on
`paymentproxy.odoo.com`.

To initiate a payment, 3 values are required:
  - `account_holder_code`: This code is provided by Adyen and is used to
  identify the sub-merchant under the common account.
  - `adyen_uuid`: This ID is used internally to identify the user.
  - `proxy_token`: This token is generated by the proxy during the
  account creation and is used to sign all requests.

The DB of the customer is the only host who has all the information
required to modify the sub-merchant info or initiate a payment. If
this information leak, the `proxy_token` can be reset on the proxy to
revoke all access to the API.

Before accessing the form to create an account, users will be
redirected to www.odoo.com where they will be asked to log in. This
ensures that we have contact information for this sub-merchant.

TaskID: 2129218
2020-09-29 04:25:44 +00:00
Antoine Prieels 57beab80fe [REV] pos_adyen: avoid concurrent updates
Revert commit e6372c3, the concurrent updates were solved by the change
in the order of the lines, not by the fact that functions were defined
as api.model
2020-09-29 04:25:21 +00:00
Christophe Simonis a2a0bfaa04 [FIX] base: avoid creating a new index at each model initialization
As example, on a runbot database, there are 13 duplicated indexes

```
4362411-14-0-all=> \d res_users_apikeys;
                                         Table "public.res_users_apikeys"
   Column    |            Type             | Collation | Nullable |                    Default
-------------+-----------------------------+-----------+----------+-----------------------------------------------
 id          | integer                     |           | not null | nextval('res_users_apikeys_id_seq'::regclass)
 name        | character varying           |           | not null |
 user_id     | integer                     |           | not null |
 scope       | character varying           |           |          |
 index       | character varying(8)        |           |          |
 key         | character varying           |           |          |
 create_date | timestamp without time zone |           |          | timezone('utc'::text, now())
Indexes:
    "res_users_apikeys_pkey" PRIMARY KEY, btree (id)
    "res_users_apikeys_user_id_index_idx" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx1" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx10" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx11" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx12" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx2" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx3" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx4" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx5" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx6" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx7" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx8" btree (user_id, index)
    "res_users_apikeys_user_id_index_idx9" btree (user_id, index)
Check constraints:
    "res_users_apikeys_index_check" CHECK (char_length(index::text) = 8)
Foreign-key constraints:
    "res_users_apikeys_user_id_fkey" FOREIGN KEY (user_id) REFERENCES res_users(id)
```

closes odoo/odoo#58746

X-original-commit: 94068037fbddc816926af7c68c19780926832722
Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-09-28 18:58:47 +00:00
Christophe Monniez e6eac65e4a [FIX] web: skip map views and increase timeout in click_all
During the click_everywhere test, the map views are tested but leads to
random failures when the view takes too long to load.

Moreover, the map resources are queried on external nominatim.org
servers. This could lead in the test runner being black-listed by
nominatim and more indeterminism as those servers are not under our
control.

For those reasons, this commit will skip the map views in the
click_everywhere test.

Also, the general time limit is increased. Five seconds was sometimes
too short, depending on external conditions (e.g.: server load or
screencast enabled).

Finally, on a database with all apps installed, the `Settings` menu of
some apps loads the full settings and it can takes a huge amount of time
to load on a clean browser (as in the tests). For that reason, the time
limit for the test of those menus was also increased.

closes odoo/odoo#58750

X-original-commit: 2f3ea94a46fde9870db6b6b1d6a4233aaff805ce
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-09-28 21:57:07 +00:00
Quentin Mourier f6f619beb7 [IMP] website_event_track: improve track view form
This commit improves the track view form so that speaker picture is above
the speaker biography.

Task ID-2325017
COM PR #57744
ENT PR #13571

closes odoo/odoo#58738

X-original-commit: 9391d16c1ae21cbae07e26e3ace524b0e0bfd0a2
Related: odoo/enterprise#13648
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-09-28 18:17:01 +00:00
Quentin Mourier eb0383de8c [IMP] website_event: improve "registration done" location display
Currently event location is displayed on the right of timing / calendar
buttons. This feels a bit strange as it is a bit lost in the screen.

In this commit we simplify display by displaying: registration taken, then
location, then timing + buttons. This was already the look-and-feel in
mobile and is therefore simpler.

Task ID-2325017
COM PR odoo/odoo#57744
ENT PR #13571

X-original-commit: f79a20b140069d6ef836f36e7bb5b6aefb736b76
2020-09-28 18:17:01 +00:00
qmo-odoo 3fa35f311b [IMP] event: Improve labeling in settings
Purpose is to ease users understanding the purpose and features of sub
modules. In this commit we improve various wording and copy writing of
event_* modules in settings.

Task ID-2325017
COM PR odoo/odoo#57744
ENT PR #13571

X-original-commit: b34d40cfb3f3af9cdd21530791e939120d075ff9
2020-09-28 18:17:00 +00:00
David Beguin 1f9cd08234 [FIX] survey: ensure to retrieve the participant's answer when restarting
In order to avoid making it possible to follow the same survey multiple times
at the same time, a survey cookie is added with the survey token and answer
token.

When starting the survey, if the cookie contains a valid answer token for that
survey token, the survey session is reloaded where the participant left it.
When the user finished the survey, the cookie is deleted to allow to retake the
survey later, if possible.

Note: A participant can still open multiple tabs with the same survey, but it
will be linked to the same survey answer. So if the user tries to submit another
answer, the late answer will overwrite the previous one.

Task ID: 2345468

closes odoo/odoo#58728

X-original-commit: c97c266313aff864f8c397fb1b42f792f9650e5e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-09-28 16:58:13 +00:00
Aurélien (avd) db76ed28cd [FIX] crm: correctly set default_partner_id when creating opportunities from contact form view
This commit fixes a missing default_partner_id in context of 'Opportunities'
stat button on contact form. It allows to immediately link a new opportunity
to the contact we came from.

Task ID-2343221

closes odoo/odoo#58722

X-original-commit: 77d4ba222630fa0f97351186782d09d2ec59a42a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-09-28 16:45:14 +00:00
fw-bot cd288bd1d9 [IMP] stock, mrp: make _split() return move values
This commit change the _split method to return new move values instead
of create it and confirm it.

This allow multi creation and multi confirmation when every move of the
recordset are split

Task : 2076873

closes odoo/odoo#58594

Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-09-28 15:04:19 +00:00
qsm-odoo 605c899b04 [FIX] web_editor: restore background and foreground color previews
Forward-port of [1] for the custom text tools for the website editor.
Still has to be improved with the future text tools.

[1]: https://github.com/odoo/odoo/pull/58690

Part of https://github.com/odoo/odoo/pull/58638

closes odoo/odoo#58745

X-original-commit: 19be84634d394f47ceb882c5ddd24585f31b50ae
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-28 18:58:25 +00:00
stefanorigano (SRI) 093ae661e9 [FIX] web_editor: review temporary text tools design
The text tools are being reworked with the new editor. Meanwhile, this
commit will get closer to the desired design with a pure CSS solution.

Part of https://github.com/odoo/odoo/pull/58638

X-original-commit: ad20f2b97ef925a27cef4976462d3d0aa39d0433
2020-09-28 18:58:25 +00:00
qsm-odoo 66cc01e76d [FIX] web_editor, *: show text tools in style tab only
*: website

As the text editor is still the summernote one, this improvement was
made possible through a series of hack. It has to be reviewed once the
new editor is ready.
This makes the text tools only appear in the style tab by switching to
it as soon as the summernote tools are updated. To prevent flickering,
css and js hacks had to be made.

This also moves the undo/redo buttons in the top bar with another hack:
those simulates click on the hidden summernote ones.

Part of https://github.com/odoo/odoo/pull/58638

X-original-commit: 0f65015b1b0a849bf109df11fd18a9e3a62820e4
2020-09-28 18:58:24 +00:00
qsm-odoo 9c41a344cf [IMP] web_editor, *: automatically increase default link color contrast
*: website

Inside a color combination (or outside, as considered the same as inside
color combination number 1), the link color can be configured. It is
set by themes to one of the 5 theme colors. Sometimes, no color of
those 5 colors contrast enough with the color combination's background
and we accepted that before, relying on the fact the user can change the
link color if he wants too. Now we automatically increase the contrast
of those link colors, except if the user overrides it.

This system might be extended to all foreground colors in the future but
the system has to be improved for that.

closes odoo/odoo#58739

X-original-commit: f8abb476fe0475799a3da66d49a92c7de2ace8a0
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-28 18:17:43 +00:00
qsm-odoo db4e47f8c4 [FIX] web_editor: restore background and foreground color previews
closes odoo/odoo#58733

X-original-commit: ee8cd9952736d9ea57609e218e3479963785a78d
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-28 17:19:23 +00:00
wan fba4e1036b [FIX] l10n_ar: invoicing tour
The invoicing tour suggests to change the invoice number manualy but it
is not doable with l10n_ar because of the document number mechanism.

The partner needs the AFIP responsability to be set in order to generate
the number.

closes odoo/odoo#58721

X-original-commit: 25889e469c063c307fee9c15b48fe4316207aeb3
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-09-28 16:44:46 +00:00
David Beguin 6f5132d108 [IMP] website_event_track: improve next talk suggestion
This commit aim to improve the algorithm to select the next talk suggestion
after a track has ended, in order to support small interact between two longer
talks.
Idea:
- all talks that begin less than 10 minutes before (all at same ordering level
whatever actual time)
- then talks beginning in a near future

Task ID: 2344522

closes odoo/odoo#58701

X-original-commit: 7f1e46331aecdaa4e08828240a495923c251c69f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-09-28 15:30:37 +00:00
wanandRaphael Collet f89d7bbf8c [FIX] core: prefetching of x2many lines in snapshot.diff()
The prefetching optimization was simply broken for x2many lines in the
snapshot method `diff()`.  Indeed, iterating on `line._prefetch_ids`
actually returns nothing, because this iterable object relies on the
value in cache of the x2many field, and the cache has been invalidated
before calling `diff()`.  In order to re-enable prefetching, we simply
populate the cache of x2many fields before looping on the lines.

Some testing with `account.move` and the relation `invoice_line_ids`:
For 335 invoice lines, changing the value of a field in the invoice
lines took about 1.9s with 1415 queries.  It now takes about 1.1s and 82
queries.

closes odoo/odoo#58687

X-original-commit: 5bd7ddd0850e56fbbae52b4478970331f9db1589
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2020-09-28 14:07:47 +00:00
root c4fa804cc6 [IMP] doc: update links to 14.0
closes odoo/odoo#58686

X-original-commit: 78abbd6472f4c389ef6b67a257754365f5b02741
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-28 14:07:25 +00:00
Ivan Yelizariev 3007e72333 [FIX] account: correct hint about fiscal position countries
Only delivery address actually matters:
https://github.com/odoo/odoo/blob/f9da0a6c80ae68283f4ef9af736253352ff4e1d4/addons/account/models/partner.py#L158-L162

closes odoo/odoo#58685

X-original-commit: a08f0721e853854c7e97f5060fc39fccb4b6b4e5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-28 14:06:59 +00:00
wan bf7920746b [FIX] account: do not display "false" as line name in automatic entry
If we select a line without an name for the automatic entry wizard, it
will be displayed as "false" in the preview widget. Even though, the
value will be set to NULL in the database, we don't want to see "false"
in the preview.

closes odoo/odoo#58680

X-original-commit: e6c93c2632555b100d31ba6745a8bca62d44450e
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-09-28 13:15:36 +00:00
Nicolas (vin) b09650d072 [FIX] account: fix a division by zero in automatic entries
When opening automatic entries on a group of entries which sum equals to
zero, a division by zero occurs which cause a traceback.

This commit will fix the issue.

task id #2334872

X-original-commit: bd8b81c62c4256898d579f81f066ad202f4ea79a
2020-09-28 13:15:36 +00:00
jdoutreloux b8d71b799d [FIX] project : fix issue with alias and display issue in portal
When the alias had been set, if the user wanted to disable it
he had to erase the email first. Otherwise unchecking the check box
didn't work.

Task-2299286

closes odoo/odoo#58634

X-original-commit: 45cd13e14fef0bab6921a1fff79335df9015cbf0
Related: odoo/enterprise#13613
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-28 10:57:13 +00:00
bat-odoo dbff65611c [FIX] hr: Fix the display of the chat icon on employee form
Currently, in employee form view edit mode, the icon of chat is
displayed underneath the name but it should be dsiaplyed in right
side of name like in readonly mode.

So in this commit, Fix the icon display issue and icon should be
right side of the name.

closes odoo/odoo#58623

Taskid: 2344588
X-original-commit: 903c8ef53cb0187075ce9db705a3d0b6faa32c8c
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-28 10:40:12 +00:00
jbm-odoo f5234d127e [FIX] hr: Give name to div for inherit
closes odoo/odoo#58606

X-original-commit: 6807c86d8568367f40a664a3bb69338372d4786e
Related: odoo/enterprise#13601
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-28 10:30:11 +00:00
Kairis 5c122cf508 [FIX] calendar: Break User token on several line
User settings (Calendar) the token was too long to be kept on one line.

closes odoo/odoo#58583

Taskid: 2335303
X-original-commit: b497837522779def181c19957e25c7629a567793
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-28 10:15:39 +00:00
Mithilesh Rao ff63baf95a [FIX] hr_expense: Fix default view in 'expense analysis' menu
Currently, expense analysis menu have default view as list and kanban
but is should be graph,pivot,list and kanban.
Here viewmode is already in same sequence but only list and kanban
view is linked with action. graph and pivot view is not linked with
action so it will be always comes up in last in sequence.

So in this commit, Link graph and pivot with the action so it should
comes up first in expense analysis menu.

closes odoo/odoo#58582

Taskid: 2337224
X-original-commit: e273afd187edca1df6b462af42db3cce58df88d7
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-28 10:15:17 +00:00
Nicolas (vin) 7c43d19c5a [IMP] account : Show company name on dashboard in multi-company
In a multi-company environment it can be difficult to see which journal
is from which company on the dashboard, when multiple company have been
selected.

This commit will update the dashboard to show the company names on the
journals in those cases

Task id #2337719

closes odoo/odoo#58574

X-original-commit: 64402d92e8e96350a909bd77818e70c40bdd29ae
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-09-28 10:10:14 +00:00
Kevin Baptiste 710e27c9c2 [FIX] hr_expense: should create button on kanban view
The kanban view was not properly using the custom javascript class.

closes odoo/odoo#58567

Taskid: 2340951
X-original-commit: dbc3785f5057a784104c434d6f0a06f2e9097208
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-28 10:04:46 +00:00
Mariska Archielli (ram) a2e77a8419 [FIX] mass_mailing_sms : traceback on create contact list
Fix traceback when creating a new contact by checking the id list is not empty.

Task ID : 2302578

closes odoo/odoo#58681

X-original-commit: 31f2bb5e494965d31f5e49d47908fd4b5eb64077
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-09-28 13:16:07 +00:00
Jérémy Hennecart 1cfd35cc97 [FIX] survey: fix trophy background certif in safari
Fix weird behavior between linear-gradient and background-size
with safari, if we don't set the value for linear-gradient.

task-2334731

closes odoo/odoo#58673

X-original-commit: c2747c60161c66f9c77feae884fd101edb693d80
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-09-28 12:29:04 +00:00
Jeremy Kersten 41bac94162 [FIX] website_[blog, forum]: fix loop in retro compatible routes
Purpose of the retro-compatibility route was to redirect the old to the new.
And not redirect to themself and create a loop

closes odoo/odoo#58672

X-original-commit: b5e1bafeb42e94b587c245e9e7aa844770a129c6
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-28 12:20:39 +00:00
Jérémy Hennecart a7c3e3ef6c [FIX] website: fix margin website_visitor
Fix margin for kanban view that was displaying a horizontal
scrollbar.

task-2346202

closes odoo/odoo#58669

X-original-commit: 97a43dde99835d4e3c4daf7e3e0b46342af46ab9
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-09-28 12:12:32 +00:00
Robin Heinz cfa89c54d3 [FIX] point_of_sale: Correct the return payment date
When registering payment, we display now the date + time instead just the date.

closes odoo/odoo#58667

X-original-commit: eb534d078dcdf58aedf09131dd57c8f6da69a910
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-09-28 12:09:07 +00:00
Bruno Zanotti (ADHOC) 9de59048a1 [FIX] l10n_ar: get_fiscal_position inheritance
The method get_fiscal_position was missing the @api.model decorator

closes odoo/odoo#58665

X-original-commit: 7cad8db251b62972b3a0ea8ca970014cd0f1b5c1
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-09-28 11:59:48 +00:00
Raphael Collet bc0dd33e5b [FIX] core: compute on batches of maximum PREFETCH_MAX records
Calling a compute method on 1M records inevitably brings a worst case in
cache prefetching: the code that determines which records to fetch has
time complexity O(N²).  We avoid this situation by calling the compute
method on maximum 1K records.  Each computed batch has a "prefetch set"
of maximum 1K records too, which avoids the worst-case scenario above.

closes odoo/odoo#58664

X-original-commit: 0b1aa660b1d94fe46dea09670b875f2d81ca36a3
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-09-28 11:59:23 +00:00
Raphael Collet e05361fb72 [FIX] core: small optimization in first computation of records
X-original-commit: 99f765139076671ecba3b49359652e7333a90e17
2020-09-28 11:59:22 +00:00
Aurélien Warnon 80a99157e2 [IMP] event_sale: speed up event price_subtotal computation
This commit improves the performance of the 'sale_price_subtotal' field of
event.event by refactoring the way it's computed.

The previous naive implementation looped on sale.order.lines linked to the
event and performed a currency conversion for every single line. This leads
up to thousands of requests to fetch the conversion rate and sum up everything
on a real production database like Odoo.com .

This new implementation groups the amounts by currency and performs a single
conversion per currency (factored by the number of events in 'self'). It has
the drawback of using 'today' to fetch conversion rates instead of the actual
SO date like previous implementation.

We (aka: all main POs as this decision was discussed) consider that as an
acceptable trade-off to increase performances.

Task ID-2335287

closes odoo/odoo#58650

X-original-commit: a4c4b03a09ffc08842f44b5759e3c7298cfbd915
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-09-28 11:32:27 +00:00
Benjamin Vray c460aa7994 [FIX] web_editor, website: fix menu colors in table of content
Before this commit, the colors of the navbar in the table of content
menu were not adapted to the color combinations system. With navbar in
top position, the background and the colors of the links were using the
same color.

After this commit, the colors of the list-group-item links are also
adapted with color combinations.

task-2312878

closes odoo/odoo#58645

X-original-commit: a0dc17676c570887773854243bcb8cd8823359d5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-09-28 11:29:20 +00:00
Kevin Baptiste 194850bc06 [FIX] calendar: set attendees on quickcreate
When creating an event through the quickcreate, the user creating the
event was not set as attendee.

closes odoo/odoo#58631

Taskid: 2334943
X-original-commit: 07d799a5f676ed68fd2ffd9cd9bac3269f947ad1
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2020-09-28 10:46:17 +00:00
Jeremy Kersten 75c2640ce5 [FIX] website: server_page match trailing slash
After this commit, if an url with trailing slash is not found we fallback
to the url without the slash with a redirect to respect seo.
With this change we have the same behavior that controllers.

We continue to support trailing slash if page explicitely created with /
via backend e.g. and for retrocompatibility.

task-2346185

closes odoo/odoo#58603

X-original-commit: 3d65424708d1623654756d58d78cec5f8d71276f
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-28 10:28:44 +00:00
Florimond Husquinet (fhu) 0f547a1b8f [IMP] mail_client_extension: post note with iap additional info
When a company is created, a note is added with all the additional
info retrieved from the IAP. Just like when autocomplete is enabled.

closes odoo/odoo#58598

X-original-commit: 0cc87a9349ab3d4e0d51a837deb6630d692ac98f
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-09-28 10:25:50 +00:00
Thibault Delavallée 9afeb6094a [FIX] digest: fix layout issues
This commit fixes several issues

  * there are still some jinja references although the template is now done
    in QWeb;
  * put preferences content inside the same paragraph to avoid unnecessary
    blank spaces;
  * fix hardcoded company name (olé);

Followup of fd8709515c

Task ID-2338930

closes odoo/odoo#58577

X-original-commit: fd838a3d87f5bd326921dd15c2a41c3d1d3dd131
Related: odoo/enterprise#13591
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-09-28 10:12:23 +00:00
Thibault Delavallée 305009a4d4 [FIX] event_sale: fix registration update from sale order
Since yet another change in view / server synchronization order line was
not correctly propagated to registration editor values. Registrations
were created several times when confirming an order as backend did not
receive order line information.

Task ID-2344167

X-original-commit: 406795fbee7be60c3346fa00a20755bfc1c8eff3
2020-09-28 10:12:23 +00:00
Thibault Delavallée 5f37bad75d [FIX] crm: remove unnecessary warning in phone format
In this commit we remove the warning logger when not being able to format
a phone number. Indeed this does not indicate there was a real issue.
It simply indicates that either the phone number is not parsable or not
matching given country format.

It happens in a lot of situation that phone numbers are not valid: bad
encoding, country mismatch due to {lead, task, ticket} / partner not always
being the same, ... This should not raise a server warning.

When using frontend SMS composer for phone number, a warning is displayed
to the user telling the number is probably incorrect. This is considered
as sufficient from UX point of view as it warns users. We do not think
we should warn admins that some data is incoherent in database.

This commit also

  * Revert "[FIX] crm: avoid linking demo leads with an unrelated partner"
    This reverts commit 2c94c4c81ffa171158586cd64828d27c537cd1d6
    -> having "invalid" data should be a valid use case of real life

  * Revert "[FIX] crm: get correct country for phone validation"
    This reverts commit a58f9fc154c038d72031b281e2bec2c0fc2915ba
    -> country of a lead comes from its partner if set but can be different.
    Same for phone numbers. Values on a lead after a compute are considered
    as complete. Sales persons could effectively have incoherent data on their
    form view but that is the result of what has been encoded.

Task ID-2325228

X-original-commit: cecc4ca6f02e599e193c3fa688bfcbd02ac0580b
2020-09-28 10:12:23 +00:00
Thibault Delavallée 073278642d [FIX] rating: improve parent container satisfaction computation
Currently rating globally allows 3 values for customers through email
requests: 5, 3 and 1. Through other means (frontend use of rating widget)
values from 5 to 1 are possible.

Only 5 is considered as a valid value for parent container satisfaction.
This leads to strange situation where a document with 4, 4, 4 and 5 has
only 25% of satisfaction.

This is considered as a bit harsh. In this commit we move the "satisfied"
limit of parent container as being above the "ok" value (aka, 4 and 5).

X-original-commit: c884a29b6b0f2cbc8b0aebbaed93d6f211621d1d
2020-09-28 10:12:22 +00:00
Goffin Simon 1769e45d74 [FIX] sale_crm: Default tag_id used when confirming order
Steps to reproduce the bug:

- Let's consider a service product P with Service Tracking = 'Create a task in an existing project'
and Project = PT
- Create a lead L and set a tag T on it
- Mark L as won and create a new quotation Q from L
- Add P on Q and confirm it

Bug:

An error was raised because the tag T didn't exsit on model project.task

PS: Confirming an order can trigger the creation of many records in different models and the generic field
tag_ids is defined on many models. So keeping it in the context when confirming an order can lead to many issues.

opw:2338764

closes odoo/odoo#58455

X-original-commit: 61a55aabaa46b002b7a4afb6335ab879026c740b
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-09-24 15:51:19 +00:00
Debauche StéphaneandXavier Morel 7ecb903bea [REM] *: ability to put raw modules in evaluation contexts
Co-authored-by: Xavier Morel <xmo@odoo.com>
2020-09-28 10:33:52 +02:00
Yannick Vaucher 2af6b7dcf6 [REF] l10n_ch ISR number computation
Add hooks to be able to tweak the Bank customer ID number for ISR-B

Those hooks will allow to not use of the field l10n_ch_postal for
multiple purposes.

Fixes conditions on which the reference is generated.
It shouldn't be always generated if l10n_ch_postal is set.
Only if a l10n_ch_subscription_xxx is set.

closes odoo/odoo#58398

X-original-commit: 4790b8e57aa357cda32818392d795b8c0dc48f43
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-09-24 09:56:14 +00:00
Olivier Dony 3f3c7b507a [IMP] base, totp: simplify form layout and improve responsiveness
Some of the TOTP-related forms contained an attempt at making a centered
modal pop-up, using a bootstrap `card` that would also serve to
emphasize that the interaction was sensitive and security-related.
Some of the "footer buttons" were moved inside the form to make it
more obvious that they were part of the interaction flow.

However some of this caused breakages of responsiveness and did not yield
a really satisfactory result anyway.

This commit switches back to using regular non-centered forms. It looks
quite ugly because the content is better suited for a narrow modal, but
it means less surprises in terms of layout and less responsiveness
issues.

closes odoo/odoo#58541

closes odoo/odoo#58544

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-09-26 09:45:17 +00:00