Commit Graph
130660 Commits
Author SHA1 Message Date
Martin Trigaux d7a4085b00 [FIX] base: improve model description verification
When a model inherit from another, it still must have a _description
specified if the _name is different

Before this commit, mail.test.cc inherited from mail.thread.cc without
specifying a _description but this was not raising any issue
2019-09-24 07:33:09 +00:00
Martin Trigaux 272638b1ac [FIX] project: do not translate html
No need to be able to translate html element
2019-09-24 07:33:09 +00:00
oco-odoo ac17e36987 [IMP] account: allow currency and amount currency on bank statement lines as an optional field
So that people encoding their statements manually can directly encode the exchange rate data on their lines.

closes odoo/odoo#37262

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-23 10:25:44 +00:00
RomainLibert 57a24dacaa [FIX] web: avoid passing buttons as export field
The new export feature forgot to filter out the action buttons that can
be displayed in the list view. (see odoo/odoo@5c4544f)
This lead to javascript trying to get fields on the model like
`action_validate` which obviously doesn't exist.

closes odoo/odoo#37261

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-23 14:41:54 +00:00
Sébastien Theys d0c852f50e [FIX] web: introduce format for many2one_reference
The format of `many2one_reference` was not introduced when the new field type
was created, which leads to errors when the web client is trying to display the
value of such fields.

Since the value of this field is an ID, it is decided to display it like an
integer, which is consistent with previous behavior: the fields that are now
`many2one_reference` are still stored as integer and they were already displayed
as integer before.

closes odoo/odoo#37216

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-23 20:55:39 +00:00
Raphael Collet 5d97c47e54 [IMP] base: use many2one_reference for res_id on ir.attachment
This helps for updating inverse fields without making queries.

Due to this change, a `flush` has to be added in the portal attachment test to
actually compute the inverse after the change of `res_id`.
2019-09-23 20:55:39 +00:00
Raphael Collet afdfdbfa5b [IMP] base: inverse datas of ir.attachment during create
Before this commit, the inverse of `datas` would be computed after the `create`,
which would lead to unnecessary queries, not only for writing the new values,
but also because of the re-computation of fields that depend on these values.
2019-09-23 20:55:39 +00:00
Raphael Collet f047425b82 [IMP] models, fields: initialize cache to None for related fields
This makes sense because in `create` the "previous" value of a field is
obviously non-existent.

This avoids having to fetch pre-existing attachments when they are known to be
inexistent, which optimizes stored related binary that are computed post-insert.
2019-09-23 20:55:39 +00:00
Sébastien TheysandAdrian Torres 9112972e15 [IMP] fields: write only once per Image field
Before this commit, flushing a model that uses the `image.mixin` would generate
twice as many queries as it should.

This is because `_compute_related` is not meant to be overridden. In the
override of `Image` we call `super()` then post process the records by
reassigning each record's relevant image field with `_image_process`.

The `super()` will assign the field of the records once which
will in turn trigger a `write` (and thus, will generate queries) then
after the `super()` call we reassign them which will re-trigger the same
`write` and the same queries.

With this commit, instead of overriding `_compute_related` we extract the
processing to a method that can be overridden, so that the `write` is called
simply once.

The result, obviously, is that queries related to the `write` are cut in half.

Related PR: #36683 & #36288

Co-authored-by: Adrian Torres <adt@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2019-09-23 20:55:39 +00:00
Raphael Collet 50c7941fa6 [FIX] fields: set model_field on related many2one_reference fields
This fixes an issue when a Model A with a `many2one_reference` is inherited in
Model B with `_inherits`, and another Model C defines a `one2many` having as
inverse the inherited `many2one_reference` in Model B.

Without this commit, the value of `model_field` is `False` by default for the
field in B, which would lead to incorrect queries when building
`get_domain_list` for the `one2many`.
2019-09-23 20:55:39 +00:00
jbm-odoo 97cee756cc [IMP] utm: More generic medium data
closes odoo/odoo#37299

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-24 13:29:19 +00:00
jbm-odoo bafecade5f [IMP] hr_recruitment: Put company_id based on job_id 2019-09-24 13:29:19 +00:00
Martin Trigaux 2471ee506f [FIX] web: translate html fields
This commit fixes:
- body of a email.template in a small field
- translation of website_description of a product does not show the
  source of the translation
