Commit Graph
118109 Commits
Author SHA1 Message Date
Nicolas Martinelli d0cd05a670 [FIX] l10n_fr_fec: new line
Commit 5dfb6e39af added the new line
characters at the end of each line but the last one.

However, it does so by adding a new element in the row: therefore, 19
columns are created instead of the 18 required.

We add the new line character at the end of the last element of the row.

opw-2000429

closes odoo/odoo#33571

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-22 13:02:55 +00:00
Nicolas Martinelli a3519638a3 [FIX] l10n_fr_fec: EcritureLib
Make sure `EcritureLib` is always filled in if the AML name is an empty string.

opw-2000429
2019-05-22 13:02:55 +00:00
Jinal Patel 84e2c85b93 [FIX] stock: return wizard in multi location
In `_create_returns`, the code creates a picking using
`self.location_id` as destination location.

When the multi location group is not active, the user has no possibility
to change this field and it is correctly initialized. When the multi
location groups is active, the user has this possibility.

If the user empties out this field and tries to validate the return,
he's faced with an error. We make this field required in the view to
prevent any issues.

Task-1986294
Fixes 24207

closes odoo/odoo#33463

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-05-22 12:48:11 +00:00
Goffin Simon 3418f8c4c4 [FIX] sale: T&C issue when changing partner
Steps to reproduce:
1. Create an invoice with a customer and enter some text in Terms and Conditions (field: comment).
2. Save the invoice.
3. Edit the invoice and change the customer.

Bug:
The text in Terms and Conditions was empty.

Same behavior as on the SO, if the company doesn't change the T&C should be kept.

Fine tuning of this commit: 9bf1f97d9b
Closes #32309

opw:1830838

closes odoo/odoo#33383

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-05-22 09:10:30 +00:00
Nans Lefebvre 95f8eb410e [FIX] mail: add all attachments at template onchange
Fine-tuning of 516f22c398.
This commit missed attachments that are linked to a mail.template,
which should be added to every mail sent using the template.

To make sure that we both fix the duplicates and the generation issue,
we add a test.

opw 2000515
opw 1998782

closes odoo/odoo#33528

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-21 12:20:07 +00:00
Nicolas Martinelli 6356a09041 [FIX] website_quote: pricelist and template
- Create a product, sale price of 100
- Create a quotation template
Product A: 10 Units
- Create a pricelist
Product A: 10% discount for a quantity of 10
- Create a SO
- Set the pricelist
- Set the quotation template

The unit price is 100 instead of 90.

This is because we retrieve the price based on a quantity of 1 instead
on the quantity specified in the template.

opw-1998642

closes odoo/odoo#33534

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-21 13:04:50 +00:00
Nicolas Martinelli 8c4a88a3f9 [FIX] account: auto-reconcile hidden lines
- Create 11 invoices with the same partner but different totals like:
1.0, 2.0, 3.0 ... 11.0
- Confirm them
- Create a bank statement with 11 lines having each of them the previous
invoice amount (1.0, 2.0, 3.0 .... 11.0) and the partner
- Click on the 'Reconcile' button
- In the reconcile form, do NOT push the 'Load More' button, but push
the 'Automatic Reconciliation' button

All lines are reconciled, but a JS traceback is raised.

This is because we try to destroy a widgets which were not rendered.

opw-1985580

closes odoo/odoo#33524

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-21 10:51:44 +00:00
Denis Ledoux c7274a48e3 [MERGE] forward port branch saas-15 up to b1e1c78ffa 2019-05-21 16:32:48 +02:00
Denis Ledoux b1e1c78ffa [MERGE] forward port branch saas-14 up to 0601b21bb5 2019-05-21 15:27:22 +02:00
Denis Ledoux 0601b21bb5 [MERGE] forward port branch 10.0 up to 0a1a950c25 2019-05-21 14:26:32 +02:00
jev-odoo 0a1a950c25 [FIX] payment_authorize: no customer profile don't crash transaction
When transaction is approved, if for any reason the `customerProfileId`
is missing from the response, the transaction is aborted.

It should succeed even if we cannot create a customer profile.

opw-1998505

