Commit Graph
140385 Commits
Author SHA1 Message Date
ryv-odoo f01ce96204 [FIX] website_sale_digital : fix AccessError attachment
A user get a AccessError during a valid flow on the website shop
due to a attachment search (with website_sale_digital installed) :
- As a portal user buy a product and pay with wire tranfer (or other)
- Check the your quotation with this user and we get a AccessError
for the read ir.attachment model.

The bug comes from the website_sale_digital module which add a search
on ir.attachment for each product (allows digital product sell,
eg. ebook) on the controller rendering orders. To fix this issue, add
a sudo call before the search. It is legit because only the name and
date is retrieved and the download (of the digital product) checks
the access of this product attachment (if user already paid for it).

TASK_ID : 2004031

closes odoo/odoo#39043

X-original-commit: c757e14cb791262485a949eacdcfb2029d03fa5f
Signed-off-by: ryv-odoo <ryv-odoo@users.noreply.github.com>
2019-10-18 13:52:17 +00:00
jbm-odoo d669654895 [FIX] web pivot: Fix open position of selection
Description of the issue/feature this PR addresses:
In pivot, when we click on '+', it must open the selection box at
the point where we click.

Current behavior before PR:
The box opens at the top of the page

Desired behavior after PR is merged:
The box opens at the point where we click

id=2066675

closes odoo/odoo#39034

X-original-commit: 989df08fd8bbfa4a1f05784b599b1657a9b28fe5
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-18 12:19:50 +00:00
Kevin Baptiste 7b8038c4bd [FIX] mail: Reserve mis-referenced trackings to system users
Purpose
=======

Let's say that the field 'foo' is tracked and defined with a res.group.

When the field is modified, a mail.tracking.value is generated, but the
reference to the field name is a char field.

When displaying the mail.tracking.values on the chatter, a check is done
according to the field group to decide whether we should display it or not
to the user. See: odoo/odoo@c7aa8c5#diff-ad8b6db158187579d2208f233d993c3cR43

So if I rename the field, and if the mail.tracking.value is not modified,
the mail.tracking.value magically appears to the users who shouldn't
access it before.

Note: If the migration is correctly handled, this shouldn't be the case.
But manual manipulations on the database could lead to this issue.

Specification
=============

If the field referenced by the mail_tracking_value doesn't seem to exist,
then display its value to system users only, by security.

closes odoo/odoo#39033

Taskid: 2088634
X-original-commit: ae1e70eba10112170283cfc17fa95d94dd948d2b
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-18 12:19:10 +00:00
helly kapatel bf99c212a0 [FIX] hr_holidays: display correct number of timeoff on approval view.
When timeoff is 1 day or 0.5 days then it was not going to
correctly display timeoff number on approval page due to momment.

For 1 day leave the date_to and date_from as equal so momment diff will
be 0 days and floating is off for diff so not display 0.5 for floating leave.
even we enable floating it will display the wrong floating based
on 24 hours instead of 8 working hours a day.

so get the number_of_days from db and display on leave same as department
leave summary.

Task-2071031

closes odoo/odoo#39032

X-original-commit: 6953620f507990010c593a0d35d67c81f5b27e47
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-18 12:18:53 +00:00
RomainLibert 69319bba3e [IMP] lunch: get rid of the lunch_order_temp wizard
Replace lunch.order.temp wizard by lunch.order (fp request)

closes odoo/odoo#35585

Taskid: 2048667
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-18 12:37:52 +00:00
Romain Derie ace7f03bab [FIX] website: make test works with more website than the data ones
This test was raising an assert error if the DB has other websites than  the
data/demo ones.

