Commit Graph
126133 Commits
Author SHA1 Message Date
Christophe Simonis 3a3f7fd586 [FIX] web: convert forward-ported test to use async/await 2019-04-10 18:11:24 +02:00
Christophe Simonis b917fdd1ac [FIX] web: correctly forward-port 8d34eb1328.
I shouldn't have trust the comment and apply the patch anyway.
2019-04-10 18:09:55 +02:00
Aurélien Warnon 2268e747c9 [FIX] survey: allow creating survey with no sections
Task#1958723

This commit fixes the survey form to allow creating, testing and sharing
surveys that don't have sections as long as they don't use the "page_per_section"
layout.

closes odoo/odoo#32159

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-10 15:03:10 +00:00
Priyanka Kakadiya 61495126ae [FIX] survey: correct score of answer in demo data
- when answer is correct, then score should be +1.

Related to Issue: 1967506

closes odoo/odoo#32612

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-11 07:02:59 +00:00
Goffin Simon 5a83cd2649 [FIX]sale_stock: Issue when clicking on "No backorder"
Steps to reproduce the bug:
- Create a SO with no salesperson
- Add a SO line with 2 storable product
- Confirm the SO and deliver only one product
- Click on "No backorder"

Bug:

A error was raised because the function "_log_activity"(called by _log_less_quantities_than_expected) requires a responsible

Partial Backport: https://github.com/odoo/odoo/commit/e1f9499d2672fb0a346f8ac74552f038f5204a64

opw:1950968

closes odoo/odoo#32592

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-10 14:35:40 +00:00
Christophe Simonis 5313cea8e6 [FIX] snailmail: add missing model entry in test declaration
This allow enterprise tests to pass.
2019-04-10 15:38:09 +02:00
Christophe Simonis e145f2b0c8 [MERGE] forward port branch saas-12.2 up to 2694174b41 2019-04-10 15:10:24 +02:00
Christophe Simonis 2694174b41 [MERGE] forward port branch saas-12.1 up to 0fb9110e46 2019-04-10 14:24:09 +02:00
Nicolas Martinelli e402c89bcc [FIX] stock_account: price unit is zero
- Set a product P to average valuation, real time
- Create a PO for 1 unit @ 100, validate the picking
- Create a PO for 1 unit @ 0 (e.g. you receive a free product)

You cannot validate the picking because of the message 'The cost of P is
currently equal to 0...'

This error message is historical, to prevent users from an incorrect
configuration.

Since we still want to prevent misconfiguration, but support the
mentioned use case, we introduce an `ir._config_parameter` for people
who 'know what they are doing'.

opw-1962249

closes odoo/odoo#32550

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-10 12:15:58 +00:00
Christophe Simonis 0fb9110e46 [MERGE] forward port branch 12.0 up to 81215120af 2019-04-10 12:27:56 +02:00
Nans Lefebvre 81215120af Revert "[FIX] mail: remove attachment as main at unlink"
This reverts commit abc45b1
Since by default the ondelete attribute of a many2one is `set null`,
this was completely unnecessary to begin with.

Bug caused by this commit:
Unlink a record that has some attachments.
The unlink first removes the record, then its related attachments.
It calls remove_as_main_attachment, which reads the attachment res_model and
res_id. This triggers a check that the related record can be read.
However the related record has already been removed, an exception is raised.
It is thus impossible to unlink a record.

Closes #32563

closes odoo/odoo#32572

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-10 08:00:06 +00:00
Lucas Perais (lpe) c43acc34b8 [FIX] account: cash basis reconciliation almost all amount
In multicurrency

Do an invoice with cash basis lines in the foreign currency
Make a payment for almost all the invoice
"almost" refers to the point where virtually all taxes will be paid

i.e., paying 90 over 100, that contains a tax of 5%
The tax paid will be an amount almost equal (to a few cents) to the
total amount of the tax
It is not negligible, but if the currency rates are in the right configuration
(i.e. 0.005888)

Before this commit: the Cash Basis reconciliation will be considered as full and will trigger
the creation of the Exchange Diff Entry.
In turn, paying the rest of the invoice will pop up an error saying that some entries are already reconciled
(with the Exchange Diff entry)
It is not *that* that an exchange rate entry has been created the first time
after all, a percentage sufficiently close to 100 has been paid
But it blocks subsequent reconciliation, hence this fix

