Commit Graph
131182 Commits
Author SHA1 Message Date
Christophe Simonis 7af8534d07 [FIX] mail: force empty value on record
closes odoo/odoo#38327

X-original-commit: da9e377ba480a034c5d740a6bcb4325f70e7f9e8
Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-10-10 06:31:21 +00:00
Antoine Vandevenne (anv) c9a54e1d05 [FIX] sale: fix down payments being deducted when they should not
Prior to this commit, un-checking 'Deduct down payments' on the invoice wizard had no effect: down payments were still deducted from the final (regular) invoice.

task-2081012

closes odoo/odoo#38326

X-original-commit: 4ef49cafec13e614c788354bc35fd232abab296b
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2019-10-10 06:31:02 +00:00
Andrea Ullianaandqsm-odoo af847832e8 [FIX] website, *: force website UI dropdown style
* web_editor

The purpose is to force our dropdown style in our UI so that themes do
not break it anymore (same way all the other elements are forced (cards,
headings, etc)).

task-2059538

closes odoo/odoo#38321

X-original-commit: 4ef0eac5ba134f462f72f3e9c60e5c9fc95f3a8c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2019-10-10 06:28:50 +00:00
Andrea Grazioso (agr-odoo) a128fb5b03 [FIX] project: can delete archived project with tasks
Create a Project with tasks, archive it, delete it.

The project is deleted, but this should not happen:
tasks are present, but they are hidden because when the project is
archived all its tasks are archived too (active flag is set to false).
On project unlinking only active tasks are checked, thus allowing the
deletion. Using a context flag to avoid filtering the non active tasks.

opw-2080515

closes odoo/odoo#38320

X-original-commit: 71a79f26e6319c6987397950c7f9df6c61dfb0d9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-10 06:28:20 +00:00
Julien Castiaux 421d76b04c [FIX] sale_stock: print canceled invoice
Install both Sale Management and Invoicing. Create an invoice without
any line, save it and cancel the entry. Print the canceled invoice,
traceback.

The python's `max` function requires an non-empty iterable to retrieve
the maximum element. For line less invoices, the value must be None.

closes #38175

closes odoo/odoo#38336

X-original-commit: d0402f9c42001f7e33256e30f58ac27e8738ac57
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-10 06:51:55 +00:00
Victor Feyens 0fac83a5da [FIX] stock: product replenishment
The replenish action shouldn't be accessible through the action dropdown
(it makes no sense to replenish consumables or services).
It is already accessible on the product/template form when applicable.

Closes https://github.com/odoo/odoo/issues/38238

closes odoo/odoo#38332

X-original-commit: 52d7008da888f1a84e38c6b110450062ac3bceaa
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-10 06:33:35 +00:00
Nicolas Martinelli ece4335e46 [FIX] l10n_ch: print ISR
On a customer invoice, click on 'Print ISR' => Error

This is because of computed fields not set.

opw-2081567

closes odoo/odoo#38325

X-original-commit: ed6dd79703bd1e02a8c3d9f13d12e2baa157ec36
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-10 06:30:44 +00:00
Nans Lefebvre b1a3e6bd04 [FIX] ir_http: return a 404 if binary content cannot be decoded
Commit 5a9e1af64a has the unfortunate side-effect of crashing early
if for any reason the content cannot be decoded.
However, simply ignoring that the content cannot be decoded is no better idea:
some functions pipe the result to decoding functions that crash the same.
The resulting traceback pollutes the log with uninformative message such as:
binascii.Error: Incorrect padding 5 0.002 0.016

In case the content cannot be decoded (data corruption, or simply missing file)
we return a clean 404 instead, which is morally almost equivalent,
and is clean even from functions that depend on binary_content.

opw 2072586

closes odoo/odoo#38318

X-original-commit: a68f7e6e72dbfd44e14c2f293fa6dc6aa402308a
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-10-10 06:27:45 +00:00
Victor Feyens 012343ef13 [FIX] stock: do not create products from replenishment wizard.
closes odoo/odoo#38296

X-original-commit: 3b4a0e817b0b6656f0545003f003d4167cd3e2ec
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-09 14:30:55 +00:00
fw-bot 126788ec14 [FIX] web: list many2one quick-create
Allows the quick create on m2o in list views

