Commit Graph
134738 Commits
Author SHA1 Message Date
Odoo's Mergebot fe74b0b6f4 [MERGE] base, various: remove unused views (limited to Marketing applications)
PURPOSE

Remove dead views to clean dead records

SPECIFICATIONS

Find unused views and remove them, notably specific views that
are not used anymore because generic one is always taken. In
this merge we remove dead views linked to Social/Marketing
applications.

LINKS

Task ID 2196317 (Social/Marketing specific)
Community PR odoo/odoo#48086
Upgrade PR odoo/upgrade#966

Followup of odoo/odoo#46435 (actions cleaning)
Followup of odoo/enterprise#8846 (actions cleaning)
Followup of Task ID 2196183 (actions cleaning)

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-23 10:00:57 +01:00
Victor Feyens 067034453b [REF] mass_mailing_sms: remove unused views
PURPOSE

Remove dead views to clean dead records

SPECIFICATIONS

Find unused views and remove them, notably specific views that are not used
anymore because generic one is always taken.

LINKS

Task ID 2196317 (Social/Marketing specific)
2020-03-20 15:01:39 +00:00
Victor Feyens bd748c10be [REF] crm: remove unused views
PURPOSE

Remove dead views to clean dead records

SPECIFICATIONS

Find unused views and remove them, notably specific views that are not used
anymore because generic one is always taken.

LINKS

Task ID 2196317 (Social/Marketing specific)
2020-03-20 15:01:39 +00:00
Victor Feyens bbce92b436 [REF] base, various: remove unused views
PURPOSE

Remove dead views to clean dead records

SPECIFICATIONS

Find unused views and remove them, notably specific views that are not used
anymore because generic one is always taken. Notably

  * view_partner_short_form: a short form view on partner that is not used
    anywhere anymore. Indeed it has a priority of 2 whereas default form view
    has a priority of 1 (lower better). It is not referenced in actions
    anymore. It is therefore dead.

LINKS

Task ID 2196317 (Social/Marketing specific)
2020-03-20 15:01:39 +00:00
Nisha patel e428d473c3 [IMP] various: Allow to select only internal users on m2x field with res.users
Purpose of this task is to prevent users from setting portal users on
internal documents by mistake, and preventing noise and performance
issues resulting from loading all the portal users in those fields.

This commit fixes internal many2x fields to res.users which are now
restricted to internal users by setting domain (share=false) on form view.

closes odoo/odoo#47553

Taskid: 2172779
Related: https://github.com/odoo/enterprise/pull/9204
Related: odoo/enterprise#9204
Closes: #47553
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-16 10:28:35 +00:00
Nicolas Martinelli c0ccf6f103 [FIX] purchase_stock, stock_landed_costs: bill after LC
1. Create a product with a category AVCO + Automated and set a price
   difference account
2. Create a Purchase Order for 1 unit at a value of 1000,
3. Stock entry at receipt
                               D         C
   Stock interim received             1000
   Stock valuation          1000
4. Create a vendor bill for a Landed cost, post it
                               D         C
   Stock interim received    100
5. Create the landed cost from the bill and apply it on the receipt of
   point 3
                               D         C
   Stock valuation           100
   Stock interim received              100
6. Create the vendor bill for the initial PO

Current entry is not correct:
                               D         C
Stock interim received      1000
Price difference account               100  --> Shouldn't take place
Stock interim received       100            --> Shouldn't take place

This happens because the valuation layers of the landed cost are taken
into account when computing the unit price of the product.

This shouldn't be the case: when computing the price difference between
the invoice price and the stock move price, LC should be filtered out.

opw-2183511

closes odoo/odoo#47804

X-original-commit: 9bd3feb7f8778ba65e1974ef012ca3a4608878b1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-23 08:08:01 +00:00
william c71658bb8c [FIX] l10n_lu: tax group properties not set
The tax properties were only set on the main company with the way the
taxe groups were declared.

closes odoo/odoo#48044

