Commit Graph
117156 Commits
Author SHA1 Message Date
Denis Ledoux f8d0efee92 [FIX] stock: use product qty decimal accuracy in Picking Operations
Since revision f6144fe1f3,
the decimal accuracy for the product quantity in
the picking operations report was no longer applied,
leading to display a bunch of numbers after the comma
in some cases.
e.g. 15404.000000000002 Unit(s)

opw-1846723
2018-05-17 14:27:11 +02:00
Denis Ledoux 59a8a1cd8e [FIX] account: accounting advisers can create taxes
Since revision 4acec418ce
it was no longer possible for an accounting adviser
to create taxes.

This is because when creating a taxes,
as the related field `hide_tax_exigibility` wasn't readonly,
it attempted to write on the field
`tax_exigibility` of the model `res.company`,
and the adviser do not has that access right.

There is no reason for this field not to be readonly,
as it is used only to compute an invisible attrs
for the tax form view.

opw-1846265
2018-05-17 12:56:00 +02:00
Thibault Delavallée 7313ce7d3c [FIX] mail: correctly fetch needaction partner ids in chatter
Why y push too fast.
2018-05-17 12:34:46 +02:00
Thibault Delavallée 0897195f91 [FIX] mail: improve implementation of message format fix
This is a better implementation of 19fb650863. It seems we did not
see the fix was inside a loop meaning not really optimized when thinking about
Inbox fetching a lot of messages.
2018-05-17 12:27:38 +02:00
Christophe Simonis 935043dda1 Revert "[FIX] website_quote: make 'Pay & Confirm' work without website_sale"
No dependency change in stable version

This reverts commit 65a589eb54.
2018-05-17 11:37:01 +02:00
Goffin Simon a16114efb4 [FIX] mrp: Two fields with the same label on stock.move
The field quantity_done_store had the same label as the field product_uom_qty
on model "stock.move" and there were confusions in the pivot view of
"stock.move".

opw:1841097
2018-05-17 09:54:37 +02:00
Nicolas Martinelli 77aa313b14 [FIX] mail: XHTML
In case an email received contains XHTML, `fromstring` fails because of
the following error:
> Unicode strings with encoding declaration are not supported. Please
> use bytes input or XML fragments without declaration.

opw-1832683
2018-05-17 09:27:38 +02:00
Lucas Perais (lpe) cd26eb8e7c [FIX] l10n_fr_fec: EcritureLib should not be empty
Make an account move with two move lines.
In those lines' label, just hit the space bar, and post your entry.

Now, get the FEC report.

Before this commit, the EcritureLib field was empty

After, it has the value '/'

closes #24734
2018-05-17 09:24:31 +02:00
Lucas Perais (lpe) 507b5cce3a [FIX] point_of_sale: repair cashier from localStorage on refresh page
open a pos,
change cashier
hit F5

Before this commit, the previous user was set as cashier, forgetting about the change we made
This was because of two things:
- The original fix to do just this use case was pushed in v9.0 as e14ab69772
- In v11.0 the commit f5f60599bf introduced full usage of Backbone's set and get
    which meant that self.cashier was no longer relevant
- In v10.0 the commit 475027b988
    (For v11.0: a9caef0ebb)
    Was intended to update the res.users objects at their loading to ensure that their access rights were loaded too
    But it did this using the wrong condition

After this commit, it reworks fine

OPW 1844006
closes #24762
2018-05-17 09:17:21 +02:00
Lucas Perais (lpe) 54d1b38844 [FIX] point_of_sale: repair cashier from localStorage on refresh page
open a pos,
change cashier
hit F5

Before this commit, the previous user was set as cashier, forgetting about the change we made
This was because of two things:
- The original fix to do just this use case was pushed in v9.0 as e14ab69
- In v10.0 the commit 475027b
    (For v11.0: a9caef0)
    Was intended to update the res.users objects at their loading to ensure that their access rights were loaded too
    But it did this using the wrong condition

After this commit, it reworks fine

OPW 1844006
related #24762

closes #24764
2018-05-17 09:15:24 +02:00
Joren Van Onder 65a589eb54 [FIX] website_quote: make 'Pay & Confirm' work without website_sale
When creating a db with only website_quote and payment_paypal you end
up with:

AttributeError: 'payment.transaction' object has no attribute '_check_or_create_sale_tx'