- translation of website_description of a product shows the full
  content for the current language

HTML fields are typically fields with longer of content.
If the field is an HTML field, it should be displayed in a textarea,
like the text fields.

Most of HTML fields are split in meaningful chunks of content (using
xml_translate or html_translate method).
For these fields, the source must be displayed.

Also sort the entries on the source to have a consistent order

closes odoo/odoo#37215

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-24 15:52:55 +00:00
Joseph Caburnay 5a9cb64414 [FIX] delivery: wrong delivery price for real cost policy
When real cost invoice policy is active in a delivery carrier, the
delivery price is set after validating the delivery. When there is
margin, the estimated price is calculated with margin but when the
delivery is validated, the price set in the delivery line does not
include the margin. This commit fixes this behavior by setting the price
of the delivery line with appropriate margin.

closes odoo/odoo#37178

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-20 08:32:44 +00:00
Romain Estievenart f88520280a [FIX] web_editor: make toolbar scrollable in mass_mailing on mobile
Before this commit, the web_editor toolbar wasn't horizontally scrollable
and part ot the items were not displayed.

To fix this, we have to revert back the initial position on some elements.

closes odoo/odoo#37076

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-09-24 10:05:47 +00:00
Romain Estievenart 65c8d33c29 [FIX] web_editor: make toolbar scrollable in note on mobile
Before this commit, the web_editor toolbar wasn't horizontally scrollable
and part ot the items were out of the screen area.

To fix this, we have to revert back the initial position on some elements.
2019-09-24 10:05:47 +00:00
Romain Estievenart 90e58efeba [FIX] web_editor: correctly display dialogs on mobile
Before this commit, web_editor dialog was opened inside an iframe and
not on the window.top. So dialogs didn't take all screen area.

To fix this, we open dialogs in full screen mode but we also put the
web editor in full screen to increase the size of the iframe.
Note that the initial state of the web editor (full screen or not) is
preserved when you close the modal.

We also add some fixes to make the "web_editor media dialog" responsive.
2019-09-24 10:05:39 +00:00
David Monjoie c778a0552f [FIX] web_editor: fix wrapping of toolbar icons
Commit e6b1dbca wrongly introduced a no-wrap rule on the toolbar while
fixing another bug. This commit fixes that mistake.
2019-09-24 07:40:04 +00:00
Christophe Simonis d67b2483e5 [MERGE] forward port branch saas-12.4 up to 9ed4872ea0
closes odoo/odoo#37372

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-24 17:45:37 +00:00
Florent Lejoly 38d8b0526f [FIX] sale_crm: correctly handle customer option when converting opportunity
When converting an opportunity to a quotation, it will give 3 options where
the last option is "Do not link to a customer". When clicked it has the
same behavior than "Create a new customer".

Followup of 1d2bccd0db that added the
selection entry but did not implement its behavior.

This commit fixes that behavior. Now it opens a quotation without linked
customer.

Task ID 2065014

closes odoo/odoo#37026

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-24 11:08:27 +00:00
oco-odoo 9ed4872ea0 [FIX] account: set partner_id field of account.move as not required in the view
Having this field required in the view forbade the 'send for digitalization' button of account_invoice_extract to work, as it could be empty there (as the invoice was created via .create({})). The constraint defined in the view was checked before executing the code related to the button and caused everything to fail before running anything.

closes odoo/odoo#37279

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-23 12:26:49 +00:00
Christophe Simonis ac4fc6e7c7 [MERGE] forward port branch saas-12.3 up to bd3e510edb
closes odoo/odoo#37314

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-24 09:44:56 +00:00
Denis Vermylen bd3e510edb [IMP] odoo: dump stacktrace of timed out threaded workers
So the logs contain some indication as to what was exceeding the limits.

closes odoo/odoo#37303

X-original-commit: 0a266f444a0abda026d09ad88024dca1c50c92b9
Signed-off-by: Denis Vermylen <Icallhimtest@users.noreply.github.com>
2019-09-23 14:16:04 +00:00
qsm-odoo c987515c9f [FIX] base: support flex-wrap in wkhtmltopdf
As explained here:
https://github.com/odoo/odoo/commit/770aec399c4e6e29cfc5854318cbda19a605315d#diff-3d7991d8bc534e0372f0bd9b4f9165a7R424
we have to post-process the generated css to add some vendor prefixes.