closes odoo/odoo#33501

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-20 11:29:08 +00:00
Odoo Translation Bot 7237b8f2a2 [I18N] Update translation terms from Transifex 2019-05-19 03:08:16 +02:00
Christophe Simonis daf9763e6e [MERGE] forward port branch saas-15 up to 68b7f2a8ef 2019-05-16 21:08:52 +02:00
Christophe Simonis 68b7f2a8ef [MERGE] forward port branch saas-14 up to fe970ad5ae 2019-05-16 21:07:53 +02:00
Christophe Simonis fe970ad5ae [MERGE] forward port branch 10.0 up to 4039fc5201 2019-05-16 21:07:21 +02:00
Christophe Simonis 4039fc5201 [FIX] website_customer: no error-prone xpath expr
closes odoo/odoo#33450

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-05-16 16:56:34 +00:00
Christophe Simonis 7b9aa21576 [MERGE] forward port branch saas-15 up to cecb1ec77d 2019-05-16 18:19:49 +02:00
Christophe Simonis cecb1ec77d [MERGE] forward port branch saas-14 up to 556b59bce1 2019-05-16 18:11:09 +02:00
Christophe Simonis 556b59bce1 [MERGE] forward port branch 10.0 up to 90d86e07dd 2019-05-16 18:10:33 +02:00
Mohammed ShekhaandDhaval Limbuwala 90d86e07dd [FIX] tools: allow using datetime in function call
Traceback generated when trying to pass a datetime object into a function tag
in xml.

<function name="action_name" model="model_name" eval="datetime.date.today"/>

Used to fail.

With this commit now one can pass time, datetime, timedelta, relativedelta,
version, ref, pytz in function tag in xml

Task-id: 1772614
Closes odoo/odoo#29212

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>


Co-authored-by: Dhaval Limbuwala <dli@odoo.com>
2019-05-16 14:42:41 +00:00
Sébastien Theys 3b3f85670f [FIX] website: prevent crash with image gallery snippet
If destroy is called before start, there will be a crash before this commit.

At the time of this commit, this can be reproduced in master by dropping the
image gallery snippet, clicking on add images (double click, which opens the
media dialog twice for some reason), selecting 2 images to add on the
media dialog, and clicking on add. The error will be in the JS console.

closes odoo/odoo#33440

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-05-16 14:33:40 +00:00
Nans Lefebvre 516f22c398 [FIX] mail: remove previous attachments when changing template
Open a mail.compose.message wizard.
Select a template that generates an attachment.
Reselect it. A second attachment has been generated.
Can be repeated ad infinitum.

At template onchange, the template is rendered to overwrite the composers values
This includes the attachments.
Let L1 be the list of attachments generated by the template.
When _convert_to_write(values) is called with {'attachment_ids': L1},
it gets self.attachments_ids = L2, and generates a [(6, 0, L1 + L2)] command.
As a result attachments are only added,
the previous ones need to be removed manually.

Since c6d718f, the semantics of _convert_to_write changed.
Before, it always returned an empty list for new records (without an id).
In other words, wa always had L2 == [].
As a result we need to adapt the wizard to keep its old behaviour.

To solve it we bypass the _convert_to_write for 'attachment_ids' and directly
generate the 6 command with the list of ids L1 generated by the template.
We only do this for templates that add attachments to keep the templates
composable (a template only overwrites the values it defines).
Unfortunately, we don't have any way to know which attachments have been added
manually, so we can't preserve these (which was the old behaviour anyway).

opw 1997430
opw 1987169
opw 1998115
opw 1998782

closes odoo/odoo#33387

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-16 13:15:03 +00:00
Denis Ledoux 272359b86c [FIX] mail: accurate message notifications marked as sent
When multiple emails (`mail.mail`) are linked
to the same message (`mail.message`),
all the message notifications were being marked as sent
as soon as one of the mail was sent, and not all of them.

This is indeed possible to have multiple emails linked to a single
message, for instance when there are employees and customers in
the followers of a thread, and some must therefore have
the buttons meant for the employees ("Assign me") and some not.

In other words, it was possible notifications were marked
as sent while their associated email was not sent yet.

This revision also comes as an addition to
5d6656d739

as it was possible to receive a bounce coming from
the previous mail sent which wrote on the same notifications `email_status`
than the current message being sent before we could acquire the lock on
them (see commit message of the above mentioned revision),
as it was writing the `email_status` on more notifications that it
should have, including notifications of the previous email.

e.g
- Mail 1
- Message 1
- Recipient A, B, C
- Mail 2
- Message 1
- Recipient D, E

Let's say recipient A bounces