when clicking on 'Pay & Confirm' in an online quote.

This is because various controller methods in website_quote use this
method and it is defined by the sale_payment module.

opw-1847977
2018-05-16 10:19:07 -07:00
Christophe Simonis 9874adebb8 [MERGE] forward port branch saas-15 up to 40e74240e8 2018-05-16 17:48:37 +02:00
Olivier Dony 86ffb549bf [FIX] base: log failed/successful logins with ip
We used to only log failed logins, and did not include the IP, which
makes it much less useful for intrusion detections systems (e.g. fail2ban)

For example, the following fail2ban filter definition should match a
failed login (in /etc/fail2ban/filter.d/odoo-login.local):

    [Definition]
    failregex = ^ \d+ INFO \S+ \S+ Login failed for db:\S+ login:\S+ from <HOST>
    ignoreregex =

This could be used with a jail definition to block the IP on HTTP(S).

Here is what it could look like for blocking the IP for 15 minutes when
10 failed login attempts are detected from the same IP within 1 minute:

    [odoo-login]
    enabled = true
    port = http,https
    bantime = 900  ; 15 min ban
    maxretry = 10  ; if 10 attempts
    findtime = 60  ; within 1 min
    logpath = /var/log/odoo.log  ;  set the actual odoo log path here
2018-05-16 17:39:32 +02:00
Christophe Simonis 40e74240e8 [MERGE] forward port branch saas-14 up to a1a03792b6 2018-05-16 17:11:39 +02:00
Christophe Simonis a1a03792b6 [MERGE] forward port branch 10.0 up to bcf20cfbec 2018-05-16 17:10:28 +02:00
Raphael Collet bcf20cfbec [FIX] stock: use timedelta instead of relativedelta
Suppose we have a delta between two datetimes:

    delta = dt1 - dt0

If delta is negative but less than a day, ``delta.days`` returns -1 (which is
compensated by positive seconds).  In order to avoid this surprising effect,
use ``delta.total_seconds()`` to compute the number of days.
2018-05-16 16:25:03 +02:00
Xavier Dollé 19fb650863 [FIX] mail: correctly filter needaction on unread notifications in message_format
Previously to this commit needaction used by JS was not taking into account
read notifications. It means notably Inbox counter could be higher than
expected as taking into account read messages while Inbox displays only
unread messages. This commit fixes that by checking notification state when
giving needaction_partner_ids to message_format result.

This fix has a small impact on performances as message_format is used in
notification process for chat or push. A better implementation of message
format and its postprocess could probably lessen this fix impact. As we
target stable version we avoid rewriting other part of the code. Optimization
will be done in development version.

Related to task ID 1841243. This is a manual backport of commit 69714fbeee
done in saas-11.2.
2018-05-16 16:00:43 +02:00
Christophe Simonis 82b15e06ce [MERGE] forward port branch 9.0 up to 9db6dfa25d 2018-05-16 15:54:08 +02:00
Nicolas Martinelli 491243d1ca [FIX] stock_account: partial reception with avg cost
- Create a product where the associated product category has Costing
  Method "Average Cost (AVCO)"
- Create a PO. Order 1 unit at $1000.
- Receive that unit. (System now has 1 unit at $1000).
- Create another PO. Order 3 units at $500 each.
- Receive only 1 unit and don’t create any back order.

System has 2 units @ $625, instead of $750.

The quantity computed should take into account the quantity actually
done.

opw-1843998
2018-05-16 14:21:15 +02:00
Xavier ALT c22d3f6732 [FIX] web: widget char_domain should pass context to selection dialog
In case we define a field like,

<field name="my_domain" widget="char_domain" context="{'active_test': False}"/>

when selecting records the dialog should display all records (as asked by the
context), but it's not the case.

This commit ensure the field context is passed to the selection dialog.

opw-1831902
2018-05-16 14:18:17 +02:00
Olivier Dony cdabb9d74c [FIX] auth_signup: remove password from welcome message
Revision 054c68689b added by mistake the
password of the new user in the welcome message that is sent to users
who signed up with an invitation token.

There is no need for this, the user has just chosen their password, and
we should not send them a copy which could be compromised on the way to
their inbox or later in their inbox.
It may also give users the impression that their passwords is stored in
cleartext in the database, even when that is not the case.

