Commit Graph
116619 Commits
Author SHA1 Message Date
Christophe Simonis cc0baa086a [FIX] base: adapt test expectation to python 3.7
Compare exception message to the exact one raised in all versions.
2018-07-31 20:31:46 +02:00
Christophe Simonis 8c81eaabe6 Revert "[FIX] models: make onchange return a smaller diff"
This reverts commit 2054b59285 which
already has been fixed multiple times [0].

However this change does not correctly handle successive onchange calls on
ony2many fields which alter existing rows.

i.e., in saas~11.4, an onchange has been added on move lines [1] in
order to create and/or update lines containing taxes amounts.
However, with diff-only onchange, a second call to onchange will discard
changes made by a first one as nothing change between the 2 calls.

Scenario: On an existing account.move, add a new credit line with a tax set.
The first onchange will update the tax line with new amount. Add a
second line (with debit amount balanced). The onchange will not change
the tax line, resulting as it value being reset to initial value. As a
result, the move is not balanced and cannot be saved.

[0] cd2ccc4110, 5e58ac16c3, 07023137cd
[1] d49ab568a2
2018-07-31 19:36:30 +02:00
Christophe Simonis 96de6756ab [MERGE] forward port branch saas-15 up to 42e5b322af 2018-07-31 19:11:33 +02:00
Christophe Simonis 42e5b322af [MERGE] forward port branch saas-14 up to 0265884608 2018-07-31 18:52:40 +02:00
Olivier Colson 11a0dd58a7 [FIX] account: set 'multi' field to False for payments generated when choosing to register payment for multiple invoices with distinct partners
This field is used by the multiple payment wizard; the payments it generates are always individual and should never have multi=True. Before this commit, they did, because of the values given in context when calling the payment wizard.
2018-07-31 17:16:47 +02:00
Christophe Simonis 0265884608 [MERGE] forward port branch 10.0 up to 65ad60665e 2018-07-31 17:03:04 +02:00
Holger Brunn 65ad60665e [FIX] base: fix users' groups assignation
Avoid sharing of users'groups when writing on multiple users.

When changing groups of multiple users, all implied groups were shared
between written users.

Oversight of new-api rewrite.

Fixes #26036
2018-07-31 16:22:26 +02:00
len-odoo e57a1a8e6f [FIX] web: fix 'drag and drop' test function to work in both directions
The 'drag and drop' function defined in test_utils should be aware of four
different cases, moving up or down, above or below another row.
We need an offset of one pixel for the function to work when moving down
(this is a case of broken symmetry because of <=)

Related to opw 1867049 regarding sequences of resequence moves.
2018-07-31 16:18:26 +02:00
Goffin Simon c75f4fbcd1 [FIX] stock: Source and Destination on pickings
Steps to reproduce the bug:

- Go on a picking with an operation type of type "vendor" (e.g. a receipt) :
the field source location appears while it should be the destination location.

- Go on a picking with an operation type of type "customer " (e.g. a delivery) :
the field destination location appears while it should be the source location.

opw:1869145
2018-07-31 15:07:53 +02:00
Goffin Simon e1da65841a [FIX] stock: Display issue on product categ
This text is not written at the right place and it's useless.
So it's confusing for the users.

opw:1870443
2018-07-31 15:04:03 +02:00
Can Tecim bf332e2e08 [FIX] purchase: P3-style super call
3869cdf7d8 merged a fix which used a
P3-style super call, which is not compatible with Python 2.

While 11.0 is not really exactly officially supported on Python 2,
we originally decided not to break compatibility unless there were
very good reasons to do so.
2018-07-31 10:05:30 +02:00
Goffin Simon 47acea1523 [FIX] website_sale_wishlist: Wrong displayed currency in the wishlist
Steps to reproduce:

1. Activate multi-currency and associate a price list "Other list" with secondary currency as an alternative for "Public Price List".

2. Enable the price list to be selectable on the website.

3. Enable wishlist functionality on Website module

4. Navigate to website without logging in

5. Add a product to the wishlist (with the default price list)

6. Switch price lists.

Bug:

The wrong currency was displayed in the wishlist for the new price.

PS: In function "compute_new_price", price_new = website_price

opw:1867314
2018-07-31 09:44:03 +02:00
Romain Derie e11908d429 [FIX] website_sale: _get_pl_partner_order
With 60300fc, people can use promo code on website.
But the condition leads to a side effect, if a partner has a pricelist set for
him, he will never be able to see the dropdown list of pricelist since he will
enter the else condition with show_visible set to true.

Now, user is able to see selectable pricelists.