After this commit, if the cash basis entry doesn't match at least 100% of the paid move
then, we force to not check for full reconciliation

OPW 1953027
closes #31168

closes odoo/odoo#32023

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-10 08:02:14 +00:00
Lucas Perais (lpe) 30f7c0ea0e [FIX] account: tests reconciliation helper class
Before this commit, test reconciliation was inherited by
test reconciliation widget.
It made the actual test_xx functions of the former
being executed twice

After this commit, we create an intermediary test class for setUp and helpers
And the tests for each class execute only once
2019-04-10 08:02:14 +00:00
Lucas Perais (lpe) ea00318e9e [FIX] account: revert move subjected to cash basis
Before this commit, when reverting a move
that will be subjected to the creation of a cash basis move
the process failed saying that some entries were already reconciled

That was because the process tried to create the cash basis move during
the revert.
This is  wrong, because no real cash is dealt with.

After this fix, the move lines of the original entry are reconciled
only with their revert counterpart

OPW 1938809
closes #30972
2019-04-10 08:02:14 +00:00
Christophe Simonis c9e1deb496 [MERGE] forward port branch saas-12.1 up to af313858b4 2019-04-09 20:48:01 +02:00
Christophe Simonis af313858b4 [MERGE] forward port branch 12.0 up to c1c322dd40 2019-04-09 20:43:35 +02:00
Christophe Simonis c1c322dd40 [MERGE] forward port branch saas-11.3 up to 372ecf4c09 2019-04-09 20:38:23 +02:00
Christophe Simonis 372ecf4c09 [MERGE] forward port branch 11.0 up to 492c5b6e17 2019-04-09 20:34:03 +02:00
Christophe Simonis 492c5b6e17 [FIX] survey: prefill checkboxes
Oversight of 82d733d68c

See #32149

closes odoo/odoo#32557

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-04-09 16:54:42 +00:00
Christophe Simonis 6c8e30cae6 [MERGE] forward port branch saas-12.1 up to 6d4940675f 2019-04-09 12:16:06 +02:00
Christophe Simonis 6d4940675f [MERGE] forward port branch 12.0 up to ea1fc124ef 2019-04-09 11:11:48 +02:00
Jorge Pinna Puissant 1cf284e91e [FIX] calendar: alarm for past events
Before this commit, Odoo notifies the user of all the recurring past
events, existing before the installation of the module Calendar (old
events imported when synchronizing with Google, for instance). This
occurs only the first time a synchronization with Google is made. This
occurs because Odoo notify all the events that occurs since the last
time it notified, and the first time you install the module the date of
the last notification is empty.

Now, when the module Calendar is installed, the date of the last
notification is set by default to the current date (the date of the
installation of the module)

opw-1942443

closes odoo/odoo#32535

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-09 06:16:41 +00:00
Christophe Simonis 4c61621efb [MERGE] forward port branch 11.0 up to 9a7e3c8b49 2019-04-08 17:45:00 +02:00
Christophe Simonis 9a7e3c8b49 [MERGE] forward port branch saas-15 up to cd28e53a31 2019-04-08 16:46:31 +02:00
Christophe Simonis cd28e53a31 [MERGE] forward port branch saas-14 up to 32c2af2376 2019-04-08 15:53:36 +02:00
Carlos Lopez 288d82a671 [FIX] pos_hr: auto_install on module pos_hr
In the manifest must be auto_install instead of auto-install
complementary to commit f14092c

closes odoo/odoo#30980

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-08 13:32:40 +00:00
Nans Lefebvre ea1fc124ef [FIX] purchase: update reference onchange of vendor_bill_purchase_id
Commit 1be873d4 removed the modification of the reference field
from the _onchange_origin.
The reasoning was that since this is an onchange on invoice_line_ids, it was
applied too often, which annoyed users in the case they overwrote that field.

However when using the "Autocomplete" field (vendor_bill_purchase_id),
then the user expects values to by modified.
Before, it worked by setting the origin field, which trickled down
to the reference.
Since that commit removed this, we re-add it explicitly in that case.