If the email notifying the bounce arrives during the processing of the "Mail 1",
it will be blocked until we release the lock on the `mail.notification` `email_status`
we acquire thanks to having written `exception` on `email_status` before sending the email.
But, as soon as it is unblocked (after the `cr.commit()`),
it will immediately re-attempt the delivery of the bounce email,
therefore writting "bounced" in `email_status` of recipient A,
while the transaction of the second email already began.
When the second email sending will try to write the `email_status`
of recipient A as well
(as it used to write the `email_status` on all the message notifications,
not just the one related to the current email),
it raised a concurrent update.
Therefore:
1. Interrupting the loop, as psycopg2 exceptions are raised and not passed,
2. Replay the sending of the second email a second time.

opw-1984293

closes odoo/odoo#33431

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-05-16 12:57:57 +00:00
Christophe Simonis 624c30a3b7 [MERGE] forward port branch saas-14 up to 679a73474e 2019-05-16 11:36:32 +02:00
Christophe Simonis 679a73474e [MERGE] forward port branch 10.0 up to 0164c9dfcb 2019-05-16 11:22:53 +02:00
Olivier Dony 9fc5a4a061 [FIX] ir_mail_server, mail: catch SMTPServerDisconnected exceptions
If the smtp session was dead, it would lead the whole mail batch to fail.

opw 1949270

closes odoo/odoo#32424

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>

closes odoo/odoo#33350

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-16 07:02:06 +00:00
Olivier Dony 11f0d7cefa [FIX] mail: do not shadow SMTP errors with QUIT
When an exception is raised during the course of a normal SMTP session,
smtplib's `sendmail()` method will close the channel automatically,
so any further attempt at sending SMTP commands will fail with an
SMTPServerDisconnected error, even just calling `smtp.quit()`.
This will shadow the original error, and make debugging harder.

Fixes #1493
2019-05-16 07:02:06 +00:00
Christophe Simonis a7743e0be8 [MERGE] forward port branch saas-14 up to 64ed30e34b 2019-05-14 13:55:35 +02:00
Christophe Simonis 64ed30e34b [MERGE] forward port branch 10.0 up to 2a14eea095 2019-05-14 13:54:56 +02:00
Johan Demaret Rivarola 2a14eea095 [FIX] website_{crm_partner_assign,customer}: fix 404 when crawling
When website_customer is not installed, some endpoints are not handled
by the router, causing the following tests to fail:

- test_10_crawl_public
- test_20_crawl_demo
- test_30_crawl_admin

Those tests were failing due to /customers responding with 404.

Indeed, the route /customers is defined in website_customer, but had
some usage within website_crm_partner_assign, causing tests to fail when
the former module is not installed.

The new behavior can be explained as follows:

- module website_crm_partner_assign on its own will lose the hyperlink.
- module website_customer will now inherit the view definition in order
to wrap the targeted HTML text elements with an anchor tag.

Closes #33344

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-05-13 16:34:27 +00:00
Christophe Simonis 82f88478cf [MERGE] forward port branch saas-14 up to 98b10f98bb 2019-05-08 17:13:30 +02:00
Christophe Simonis 98b10f98bb [MERGE] forward port branch 10.0 up to a48318cb33 2019-05-08 17:09:40 +02:00
Pedro M. Baeza a48318cb33 [CLA] update Tecnativa signature
Remove Tecnativa's old employees, add new ones

closes odoo/odoo#33197

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-07 08:03:28 +00:00
Manuel Vázquez AcostaandNicolas Lempereur 08425316d3 [FIX] stock: rewrite search override style for RPC
Putting *args and **kwargs confuses the function `odoo.api.split_context`.
This causes that a call to `search` via XMLRPC gets the wrong argument: takes
the first argument of ``args`` as the context.

Example which ignores the `count=True`::

```
api.call_kw(self.env['product.product'], 'search', (
    [], False, False, None, True, {'lang': 'en_US'}
), {})
```

would ignore the `count=True` and use the wrong argument for context.

Issue introduced in commit 15ea753a.

Since:

`def search(self, model=None, *args, **kwargs)`

is equivalent to:

`def search(self, args, offset=0, limit=None, order=None, count=False):`

because the call to the super will anyway call the parent method, we can
change the method arguments.

note: this is only for [10.0,saas-14] where 15ea753a is.

closes #33147

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>