opw-1869371
2018-07-31 09:25:26 +02:00
Lucas Perais (lpe) 93e71d181e [FIX] account: reconciliation widget: Don't loose pager on adding last line
Have a statement line with multiple pages of propositions
Go to the last page
Add everything

Before this commit, after clicking on the last item of the list,
a write-off creation was displayed, without any means to come back to the other
propositions

After this commit, we display the page before
2018-07-31 09:18:31 +02:00
Lucas Perais (lpe) aa7bc410f0 [FIX] account: reconciliation widget: empty line should open write off
In manual reconciliation, have an accound with no direct proposal.
An empty line should be present

Click on it

Before this commit, there was a traceback

After this commit, a write-off creation appears
2018-07-31 09:18:31 +02:00
Lucas Perais (lpe) ebca7c3d37 [FIX] account: reconciliation widget: remove prop to attain balance
In manual reconciliation (but probably automatic too)

Have 3 lines for one account
2 of them are balanced
the third is of an amount X

Add the three lines to the reconciliation
A write-off proposal of -X should appear

Now, remove the third line by clicking on it
Click on Reconcile

Before this commit, the values sent to the server were wrong, as the write-off
was still included

After this commit, we make sure we don't send lines that are not displayed
2018-07-31 09:18:31 +02:00
Lucas Perais (lpe) 862c245576 [FIX] account: default_get aml compute balance
Create an account.move, create a line, then add an item to start to add a second aml
The current balance of the move is put in debit (or credit) to help automatically making the second line

Save the move.
Edit the move
Delete a line
Add a new line

Before this commit, the balance was not correctly computed because the default_get did not compute
the balance on deleted lines
The move ended up with wrong unbalanced new lines

After this commit, the balance is computed with deleted lines taken into account
2018-07-31 09:18:31 +02:00
Nicolas Lempereur 5dc180a3ea [FIX] im_livechat: double click on :) => 1 message
Prevent sending multiple messages when multiple clicks on one feedback
icon.

opw-1863312
closes #26047
2018-07-30 17:03:57 +02:00
Lucas Perais (lpe) 44ea58234e [FIX] base, hr_timesheet: display negative float_time values
Before this commit, negative values in a float field interpreted as time
(i.e. unit_amount on analytic lines) were wrongly formatted

After this commit, not only we correct the hr_timesheet qweb templates
but we also correct the qweb widget to handle the case

OPW 1869986
closes #26024
2018-07-30 13:18:04 +02:00
Christophe Simonis 91d647ecf7 [FIX] website_sale_delivery: use -U+FEFF instead of U+2011 for negative numbers
See cb2a3afa7e and 7a519520f2
2018-07-30 12:57:26 +02:00
Christophe Simonis 248a59553d [MERGE] forward port branch saas-15 up to 535d50afbd 2018-07-30 12:53:34 +02:00
Christophe Simonis 535d50afbd [MERGE] forward port branch saas-14 up to 5a57892b05 2018-07-30 12:48:15 +02:00
Christophe Simonis 5a57892b05 [MERGE] forward port branch 10.0 up to 7a519520f2 2018-07-30 12:46:20 +02:00
Nicolas Lempereur ce2fdc02ab [FIX] im_livechat: bad rating=1 not 0 w/ 75d3121c
In 75d3121c9 the bad rating was change from 0 to 1.

This commit update the javascript feedback part so the behavior is the
one expected.

related to opw-1863312
closes #26043
2018-07-30 12:45:53 +02:00
Christophe Simonis 7a519520f2 [FIX] mail: use -U+FEFF instead of U+2011 for negative numbers
Just like cb2a3afa7e, U+2011 may not be
rendered correctly with all fonts.
2018-07-30 12:22:16 +02:00
Lucas Perais (lpe) 4c1ebd0745 [FIX] point_of_sale: constrain pricelist belong to config's company
Have the Admin in company A
Create a pos.config for company B
Have its default pricelist to be one of company A's
Save

Log in with user B, in company B
Try to make a new pos session
When everything is loaded, the screen stays black, leaving the pos unusable

After this commit, we constrain the pricelists to either be of company B's
or to not have a company set on them

The black screen doesn't happen

OPW 1861757
closes #25996
2018-07-30 11:51:09 +02:00
Christophe Simonis fbd52d57d8 [MERGE] forward port branch saas-14 up to b8f866c57b 2018-07-30 11:44:31 +02:00
Christophe Simonis b8f866c57b [MERGE] forward port branch 10.0 up to 3a14b75518 2018-07-30 10:53:25 +02:00
Christophe Simonis 3a14b75518 [MERGE] forward port branch 9.0 up to cb2a3afa7e 2018-07-30 10:23:48 +02:00
Lucas Perais (lpe) 510fe712ee [FIX] account: transmit analytic tags in credit note
Have an invoice with analytic tags
Create a credit note