X-original-commit: 2d74471649db3cfbcce35c7d347dbf2edeed7216
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-19 15:20:47 +00:00
Jorge Pinna Puissant 2f0008c7c7 [FIX] sale_timesheet: error when change the project and task of a timesheet line
1. Install the sale_timesheet module;
2. Go to the timesheet menu, and add a new line;
3. Select a project and a task linked to a SO line (ex: DPC - SO037;
    Junior architect)
5. Save the line;
6. From the list view, edit the line, and modify the project and task.
    You must choose a task linked to a SO line (ex: AGR - SO036; Senior
    Architect);
7. Save.

Before this commit an error message was raise 'This timesheet line
cannot be billed: there is no Sale Order Item defined on the task, nor
on the project. Please define one to save your timesheet line.'

opw-2197213

closes odoo/odoo#48129

X-original-commit: c0249fb3480e422e63094e977fcb795aa754ba67
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-03-20 15:45:13 +00:00
fja-odoo 36269c5660 [FIX] web_editor: revert datepicker font awesome 5
datetimepicker today button used a font awesome 5 icon.
Font Awesome 5 was reverted to 4.7 but not this line.

introduced by: 699890d3f0

task-2211899

closes odoo/odoo#48135

X-original-commit: 083f7bb3e1b8aef9e2ebd86bc8c059d39473fe6b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-20 16:55:30 +00:00
Jeremy Kersten 94f8f15036 [FIX] website: make handle_visibility private
This commit:
   - make handle_visibility a private function (even if not
     exploitable in rpc easily since it uses request.website)
   - encrypt the password in db (even if not critic, since this
     password could be shared on twitter, ... it doesn't cost anything
     to secure it a bit more)
   - remove useless sudo, since handle_visibility does a sudo itself.

In the future, this notion of visibility should be handled on controller layer,
and no more on the View layer (during rendering)

closes odoo/odoo#48145

X-original-commit: 06e0e48217f25f17dff23331111f5dcb98e8cecd
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-03-21 10:23:32 +00:00
william 92f9d9b21b [FIX] account: depends in compute name
opw-2220539

The depends of _compute_name and _compute highest_name could lead to a
double recompute.
To reproduce:
* create a draft invoice in a new journal; a name is set
* post a new invoice in the same journa; the name is the one of the
draft + 1
* post the draft invoice; the name is changed to the other posted + 1
but it shouldn't

closes #47944

closes odoo/odoo#48144

X-original-commit: 2d7b751477d9c723fcbbc868534f47565e0a1621
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-20 20:10:00 +00:00
Aaron Bohy 25aaf7afcf [FIX] sale,*: product_configurator: can drag&drop row
*sale_product_configurator

Since commit 50bf830, a crash occurred when a row containing a
many2one displayed with widget 'product_configurator' was dragged
and dropped.

For instance, open a quotation with at least two rows, and drag and
drop one of them.

Issue reported on task 2206228

closes odoo/odoo#48128

X-original-commit: d9c35b40b7df588f9e81142a2b272d9c7da06e04
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-20 15:44:47 +00:00
Odoo's Mergebot fd113d48a2 [MERGE] *: ir.rule declaration cleanup
* remove global assignation in xml, it is a computed field anyway, let the orm compute it
* put all `ir_rule` definition as noupdate in the xml

closes odoo/odoo#47688

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-03-20 17:24:11 +01:00
Victor Feyens a3ded9043d [IMP] *: declare ir.rule in noupdate
ir.rule are default values but can be customized based on the
company's policy and needs.
This is typically a record that is in noupdate as should be
customization-friendly.
2020-03-20 16:21:25 +01:00
Victor Feyens 532c083cbb [IMP] *: remove global field definition in ir rules xml
It is a computed field, there is no need to manually set its value.
2020-03-20 16:15:40 +01:00
Aaron Bohy f6c06bd0b8 [FIX] web: nested x2many with non inline views
Let's assume a form view with an x2many list, containing itself
an x2many field (no widget, so simply displaying the number of
records). When a record of the list is clicked, a form view
opens and displays the same sub x2many field, with widget
many2many_tags. Both list and form views of the x2many aren't
inline (thus have to be fetched on demand).