The flex-wrap property was not post-processed yet.

Related to opw-2045424

closes odoo/odoo#37283

X-original-commit: 8c251ec835edb04821cd45087f92756be3d5731f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-23 13:00:38 +00:00
wan 4ec267bf79 [FIX] account: take into account the amount type of second reconciliation line
The field second_amount_type was not taken into account when doing automatic reconciliation and 100% of the remaining amount was always used

closes odoo/odoo#37282

X-original-commit: 8c2ed8849bdf5f6b84f63a01c1b27b83d31e3a8d
Signed-off-by: wan <william-andre@users.noreply.github.com>
2019-09-23 13:00:22 +00:00
oco-odoo a6a3df3d0e [FIX] account: tax lock date: don't check tax lock date when printing the invoice
It made no sense; forward-port mistake.

closes odoo/odoo#37071

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-23 12:48:57 +00:00
Priyanka Kakadiya 4abb293f3c [IMP] l10n_fr: Add missing cash basis VAT
-TVA à l'encaissement (vente) 10,0% for sale

-TVA à l'encaissement (vente) 10,0% TTC for sale

-TVA à l'encaissement (achat) 20,0% for purchase

-TVA à l'encaissement (achat) 20,0% TTC for purchase

-TVA à l'encaissement (achat) 10,0% for purchase.

-TVA à l'encaissement (achat) 10,0% TTC for purchase

-TVA à l'encaissement (achat) 5,5% for purchase

-TVA à l'encaissement (achat) 5,5% TTC for purchase

-TVA à l'encaissement (achat) 2,1% for purchase

-TVA à l'encaissement (achat) 2,1% TTC for purchase

also add accordingly fiscal positions

task - 42558

closes odoo/odoo#37266

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-09-23 10:57:32 +00:00
Nicolas Lempereur 1eec5860e2 [FIX] website_sale_wishlist: unlink instead of archive
Since 11.0 88b75f150 the wishlist can't contain duplicates: thus if we
remove an element from wishlist (by adding it to cart or removing) there
is an error next times it is added (since the product is already in
wishlist but archived until next garbage collection).

opw-2074843
closes #37255

closes odoo/odoo#37287

X-original-commit: 0b085ce0800f410d5f88615fd18bd633c0d48fb5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-23 13:01:47 +00:00
Christophe Simonis f77123573c [FIX] account: handle non-existance of groups when checking exclusiveness
If groups are deleted (or does not exists yet in case of upgrade), it
wasn't possible to update the `account` module.

closes odoo/odoo#37286

X-original-commit: 5c5823f254ab79b5ea4e88aee5b6d088508db9a0
Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-23 13:01:29 +00:00
Florimond Husquinet (fhu) 187f8e4369 [FIX] base: general settings crashes when a setting is None
Go to Configuration > General Settings.

Before this commit:

if a setting is None, a stack trace appears.

After this commit:

a warning message is logged in this case, but there is no crash.

closes odoo/odoo#37271

Opw: 2075047
X-original-commit: ed64477d0a9fc58a577d9174a347268186eff70f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-23 11:44:09 +00:00
Nicolas Martinelli 69fceb8f42 [FIX] base: KWD digits
KWD has 3 digits.

opw-2071909

closes odoo/odoo#37270

X-original-commit: 4d766278504d43646a4158330923eb92194348c8
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-23 11:39:55 +00:00
Jorge Pinna Puissant 3f289ff62f [FIX] l10n_it_edi: checking for Codice Ficale/VAT on invoice for non Italians
Fine-tuning of 461effb9fc

opw-2045244

closes odoo/odoo#37272

X-original-commit: 2302386d3ea47f3160ca5857425c99e0d4bbf62a
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-09-23 11:44:25 +00:00
Toufik Ben Jaa 3a81d43aff [FIX] hr{_org_chart}: multi-company access issues on employees
- Avoid to crash when trying to render an employee's org chart
  when in a different company than yours.
- Retrieve the context from the current environment instead of
  the `_check_employee` function parameters.

closes odoo/odoo#37251

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-23 10:12:31 +00:00
Jorge Pinna Puissant df76747beb [FIX] l10n_it_edi: sent certified email without reply-to or return-path
Fine-tuning of 66c5053a3d1f8cb456929453a62869c95eccf86a