Before this commit, the tags on the invoice lines
are not transmitted to the credit note's lines

After this commit, they are

OPW 1866432
closes #26010
2018-07-30 10:06:13 +02:00
Olivier Laurent 8ee329c1dc [FIX] P3: add missing opcode
In Python 3, SETUP_FINALLY is used if the exception object is bound in
the except block — even if there is no finally block — in order to
unbind and cleanup the exception's binding as part of PEP 3110:
https://www.python.org/dev/peps/pep-3110/#semantic-changes

This allows both using exception objects in Python 3 and using
finally blocks in both version.

opw 1824211
2018-07-30 09:49:59 +02:00
Lucas Perais (lpe) dc253ff1c6 [FIX] web: kanban progress bar, auto width
Have ~50 records in a column,
Mark 49 of them as blocked (kanban_state field)
Mark 1 or 2 as done

Before this commit, the bar that showed the proportions of blocked objects was invisible
This was because the min-width of a bar was 10px, without max-width
Leaving the red bar to 95% or something, the green bar to 10px
All of this overflowing 100%

After this commit, we compute max-width and min-width to be able to fit everything
within the progress bar

OPW 1867464
closes #25962
2018-07-30 09:24:16 +02:00
Lucas Perais (lpe) e81d331959 [FIX] event: outlook live calendar link doesn't work anymore
The functionality to add an event on outlook through a link seems gone on Microsoft's part
Or doesn't work as it did before

To avoid confusion, we remove the links

OPW 1865938
closes #25968
2018-07-30 09:14:36 +02:00
Odoo Translation Bot ba61098cf3 [I18N] Update translation terms from Transifex 2018-07-29 04:03:32 +02:00
Odoo Translation Bot e1703cb95a [I18N] Update translation terms from Transifex 2018-07-29 00:26:54 +02:00
Nicolas Lempereur cb2a3afa7e [FIX] base: use -U+FEFF instead of U+2011 in -num
In af64780a2 an improvement was done so a numerical fields like '-500'
was not breaked up over two lines after the hyphen.

But it seems in a very particular case of printing PDF in a given
combination of condition:

- printing over wkhtmltopdf which itself uses an old version of webkit
- particular font (issue happen with Arial but not "Segoe UI")
- particular version of windows (windows server 2012, not on windows 10)

the - character at the front of a monetary, float or integer field would
be displayed as | erroneously.

The problem is probably that the font system in the old webkit with
given windows will not find the code point in the given font, and
doesn't fallback correctly.

This commit replace using the "NON-BREAKING HYPHEN (U+2011)" by using
the "ZERO WIDTH NO-BREAK SPACE (U+FEFF)" which is an invisible character
with no width that prevent splitting at its location.

As a note, an alternative to this character is "WORD JOINER (U+2060)"
that may be preferred, but it presents exactly the same issue (with
-|500 instead of -{WORD JOINER}500) in the same environment.

mentioned in https://www.odoo.com/forum/1/question/118653
opw-1867842
fixes #17093
fixes #25840
closes #26019
2018-07-27 17:07:38 +02:00
Martin Trigaux 4c3e9d411d [I18N] export 11.0 source terms
To reflect all the unstable changes made in translations
2018-07-27 14:02:35 +02:00
Denis Ledoux 3096d94d9b [FIX] service: --dev=reload, exclude temporary python files
Do not reload when a temporary Python file is
added/updated/reloaded.

This is to be able to use editors using isolation when saving file.
On save, they create a temporary file which is then moved on the target file.
The temporary file exists for milliseconds only,
and when the change was detected by watchdog and the server was reloaded,
the file already no longer existed on load.
It leaded to `No such file or directory` after the reload.
2018-07-27 11:40:01 +02:00
Olivier Dony 92a224ee3a [FIX] event: prefer registration email over partner email
As of rev. ca989b6548, the default
recipients of a model record are used to filter out blacklisted and
duplicate emails during a mass-mailing. This can match both either
partner_ids or emails, as returned by
`message_get_default_recipients()`.

The problem with even registration is that a single partner, sometime
anonymous (Public User) can be used to register several participants.
We therefore need to override `message_get_default_recipients()` to that
intent, similarly to what is done in crm.lead since
ca989b6548.