Before this commit, it crashed when the user clicked on a row
of the x2many list.

The bug has been introduced by a9cebd5a, which wrongly removed the
code handling this specific situation. At least, now we have a
test attesting that this code isn't useless.

Note that the diff isn't as scary as it looks like (we just added
an if/else, and thus indented the former code inside the else
clause).

closes odoo/odoo#48116

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2020-03-20 13:40:42 +00:00
Swapnesh Shah 5d86eb64ac [FIX] base: place correctly the symbol for INR currency
closes odoo/odoo#48111

Fixes: #47687
X-original-commit: 3d65ffd15d61c48666e8489e5c86085e64d86216
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-20 13:05:14 +00:00
Vishnu Thuletiya d426a2cfca [FIX] website: Fix the 'unarchive' behaviour
Currently when the 'active' field is exist in model but when not added
to the view then it will only display the 'unarchive' options on action
and it does not works as well.

So Find out some model and to fix that behaviour added the active
invisible field on the view so archive/unarchive should works properly

closes odoo/odoo#46839

Taskid: 2204135
Related: https://github.com/odoo/enterprise/pull/9000
Related: odoo/enterprise#9000
Closes: #46839
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-20 12:18:05 +00:00
David Beguin 979de45066 [IMP] crm, mail: clarify the alias configuration in crm.team view
This commit rename the button that redirect to the configuration panel
whare the alias configuration can be done (External email server).

The name was unclear as this is not a domain name that we can configure but
an alias instead. Behind the alias, there is a custom domain, though.

Task ID: 2214653
PR #48023

Related: odoo/enterprise#9367
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-19 15:34:24 +00:00
David Beguin e5ee58104b [IMP] crm: remove duplicated probability field from form view
This commiit removes the probability field under analysis group as
that field is already displayed in the Probability main section.

Task ID: 2214653
PR #48023
2020-03-19 13:21:57 +00:00
Helly kapatel 1c9a6db16f [IMP] various: Change 'assignation' to 'assignment' across all modules
Purpose
=======
The main definition of 'assignation' is the following:
   "an appointment to meet someone in secret, typically one made by lovers"

The correct word we should be using is 'assignment':
   "the allocation of someone or something as belonging to a particular group or category"

So in this commit change every iteration of the word
'assignation' to 'assignment', across all modules.

closes odoo/odoo#45041

Taskid: 1966215
Closes: #45041
Related: odoo/enterprise#8375
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-20 14:12:51 +00:00
Katherine Zaoral 191530059f [IMP] l10n_ar: be able to generate refunds for OTROS COMPROBANTES document type
This document does not have any credit/debit note related documents, so
when a credit/debit not is required then the same document type is used.
This only applies in vendor bills so we are able to create the credit
note with this type of document

closes odoo/odoo#48117

X-original-commit: 7748e0e87fd3f4677a4026ed06516d36e8d52ad5
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-20 13:53:39 +00:00
David Beguin 375b984cc7 [FIX] website : fix partner visitors field definition
visitor.partner is a many2one to partner. But partner.visitor_ids is a
many2many.

The result is when you set the partner_id on visitor, the (what should be)
inverse field is not set accordingly.

This inverse field should be a one2many fields. This commit fixes the field
definition.

Task ID: 2127691
PR #40577

Related: odoo/upgrade#905
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-01-20 09:09:57 +00:00
Arnold Moyaux 74616ee9d2 [FIX] stock: remove False out warehouse management
Currently the quantity outside warehouse in the forecast report is erroneous.
It only takes the quants and not the stock.move incoming and outgoing for those location.
So the qty is only correct for the current datetime.

Remove this functionality and remove the filter 'warehouse is set' since it's always the case.