Before this commit, when entering a new value in a many2one in a list and
exiting the cell through a click, the quick-create modal appeared for the
duration of the mousedown.

Now, the modal remains and allow to edit the new many2one value

Task 2076380

closes odoo/odoo#38289

X-original-commit: c00f84eb0a176b8d23927080078eb02dc2e5d806
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-09 13:42:59 +00:00
Naglis Jonaitis 1a895eab1e [FIX] l10n_it_edi: add missing module dependency
`l10n_it_edi` inherits `fetchmail.server` model and extends its form view,
however it does not have `fetchmail` in its transitive dependencies.

closes odoo/odoo#35744

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-15 20:45:02 +00:00
RomainLibert c0f6e50fdd [FIX] lunch: avoid rewriting ids
The wrong order was used in the row_number call, which lead to ids
changing when writing on `is_favorite`

closes odoo/odoo#38278

X-original-commit: 28ebe6d4849a692d234b4c256332525aa71132e5
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-10-09 12:20:08 +00:00
RomainLibert 1abd0f6a63 [FIX] lunch: rename order kanban actions
X-original-commit: fcf03eaf01bbc76cfc4ea21e573e31187ba9e2b6
2019-10-09 12:20:08 +00:00
Victor Feyens cfe06f6d68 [FIX] web_editor: don't crash if anchorNode is Reserved.
When on Firefox, with sale_product_matrix and sale_quotation_builder installed,
clicking anywhere on the matrix (after opening it) raises a traceback.

It is due to the fact that isBody tries to access anchorNode.nodeName, which
is unexpectedly unaccessible as anchorNode is {Reserved}.

Due to the absence of clear documentation of the possible reasons of this problem,
it was decided to reuse the existing fallback on 'return null', which avoids the
traceback.

closes odoo/odoo#38277

X-original-commit: 70c484e72bffc9ab759df3c376ad9157acec3965
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-09 12:19:46 +00:00
Lucas Perais (lpe) badd0c0bb2 [FIX] crm: lead to opportunity no link partner
Have a lead with a partner on it, convert it to opportunity
in the conversion wizard, tick "don't link to customer"

Before this commit, the opportunity has been linked to the
lead's partner

After this commit, the opportunity is not linked to any partner

OPW 2077692

closes odoo/odoo#38262

X-original-commit: f1d270e441320e16bf38261f64a473a5296d6719
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-09 10:27:06 +00:00
Mathieu Duckerts-Antoine 64293fbdb0 [FIX] web: prevent browsers inputs autofill
We don't want the browser to fill inputs in the backend.
Most of the time this is useless but sometimes it is
even problematic. For example, focusing an input in a
modal can trigger autofill not only in the modal but
also in the whole page. If there is an input outside
the modal and it is recognized by the browser as a
candidate to fill, bad things occur.

For that reason, we set the attribute autocomplete to
"none" by default for input elements.
Note that "off" does not work all the time because
the browsers sometimes decide to ignore it.

Task ID: 2076730

closes odoo/odoo#38039

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-10-07 08:40:53 +00:00
Luis González 2b8f5dce06 [IMP] base: Forbid spaces in external IDs
This introduces a new constraint to the `ir.model.data` model, to
disallow external IDs containing spaces. Those cases may cause issues
and should be avoided.

For more information about why an external ID containing spaces is a bad
idea, see:
- https://github.com/odoo/odoo/commit/3c568aec0b46
- https://github.com/odoo/odoo/issues/25408

closes odoo/odoo#38139

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-10-08 16:28:23 +00:00
Martin Trigaux dbeba8ea23 [IMP] packages: match PIL to debian version
https://packages.debian.org/buster/python-pil
As of today, python-pillow is at 5.4 in the latest debian release

This allows to deprecate the older versions progessively

Newer versions have new features like the exif_transpose method in 6.0
as discussed at #37448

closes odoo/odoo#38245

X-original-commit: 4ad7a99df0a25122cf6872f880e07b6148c82ea8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-09 07:33:24 +00:00
Christophe Simonis 97842368ef [FIX] http_routing: avoid using deprecated methods
Oversight of previous forward-port.
2019-10-09 02:39:09 +02:00
Christophe Simonis d74b451805 [MERGE] forward port branch 13.0 up to f4105eb9c7 2019-10-09 02:08:17 +02:00
Romain Derie f4105eb9c7 [FIX] website: prevent endless loop if homepage is unpublished..
.. and first menu is a container with # as url.

