Commit Graph
110681 Commits
Author SHA1 Message Date
RomainLibert ed47e3a546 [FIX] event: use groups to hide event count stat button
In order to avoid the access error when trying to view a partner form
view we should hide the event count stat button for the users who don't have
access to it (must be event_user or event_manager to read this field).

Closes #25225
2018-06-14 14:55:55 +02:00
Nicolas Martinelli 1bde9b1ec4 [FIX] event: do not use sudo to compute event_count
This reverts commit c0618d72d0.
2018-06-14 10:15:23 +02:00
Christophe Simonis c43c540172 [MERGE] forward port branch 10.0 up to 788750ea51 2018-06-13 10:55:58 +02:00
Christophe Simonis 788750ea51 [MERGE] forward port branch 9.0 up to 444f0b6a7f 2018-06-13 10:50:43 +02:00
Toufik Benjaa 444f0b6a7f [IMP] payment_ogone: Avoid requesting already owned data from Ogone
- When receiving a S2S payment feedback from Ogone server, we call the method '_ogone_form_get_tx_from_data' which does a "pre-process" of the data to retrieve the payment.transaction linked to this payment.
  It also checks the hash signature of the data to be sure it comes from Ogone.
  Right after, we call "_ogone_s2s_validate" which make a HTTP call to ogone, to retrieve the data related to the transaction which were already sent by Ogone (maybe to be sure the data comes from Ogone?).

  So instead of calling "_ogone_s2s_validate" we now call "_ogone_s2s_validate_tree" which processes the data from Ogone.
  We are sure they come from Ogone, since they passed the hash signature when calling "_ogone_form_get_tx_from_data".
2018-06-12 18:27:24 +02:00
Toufik Benjaa c8243e71c6 [FIX] http: Consume less cursors for session checks
- Each time we check if a session is valid we create a new cursor.
  This could lead to issues with db_maxconn that limits the number of
connections to the postgresql server.
  In a perfect world, a worker should use a single connection to
postgres to process the request.
  The only known side effect is that the cursor is created earlier in
the execution of the code.

- This commit fixes issues with the longpolling raising
Psycopg2.PoolError exceptions on databases with a lot of clients.
2018-06-12 18:10:37 +02:00
Jairo Llopis 8357e7395e [FIX] link_tracker: do not give a date to a datetime
Creation date is a datetime field. However code is giving a date value.
as create date is a magic field with a default value there is actually
no need to override it.