closes odoo/odoo#47997

Task: 2217047
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-19 10:30:51 +00:00
Vishnu Thuletiya 8fdb247d7c [FIX] hr_holidays: Fix the wrong behavior of no-validation leave type
Currently when you create time off type with no validation and then
create new time off request, save and status is approved.
However, if you refuse the time off and reset to Draft and confirm it
then status will be 'To approve' when it should be 'Approved'.

So after this commit, on confirm of refused time off with validation
type 'no validation' automatically move to the 'Approved' instead of
'To Approve'.

closes odoo/odoo#48087

Taskid: 2206222
Closes: #47738
X-original-commit: 3d2391d350ea7ed572cf6818ab3f607c99fe0bf5
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-20 09:44:34 +00:00
Xavier Morel 012678bf27 [IMP] core: cutoff imports after some number of errors
Importing 100 records and getting 100 errors (often the same every
time because a required field was not mapped) is not super useful and
spams the logs a lot.

Cutting off at one point seems useful.

Note: integrates warnings-related fix from #47972 reported by Grzegorz
Marczyński in #47936.

closes odoo/odoo#48095

X-original-commit: 6b05f1d13c862dd66e89f35607d072315be80995
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-03-20 10:29:33 +00:00
nasreddin boulif d948362e60 [IMP] base,contacts,website_customer: rename "Sectors of activity" to "Industries"
Purpose of this commit is to improve english wording in Odoo
regarding res.partner.industry model.

For that purpose we rename "Sectors of activity" with
"Industries" everywhere we use that naming.

Original feedback #2212682

Task ID #2214290
Closes #47559

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-20 08:53:57 +00:00
jerome hanke (jhk) 19d00d668a [FIX] mass_mailing: mailing.mailing does not use template_id
Steps to reproduce:
- install crm and mass_mailing
- go to crm > configuration > settings > activate leads
- go to crm > leads > select at least 2 leads > action > send mail
- set a subject > set a mass mailing name > send

Previous behavior:
you get a traceback
ValueError: Invalid field 'template_id' on model 'mailing.mailing'

Current behavior:
the mass mail is sent

opw-2212605

closes odoo/odoo#48088

X-original-commit: c87db90d5dbab4d02a9378a1fc905c9b2935cbe2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-03-20 09:47:19 +00:00
Nicolas Martinelli eeee58c7ac [FIX] account, point_of_sale: incorrect rounding
- Create a 12% tax, price included
- Create an invoice for a single product @ 52.50

The total is 52.51.

This happens be cause the tax is computed on a non-rounded base amount.

opw-2198712

closes odoo/odoo#48084

X-original-commit: f307c29160675583c1c40ccf0f4452c6a1461cbe
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-20 09:29:39 +00:00
Andrea Grazioso (agr-odoo) 8a6b1ed9e0 [FIX] l10n_de: fix Followup Report Letter
Install Germany - Accounting.
In General Settings, set "European A4 for DIN" as the Format and
"external_layout_din5008" as the layout.
Print Followup report letter

The report has misplaced elements, the other company address should be
present on the left and there is the extra address below the FollowUp
header.
Modifying the style to hide the address below the followup title
and the xml addon for din to fetch the address from the partner fix the
issue

opw-2187240

closes odoo/odoo#48057

X-original-commit: 2b9bf77c85c8840b9f585a59ee0ba4b8a3255120
Related: odoo/enterprise#9377
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-03-19 16:44:26 +00:00
Kaushalya Mandaliya e1b257bd8a [IMP] web: prevent tooltip duplication on a responsible in the calendar
Before this commit,
Hovering on a responsible on the right column of the calendar will:
    - show a classic yellow tooltip
    - show a custom tooltip with a bigger image

After this commit,
Hovering on a responsible on the right column of the calendar will:
    - show a custom tooltip with a bigger image if image exist
      else, show classic tooltip