There is a particular case where the / url would loop endlessly.

1. Unpublished the homepage /
2. Edit the menu so the first menu is a container. There is a hint telling you
   a container menu should have its URL set to `#` as a good practice.
3. This will lead to endless loop for public user as the code will check if the
   homepage can be accessed. Since it is unpublished, it will then fallback on
   the first menu which is not '/' and redirect to it.
   Sadly, the code was not expecting `#` to be handled as `/`.

opw-2081969

closes odoo/odoo#38234

X-original-commit: cff11bdb66f1dda41cf333a28b67df7ef20a3de9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2019-10-08 16:54:07 +00:00
Romain Derie f53e751433 [FIX] website_sale_digital: find only move line related to products
Before this commit and since beaa30a3d1 it was not possible to download a
digital product.

The `search_read()` would return move line which does not have any `product_id`
which will later crash when accessing `product_id` in the for loop.

Search_read result would be:
[{'id': 20, 'product_id': (38, 'eBook: Office Renovation for Dummies')},
 {'id': 21, 'product_id': False},
 {'id': 22, 'product_id': False},
 {'id': 23, 'product_id': False}]

task-2063307

closes odoo/odoo#38225

X-original-commit: b045be2814cee96c9723f0c9d07462e07cab4773
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-08 15:08:04 +00:00
Jeremy Kersten 8488e6c871 [FIX] web_editor: don't show warning relative url for new menu item
Before this commit, we hide the 'relative warning' when you don't start
you url with the current location. Now we show it only when you start
your url with the current location.

Before this commit, when you create a new link, the warning was shown
until you type a first char in the input to trigger the input change.

+ some small design theme (label font weight, muted color, ...)

closes odoo/odoo#38224

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-08 15:04:54 +00:00
Yenthe666 473403792e [FIX] *: fix "there is no" sentences
"There is no <plural>" is not correct
cf https://english.stackexchange.com/a/26634

closes odoo/odoo#38205

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-08 14:30:19 +00:00
Jairo Llopis 8ad360ccd3 [FIX] Log failed queries decoded
Starting with Python 3, queries sent by psyocopg2 are stored as `bytes()` objects.

Logging those raw makes them appear unformatted, harder to read than in v10 or lower Odoo versions (i.e. `\n` instead of a raw newline character).

Decoding the query into unicode makes it easier to read in the logs.

closes odoo/odoo#38074

X-original-commit: 329accde2ed6d4dbfdde6d3d99d71e21d15396b7
Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-10-08 14:12:23 +00:00
Jeremy Kersten bb5ceeaa1b [FIX] website: restore 'Add Features' feature
Since commit 07631a5, category has been updated, but not the filter of this action

task-2081177

closes odoo/odoo#38223

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-08 13:50:02 +00:00
fw-bot 16cd227090 [IMP] account: Dates on refund must be consistent
When is created a refund from a invoice, the payment term its cleans,
but not the date due.

In the next case:
1. Create an invoice with date 05/26/2019, with payment term "30 days".
2. Create an invoice refund for invoice in 1, with the same date.

In this case, the payment term in the refund is empty, but the date_due
is the same that in the invoice.

With this change, the date due in the refund is the same that invoice
date.

closes odoo/odoo#38212

X-original-commit: 6828454dc3726d85e4d29b9399d6e8ddd1aaac21
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-08 13:49:03 +00:00
Mohammed Shekha c72cc497e9 [IMP] mrp: fix work center kanban card glitch
before this commit: mrp work center kanban card has UI glitch in
kanban card, work center stage was overlapping kanban card right
div

after this commit: overlapping issue of work center stage will
not occur, issue was occuring due to absolute position given on
work center stage div, added margin bottom of 16px on kanban
card right div

task-2060181

closes odoo/odoo#38210

X-original-commit: 7143e570bb186a8d7c42455e9c02072fdde8aa49
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-08 13:44:10 +00:00
fw-bot 8ca7f866c8 [FIX] mail: correctly fetch customer data when sending invite
Currently when inviting someone on a document all recipients are considered
as standard customers. It means access buttons are not displayed and
addon specific behavior not really triggered.