Without this, mass-mailings sent to free event attendees would never be
sent, as they would all appear to be duplicates of each other.
2018-07-26 23:52:18 +02:00
Olivier Dony fb31330451 [FIX] auth_signup: correct leftover from 6d16915d39
The /web/signup controller was also supposed to get the special frame
header, like all sign-in/up pages.
2018-07-26 23:48:58 +02:00
Richard Mathot adc97120c9 [FIX] hr_timesheet: missing compute_sudo
opw-1862271
2018-07-26 17:13:11 +02:00
Nicolas Lempereur 07023137cd [FIX] models.py: onchange creating m2m => no NewId
Since 2054b59 if we created a record in a many2many relationship of an
onchange, we would also possibly erreneously return the NewId.

The logic of convert_to_onchange of _RelationalMulti doesn't send back
the ID field (if the ID is needed, it is part of the command, not the
update/create dictionary values of a command) and this commit does the
same for the code changed in 2054b59.

This commit also adds a test for this fix, and a test for the regression
corrected with cd2ccc4110 reported in #25969

fix for https://github.com/odoo/odoo/commit/2054b5928#commitcomment-29837226
closes #25984
2018-07-26 15:26:27 +02:00
Cedric Snauwaert 82da221b1f [FIX] l10n_de: DATEV export compatiblity
When invoicing a line with an account that has a tax, ensure that line has the same tax of accounts. This is required by DATEV and is common usage in Germany

Was task 35289
Was PR #25202
2018-07-26 15:15:12 +02:00
Thorsten Vocks a3bc08d9d8 [IMP] 10.0 improvement of german account charts
I. modification and extension of SKR03 account chart
========================================

* improvment and mapping of Odoo standard account types (usage of all
available account types and fixing of wrong mapping)
* fixing of reconcile setting on several accounts
* update of account chart (to SKR03 2017)
* fixing of account chart by ascending order of accounts for easier
maintenance in the future and probably easier preparation of accounting reports
* backport of new account tags from V11 for better reporting
* shorter tags
* introduction of new taxes for all theoretically possible tax cases
needed to declare the VAT
* automatic mapping of taxes to accounts to auto detect the right tax
by selection of income / expense account on invoice lines
* assignation of tax groups to taxes
* introduction of reconcile templates (to allow booking of cash discount
cases)

II. modification and extension of SKR04 account chart
=========================================

* improved mapping of Odoo standard account types (usage of all
available account types and fixing of wrong mapping)
* fixed reconcile settings for all accounts
* update of account chart (to latest SKR04 2017)
* better source code by ascending order of accounts. Finally it will be
easier to maintain the chart in the future and also it will be easier
to identify and group records to to develop missing or new accounting
reports.
* backport of new account tags from V11 for better reporting
* shorter tags
* assignation of tax groups to taxes
* introduction of further taxes to cover most possible tax
cases needed to declare the german VAT
* automatic mapping of taxes to accounts to auto detect the right tax
by selection of income / expense account on invoice lines
* introduction of reconcile templates for cash discount deduction on
payments or low payment variances.
2018-07-26 15:14:17 +02:00
Lucas Perais (lpe) 2e5dc495bb [FIX] sale: portal SO view no image if public
Access a SO with the access token, without being logged

Before this commit, the images of the so lines were the no image placeholder
This was because the route of the image was so.line/product_image
Since the token applies on SO, and not on its lines, nothing simple would work

After this commit, we hide the image if the user is the public one

OPW 1868916
closes #25973
2018-07-26 14:20:15 +02:00
Lucas Perais (lpe) f05b10ce49 [FIX] website_payment: display acquirer's messages in case of wire transfer
Connect as portal, go to my account > invoices and click pay now
select wire transfer as the acquirer and then pay now

Before this commit, the messages displayed to the user was misleading and wrong

After this commit, we take the relevant acquirer's message

OPW 1867670
closes #17508
closes #25946
2018-07-26 14:17:32 +02:00
Christophe Simonis 1353abecbe [MERGE] forward port branch saas-15 up to ee09d11738 2018-07-26 12:40:54 +02:00
Christophe Simonis ee09d11738 [MERGE] forward port branch saas-14 up to b8ab55319b 2018-07-26 12:38:55 +02:00
Christophe Simonis b8ab55319b [FIX] web: avoid traceback in case of failed login 2018-07-26 12:21:44 +02:00
Goffin Simon 418e146054 [FIX] sale_timesheet: Leaves manager Access error
When validating a leaves request with a user which is
in group group_hr_holidays_manager(Leaves Manager) and
group_account_invoice (Accounting & Finance Billing), it raised an
access error because the function _validate_leave_request
tried to create an analytic line with a project_id.

Without the rule account_analytic_line_rule_billing_user added by this
commit: https://github.com/odoo/odoo/commit/81218a8, a user which was
in group group_hr_holidays_manager and group_account_invoice had the rights
to validate a leaves request.

opw:1866243
2018-07-26 10:34:06 +02:00