PR odoo/odoo#45353
Task-2194828

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-03-04 09:50:58 +00:00
Romain Derie d47f039fd2 [FIX] website: clear cache when menu group is changed
Otherwise, `_get_menu_ids()` won't be recomputed, meaning removing a group from
a menu won't make it appear for restricted user, and adding a group on a menu
won't hide that menu, until a clear cache occurs.

Introduced with 02e01dce516

closes odoo/odoo#48065

X-original-commit: 0131e6d9103f68950ee23c6b0ef1af972370416e
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-03-19 18:25:09 +00:00
Krupal Oza 5e4ddfaacf [IMP] note: Improve notes kanban card layout
Purpose of the task is to fix layout of kanban view in notes.

Currently the kanban view of the note is having bad layout of activity.
The activity is shown under the note and at left side.

After this commit, it will fixes the layout by setting the
float-right and mr4 in div of activity_ids and remove unnecessary
div of it and also adding the spaces above the images.

closes odoo/odoo#44445

Taskid: 2186292
Closes: #44445
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-20 09:05:11 +00:00
Mathieu Duckerts-Antoine 1959e7756a [FIX] web: do not activate falsy search defaults
Before this commit, if an action context would contain a key/value pair
like

    search_default_foo : 0

the filter foo would be activated, while it should be not considered
as default.

The present commit fixes that situation.

closes odoo/odoo#47958

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-20 08:06:41 +00:00
Thibault Francois bc6dc53b6d [FIX] account: issue with not rounding price_subtotal
Write on business field on account.move.line
may lead to an unbalanced move due to currency conversion
from the price_subtotal to debit or credit

How to reproduce:
You need to create an invoice in a different currency
than the company currency

The rate form currency to company currency should be much
bigger then 1 for example 8 or 10

Create a line the will have a pricesubtotal
with 3 decimal

For example:
price unit : 28.8
qty: 4
discount: 22%

the price_subtotal will be 89.856
rounded in the form to 89.86
Based on that with a rate of 7.79356837023608
You end up with a credit of 700.33

then write on the line, for example the analytic account
It will trigger the computation of the price subtotal
and directly with that value the credit

and you endup with a credit 700.30

which is not balanced with the 700.33 of the other line

Solution:
Always round the pricesubtotal computed with the currency before
using it in any further computation

closes odoo/odoo#47305

X-original-commit: a60017df0e947e32f0606ee1487224d2c00470a4
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-03-20 07:59:25 +00:00
Thibault Delavallée 215b2fffa2 [FIX] account_check_printing: do not set account_check_printing_layout as required
Adding required fields on company model is annoying for tests. Indeed multi
company tests may run during module installation, notably in CRM. Those tests
generally require to create a new company which is not possible if the column
is required but module not already loaded in registry. This is the case
if for example account_invoice_extract is installed and updating CRM
when testing website_crm_score.

When possible, avoid required fields on a such used model as company. In this
case we simply make the field required in the view, and handle a void value
as the default disabled one, leading to no functional change.

closes odoo/odoo#48059

Related: odoo/enterprise#9381
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-19 17:13:30 +00:00
Yannick Tivisse 86691b1379 [FIX] web: Fix switch company menu glitch on mobile
Purpose
=======

When being logged on company A and clicking on company B, I should
log into the company A only.

Currently in mobile, the checkbox next to A remains enabled before the
refresh. With this commit, this behavior is fixed.

closes odoo/odoo#48045

Taskid: 2205603
X-original-commit: 19f196c0afd73c5d64b612aa413e6e6772e0c288
Related: odoo/enterprise#9373
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-19 15:31:08 +00:00
Rémy Baranx (bar) 11cd84317d [IMP] pad_project: collaborative pads in portal
When the 'collaborative pads' option is activated for a project,
and the visibility is set to 'portal users', it is possible to define
the access level to pads to edit task descriptions.

- If set to 'internal users', the behavior stays the same.
- If set to 'portal users', a portal user has access to a pad to edit
  task descriptions on the portal.