This commit makes use of ``_get_recipient_data`` tool method allowing
to categorize recipients in groups and display buttons and action links
like other post on documents.

Task ID 1967234

closes odoo/odoo#38111

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-08 13:48:34 +00:00
Jeremy Kersten 17b0215ed5 [FIX] http_routing: remove useless redirection /website/translations
This reverts commit 08108486d5.
+ Fix the url that add a useless ending / and so a useless redirection.

There are no problem of mixed content or anything else, if you configure nginx
and launch your server in proxy-mode as specified into the documentation.

closes odoo/odoo#38196

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-08 12:22:54 +00:00
Florent de Labarre 8c29bdfae6 [FIX] doc: correct description of write methode
One2many fields can use it actually

closes odoo/odoo#38193

X-original-commit: 765566032e60252ec8fb7800200ed05addbfce65
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-08 12:09:04 +00:00
Sébastien Alix a15cf7eeee [FIX] base: set values on non-stored computed fields
Every records should have a value assigned, avoid CacheMiss errors

Closes odoo/odoo#37957

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-08 12:39:28 +00:00
Sébastien Alix 642f9d0064 [CLA] adds sebalix to camptocamp's CLA
Done at #37957
2019-10-08 12:39:22 +00:00
Jeremy Kersten 85c2a18dae [FIX] http_routing: fix request.redirect withtout website installed
In case you have a controller website=True without website installed, the
request.redirect() use url_for which one uses request.website_routing on the
request, without that it has been set by the website dispatcher.

closes odoo/odoo#38191

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-08 11:54:56 +00:00
Arnold Moyaux 2cf3377fdb [FIX] sale_stock: so line creation launch procurements twice
Use case to reproduce:
- Create a SO and confirm it
- Add a new line with a consumable/storable product

-> The delivery order contains the new lines but with the double of
required quantity.

Due to commit cb618e9a99 that try to lauch procurement in bacth.
Howerver The create from sale.order.line was not removed and the
_action_launch_procurement were launched twice (in sale.order write +
sale.order.line create).

The fix could remove the create function from sale.order.line but
the drawback is that everytime a sale.order.line is created/edited then
it should pass through the sale.order 'write' method.
That would create a lot of issue in the future compare to the small gain
of performance for a correction.

Task-2077129

closes odoo/odoo#38187

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-10-08 11:38:42 +00:00
Andrea Grazioso (agr-odoo) 1ac5ba040e [FIX] account,mrp,payment,purchase,purchase_stock,sale,sale_stock: studio crash on new view
Install stock and purchase. Make a RFQ for just one product, coonfirm
and receive in one transfer. Click on the delivery (should be only 1).
The picking will display. Open studio, select view, activate list view.

Javascript traceback will popup. Moreover the view of the stock
module will be altered in a faulty way (can be recovered from "Window
Actions", looking for the stock.picking action with external id
"stock.action_picking_tree_all" and removing the last added tree from
"View Mode").

This is caused by studio not detecting all the active views, thus giving
the possibility to add an already active view, because when there is just
one picking all other views are filtered out.
Changing the way the form view is retrieved in case of a single picking
fix the issue.

opw-2076241

closes odoo/odoo#38093

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-07 13:18:20 +00:00
mreficent 827b533662 [FIX] base: fix user view upgrade for migration
Fine-tuning of a8dbbc029d1e86c84, similar to d76cd50f0e
Avoid error of 'user_type_readonly' referenced before assignment.
This can happen during database migration or if the module category is deleted.

closes odoo/odoo#38190

X-original-commit: cf1e5198e32e9239a6d3cbbfdc325dbd3e0952de
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-10-08 11:45:57 +00:00
Simon Lejeune 2c22675ead [FIX] stock: remove move 'without package' properly
This revert the revert 61fa590e67 now that
400efc4d40 is merged.

closes odoo/odoo#38184

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-08 11:25:57 +00:00
wan 2a868edfdd [FIX] mail: position of composer tools
After commit ef46378, the position of the composer tools of the chatter
was below the text area instead of at the right of it. This is because
one div inside the flexbox was no longer diplayed as a flex or absolute.
By setting that disabled textbox to position absolute, the flexbox can
be displayed normaly again.