opw 1962364

closes odoo/odoo#32500

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-08 13:18:51 +00:00
Thibault Delavallée 32c2af2376 [FIX] mass_mailing: correctly find partner email in mass mailing
In mass mailing access to partners when performing a mass mailing has been
done in batch to speedup computation [1]. Emails are put into a dictionary
allowing to find back the email based on partner_id.

However the matching between the partner and its emails is done using a
shortcut using the current document ID as partner ID. It works when performing
a mass mailing on partners but fails when performing a mass mailing on models
having message_get_default_recipients not returning only emails. Currently
in saas-14 main models return only emails (crm, event, mailing contacts) but
other models may encounter issues (applicants, tickets).

This commit fixes it by correctly matching partner id and its found email.

[1] See 65ed4553a5
2019-04-08 15:18:18 +02:00
Christophe Simonis e831064d93 [MERGE] forward port branch 10.0 up to 6431e366a8 2019-04-08 15:12:52 +02:00
Pierre Paridans 75c219bfdf [FIX] mail: chatter's button alignment and composer width on mobile
Buttons "Send message / Log note / Activity" are on two lines instead of
one. In addition there is a 1px glitch on the attachment icon.

Also long attachment name on tiny screens (i.e. iPhone 5) breaks the
composer layout: horizontal scrollbar appears.

The two-line buttons effect is related to a change (fix) in Bootstrap
4.2 which removes the white-space: nowrap on .btn. It was originally
introduced in Odoo through https://github.com/odoo/odoo/pull/29949.

Reference: Original Bootstrap PR https://github.com/twbs/bootstrap/pull/27010

Task ID: 1946573

closes odoo/odoo#31939

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-04-08 12:31:16 +00:00
Jalpesh Patel e524a25004 [FIX] digest: fix m2m typo that would not do whats expected
m2m ORM operation (4, id, _) was not correctly used, resulting in an
unexpected behavior. Instead of adding the record, it would add the record and
also the res.user(4,).

As that used is generally the public user, without an email address, that bug
would not be that critical but if that res.user(4,) does not exist (eg deleted),
then the code simply crash as it tries to read user 4 from db.

closes odoo/odoo#32425

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-08 09:30:41 +00:00
Christophe Simonis fef49061ea [MERGE] forward port branch saas-11.3 up to 4c61621efb 2019-04-08 19:52:29 +02:00
Thibault Delavallée ebba721130 [FIX] mass_mailing: fix statistic state computation
Replied / Bounced / Opened states should be computed prior to Sent state.
Indeed Sent is the default state once the email is sent. Then replied,
bounced and opened are states that happen after sending the email. It
is therefore necessary to re-order the state computation to correctly compute
the statistic state.

Related to task ID 1924711
Linked to PR #32496

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-08 12:39:41 +00:00
Thibault Delavallée b0491c4445 [FIX] mass_mailing: correctly find partner email in mass mailing
In mass mailing access to partners when performing a mass mailing has been
done in batch to speedup computation [1]. Emails are put into a dictionary
allowing to find back the email based on partner_id.

However the matching between the partner and its emails is done using a
shortcut using the current document ID as partner ID. It works when performing
a mass mailing on partners but fails when performing a mass mailing on models
having message_get_default_recipients not returning only emails. Currently
in saas-14 main models return only emails (crm, event, mailing contacts) but
other models may encounter issues (applicants, tickets).

This commit fixes it by correctly matching partner id and its found email.

Related to task ID 1924711
Linked to PR #32496

[1] See 65ed4553a5
2019-04-08 12:39:18 +00:00
Andrey Semko 986e405457 [CLA] signature for andriisem
closes odoo/odoo#32490

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-08 10:26:36 +00:00
Mohammed Mahgoub 8ac788adff [FIX] doc: Steps to install website theme in v12.0
Correct the instructions needed to install a website theme
In 12.0 the steps have changed

closes odoo/odoo#31886

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-08 12:41:14 +00:00
Mohammed Mahgoub 8f5a0d782f [CLA] signature for Mohammed Mahgoub 2019-04-08 12:38:15 +00:00
SimoRubi 6431e366a8 [FIX] web: call method with correct record
_compute_website_url can only be called on singletons
It should not be called with self but the record we are iterating on