closes odoo/odoo#37246

X-original-commit: d79cf04977c3b5737d57c70b7c4e2ddc147ff7ef
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-23 09:59:28 +00:00
Jorge Pinna Puissant c10899167a [FIX] l10n_it_edi: sent certified email without reply-to or return-path
Before this commit, when the domain alias was set (e.g. my_domain.com),
the reply-to and the reply-path were filled with default values using
this domain (e.g. reply-to : catchall@my_domain.com and reply-path:
Return-Path: bounce+number@my_domain.com). As we have a second SMTP
server, the certified email
(https://en.wikipedia.org/wiki/Certified_email), with a different domain
than the domain alias filled in the settings, the SMTP servers will
arise an error : "SMTPRecipientsRefused: Sender address rejected: not
owned by user", this error arise because the domain of the certified
email is different from the one setted in the settings, is also
different from the domains of the reply-to and the return-path.

Now, when we know that we are going to use the certified email SMTP
server, for example to send invoices to the Italian government, the
email will be sent without a reply-to or without a reply-path. This
behaviour is exactly the same as the behaviour will have if we didn't
set a domain alias.

opw-2045244

X-original-commit: 66c5053
2019-09-23 09:57:46 +00:00
Pierre ParidansandRomeo Fragomeli 442f74ff39 [FIX] web: crash when resizing on tablet
When having a long systray (icons from different apps, mode debug,
multi-company...) the resize of the window can trigger a crash for apps
that have not too much top-level menus (e.g. Contacts).

This also happens when loading those apps.

Steps to reproduce (on an iPad, portrait):

* use a Runbot with all modules installed (12.0+)
* activate "debug mode"
* ensure that the menu/systray bar is quite full
* open the "Contacts" app
=> traceback with a "cannot call getBoundingClientRect of undefined"
error

The reason is that the resize's callback iterate over the systray/menu
items to find which one should be folded behind a "more" ("+") menu
item.

Sadly in some cases (combination of screen width, systray size, app's
number of menus) it can lead to a traceback.

This commit ensures that when looping for menu items, we don't try to
reach an non-existing item.

closes odoo/odoo#37245

X-original-commit: d7bae0329990171710acf2d9c0d4d9579cba2c0e
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Co-authored-by: Romeo Fragomeli <rfr@odoo.com>
2019-09-23 09:10:05 +00:00
Lucas Perais (lpe) 7bea91260f [FIX] account: amount by group adapt to repartition
Before this commit, when printing an invoice that has at least
one tax which is part of a tax group and some repartition lines

On the invoice pdf the group of tax contained twice the base amount for that
tax

After this commit, the tax group contains the base only once

OPW 2073989

closes odoo/odoo#37226

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-09-23 06:18:45 +00:00
Denis Vermylen 4fb712f729 [FIX] service: do not call nonexistent function
omission in d26e253edd

kill -3 (SIGQUIT) is not processed like the other signals so it doesn't
go through this bit of code, but leaving the AttributeError lurking
there is not a good idea.

closes odoo/odoo#37221

X-original-commit: ac65ef0208a5ec814d263aeb44a98b47a5ee3947
Signed-off-by: Denis Vermylen <Icallhimtest@users.noreply.github.com>
2019-09-21 13:59:06 +00:00
Denis Vermylen 81df4d07b7 [FIX] base: log when a cron job is done
Missing log for analyzing cron issues.

X-original-commit: 9a88fce496f5f6a08b0f9861b0951ee987c60d5e
2019-09-21 13:59:05 +00:00
wan d3ddcc613f [FIX] account: constraint on empty account
If SQL, if you do
```display_type IN ('line_section', 'line_note') OR account_id IS NOT NULL```
and `display_type` is `NULL` then you can only have `'t'` because
`SELECT NULL OR 'f';` yields `NULL`
`SELECT NULL OR 't';` yields `'t'`
The check of NULL is not blocking, hence the constraint doesn't work.

closes odoo/odoo#37075

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-20 13:59:21 +00:00
Odoo Translation Bot e41f468972 [I18N] Update translation terms from Transifex 2019-09-22 06:10:13 +02:00
Florimond Husquinet (fhu) 45c6341ba4 [FIX] survey: answers not saved when using breadcrums
- Create a survey with one page per section.
- Go to the second section and select an answer.
- Go back to the first section using the breadcrums.

Before this commit:

if you go back again to the second section, you will see that your answer
wasn't saved.

After this commit:

answers are saved even when navigating with breadcrums.

closes odoo/odoo#37157

Opw: 2072948
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-09-20 13:44:23 +00:00
Antoine Vandevenne (anv) 06915120ab [IMP] doc: rewrite of the source install page
Prior to this commit, the documentation page for the installation of Odoo had lots of inconsistencies, errouneous information and a bad structure.

This commit restructures the page to split the Source Install chapter into three sections for Windows, Linux and Mac OS.
Each section is entirely rewritten to be accurate, logical, clean, easy to understand and focused on its purpose (removed tutorials of non-Odoo softwares).

task-2072822

closes odoo/odoo#37001

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2019-09-20 13:00:43 +00:00
William 3431d7b1cd [FIX] stock: remove move 'without package' properly
on a picking, move_ids_without_package is a subset of move_lines.
The inverse function on move_ids_without_package only work well when we
add a move.

This commit improves the inverse function to take deletion into account

closes odoo/odoo#36558

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-20 14:01:19 +00:00
Damien Bouvy 7807bc854e [FIX] payment_stripe_sca: on-the-fly customer conversion
Payment tokens created before the installation of this module and that
used the Charge API did not need to keep the card reference on Odoo's
side - since we were allowed by the API to simply specify a customer
reference when creating a charge and it would take the default one for
that customer. Odoo creates one customer per payment token (even if it's
the same partner), so there was no uncertainty there.

Now, with the PaymentIntent API, the payment method reference is
mandatory. We have a field to keep it in db, but this info needs to be
retrieved for tokens created before the module's installation. This fix
introduces that remote call.

closes odoo/odoo#37206

X-original-commit: 1b760a988fdf7bbc08b92e0705929d5620356a2f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-20 12:42:09 +00:00
William Henrotin 1067f3bda2 [IMP] mrp: compute quantities speedup
The computation of kit quantities was not efficient. A loop on each product
of the recordset to consider performed. Each time a product was seen as 'not a kit',
a new computation on the complete recordset was done. This leads to a N^2 complexity

This commit only compute stock quantities for non kit product in one batch

opw-2070768

closes odoo/odoo#37205

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-20 12:39:04 +00:00
Andrea Grazioso (agr-odoo) 5e2ae036cf [FIX] account: broken filter in reconciliation widget
From Accounting app under the kanban card "Bank" click on
"Reconcilile items". Select a line to reconcile with a selected partner
or counterpart (or input one) and then filter the underlying lines using
for example the name of the record

No filtering will occur, this is due to commit 900d89c997.
The domain used by the filtering function is matching all lines
from the current partner instead of restricting the search to
the filtered elements.

Reverting that commit and providing a fix for the original issue:
removing a check on the partner id make a logical separation between the
domain involving the partner_id and the one related to the search string,
so that they do not interfere with each other (at most they will overlap).

Preserving tests from the reverted commit and adding some more as well

opw-2070458

closes odoo/odoo#37179

X-original-commit: d434251f3350e033843d941b48cf84f7de28d20f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-20 08:45:33 +00:00
William Henrotin 1191676227 [FIX] sale_stock: quantity widget improvement
Commit fff2a30 introduced a popup on sale order line to show some information about available quantity
of the sold product.

This commit adds various imporvement on this widget

closes odoo/odoo#36995

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-20 08:37:08 +00:00
Debauche Stéphane 34791aa403 [IMP] website_slides: clean navigation and breadcrumb with profile / courses
SPECIFICATIONS

  * Remove the /home from the breadcrumb in user profile
  * Rename the Home (on a specific course) into "Courses"

Task 2062640

closes odoo/odoo#36900

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-24 11:23:25 +00:00
qdp-odoo 5abad05e8b [FIX] account: tax audit field sign
Customer invoices and supplier refunds lines involved with taxes will be credit lines, hence their balance must be inversed when shown in the tax audit field.
The method is_inbound() encloses exactly those documents, whereas is_outbound() stands for customer refunds and supplier bills.

closes odoo/odoo#37092

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-09-20 07:11:46 +00:00