closes odoo/odoo#38183

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-10-08 11:08:50 +00:00
fw-bot d38e32c85a [FIX] mrp: avoid double write on production orders
Small improvement in order to not trigger twice the write
function on state

close #34884

closes odoo/odoo#38177

X-original-commit: d45d50b4f145a0bfb60465f7eb783a3c5fd85e6c
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-10-08 10:17:05 +00:00
William Henrotin 8303b1a69e [FIX] stock: immediate transfers in the future
Immediate transfers only fill the quantity done of stock moves/stock move lines
Those transfer are thus not taken into account for the forecast computation if they
are not validated. Indeed, the stock quant are not yet updated and the initial demand
is left blank.

This commit duplicate the quantity done of immediate transfer on their initial demand
this quantity is still hidden in the view but can now enter in the forecast quantity.

closes odoo/odoo#38169

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-08 09:35:36 +00:00
Aurélien Warnon aeda568fe8 [IMP] web: add test case to the kanban records_draggable option
This commit adds a test case for the recently introduced 'records_draggable' option in the kanban
view.

Initial test was not written because of social app rush before 13.0 release.

'records_draggable' feature introduced by 869a5b83a5

Task#2082068

closes odoo/odoo#38166

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-10-08 09:07:37 +00:00
fw-bot f22ccb624c [FIX] web: calendar first day of week from res.lang domain
The feature that allows res.lang's first day of week parameter
to be the reference point of web calendar
has been introduced at 27b30daea5
A few other came on top of it to fix a few things

Before this current commit though, only Fullcalendar was
rendered using that initial value, nothing was done
to actually fetch the right data

After this current commit, we fetch data from the server
according to the range displayed by the calendar

OPW 2072872

closes odoo/odoo#38131

X-original-commit: 0bd82ef6489f3ea1da26fb6ee337b15e3f13d4e5
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-10-08 09:52:06 +00:00
Romain Derie 9f5fd9e2ed [FIX] web: add missing utils dependency
Since bb37077610 (apparently), trying to regenerate the assets through the
crash manager result in a traceback.

Indeed, utils was not defined.

closes odoo/odoo#38129

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-10-07 17:08:32 +00:00
Victor Feyens 09221fe246 [FIX] doc: fix some sphinx warnings.
closes odoo/odoo#38170

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-10-08 09:36:59 +00:00
Nicolas Martinelli df38b57557 [FIX] website_sale: missing structured data
The `image` structured data is set on the `<div>` element, therefore it
is not recognized by web crawlers. We add it to improve the SEO.

Reference: https://search.google.com/structured-data/testing-tool/

opw-2076934

closes odoo/odoo#37870

closes odoo/odoo#38121

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-08 08:18:59 +00:00
Nicolas Martinelli 030f2654a5 [IMP] web: add support for itemprop on img
Take the following QWeb snippet:

```
<div t-field="product.image" itemprop="image" t-options="{'widget': 'image'}"/>
```

When the image is rendered, the `itemprop="image"` remains on the
`<div>` tag, it is not set on the `<img>` tag.

We add the support of the `itemprop` option, so it can be added to the
`<img>` tag:

```
<div t-field="product.image" t-options="{'widget': 'image', 'itemprop': 'image'}"/>
```

opw-2076934
2019-10-08 08:17:05 +00:00
Nicolas Martinelli e42aa1e344 [FIX] hr_attendance: do not allow grouping
The user for the kiosk mode must have access to personal information of
the employees. To avoid easily leaking information, prevent grouping.

Fixes #34231
opw-2079330

closes odoo/odoo#38120

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-08 08:13:21 +00:00
Nicolas Martinelli 8d910c59b5 [FIX] stock: route_sequence in multi-company
- Go to Inventory > Configuration > Warehouse Management > Routes >
   Make To Order
- Edit
- Swap two rules with the handles
- Save

An access error is raised.

This is due to the recomputation of `route_sequence` which is performed
on all companies.

Setting it as `compute_sudo` solves the problem.

opw-2072159

closes odoo/odoo#38104

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-08 08:09:50 +00:00
Raphael Collet f064437f06 [FIX] test_mail: query counts
closes odoo/odoo#38034

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-10-07 13:43:21 +00:00