This patch minimalizes changes to the template and its translations.
For existing databases where the code is updated without re-syncing the
template, the password will simply be missing in the message (until a
resync of auth_signup module is done)
2018-05-16 12:17:14 +02:00
Jeremy Kersten b8f5f17aed [FIX] event: don't block scheduler at first exception
Before this commit, when a scheduler fail for one event (eg: error in send_mail),
the cron stop and don't continue to process all others event's scheduler.

Now we try to warn (~ randomly once by hour) the responsible/organizer/write_uid
that an error occurs with this scheduler, and we continue to process the others.

opw-1840497
closes #24741
2018-05-16 11:58:11 +02:00
Nicolas Martinelli 6fce298d70 [FIX] account: tax computation at reconciliation
- Create a tax included of 7.7%
- Set the company rounding to 'Round Globally'
- Create a bank statement of 10.70, reconcile
- Add a manual line with the 7.7% tax

An extra line of 0.01 remains.

The remaining amount after subtracting the tax is `0.00499...`, which
is rounded to `0.005` by `Math.round(total*1000)/1000`, and finally
displayed as `0.01`.

The 'Round Globally' setting makes sense for objects containing multiple
lines, such as SO, PO or invoice. In the case of a reconciliation, we
can switch to the 'Round per line' config.

opw-1837986
2018-05-16 11:10:58 +02:00
Christophe Simonis 9db6dfa25d [FIX] event_sale: update registrations as sudo.
Consequence of 19878d011f

Backport of fb17edd0b0
2018-05-16 11:05:16 +02:00
len-odoo 47cc4fbbab [FIX] auth_signup: add missing dependency on the computation of the signup validity
The field signup_valid is a non stored computed field based on signup_token.
The cache is filled with prefetched values, so in a loop the field is read from
the cache and not recomputed due to the missing dependency.

opw 1843442
2018-05-16 09:01:14 +02:00
len-odoo 25548eb7e9 [FIX] web: sort relational fields by their names
When sorting records according to a many2one field in a list view
embedded in a form view, the js would sort according to their ids,
in a seemingly arbitrary order.
Thus sorting records according to a field with values in ("a", "b", "c")
could be sorted as "a", "a", "c", "b" instead of "a", "a", "b", "c".
We make the comparison on the name of the field instead.

opw 1838860
2018-05-16 08:04:53 +02:00
Christophe Simonis 5a943390f2 [MERGE] forward port branch saas-15 up to fb17edd0b0 2018-05-15 20:03:18 +02:00
Christophe Simonis fb17edd0b0 [FIX] event_sale: update registrations as sudo.
Consequence of 19878d011f
2018-05-15 19:19:51 +02:00
Christophe Simonis df3b75a127 [MERGE] forward port branch saas-15 up to f1ae96e389 2018-05-15 18:58:20 +02:00
Christophe Simonis f1ae96e389 [MERGE] forward port branch saas-14 up to a50e7aa366 2018-05-15 18:36:16 +02:00
Christophe Simonis a50e7aa366 [MERGE] forward port branch 10.0 up to 13fc77daf4 2018-05-15 17:44:34 +02:00
Denis Ledoux e5fb990db1 [FIX] project: prevent to create recursive hierarchy of tasks
Until this revision,
this was possible to set as parent task the current task.

From then, it was impossible to compute the field
`subtask_count` because of an infinite loop.

This resulted to the inability to open the task
form, which contains this field.

opw-1847982
2018-05-15 17:10:30 +02:00
Goffin Simon 35c2a74480 [FIX] delivery: Delivery method name not translated
When adding a SO line with a delivery method (e.g. The Post) for a customer
with a different language that the one set on the current language, the description
of the SO line was not translated. Inspired from function 'product_id_change' in
model 'sale.order.line'

opw:1843934
2018-05-15 17:07:44 +02:00
Christophe Simonis 13fc77daf4 [MERGE] forward port branch 9.0 up to 19878d011f 2018-05-15 16:51:34 +02:00
qdp-odoo 6558d52e9b [FIX] account: adjustment wizard usability
This commits removes a disambiguation on the choices of the 'Adjustment Type' selection as 'in your favor' could be achieved by debitting the 'Collected Tax' account or creditting the 'Paid Tax' accounts (respectively for 'in favor of the Estate'). The choices now refers directly to the journal item where the tax is gonna be copied