Closes #22447.
2018-06-12 17:48:56 +02:00
Jairo Llopis 228df6a29f [FIX] link_tracker: do not die if statistic was unlinked when the user clicks on a tracked link
[There's a chance mail statistics disappear](https://github.com/odoo/odoo/blob/b3b8a471cc3e02488dcc0da991fd1d828978220d/addons/mass_mailing/models/mass_mailing.py#L519), which is probably not a very good decision, but there it is. Then, `add_click()` produces a 500 error when a user clicks on the mass mailing if the email comes from an old attempt.

Fix is to check the statistic record effectively exists before linking it.

Closes #22447.
2018-06-12 17:48:56 +02:00
Subodh Dahal c2f20f12b9 [FIX] doc: recommand to xpath on snippet_structure
Fixed the xpath expression for inserting snippet into Structure tab

Closes #22971
2018-06-12 17:45:36 +02:00
Subodh Dahal 3fc6624631 [CLA] SubodhDahal signs Odoo's CLA
Done at #22971
2018-06-12 17:45:36 +02:00
Jeremy Kersten 51acdeba4f [ADD] qweb: add tests for widget=date with datetime
This commit is related to #24761
2018-06-12 15:48:21 +02:00
Carlos Dauden ac68eb5b3d [FIX] base: ir_qweb fix timezone for datetime with widget=date
Before this commit, display a datetime field with the widget="date" was ignoring
the timezone.

This commit closes #24761
2018-06-12 15:48:21 +02:00
Jairo Llopis ce6b6e6458 [FIX] event: do not suggest public user email in registration chatter
Chatter suggests to include recipients on several objects, notably on
registrations. When a registration is done through a public interface
like website in website_event associated partner is the public user.
In that case proposing to mail the public user does not make sense.
It should propose the real email stored on the registration record.
To fix that we filter the partner if it is linked to the pubic groups.

The fix includes a sudo + context switch in a loop. As this method is
called only on a recordset of one element this has no impact on real use
case. Purpose is to keep the diff minimal.

Closes #23187 .
2018-06-12 15:42:40 +02:00
Andrea Stirpe 375bff6619 [FIX] l10n_nl: use tax tag 5b
There was a difference in the tax codes Import Buiten EU (2), some had the tag
'5B Voorbelasting' and other had the tag 'Voorbelasting BTW Bis'.

Link all the codes to '5B Voorbelasting' instead.
This is more consistent with the rest.

Closes #23119
2018-06-12 14:50:17 +02:00
Nicolas LempereurandRaphael Collet e60a8762fb [FIX] base: depends if no depends is ()
With saas-11.2's 3fbd86b some trigger towards other fields are improved
but this caused an issue when a inherited field towards a custom
computed field had no depends.

When we created a computed field x_custo on res.partner, we have a
inherited x_custo on res.users automatically created.

Both these fields have a depends computed to `('',)`, this caused an
error for the one on res.partner: but this was ignored with dd048ae7.

Since saas-11.2's 3fbd86b this also caused an error on the inherited
field but since an inherited field is not "manual" the error was not
ignored. Thus it was not possible to create custom field on a model
inheriting of another model if the fields had no depends.

opw-1854786
closes #25146

Co-authored-by: Raphael Collet <rco@odoo.com>
2018-06-12 13:12:39 +02:00
mehdi-ghezal 58e85bdec0 [FIX] sale_stock: qty calculation in procurement creation
When updating the qty on a confirmed sale order line,
we want the system to add new procurement qty
for the cancelled procurements. That way you can
leave the cancelled procurements for what they are.
2018-06-12 11:44:50 +02:00
rgarnau fe15b7a1f0 Update Eficent's CLA 2018-06-12 11:40:54 +02:00
rgarnau 46129e7530 [FIX] stock: scrapping consumable products allowing negative quantities
As for consumables stock levels are not that important,
it should be ok to scrap a consumable at all times,
even if the stock becomes negative.

Tests were added to check what happens with a consumable/stockable
product if stays positive/goes negative.
2018-06-12 11:40:28 +02:00
Christophe Simonis 284ed9216c [MERGE] forward port branch 10.0 up to 50ee813153 2018-06-12 11:39:34 +02:00
Tony Gu 50ee813153 [CLA] add signed cla Shine IT 2018-06-12 10:23:06 +02:00
Tony Gu 45a179d93c [FIX] mrp: Unrelated product_template and product_product on the same BOM
Before this fix, we can create a Bom with both product_id and
product_tmpl_id filled where the product_id is not a variant of the
product_tmpl_id. This is unlogical and will be even trickier when the
user is not able to see the variant field on the BOM.

This fix puts the product_id back to False when the product_tmpl_id
is changed.
2018-06-12 10:21:40 +02:00
Goffin Simon cb3e415a7c [FIX] mail: Allow modifying followers in multi company/with private channel
It's a backport for https://github.com/odoo/odoo/commit/b795d69ce8aca2e88182c6d6d6b7af54d536f9dd
It also backports this fix https://github.com/odoo/odoo/commit/c49265afa1b0610d52fd356df26491546f1905bf

It also fixes #13578
2018-06-12 09:52:12 +02:00
Christophe Simonis b6496f8b38 [MERGE] forward port branch 10.0 up to 9032617120 2018-06-11 19:20:38 +02:00
Christophe Simonis 9032617120 [MERGE] forward port branch 9.0 up to 06a085b25f 2018-06-11 18:39:45 +02:00
Martin Trigaux c5946d6c5e [IMP] product: add test
To make sure the changes made at #24905 are tested
2018-06-11 17:47:39 +02:00
Martin Duvergey abe7e6c376 [FIX] product: add missing break statements in for/else constructs
The code of the product was always the default one, not the one of the seller

Closes #24905
2018-06-11 17:47:38 +02:00
Martin Duvergey d0a2a4eef6 [CLA] mduvergey signs Odoo's CLA
Done at #24905
2018-06-11 17:47:38 +02:00
Yannick Tivisse 06a085b25f Revert "[FIX] event: fix rights for event.registration"
This reverts commit 05e914629b
while waiting a clear commit message to justify an access right
modification in a stable release.
2018-06-11 17:15:50 +02:00
Invitu e44cb0ae34 [FIX] hr_attendance: Correctly compute worked hours
Fixes #10381 (wrong calculation on datetime)

if worked hours > 24h, calculation is wrong because "seconds" funtion does not take into account days
See: https://docs.python.org/2.4/lib/datetime-timedelta.html

total_seconds() should be used instead of seconds function
2018-06-11 17:13:29 +02:00
RomainLibert 05e914629b [FIX] event: fix rights for event.registration 2018-06-11 17:12:23 +02:00
Swapnesh Shah af752e7158 [FIX] website_forum: Fixed maximum recursion depth
Before this commit, you can set the question of a post like the post itself.
That will generate a traceback:
    RecursionError: maximum recursion depth exceeded in comparison

Now we check that there is no recursion
2018-06-11 16:49:38 +02:00
Martin trigaux 3419b260fb [CLA] backport of WT-IO-IT GmbH signature
backport to 9.0 as asked at #25185
2018-06-11 16:13:14 +02:00
Alexis de Lattre 66182a5645 [FIX] account_bank_statement_import: access right fix
This commit fix an access right issue when a user that belongs to account.group_account_user (and not to account.group_account_manager) imports a bank statement file.

Was PR #25041. Courtesy of Alexis De Lattre (Akretion)
2018-06-11 15:42:01 +02:00
Goffin Simon e15990489c [FIX] mrp: Produced Lot is not updated if multiple productions with the same Lot
Steps to reproduce the bug:

- Create two products P1 and P2 requiring a lot
- Create a BOM B for P1 and requiring 3 P2
- Set on B a routing with a work order
- Create an inventory adjustment with 2 lots for P2:
   - Lot1 with 20 P2
   - Lot2 with 10 P1
- Create a MO for 10 P1
- Start the production and create a current lot Lot3 in Current Production sheet
- Set as current Qty 5 with Lot3 as current lot and Lot1 as Product Lot
- Click on DONE
- Set as current Qty 2 with Lot3 as current lot and Lot1 as Product Lot
- Click on DONE
- Set as current Qty 3 with Lot3 as current lot and Lot2 as Product Lot
- Click on Done

Bug:

When you checked the produced qty on the MO in the Finished product sheet, it only displayed 5 instead of 10.

opw:1849796
2018-06-11 15:19:17 +02:00
Laurent Mignon (ACSONE) 3c628bae49 [FIX] base: allow erp manager to set multi-company on a user
If a user member of group 'group_erp_manager' create a new user and adds
the user in multiple companies, the system raises an AccessError on ir.ui.view

When adding a user in multiple companies, he is automatically added in
the 'base.group_multi_company' group.
Modifying a 'res.group' record recomputes the view architecture.
The ir.ui.view records is writable by 'base.group_system' users.

Closes #21207
2018-06-11 15:04:15 +02:00
Goffin Simon f6d69ff2d3 [FIX] odoo: copy_translation translates the wrong view
With website_version, when publishing a version and copying the current version,
the copy_translation wrote a new translation for the copy of master in the published
view instead of the copied view.

Reason:

When writing in the view, odoo checked in the context the current version and
wrote in the view corresponding to the key and the verion seen in the website.
So when copying a view, it translated the copied view instead of the copy of
the view.

The write is made by the function copy_translation with the line:

   "new_wo_lang[name] = old_wo_lang[name]"

opw:1856150
2018-06-11 13:22:01 +02:00
Flavien Chêne a023a55f95 [CLA] signature for Zelwak 2018-06-11 12:14:36 +02:00
Flavien Chêne 8dc3bd4b63 [FIX] website_sale: Correct set 'checked' attribute on variants list
Purpose
=======

In the website_sale.product_variants template, for the "checked" attribute in the radio input,
it must be " checked' if variant_id_index == 0 else None " instead of "' checked' if
variant_id_index == 0 else '' ".

For this moment, it checked the last variant because we get " checked="checked" " for the
first and " checked="" " for the others.

Specification
=============

Use None instead of '' for the checked attribute if it shouldn't be checked.
2018-06-11 12:13:19 +02:00
Adrien Peiffer (ACSONE) 31f3687124 [IMP] payment_stripe: Fill email on stripe modal to avoid retyping it
Purpose
=======

Currently, users have to retype email in the stripe payment popup.

For event registration, the email address must be typed 3 times (the first
for the registration information, the second for the billing information
and finally for the payment on the stripe popup)

Specifications
==============

As the email is already filled on billing information view, isn't
necessary to retype in the payment form.
2018-06-11 11:27:49 +02:00
Adrien Peiffer (ACSONE) 52f5bb27ce [FIX] website_event: improve registration modal behavior
Currently there are 3 ways of going out of the modal: clicking cancel
registration, hitting the close button or clicking outside the modal.
The latter one however does not trigger the close event for modals and
therefore buttons of event registration are not reset correctly. This
commit fixes that behavior by preventing to close modal by clicking
outside of it. Buttons should be used and flow is now fixed.

Closes #25174 .
2018-06-11 11:23:28 +02:00
Simone Rubino 56e8a4a82a [FIX] website_project_issue: put 'view task' button in email to portal users
Commit
https://github.com/odoo/odoo/commit/9e981f6535cc7d8e46bc53ebd279b377c805e6a2
removed the 'view task' button for the groups 'customer' and 'portal'.
Since this button works fine for portal users, we put it back for them.

opw 1849770
2018-06-11 11:07:24 +02:00
Rod Schouteden 5c03430d9f [FIX] service: do not break on gevent 1.3
gevent 1.3.0 removed backward compatibility on gevent.wsgi.
make the new path the default

While the recommanded version on requirements.txt is 1.1, a server can not
launched with the 1.3

Closes #24780
Fixes #24779
2018-06-11 10:42:09 +02:00
Rod Schouteden 84ce2ead86 [CLA] signature for schout-it
Done at #24780
2018-06-11 10:42:09 +02:00
David 561ac24ca7 [FIX] website_form: set meta field
backport of 682ae1cc64

Before this commit, if you enable website_form_enable_metadata, that
will crash with a "KeyError: 'meta'"

This commit closes #24888
2018-06-11 10:35:42 +02:00
Odoo Translation Bot 11515e14f7 [I18N] Update translation terms from Transifex 2018-06-10 00:27:35 +02:00
RomainLibert c0618d72d0 [FIX] event: use sudo to compute event_count
You could not see the partner page when not having the event rights.
2018-06-08 16:33:45 +02:00
Christophe Monniez 2da4eb5898 [FIX] packaging: add BeautifulSoup to py2exe setup
When trying to import an OFX bank statetement under MS Windows, a
Traceback states that BeautifulSoup is missing.

During the build process, py2exe didn't autodiscover that BeautifulSoup
is needed by the ofxparse package.
With this commit, BeautifulSoup is explicitely added to py2exe packages.
The Nightly VM was updated accordingly.

opw-1848202
2018-06-08 14:31:06 +02:00
len-odoo 867bbff589 [FIX] mrp: help message to disambiguate meaning of duration value
The duration field on a workorder computes the total time spent on it.
The mrp_time_counter widget that is used to display it only computes the total
time spent on it by the currently logged user (ignoring the field stored value).
To help the user understand the inconsistency between the two values, we add a
help tooltip.
Since this really depends on the widget used to display the value, the tooltip
is directly put in the view.

opw 1854802
2018-06-08 14:01:34 +02:00
Pedro M. Baeza 64645457dd [FIX] base: Allow to create a contact without type
If you don't define an explicit address type, then the
record is not going to be accessible.

In the ORM:
>>> env['res.partner'].create({'name': 'Test', 'type': False})
res.partner(44356,)
>>> env['res.partner'].search([('type', '!=', 'private'), ('id', '=', 44356)])
res.partner()
>>> env['res.partner'].search([('type', '=', False), ('id', '=', 44356)])
res.partner(44356,)

due to the fact that NULL in the database is undefined and can't be
compared to a specific key.
2018-06-08 12:24:19 +02:00
Lucas Perais (lpe) f01e298d53 [FIX] account: in account config, constrain exchange diff journal's domain
Before this commit one could choose any journal for the registering exchange rate differences.
That could lead to accounting errors down the line

After this commit, we apply a domain on the field, and there is no problem afterwards

OPW 1851616
closes #25101
2018-06-08 09:45:21 +02:00