Co-authored-by: Nicolas Lempereur <nle-odoo@users.noreply.github.com>
2019-05-06 11:45:49 +00:00
Yenthe666 8b76584892 [FIX] doc: fix typo in qweb documentation
closes odoo/odoo#32670

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-03 09:20:35 +00:00
Nans Lefebvre 7ffedecf82 [FIX] base: put parsing of an email 'from' into a try except block
The "from" of an email is expected to follow the regex
"name <address>(, name <address>)*".
We simply split the from on the commas "," and try to interpret each piece as a
(name, address) pair.
If a "from" contains a name that is not quoted, and contains special characters
before the comma, then we would try to encode that name into an email address,
and fail on a UnicodeEncodeError.

E.g. the following "🐧, <a@a.com>" would be parsed as [('', '🐧'),('', 'a@a.com')]
thus Odoo would crash on trying to use 🐧 as email address.

With this commit we would just mess up the name in these situations,
by ignoring failures.

opw 1923429

closes odoo/odoo#33145

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-03 08:02:32 +00:00
Christian Engelhardt 4dc8318213 [CLA] ecoservice GbR
closes odoo/odoo#33370

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-14 14:46:36 +00:00
Luis aefbd6da12 [CLA] Update CLA from savoirfairelinux
closes odoo/odoo#33343

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-14 11:59:05 +00:00
Yannick Tivisse fba09508b1 [FIX] l10n_be_hr_payroll_fleet: Make contract managers fleet managers
- Install `l10n_be_hr_payroll_fleet`
- Connect as admin
- Change demo user rights:
- Remove fleet (nothing, not user, not manager)
- Set employee Manager.
- Connect as demo
- On an employee, click the "Contracts" smart button.
- Try to create a contract.

Before this revision, access right issues were raised:
- Just after the create, as default values couldn't be computed,
- After the save as well, because of defaults and computed fields.

The real use case here is for our own sake: Dubai HR Officers
do not have access to Fleet as they do not have company cars,
but they can't create contracts for their own employees
without having access to fleet.

closes odoo/odoo#33120

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-05-14 11:07:46 +00:00
Nans Lefebvre 85cbb070ad [FIX] mail: remove readonly on recommended next activity
Fine-tuning of 463601a384.
It does not make sense to be able to write on mail.activity.type
using the related fields defined on mail.activity.

But this field is not a related one, and it is necessary to be writable to make
the 'recommended next activity' feature work at all.

opw 1974236

closes odoo/odoo#33325

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-05-13 09:10:56 +00:00
Odoo Translation Bot 5941f00143 [I18N] Update translation terms from Transifex 2019-05-12 03:10:00 +02:00
Geert Janssens 0bf5adaf6c [I18N] l10n_be_invoice_bba: translate missing terms
closes odoo/odoo#33284

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-10 11:51:08 +00:00
Geert Janssens 246e7e730b [CLA] signature for gjanssens
Closes odoo/odoo#33272

closes odoo/odoo#33293

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-05-10 09:20:23 +00:00
Nathan de Pryck 0164c9dfcb [FIX] Account:rounding poorly applied
Rounding each element of the sum decrease the
precision and prevent to reconcile large recordset.

closes odoo/odoo#33100

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-05-02 08:26:25 +00:00
Denis Ledoux 5d6656d739 [FIX] mail: avoid concurrent update of notifications
This revision is a backport of revision
56596e5240

As the bug mentioned in the above revision
occurs as well in Odoo 10.0 and 11.0.

opw-1984293

closes odoo/odoo#33382

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-05-15 09:16:23 +00:00
Gert Pellin 928e91c624 [FIX] hw_escpos: cashdrawer doesn't open
With some escpos printers the cash drawer did still not open after
previous fixes. One of the problemetic printers is the Epson TM-m30.

This fix will check the status of the drawer and try to open it up to 5
times. The fix is successfully tested with the TM-m30.

closes odoo/odoo#33328

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-05-13 13:38:20 +00:00
Christophe Simonis d5a1ad566b [MERGE] forward port branch saas-14 up to 5728e39181 2019-05-02 09:31:13 +02:00
Christophe Simonis 5728e39181 [MERGE] forward port branch 10.0 up to 903fec011d 2019-05-02 08:48:46 +02:00
Odoo Translation Bot 903fec011d [I18N] Update translation terms from Transifex 2019-05-01 02:43:48 +02:00
Aurélien Warnon df4dcc8932 [FIX] payment: fix custom payment.transaction create method mechanism
This commit will correctly check for a custom payment.transaction create method
on 'self' instead of the acquirer's provider before calling it.

closes odoo/odoo#33033

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-30 07:45:19 +00:00