As we have a new module in Odoo 13.0 (https://github.com/odoo/design-themes/pull/178)
which is creating 25 websites, and since the design-themes runbot is now
running tests, we were having a red design-themes runbot.

closes odoo/odoo#39008

X-original-commit: 5c7b446363fbec7b2a76a579794e0fac20d05271
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-18 08:34:59 +00:00
Julien Mougenot 33c406e3b1 [FIX] web: filter menu styling
Before this commit, the trash icons and "OR" indicator of each filter
was too far and couldn't be seen

Now, both of them are closer to the filter and can be seen in any circumstance.

Task 2073707

closes odoo/odoo#39026

X-original-commit: 87a91c78fb15ee941e72023e02e539de64f0486d
Signed-off-by: Julien Mougenot (JUM) <Arcasias@users.noreply.github.com>
2019-10-18 11:03:56 +00:00
Jorge Pinna PuissantandLucas Perais d00a832952 [FIX] website: access to themes images
Since 62c9dedafd, when accessing a website
connected as portal or public user, the themes images are not showed. An
error is arose 'Sorry, you are not allowed to access documents of type
'Attachment' (ir.attachment)'.

Now, the portal and public user have access to the themes images.

opw-2082468

closes odoo/odoo#39025

X-original-commit: 9b8c390cd5526556346356f260a9cfe1b90cd510
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
2019-10-18 11:01:15 +00:00
Victor Feyens e92d302d2f [FIX] web: kanban archive / unarchive all
Since https://github.com/odoo/odoo/commit/f896afcc8a54eae3efcdf034e3fd256942f7fa78,
(un)archive all triggered toggle_active on all records, which doesn't consider
whether we want to archive/unarchive and on which records...

Closes #38903

closes odoo/odoo#39022

X-original-commit: 2c89cb0c92fc593e2e323e322c9228de268f64cf
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-18 10:25:58 +00:00
Samuel Degueldre 86681cd0b4 [IMP] website: add option to stretch or unstretch sections
Snippets with side margins look quite compressed between full width
snippets. This commit adds an option in the side-menu to control whether
a section is stretched or not. This option is available everywhere it
would have a reasonable visual impact (the cutoff was arbitrarily chosen
to be that the stretched section is at least 5% larger than the
unstretched version)

task-2080570

closes odoo/odoo#38852

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-10-18 10:25:08 +00:00
Xavier-Do fbfae7efc4 [IMP] base: avoid invalidate cache on first assets
Assets bundle creation will try to find previous version of assets and unlink them.
This needs to invalidate ormcache to notify other workers.

Since assets are never commited during test, assets will be generate at each request if request is
not commited (cursor closed) whtch is the case with 404.

Invalidating the orm cache only when a previous attachement was existing will help to
mitigate the problem, and slightly improve HTTPCases test speed.

closes odoo/odoo#38979

X-original-commit: d4d63549e1b31e3f3c97a2b91155023dbac62847
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-10-17 17:10:06 +00:00
Xavier-Do d65fcfecb6 [FIX] web: avoid expensive 404 during js tests
A 404 will take 3 to 5 seconds to be resolved and execute +- 1900 query, to return
a rendered page which is quite expensive, especially when multiple missing images
are rendered in a view.

Catching static route and marking them as not frontend will help to avoid to handle miss
on static resources. In this case server returns a standard 404.

This commit also fix a iframe src in order to avoid a 404 on
/web/(test )/report/html/some_report (thx to aab-odoo)

X-original-commit: 818d0cb59fbae78d0edf06318082981f318e4db7
2019-10-17 17:10:06 +00:00
fw-bot ed1236275f [FIX] base: Remove label from views if user groups forbid the field
Without this patch, if a view defines a `<label for="forbidden_field"/>` anywhere, the web client tries to fetch the field data, but since the user has no access, it gets an error.

Now, if the label targets a forbidden field, it gets removed from the view, as happens with the related field. The client doesn't know of that field's existence and no errors happen.

closes odoo/odoo#38876

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-18 08:35:39 +00:00
Jack 97a5054eeb [IMP] l10n_cn_small_business: modify the Chinese small business taxes
Update the translation files to reflect the changes

closes odoo/odoo#38999

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-18 08:10:48 +00:00
Xavier-Do d61c48f298 [FIX] core: remove useless graph class
closes odoo/odoo#38967

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-10-17 15:12:32 +00:00
Jeremy Kersten 3a7033463e [FIX] website: allow authenticate in json multidb
Before this commit launch a server with --db-filter that match at least 2 dbs name
Try to authenticate

You will have an error request is unbound when you try to access request.env

Now we retrieve the user from self instead of the request.

New test to ensure rpc authentication is tested.

Related to commit 245ef4b1

closes odoo/odoo#38969

X-original-commit: 4b3400c430bec7539aada0619fd203978daca2d8
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-17 15:35:11 +00:00
Yenthe666 734f0af61f [IMP] calendar: place smartbutton within oe_button_box
closes odoo/odoo#37987

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-10-18 06:28:01 +00:00
mgh-odoo acda5c58ac [IMP] ipoint_of_sale,l10n_in_pos: customer and HSN code on receipt
To be compliant with the indian law, some informations should be
displayed on the receipt in the POS.

So we've added the customer name and phone nulber if any. We've also
added the HSN code of products for each line.

closes odoo/odoo#36590

Task-id: 2000231
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-10-18 07:20:30 +00:00
Nans Lefebvre da76c7c47b [FIX] website_sale, website_sale_product_configurator: fix cart update
Commits df2ea31ff6 and 55ed70f405 moved things around,
"without any functional change".
They made it so that if you add twice a product to the cart,
they are added in different lines instead of merged.

There are two issues:
- the `if line_id: return lines` made sense when the post-filtering
was in the same function, since it could readily be avoided
- conversely the post-filtering was avoided in the function that was added with
the only goal to do it, except in the case where it was useless
(the case where lines is an empty recordset).

opw 2083729

closes odoo/odoo#38938

X-original-commit: c9c0a0c322f02974bc6395410ca3d7213899c7e0
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-10-17 10:58:24 +00:00
Denis Ledoux 0a2fcfbce9 [FIX] fields: do not attempt to set foreign keys on views
Users sometimes define custom models on SQL views
e.g. @nseinlet
In such a case, Odoo should not attempt to create foreign keys
as it just cannot work on views.

This could prevent the migration of a database
with such a custom model using a view
when it attempted to fix the missing foreign keys
when updating the modules.

closes odoo/odoo#38988

X-original-commit: dfaea03de57394a9a188f499da664c57dd9adc29
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2019-10-17 19:20:39 +00:00
Yenthe666 7ee342ee0e [FIX] website_blog: correctly create URL to access blog post
closes odoo/odoo#38986

X-original-commit: 534e5fbc4782a23162ce69d93a640fdd5dd99f9b
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-17 18:38:12 +00:00
Florimond Husquinet (fhu) 3a0acf329b [FIX] point_of_sale: missing currency symbol on receipts
- Buy anything with de POS and generate a receipt.

Before this commit:

The currency symbol is missing everywhere.

After this commit:

The currency symbol is present next to any price.

closes odoo/odoo#38970

Opw: 2083186
X-original-commit: e6528dd8ac202a66103e00c08c2246f6083ebf51
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-17 15:35:46 +00:00
Julien Mougenot ee2f30fba2 [FIX] account: render report tour steps
Before this commit, the account_render_report tour assumed that
account_accountant was installed on any enterprise database.

Now, the account_accountant steps are only inserted in the tour
when the module is installed.

closes odoo/odoo#38963

X-original-commit: a45a4b6cc3249320969c8ba3324aad9e7c1aab67
Signed-off-by: Julien Mougenot (JUM) <Arcasias@users.noreply.github.com>
2019-10-17 14:52:23 +00:00
RomainLibert 1802a1cbc4 [IMP] base: add tests to create basic records using Form tool
Purpose
=======

It sometimes happens that the last runbot build is green, but it's
impossible to create a basic record (a new user for example) in the
interface.

This commit adds new tests using the Form tool (so triggering the
onchanges, and so on), to check that those basic models can be
instanciated without any issue on the interface.

closes odoo/odoo#38962

Taskid: 2070350
X-original-commit: e6d8c471c036a35b2c86f91d0053435f468c0ab8
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-17 14:51:47 +00:00
jbm-odoo 1c5b6a6b5d [FIX] hr_recruitment_survey: Start survey, create answers
Use the correct function to create answers before strating the
survey.

closes odoo/odoo#38960

X-original-commit: e9d40caca6a18f4b77bb5681a9bce3a3aae40cc7
Signed-off-by: jbm-odoo <jbm-odoo@users.noreply.github.com>
2019-10-17 13:57:54 +00:00
Juan Jose Scarafia c96aad0cb1 [FIX] l10n_latam_invoice_document: document_type default value
The detected errors is about a normal field
(l10n_latam_document_type_id) which is written by a computed method
(_compute_l10n_latam_documents) making that the normal field value be
overwritten the value given by the user everytime the compute field is
re computed with the default value given by the compute.

We remove this write n the compute method and now we use and onchange
instead.

IMPORTANT: the l10n_latam_available_document_type_ids computed field is
changed from a m2m to a o2m to be able to use it on the new onchange

closes odoo/odoo#38973

X-original-commit: 96c70bb1eb34198b03eb21f00b57f819367677c4
Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-10-17 16:24:04 +00:00
Jeremy Kersten 3233c46d4b [FIX] website: Missing module in Apps
closes odoo/odoo#38971

X-original-commit: 562a2ac270ef8aac3afde05625008cef64f62f89
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-17 15:36:04 +00:00
Colinliz d3ca227276 [FIX] l10n_cn_small_business: Modify Small And Medium-sized Enterprises COA
Changes
- Modify some account according to 'Accounting Standards for 2017
  Small and Medium-sized Enterprises'
- Add account translation into .po file

closes odoo/odoo#38935

Signed-off-by: Colinliz <lizheng02@inspur.com>
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-17 14:17:21 +00:00
jacksun111 ad877d352f [CLA] add new employees to Inspur CCLA
closes odoo/odoo#38918

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-17 14:11:15 +00:00
William Henrotin b86bc6e979 [FIX] mrp: cancelling and validating impact on planning
The commit 0679d0d introduced a new
planning mechanism for the workorder. Two issues have been instroduced
since this patch.
  1. Cancelling a workorder didn't free the time slot in the workcenter
    calendar
  2. Validation a workorder sooner than the planned date didn't update
    the workcenter calendar to plan another production sooner.

This commit update the date_planned_start and date_planned_finished
at cancellation and validation to impact the workcenters calendar.
To keep the original planning dates, they are now tracked

This commit also fix the button_start() method that always rewrited the
date_start even if the production had already been started.

Task : 2082442

closes odoo/odoo#38947

X-original-commit: 4ca6c773a00320865142e4efb3645f36c54ce9a2
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-17 12:17:49 +00:00
Goffin Simon 32caafd5bd [FIX] account: Set default for invoices
In 12.0, the function onchange_default defined in odoo/models.py
was triggered on model 'account.invoice' for the fields type, company_id,
partner_id

In 13.0, as the model 'account.invoice' has been removed by 'account.move',
the same logic must be applied on this model.

opw:2086812

closes odoo/odoo#38925

X-original-commit: 04deb9593342450cda381699b788c4a0205eec76
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-10-17 08:55:38 +00:00
Naglis Jonaitis 19e4b89d65 [IMP] mrp: remove check_company attribute from float field
Since `check_company` is intended for relational fields.

closes odoo/odoo#38939

X-original-commit: bf2f3f6ce1430c2603fe7fe199a28296b2d7416f
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-17 11:32:02 +00:00
Goffin Simon a3bbcb13f3 [FIX] portal: Portal user not able to update their details
Steps to reproduce the bug:

- Create a portal user U
- Try to update the details of U from portal

Bug:

A server error was raised because the country_id was set as a character.

opw:2082450

closes odoo/odoo#38924

X-original-commit: 009b632c552822cb9892a2ccdbe9d79947d88a34
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-10-17 08:55:17 +00:00
Goffin Simon 566cfe3e4d [FIX] purchase: Impossible to duplicate a PO
Steps to reproduce the bug:
- Create a RFQ
- Add a line with a product
- Add a line with a note and save
- Duplicate the RFQ

Bug:

A traceback was raised because the function _select_seller was called on a line
with no product.

opw:2085977

closes odoo/odoo#38921

X-original-commit: 4ffc517d6011c2443f78ba27a608d4ec3815e737
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-10-17 08:05:53 +00:00
Lucas Perais (lpe) 1f6a7debf2 [FIX] web: custom filter on date[time] with changing the operator
On a list view, Add a custom filter on a date
Change the operator to "in between"
Change it back to "equal"
Apply the search

Before this commit, the label of the filter still was in between
Whereas it should have been "equal to ..."

After this commit, the label of the filter is correct

OPW 2085951

closes odoo/odoo#38705

closes odoo/odoo#38869

closes odoo/odoo#38936

Original-signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Original-signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
X-original-commit: bb775152b79f1212258ff47daac387eaf11f64e2
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-17 10:50:03 +00:00
Lucas Perais (lpe) a4910628b3 [FIX] web: date[time] custom filter format
In a list view, create a custom filter involving a date or datetime field

Before this commit, the domain that was sent to the server
contained the date or datetime as the pure string
representation that Moment.js constructs
that is a ISO compliant one, containing info on timezone

After this commit, the format is the one of the server, in UTC
and NOT ISO compliant. Also, the format for date is dealt with

OPW 2085936

X-original-commit: 1f1fa173c38dae105637edeb3a1e856e9748a14f
2019-10-17 10:50:03 +00:00
Debauche Stéphane e981e3312d [IMP] web: many2many_binary, binary, image, add the option `accepted_file_extensions`
Purpose
=======
We want to add an option on the widgets
- many2many_binary,
- binary,
- image

This option specifies what file extensions the user can pick from the file input dialog box.

Examples
========
```xml
<field widget="many2many_binary" options="{'accepted_file_extensions': 'image/*'}"/>
<field widget="many2many_binary" options="{'accepted_file_extensions': '.png,.jpeg'}"/>
<field widget="many2many_binary" options="{'accepted_file_extensions': 'application/pdf'}"/>
<field widget="image" options="{'accepted_file_extensions': '.png,.jpeg'}"/>
<field widget="binary" options="{'accepted_file_extensions': '.pdf,.svg'}"/>
```

How
===
Add an option (accepted_file_extensions) in the template ``HiddenInputFile`` (the widget many2many_binary is using this template)
So, we can also use this new option in others widgets using ``HiddenInputFile``
In the many2many_binary, read the ``nodeOptions`` and set the widget attribute ``accepted_file_extensions``

We also have to fix some other widget, because an property ``image_only`` was already existing in the template ``HiddenInputFile``
(we just need to replace ``image_only=True`` to ``accepted_file_extensions='image/*'``

The widget ``FieldPdfViewer`` (pdf_viewer) now use the new option to filtrate PDF
(instead of removing the <input/> and adding <input accept='.pdf'/>).

Tests
=====
We also test if the option is correctly set on the <input/>
- binary
- image
- many2many_binary

Impacted widgets
===============
- many2many_binary
- image: this widget use ``options="{accepted_file_extensions='image/*'}"`` instead of ``image_only=True``
- tablet_image: same as ``image``

Task #2082815

closes odoo/odoo#38351

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-10-16 13:57:49 +00:00
Xavier Morel 594206d4f3 [REL] bump master's alpha version post 13 release
closes odoo/odoo#38913

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-10-17 05:45:33 +00:00
RomainLibert d4fb89cd25 [IMP] lunch: back2basics
closes odoo/odoo#38899

X-original-commit: f4dbee9b844015e95afd5edf892489582cf1f397
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-16 16:39:16 +00:00
Lucas Lefèvre 3daec8b5fb [FIX] calendar_sms: Timezone event date in sms reminder
SMS reminders are not timezoned

closes #38243

closes odoo/odoo#38893

X-original-commit: 93d17be423d27c2e5eddf313327133082995f003
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
2019-10-16 15:02:13 +00:00
Odoo's Mergebot 75759d3173 [FW][FIX] web: Correctly aggregate values in exported parent groups
[FIX] web: Correctly aggregate values in exported parent groups
--------------------
When exporting a grouped list view with some nested groups, the aggregate value
of parent groups are not correct. It always sums aggregated values of children
whether the group operator is 'sum' or not (could be 'max', 'avg', ...).

This behavior is wrong and can even lead to a crash if the aggregated field is a
date field (e.g. with group_operator='max'). (Try two sum two dates...)

To avoid the crash a quick fix was merged 85cf47f just before OXP. This fix
limited the support of aggregates to only int and float fields.
This commit remove this limitation.

This commit correctly implements the aggregation for parent group for all
field types and all group_operator.

This commit also improves the export feature tests.

[FIX] base export: Manage False in groupby title
--------------------
Before this commit, when we export a list with a groupby on
boolean, the groupby title 'False' is replaced by 'Undefined'
in xls document.

After this commit, with an export and groupby on a boolean, we
will have correct title: True and False.

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#38896

Forward-port-of: odoo/odoo#38373
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
2019-10-17 09:08:07 +02:00
Arnold Moyaux e89c818e5a [FIX] mrp: missing cast string to date
Usecase to repdroduce:
- Create a manufactured product with route manufacture and a RR
- Run the scheduler.

Orderpoint will prepare procurement values's date as string. Other
module could possibly also use string as date and a call to from_string
will not break anything if the value is already a date or a datetime.

closes odoo/odoo#38900

X-original-commit: e4c654f8e5e768288226c725a1018ae31e8f5606
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-16 17:17:09 +00:00
Lucas Lefèvre 2bc060d13b [FIX] web: Avoid variable name confusion
The attribute `self._fields` is not well named. This is not a list of instances
of the Field class.
It is a list of field names to export.
e.g. 'journal_id', 'account_id/name'

X-original-commit: 6225ce60082d5d2b5fec0e678fe2a1f3f9b93668
2019-10-16 15:49:49 +00:00
Lucas Lefèvre 645ae69bb9 [FIX] web: Correctly aggregate values in exported parent groups
When exporting a grouped list view with some nested groups, the aggregate value
of parent groups are not correct. It always sums aggregated values of children
whether the group operator is 'sum' or not (could be 'max', 'avg', ...).

This behavior is wrong and can even lead to a crash if the aggregated field is a
date field (e.g. with group_operator='max'). (Try two sum two dates...)

The quick fix 85cf47f was merged just before OXP to avoid any crash. This fix
limited the support of aggregates to only int and float fields.
This commit remove this limitation.

This commit correclty implements the aggregation for parent group for all
field types and all group_operator.

This commit also improves the export feature tests.

X-original-commit: 5e7e4fa98698967e3c4fd0903f4aa8e91981a6cd
2019-10-16 15:49:49 +00:00
jbm-odoo e76c65e8b4 [FIX] web: Manage False in groupby title
Before this commit, when we export a list with a groupby on
boolean, the groupby title 'False' is replaced by 'Undefined'
in xls document.

After this commit, with an export and groupby on a boolean, we
will have correct title: True and False.

X-original-commit: 7e2c7bc35f2a5b3bc22e0e6c9d3b38279cda9367
2019-10-16 15:49:49 +00:00
Lucas Lefèvre e5c455f1b6 [FIX] hr_maintenance: Display equipment count of employee
In the employee form view and in the employee profile, the stat button
displaying the equipment count is wrong.
It counts the equipment owned by the user, not equipments assigned to the
employee.

closes odoo/odoo#38889

X-original-commit: 07bd725c97519a82cc76f3069614ac70b49495a3
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
2019-10-16 14:18:00 +00:00
RomainLibert 14681a346e [FIX] website_theme_install: avoid crashing if install_filename not in context
closes odoo/odoo#38888

X-original-commit: 28dce41599bf0dcef5feb17ce9a33b8ed600a55c
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-10-16 14:17:29 +00:00
RomainLibert 8baa8c9f59 [FIX] stock_account: avoid crashing when active_model not in context
X-original-commit: 3a70e7f91a234229b9ef84624fe3c18681545897
2019-10-16 14:17:28 +00:00
RomainLibert 9f9c989e60 [FIX] stock: avoid cache miss error in compute
We should check that we have a picking_id before calling a method that
uses `ensure_one`

X-original-commit: e9da11665fe7539bc97c92143525a311af637c3f
2019-10-16 14:17:28 +00:00
RomainLibert 206062dfa3 [FIX] sale: avoid crashing if so_line has no name
X-original-commit: 9e0f200a1e67f09b3711913a39f5389f0713743d
2019-10-16 14:17:28 +00:00