closes odoo/odoo#32369

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-08 09:26:01 +00:00
Odoo Translation Bot 7887dd8727 [I18N] Update translation terms from Transifex 2019-04-07 06:20:48 +02:00
Christophe Simonis 3f95b074e9 [MERGE] forward port branch saas-12.2 up to f2be461f09 2019-04-05 18:46:10 +02:00
Jorge Pinna Puissant bb17098172 [FIX] mail: only display errors linked to message of current user
fine-tuning commit 1120bffb66

Before this commit, the search on message_has_error (used when clicking
on a failure notification) only display errors linked to message of the
current user. Also, the filter Has_error is true, in the messages view
in technical menu only display the message with errors of current user.

Now, the filter Has_error is true display the message with errors of all
users. The search on message_has_error behave as before.

opw-1958813

closes odoo/odoo#32462

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-04-05 13:20:21 +00:00
Adrian Torres 3f3d2b2773 [FIX] base: prevent module operations while cron is running
closes odoo/odoo#32234

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-05 13:10:35 +00:00
Sébastien Theys 742fa44fe9 [FIX] product: fix speed of closest combination
Before this commit, the code would try to loop over all possible combinations
following their sequences, until it found the requested one, which could be
extremely slow if there was a lot of combinations.

Now if the given combination is possible, we skip that useless looping and
yield it directly.

To reproduce this: create a product template with millions of possible
combinations (using dynamic attributes) and try to add to cart a combination
that would be found late in the looping. Before the commit, the request would
take too much time.

opw-1958623

closes odoo/odoo#32433

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-05 09:48:07 +00:00
Nicolas Lempereur 924beddeb1 [FIX] sale_management: translate quote template t&c
On a quotation template, the "Terms and conditions" (note) field may
override the company terms and conditions.

The company terms and conditions is translatable is translatable at
least since 2013 (a510050ba) but the quotation template terms and
conditions has never been translatable.

With this changeset the quotation template terms and conditions are
translatable (so when used on a partner in the lang of the partner for
the quotation).

opw-1960728
closes #32236

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-04-09 09:31:25 +00:00
Christophe Simonis 5521b05a04 [FIX] account: do not force users on B2B group on update
Followup of 552da8dc8d (#32200)

opw 1950833

closes odoo/odoo#32472

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-04-05 17:05:15 +00:00
Nans Lefebvre abc45b19d0 [FIX] mail: remove attachment as main at unlink
If an user unlinks an attachment,
it doesn't remove it as message_main_attachment_id.

opw 1950403

closes odoo/odoo#32347

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-05 13:43:28 +00:00
Nans Lefebvre 6a5dab9c64 [FIX] mail: reload the record when uploading attachments if post_refresh is set to always
When post_refresh is set to 'always', the displayed record is entirely reloaded
each time a message is posted in the chatter.
However no such thing exists for when attachments are uploaded.

This is of use e.g. when in the view there are fields that have attributes that
depend on computed fields, themselves dependent on the record's attachments.

One such case is the OCR.

opw 1950403
2019-04-05 13:42:55 +00:00
Nans Lefebvre c791981abc [FIX] mail: only register as main attachment if main not already set
Commit a26496b6e7 registered an attachment added through the widget as record's
message_main_attachment.
This to make the OCR feature available for such attachments.
However we copy more closely the behaviour in message_post,
which only puts the attachment as main if there isn't already a main.

opw 1950403
2019-04-05 13:42:39 +00:00
Nicolas Martinelli c89b8451c2 [FIX] stock: inventory report
Avoid overlap between address and title in case of a long address.

opw-1966325

closes odoo/odoo#32546

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-09 11:32:43 +00:00
Lucas Perais (lpe) cdc150d0a3 [FIX] board: fixed height for graph svg container
Commit 9214d78152 is a bit old and made
huge white spaces between graphs

Commit 89931d1749 introduces
a dedicated svg container, on which we can set a fixed height

The 250 px comes from what is being done in the web_dashboard app
with commit odoo/enterprise@1638e5d481

OPW 1944857

closes odoo/odoo#32522

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-09 10:32:19 +00:00