When configured for portal users access, by default, the task description
is displayed with an 'edit' button on top of it.

On 'edit' button click, the page is re-rendered with an additional
url parmater 'edit=1' to switch to edit mode.

In edit mode, the task description is shown in a collaborative pad,
with a 'Save' button on top of it.

On 'save' button click, the page is re-rendered with the 'edit' url
parameter, to switch in classic mode (read-only).

TaskID: 2204379

[IMP] project: collaborative pads in portal

In order to be (easily) able to add buttons to the right of the description
title, the description title is put inside a d-flex div.

closes odoo/odoo#46591

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-19 14:33:02 +00:00
Lucas Lefèvre bd2e82b504 [FIX] base_setup: Add DOM id to license link
With Odoo Enterprise Edition, the license is still GNU LGPL.
A DOM id is added here to allow targeting the license link in `web_enterprise`

Task 2198484

closes odoo/odoo#46263

Related: odoo/enterprise#8776
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-25 14:32:39 +00:00
David Beguin c06a7cf2de [FIX] gamification: fix karma tracking demo data
Before this commit, when checking the gained karma per month or per week in
/profile/users route, the users gained more karma than they actually have.

This is due to the way demo data are loaded : karma tracking history is added
but when the final karma is set on the user, a new line of karma tracking is
created on the DB (via write or create method). But as the transaction with
karma tracking demo data is not commited yet, the old value is still 0.
That leads to add a new karma tracking line that have old_value = 0 and
new_value = user.karma. At the end the users 'gained' as addition the amount
of the karma they have.

E.g : Mitchell Admin has 2500 karma and his karma tracking history is the
following: 0 -> 1000 then 1000 -> 1500 then 1500 -> 2500.
In total, Mitchell should have gained 2500 XP: (2500-1500)+(1500-1000)+(1000-0)
But, before this commit, as there is an additional 0 to 2500 karma tracking
line, Mitchell Admin gain in total : (2500-0)+(2500-1500)+(1500-1000)+(1000-0)
= 5000 karma.

This commit clean that additional karma tracking line to get a correct karma
tracking history.

Task ID: 2209743
PR #48042

closes odoo/odoo#48061

X-original-commit: 858f80e2529b17d1857d77f372c378ae235443de
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-19 17:22:06 +00:00
Julien Mougenot 71af8ee4f8 [FIX] web: update clickAll test helpers
Before this commit and following the refactoring of the home menu and the control
panel to the Owl framework, some of the helpers of the 'clickEverywhere' test have
not been properly updated to the new classes/behaviours.

Now the selectors target the right elements and some actions that were previously
synchronous are now properly awaited (home menu toggling, filter menu interactions,
etc.).

Also slightly changed the behaviour of the clickAll functions:
- requesting a click on a null element will make the test crash (added some conditions
  to avoid this in a standard flow).
- any error crashing the test at a deeper level will be displayed in the console
- an animation frame is awaited after clicking on an element. This is to comply
  with the Owl rendering system.

closes odoo/odoo#47762

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-18 12:33:02 +00:00
Laurent Stukkens (LTU) ad986ee0db [FIX] purchase: set date_approve as now when approve
685f4eff50 added date_approved as
fields.Date.context_today
b5cea7e2b6 has changed the field
as a Datetime

Both together introduced a miss calculation of the date_approved

closes odoo/odoo#48055

X-original-commit: 6dff3024d19c9dd44c71992469540e3f09dd3247
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-03-19 16:33:05 +00:00
Swapnesh Shah 4613d95053 [FIX] purchase: No drag and drop when grouped by Vendor
Fixes #47727
Closes #47955
Before this commit, it was possible to change the Vendor/Currency of the PO when Grouped by Vendor/Currency on Kanban view which is not Ideal Behavior.

Now we block drag and drop using these fields.

closes odoo/odoo#48050