Related to https://github.com/odoo/odoo/commit/c58ef14a01f600d75391f2a9c38bb2b30e0e2528
Related to OPW 1826242
2018-05-15 16:47:38 +02:00
qdp-odoo d5cf6be26e [IMP] account: make currency_exchange_journal_id field visible in settings 2018-05-15 15:04:17 +02:00
RomainLibert 6de803645e [FIX] hr_holidays: remove duplicate onchange
There were two onchange methods on employee_id in hr.holiday.
2018-05-15 12:27:19 +02:00
Lucas Perais (lpe) eb6714f59b [FIX] website_slides: slide in fullscreen needs to have the navbar
Display a slide, enter fullscreen mode
Make the navigation bar appear.

Now, try to push on any button of the nav bar

Before this commit, none of the button work
This is because the fullscreen mode is handled by the browser, and won't let any non-fullscreen
elements be interactive

After this commit, the nav bar is part of the element that are in fullscreen
And the button work

OPW 1839503
closes #24522
2018-05-15 09:46:55 +02:00
RomainLibert 19878d011f [FIX] event: fix bug with users
We need to fix a problem with the users where someone might get
informations on registrations.
2018-05-15 09:41:25 +02:00
Goffin Simon e806151882 [FIX] point_of_sale: product not available in POS if not salable
When the box "Can be sold" on product.template is unticked, the
product must be unavailable in the point of sale.

Closes #22061
opw:1844188
2018-05-15 09:33:31 +02:00
Nicolas Lempereur c39d40f98d [FIX] hr_recruitment: job stages choosen manually
In 9.0, stages of a job position in recruitment are not share by
default, there is a "New" stage and existing stages can be added in the
form view (since 780f46ae).

When creating a job position, the "New" is not working with the given
widget type.

This commit doesn't show stages in the form view until the record is
created.

opw-1839217
closes #24706
2018-05-15 09:20:59 +02:00
Goffin Simon 871387ca9e [FIX] web: Impossible to add an attachment on Safari
Fine tuning of cd6150fe9e

opw:1840373
2018-05-15 09:20:02 +02:00
Nicolas Martinelli d9fc5bca7e [FIX] purchase: move with zero qty
- Create a product FIFO / Real-Time valuation
- Create a PO with 1 unit, validate, receive the picking
- Create the corresponding vendor bill, but do not validate
- Unlock the picking and change the received quantity to 0.0
- Validate the invoice

A traceback because of a zero division occurs.

When searching for the stock moves linked to the PO, we should filter
out the ones with a zero quantity.

opw-1843543
2018-05-15 08:51:40 +02:00
Nicolas Martinelli 1dbeda0157 [FIX] project: sub-tasks
- Activate sub-tasks in projects
- Enter a project's tasks, click on the stat button 'Sub-tasks'
- Reload the page (F5)

A traceback occurs since `project_id` is undefined.

The fields `project_id` and `partner_id` are only defined in the context
of the stat button.

opw-1844334
2018-05-15 08:47:20 +02:00
Nicolas Martinelli 429bcd9464 [FIX] payment_sips: special characters
The field `transactionReference` of Sips must contain only
alphanumerical characters. Previous commit 31dc6b888e solved
the special case of several attempts to pay, but a much simpler case may
appear in v11. Paying an invoice is likely to fail since the reference
contains by default `/`.

In the previous commit, we could simply modify the common `payment`
module code. In this specific case, however, we only change the
reference if the acquirer is Sips.

opw-1841483
2018-05-15 08:33:06 +02:00
Christophe Simonis 45b4a4a4dd [MERGE] forward port branch saas-15 up to 62d93dad02 2018-05-14 20:25:16 +02:00
Christophe Simonis 62d93dad02 [MERGE] forward port branch saas-14 up to da7f280d8f 2018-05-14 20:18:21 +02:00
Christophe Simonis da7f280d8f [MERGE] forward port branch 10.0 up to 1bcc856e4c 2018-05-14 20:14:27 +02:00
Christophe Simonis 1bcc856e4c [MERGE] forward port branch 9.0 up to 0450868391 2018-05-14 20:08:31 +02:00
Christophe Simonis 0450868391 [FIX] website: correct GeoIP Legacy compatibility
Attribute is different for country and continent objects.
2018-05-14 19:54:50 +02:00