Commit Graph
127587 Commits
Author SHA1 Message Date
Olivier Colson e270efff2e [FIX] account: tax lock date: avoid posting account moves that would impact the tax report before the tax lock date
The previous version of this verification was buggy and inadequate. It was for example impossible to post an account.move before the tax lock date, even if it did not impact the tax report in any way.

closes odoo/odoo#36289

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-06 11:00:17 +00:00
RomainLibert d4fab012f6 [FIX] l10n_ae: forward port broke this
closes odoo/odoo#36502

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-09-06 11:07:13 +00:00
Jorge Pinna Puissant 92990ad30e [FIX] i18n: missing Slovenian translation
Slovenian language, as many others languages, is not present in the
beta/master projects in Transifex.

For some reason, Transiflex removed all current translations, this was
already fixed in 12, but as there are not automatic forward-port for
translations, this is a manual forward-port.

opw-2060055

closes odoo/odoo#36374

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-09-03 11:32:39 +00:00
Christophe Simonis 7895044a79 [FIX] web: unpatch test Views earlier
We need to unpatch the view as soon as we correcly applied the
`groupedBy` attribute to avoid sub views to also be patched.

closes odoo/odoo#36486

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-05 13:43:51 +00:00
Christophe Simonis 41f7befb8e [FIX] web: correctly await promises in forward-ported test 2019-09-05 13:41:59 +00:00
Christophe Simonis 02a8490f05 [FIX] web: use defined variable
Oversight of previous forward-port.
2019-09-04 20:14:15 +02:00
Jorge Pinna Puissant dc5a8b1b30 [FIX] website_sale_coupon: promotion program image
Before this commit, when using a promotion program ('I have a promo
code') in the shopping cart in the e-commerce, the image of the
promotion product is only shown if the user is connected.

opw-2056968

closes odoo/enterprise#5343

X-port/Cherry-pick of odoo/enterprise@88e1ab31d2

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-04 19:40:17 +02:00
Lucas Perais (lpe) 9570151cb5 [FIX] sale_coupon: display domain widget in dialog
Before this commit, when being on the sale coupon program form view
in French, it was impossible to click on the record found by the domains

this was because the widget domains were displayed in line, which made long
text overlap

After this commit, we display the widgets in the "in_dialog" mode, which
makes more vertical blocs

OPW 2061859

closes odoo/enterprise#5363

X-port/Cherry-pick of odoo/enterprise@ffb86687a3

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-04 19:37:41 +02:00
Christophe Simonis 7a548569c6 [MERGE] forward port branch 12.0 up to 638eac9bae 2019-09-04 19:32:26 +02:00
Christophe Simonis 638eac9bae [MERGE] forward port branch saas-11.3 up to a4fe211ee2 2019-09-04 18:56:27 +02:00
Christophe Simonis a4fe211ee2 [MERGE] forward port branch 11.0 up to cd1b56b41f 2019-09-04 16:31:43 +02:00
jev-odoo 2761393b06 [FIX] stock,sale_stock: Speed up sale_order confirmation
In case there is a lot of stock_moves and/or lot of
stock_quants, the function _get_qty_procurement
takes a lot of time because there is no index defined
on most accessed fields.

I.E. OPW-2027183

closes odoo/odoo#36113

Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2019-09-04 12:03:22 +00:00
Goffin Simon cd1b56b41f [FIX] account: Wrong amount due when reconciling with refund
Steps to reproduce the bug:
- Let's consider the following currency rates: 1.00 for USD and 0.50 for EUR
- Create invoice I with the same currency of your company (USD) and amount due = 100$
- Validate I
- Create refund R with  a diffenrent currency of your company (EUR) and amount due = 1€
- Validate R
- Reconcile R with I

Bug:

The amount due of I was 196$ instead of 98$

PS: The root of this issue was coming from function assign_outstanding_credit that was called when
reconciling R with I. This function changes the currency_id and the amount_currency of the account move line.
So the function _amount_residual defined on model account.move.line was triggered as
the currency_id was changed. In _amount_residual, the residual_amount_currency was computed.

Forward-port up to saas-11.3

Closes #36252

opw:2062103

closes odoo/odoo#36412

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-09-04 11:04:26 +00:00
Goffin Simon dde5227546 [FIX] l10n_ae: Wrong translation
TVA in english is VAT

opw:2065413

closes odoo/odoo#36410

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-09-04 09:37:59 +00:00
Christophe Simonis 6143de52ad [MERGE] forward port branch 11.0 up to 923fb7aa05 2019-09-04 11:33:04 +02:00
Nans Lefebvre 116dda06a7 [FIX] account: do not sent user as vendor when sending bill by email
On purchase journals, there is the possibility to set up an alias to
automatically create vendor bills from incoming email.
Three types of emails can send the bill:
- the vendor, with email matching a partner in database
- an internal user, possibly forwarding the bill he received from the vendor
- an unknown address
In the third case, the address will be ignored.
In the first, we found the vendor, so he can be set as partner_id of the bill.
The tricky one is the second case, where we try to guess the vendor.

Before, the code would take only the first email found in the body;
if it found a matching partner, then it used that partner anyway,
even if that partner belonged to a user and was skipped before.

After the fix, we get the partners for all emails
and take arbitrarily the first vendor, then backup on the first non-user.

Note also that email_addresses would duplicate every address read in the body;
we make a set to avoid duplicate processing.

opw 1885070

closes odoo/odoo#36399

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-09-04 06:21:22 +00:00
Goffin Simon 450269b268 [FIX] account: Wrong amount due when reconciling with refund
Steps to reproduce the bug:
- Let's consider the following currency rates: 1.00 for USD and 0.50 for EUR
- Create invoice I with the same currency of your company (USD) and amount due = 100$
- Validate I
- Create refund R with  a diffenrent currency of your company (EUR) and amount due = 1€
- Validate R
- Reconcile R with I

Bug:

The amount due of I was 196$ instead of 98$

PS: The root of this issue was coming from function assign_outstanding_credit that was called when
reconciling R with I. This function changes the currency_id and the amount_currency of the account move line.
So the function _amount_residual defined on model account.move.line was triggered as
the currency_id was changed. In _amount_residual, the residual_amount_currency was computed.

opw:2062103

closes odoo/odoo#36379

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-09-04 07:34:08 +00:00
Aaron Bohy 0b146aa253 [FIX] web: form: race condition when editing in readonly
... and switching to 'edit' mode before the write RPC returns.

For instance, on a project task form view, in readonly, change the
state by clicking on the bullet, and directly switch to 'edit'
mode: when the RPC returns, the view is switched back in readonly.

Task 2065443

closes odoo/odoo#36400

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-04 07:15:18 +00:00
Lucas Perais (lpe) b7e3469931 [FIX] web: grouped list as grouped list as child
In grouped editable list, get rid of the groups
Edit one record in the editable list
In a M2O, click on search more

In search's list, group by a field
Expand a group in the search's list

Before this commit, it crashes because the event was propagated
onto the first main list

After this commit, it doesn't crash and the group is expanded

OPW 2064156

closes odoo/odoo#36383

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-03 14:24:58 +00:00
Aaron Bohy ae50f2cbbb [FIX] web: editable list: edit group with create=0
This rev. disables the 'create' action in the form view reached
when clicking on the 'Edit' button on a group in an grouped list.

closes odoo/odoo#36384

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-03 13:37:47 +00:00
Lucas Perais (lpe) c132a8c364 [FIX] account_cancel: update posted always visible
Before this commit, the allow cancelling entries field
was invisible when the journal was of type general

After this commit, the field is visible for every journal

OPW 2062875

closes odoo/odoo#36358

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-03 11:24:31 +00:00
Alexandre Kühn 923fb7aa05 [FIX] im_livechat: no duplicated messages
Before this commit, when using website livechat with multiple tabs,
it may duplicate messages in the chat window.

This happens due to registering messages twice:

- once, from `/mail/chat_history`
- second, from receiving notification from master tab, via local
storage.

This commit fixes the issue by not registering messages that have
already been registered (i.e. unique ID).

opw-2052960

closes odoo/odoo#36370

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-09-03 10:55:32 +00:00
Christophe Simonis 4528f75cb0 [MERGE] forward port branch 12.0 up to 82c0e9b620 2019-09-03 12:41:08 +02:00
Goffin Simon 82c0e9b620 [FIX] payment: Publish Sips online payment
Steps to reproduce the bug:

- When trying to publish the sips payment acquirer not in debug mode

Bug:

It raised a access rights error because the fields: sips_test_url, sips_prod_url, sips_version
were not readable in function _check_required_if_provider and  a default value was set for all
these fields.

opw:2061123

closes odoo/odoo#36346

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-09-03 08:13:49 +00:00
Goffin Simon a9bb669487 [FIX] mrp: Kit in manufacturing
Steps to reproduce the bug:

- Create a MO with a product with a normal bom B
- Save the MO
- Change the type of B to phantom
- Try to produce the MO

Bug:

It was impossible to cancel or confirm the MO.
It's not allowed to produce a MO with phantom bom.

opw:2061958

closes odoo/odoo#36329

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-09-03 07:38:18 +00:00
Christophe Simonis 149d782a0e [MERGE] forward port branch saas-11.3 up to 79ff916b59 2019-09-02 19:57:25 +02:00
Christophe Simonis 79ff916b59 [MERGE] forward port branch 11.0 up to 61a85ccf8f 2019-09-02 19:37:06 +02:00
Christophe Simonis 61a85ccf8f [FIX] website_blog: avoid using map to please pylint 2019-09-02 18:46:34 +02:00
Christophe Simonis 1e1702d3c0 [MERGE] forward port branch saas-15 up to dc934d67dd 2019-09-02 18:24:59 +02:00
Christophe Simonis dc934d67dd [MERGE] forward port branch saas-14 up to ff1f3c557e 2019-09-02 18:09:41 +02:00
Christophe Simonis ff1f3c557e [MERGE] forward port branch 10.0 up to c7c68bab84 2019-09-02 17:54:34 +02:00
Richard Mathot ed90ad0a01 [FIX] mail: restore "pencil" icon behaviour in Followers widget
When editing the followers, the "pencil" icon that leads to the edition
of subtypes should be displayed only when "debug" mode is activated.
This commit restores this behaviour, as it was not the case anymore.

`has_group()` looks for static groups stored in database, whereas
`base.group_no_one` is dynamically added/removed depending on the flag
`debug` of the request.

We thus use `models.user_has_groups()` that adapts on the `debug` flag.

opw-2055848

closes odoo/odoo#36327

Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2019-09-02 11:57:54 +00:00
Andrea Grazioso (agr-odoo) b8c7eddb34 [FIX] calendar: invitation for deleted event (recurring)
From calendar create a recursive event and add some guests. Delete one
event of the chain.

Invitations (Mail) will be created for the deleted event, and should not
be the case because the event has been deleted.

This happens because the recursive event is really just a record in the
database representing all the generated events. When the user want to
delete an event in the chain, a new event, copy of the "parent" event
has to be registered and subsequently disabled.
In the process of creating the event the mail is sent as
side effect. Note that the code to prevent this was partially there
because a context flag "dont_notify" is sent by the unlink in
Calendar.Meeting but was ignored from the mail subsystem.

opw-2039576

closes odoo/odoo#36270

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-09-02 09:45:51 +00:00
Lucas Perais (lpe) 4181063031 [FIX] hr_expense: domain for field employee
Before this commit, the domain applied to the field
employee_id on hr_expense was wrong, so a simple officer (no other rights)
could not see the relevant people

After this commit, the domain is correct and matches the one on the
officer group's record rule

OPW 2058512

closes odoo/odoo#36292

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-09-02 07:52:02 +00:00
Odoo Translation Bot 432b50bd1b [I18N] Update translation terms from Transifex 2019-09-01 03:48:01 +02:00
Odoo Translation Bot c7c68bab84 [I18N] Update translation terms from Transifex 2019-09-01 03:24:12 +02:00
Alexandre Kühn ad03cac07a [FIX] mail: channel notification messages are never marked as unread
When a user either joins and leaves a channel, it posts a message of
type 'notification' with either action as content.

Before this commit, such messages above were incrementing the unread
counter of the channel. As a result, the messaging menu was showing
this channel as unread with this message.

Messages of type 'notification' should never increment the unread
counter of channel.

This commit fixes the issue by preventing new messages of type
'notification' to increment the unread counter of a conversation.
This should also prevent increasing the counter of the messaging
menu, in addition to highlighting this channel as unread from the
messaging menu.

Task-Id 2059515

closes odoo/odoo#36293

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-08-30 15:18:05 +00:00
Sébastien Theys 3a52b22b50 [FIX] web: correctly escape image name
Follow up of https://github.com/odoo/odoo/commit/2f932e3a46c6005870e4130b3c3f7151cd521f2d#r34760948

`url_quote` does not escape `/` which leads to incorrect routes when the name
contains `/`.

Also escape `\` to avoid potential issues on different OS.

closes odoo/odoo#36146

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-02 19:15:46 +00:00
Arnold Moyaux 5f7648bb9a [FIX] mrp: failing test multi mrp step
It's due to MRP refactoring that confirm raw moves before finished
moves. It implies that in _assign picking, SFP with final product
will search a picking but the stock.move do not have a created_production_id
and it will be merged inside the intermediate SFP (it works before
because it was the intermediate SFP that was merged in the finished SFP).

_key_assign_picking is also added if multiple moves are confirmed w/
and w/h created_production_id, we won't merge them in the same picking.

closes odoo/odoo#36335

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-02 13:00:00 +00:00
Christophe Simonis 641358892f [FIX] mail: adapt mobile test to new version
Oversight of previous forward-port.
2019-09-02 13:36:19 +02:00
Christophe Simonis 545e6d2034 [MERGE] forward port branch 12.0 up to 52f6e38cea 2019-08-30 17:20:28 +02:00
Julien Castiaux 513545cdbd [FIX] sale_coupon: use partner lang in description
Fine tuning of odoo/enterprise@f433384, not only the promotion must be translated

opw-2034094

X-port/Cherry-pick of odoo/enterprise@6dd77cc049
2019-08-30 17:18:06 +02:00
Olivier Colson 978af5c87e [FIX] account: lines onchange on account.move: remove the base tag when removing a tax from a move line
Before that, when removing a tax previously set on an account.move.line in tax_ids, the onchange event did not remove the corresponding tags from the base line, causing possible errors in tax report.

closes odoo/odoo#36283

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-30 12:51:16 +00:00
Christophe Simonis 52f6e38cea [FIX] account: change back reconciliation test
Reconciliation credit is expressed in company currency
since odoo/odoo@7b636f3342.

See odoo/odoo#36181 for more context about the issue.

closes odoo/odoo#36260

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-30 08:34:03 +00:00
Hardik Prajapati 8d7d2aeef3 [IMP] l10n_ch: treat BVR number as structured communication
Now, Swiss users can auto populate BVR number generated for invoice in it's 'Payment Ref.' field
by simply configure it in 'Communication Standard' of invoice's journal.

task: 1999530

closes odoo/odoo#36253

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-08-30 05:10:14 +00:00
Alexandre Kühn 1d766c067d [FIX] mail: keep ratio of img in message with inline dimensions
Before this commit, when a message body contains a big image with
inline dimensions, the image was stretched.

For instance:

- `<img width="4096" height="2304">`
- on 1080p screen in the discuss app:
- max-width for image: 1542px
- image ratio: ~ 1,78
- expected height: 867.38px
- actual height: 2304px

This issue had been fixed[1], but was reintroduced[2].

Note that this fix only works when inline dimensions are set as attr
of the `<img>` tag. It won't work with dimensions attached as inline
styles (e.g. `<img style="height: 4096px; width: 2304px;>`), due to
high CSS specificity of inline styles.

[1] https://github.com/odoo/odoo/commit/e7bc4e9703954fa952f24b4f96e75dc4299bbb28
[2] https://github.com/odoo/odoo/pull/15542/commits/46699c5214229ea8aebcc04e08d0786fd2b67f35

Closes #36227

closes odoo/odoo#36243

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-08-29 14:50:49 +00:00
Christophe Simonis 8bd6a93c74 [MERGE] forward port branch saas-11.3 up to ede253f1b2 2019-08-29 16:45:15 +02:00
Christophe Simonis ede253f1b2 [MERGE] forward port branch 11.0 up to d61873ac4a 2019-08-29 15:22:51 +02:00
Lucas Perais (lpe) cbe04c4df1 [FIX] account_voucher: force receivable/payable on payment
Create a voucher in pay_now mode
set another account that the one of the partner
Validate

Before this commit, the automatic payment and payment entries
were done in the account receivable/payable of the partner
which means that the voucher and the payment were never reconciled

After this commit, the payment and its entries occur in the same
payable/receivable than the voucher's

OPW 2056240

closes odoo/odoo#36232

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-29 12:32:17 +00:00
odoo 25e881d629 [FIX] base: prevent error when no attachements and report edited with
studio

opw2062025

In some cases, when there is no attachment (on an invoice for example)
and reports have been modified with studio, the self.attachement value
is false and an error appears

closes odoo/odoo#36291

Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2019-08-30 14:57:09 +00:00