Commit Graph
140847 Commits
Author SHA1 Message Date
Jeremy Kersten 36e894d438 [FIX] website_event(_track): use is_view_active to benefits from the cache
Purpose of this commit is to speedup loading of event pages by using
is_view_active helper. It allows to know if a view (template) is active.
This is generally used for options in fontend templates.

Using is_view_active allows to use a cache, speeding up loading of pages
by removing unnecessary queries.

Task ID-2348382

closes odoo/odoo#58780

X-original-commit: bf24c18c44fc45e934524cdeab3d5d8ba50b4def
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-09-29 10:27:50 +00:00
Thierry Ducrest 590c5fbe2d [CLA] Add tdu to camptocamp cla
closes odoo/odoo#58773

X-original-commit: 1d95a9e540c442b65b1f51adde5a265bf8089bef
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-29 09:40:03 +00:00
Jérémy Hennecart 24fddf6e9f [FIX] crm: fix redundancy of action menu
Fix the redundancy of "Send email" menu on the crm.lead model. We now correctly
have a form action in comment mode, and a list action in mass mail mode.

We also update the use of those actions according to the business flow: form
based from a single record, mass mail from a batch of records.

Task ID-2310462

Somehow forward-port of X-Original-Commit: odoo/odoo@9ded57d87f

closes odoo/odoo#58774

X-original-commit: ad7d28ab1abe484102cd3ec18ee6ce9c9ac7b5bb
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-09-29 09:40:32 +00:00
std-odoo 8bba8852b8 [FIX] survey: fix "multiple choices one answer" keyboard related bug
Bug
===
1. Create a survey with the option "One page per question"
2. Create a "Multiple choice - only one value" question
3. Go to the survey, select a question
4. With the keyboard unselect the question
5. Submit

You will be able to submit your answer even if nothing seems to be
selected.

We also want to be able to unselect answers with the keyboard.

Technical
=========
The event "onchange" can be triggered for the radio button even if there
was no change. The reason is because we always "write true" on the radio
(even if it was already check) and we always trigger manually the event
"onchange".

Task-2345463

closes odoo/odoo#58771

X-original-commit: ad2b4fe9c1ad0f09df33daab3a0784d2d5392fbd
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-09-29 09:31:30 +00:00
Aurélien Warnon 01d35051c0 [FIX] website_event_track_exhibitor: fix ribbon style in exhibitor page
This commit fixes the style of the ribbon displayed in the exhibitor dedicated
page to use the newly introduced display_ribbon_style field on the
event.sponsor.type model instead of the sponsor type name
(previous implementation).

Task 2336247

closes odoo/odoo#58652

X-original-commit: ef38eda84025f0bd7aad2b12d60a5618a280bf19
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2020-09-28 11:33:42 +00:00
Jeremy Kersten 6538e20bb6 [FIX] tools.sql, website_*: increment counter with skip lock
*blog, forum, slides

Based on https://github.com/odoo/odoo/pull/48552#discussion_r440061218 suggestion

Add a new method 'increment_skip_lock' in tools.sql to allow to easily
increment a specific field of 1 if the record is not locked.

The method return boolean if at least 1 record has been incremented.

closes odoo/odoo#58765

X-original-commit: d92e61e89f468c2db2fbd68b2f0d6b36c77f1065
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-09-29 08:48:59 +00:00
Dhruv Patel 2004847c15 [FIX] mail: activities without summary added display false in export
Currently, activities having blank summary field exported in xls or csv display
False. Instead of that, need to display the activity type like Email, To Do,
Call, Meeting, etc. as its display in the list view.

With this commit, if the activity type has summary then it will display summary
value otherwise it will display the activity type name if summary is not added.

Task : 2254851

closes odoo/odoo#58747

X-original-commit: 811edc466edbe9fc4b22e6f140cb5601612404f1
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-09-28 19:11:11 +00:00
Nicolas Lempereur 00e7122a40 [FIX] sale_coupon: sale_coupon default current lang
Default on current environment language when there is no customer set on
the current coupon.

opw-2339815

note: part of this forward-port was not necessary because it was done in
98678199a3

X-original-commit: odoo/enterprise@d00981fe8f
closes #58473

closes odoo/odoo#58734

X-original-commit: f1b9ebe57f37bcfb271e00a7e9ba15a45493bd73
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-09-28 17:32:08 +00:00
Jorge Luis Quinteros ae7a3e09b2 [CLA] signature for JorgeQuinteros
closes odoo/odoo#58732

X-original-commit: 98c006e5c78bf7b31703846d3cf602da84e83a76
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-28 17:17:10 +00:00
Mohammed Alhalwachi 8310c44c0f [CLA] Signature for jidd6
closes odoo/odoo#58724

X-original-commit: e6249992b33b42edf191772dba4c406cbfcd7005
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-28 16:46:28 +00:00
Martin Trigaux 5c3923c3e3 [IMP] doc: specify the minimum version of PostgreSQL
Specify 10.0 as present in both the latest LTS versions of Debian and
Ubuntu (Debian Buster=11.0, Ubuntu Bionic=10.0)

Update link to point to a postgresql.org URL to be more "official"

Fixes odoo/odoo#34226

closes odoo/odoo#58710

X-original-commit: 698336cbcfdefd78728901edeb365febe0b8cb77
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-28 16:03:27 +00:00
Antoine Prieels 3566dc9005 [ADD] payment_odoo_by_adyen: Adyen for Platforms in eCommerce
Adyen for Platforms integration in eCommerce.

closes odoo/odoo#58752

Taskid: 2129218
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-09-29 04:25:59 +00:00
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