X-original-commit: 7b19964a203c205b67d8f3bc05c1279362d38a61
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-19 15:57:52 +00:00
Jeremy Kersten 5bdec6351a [FIX] web_editor: allow widget text on field html in studio
Before this commit, widget='text' was not available in web_studio since 'html'
was missing from the supportedFieldTypes list of the TextField.

After this commit you can use widget text (and other derivated type of text).

task-sbu-feedback

closes odoo/odoo#48043

X-original-commit: 34bd90e7fc2aa094eac92b6f635c2d8d933ecb86
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-03-19 15:20:29 +00:00
Odoo's Mergebot 04e07ba9aa [FW][FIX] website: perf - reduce SQL queries on hot execution on website page
This PR is the continuity of #46925

It is a bunch of small commits, retro compatible, that should reduce
the number of sql query for each page.

--

Optimistic stats
```
|                       | Query |   Time |
| --------------------- | ----- | ------ |
| website.page          |       |        |
| Before                |    25 | 0.0218 |
| Now                   |    12 | 0.0106 |
| tracked website.page  |       |        |
| Before                |    34 | 0.0276 |
| Now                   |    20 | 0.0123 |
| tracked homepage      |       |        |
| Before                |    34 | 0.0223 |
| Now                   |    19 | 0.0194 |
```

task-2211013

closes odoo/odoo#48048

Forward-port-of: odoo/odoo#47891
Forward-port-of: odoo/odoo#47257
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-03-19 17:01:17 +01:00
Romain Derie ffd6ebff72 [FIX] website: add SQL performance test for page loading
This will ensure the performances stay correct for a blank page (no layout),
a standard page and a homepage (which has its own controller).

Related to #47257
task-2211013

X-original-commit: 08e01b5fc4a71b8f7639a953137fbb546ddf3b3e
2020-03-19 15:37:49 +00:00
Jeremy Kersten 89bbf76c44 [FIX] website: perf - get most specific in SQL
Before this commit, we would get all the pages for the requested URL then
filter to get the most specific.
This can just be done in SQL by sorting website_id desc so the specific are
returned first.

Note that this will respect 41897f0dba.

This will avoid having to prefetch the generic page when it is useless.

Related to #47257
task-2211013

X-original-commit: b31294592a80d9e55f887f0122cc01225b64966c
2020-03-19 15:37:48 +00:00
Romain Derie b98d9c968c [FIX] website: perf - ormcache the website menus
To avoid a SQL Query on hot state, the website menus ids are now prefetch.

Related to #47257
task-2211013

X-original-commit: 73421c27f01e7100403eaa72e027c34dbdf9f720
2020-03-19 15:37:48 +00:00
Jeremy Kersten 9430dd1287 [FIX] website: perf - use lang cache in url for.
Before this commit, url_lang (= url_for) will make query to find the lang_code
but we alrady have this info in ormcache with get_available method.

So instead to rebrowse (search query) the lang, we use a new method that will
try to find it in cache if possible before to make the query.

The gain on each page is n-1 (where n is # lang installed)
Because the switcher of languages do an url_for for each lang available.

Related to #47257
task-2211013

X-original-commit: 2cecbe356ce283e15fb0bbd0a6e9aa4735af520e
2020-03-19 15:37:47 +00:00
Jeremy Kersten 4c40393490 [FIX] website: perf - translation - avoid query to find what we know
Before this commit, each module override _get_translation_frontend_modules_domain
from ir.http to add its own translation in website if needed and that module
is not starting by website_. Updating the domain from the super() call.
Since we know in most of the case the name, it is useless to do a:
   select name from module where name = 'name1' or name = 'name2'...

Now we support a new override of _get_translation_frontend_modules_name that will
allow to add the known module name directly in the list instead to make a search.

In case nobody override _get_translation_frontend_modules_domain, we don't need to
make an extra rpc to find the module.

Related to #47257
task-2211013

X-original-commit: 0dc54814161ab55c34dd2242f65dea23d19fdfca
2020-03-19 15:37:47 +00:00