Commit Graph
116250 Commits
Author SHA1 Message Date
Simon LejeuneandNicolas Martinelli d42856f29d [FIX] stock: partial reserve in MTO
- Create a product with -4.0 Units in stock
- Set the Buy and MTO routes, assign a vendor
- Create a SO for 25 Units
- A PO of 25 Units is created => validate and receive products
- Check availability on the picking linked to the SO

Nothing is reserved, while 21 Units could be reserved.

opw-1850688

Co-authored-by: Nicolas Martinelli <nim@odoo.com>
2018-06-14 10:36:57 +02:00
celm1990 caadeeee62 [FIX] base_address_city: avoid unexpected write trigger
This sets the field country_enforce_cities readonly in order to skip inverse field's write on contact creation.

Was PR #24686. Courtesy of Carlos Lopez
2018-06-14 09:39:28 +02:00
Christophe Simonis d45c32baac [MERGE] forward port branch saas-15 up to bdd051bf78 2018-06-13 18:13:48 +02:00
Goffin Simon ab0b3a6217 [FIX] stock: Printing barcode on picking list
Inspired from 12b11c1e6f
Fixes #25214

opw:1849965
2018-06-13 17:21:56 +02:00
Jairo Llopis 71334b13bd [IMP] web: Expose datepicker configuration to view declarations
The lower-level widget itself supports passing options to the underlying
datepicker library. However this is not exposed to higher-level view
declaration. With this patch, one can declare a field in a view such as:

```xml
<field name="datefield" options='{"daysOfWeekDisabled": [0, 6]}'/>
```

That option would land in the widget and disable those weekdays.

Documentation has been updated accordingly.

Closes #25044.
2018-06-13 14:53:11 +02:00
Christophe Simonis bdd051bf78 [MERGE] forward port branch saas-14 up to c43c540172 2018-06-13 14:12:12 +02:00
Thomas Binsfeld 4d3debe2c3 [FIX] purchase: do not show all pickings from PO if there are no picking
Closes #19961.
2018-06-13 12:05:17 +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
Andreas Perhab bb8ded772a [FIX] db: close connection of incompatible DB only
Close connections of incompatible databases instead of closing all
connections.

Introduced in 610036756a

Closes #24479
opw-1852793
2018-06-12 18:26:35 +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
Toufik Benjaa 8354b34a4a [FIX] project: Keep your search filter on the tasks' portal
- Searches made on tickets using the portal aren't kept when changing page.
This commit makes sure the search is kept.

OPW-1857033
2018-06-12 18:05:36 +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
Christophe Simonis 4479aac52f [FIX] product: correctly set partner_ref
Oversight of previous forward-port
2018-06-12 16:53:44 +02:00
Christophe Simonis e3658d6f56 [MERGE] forward port branch saas-15 up to d44cd77884 2018-06-12 16:31:54 +02:00
Yannick Tivisse 92052386f7 [FIX] mass_mailing_event_track: Correctly set recipients on mail wizard
Since https://github.com/odoo/odoo/commit/f93c4f4262e0a7102e34c6ed8f2b8f51eef45062 the
feature is not setting the recipients correctly when trying to send a mass mailing
to all the event tracks speakers.
2018-06-12 16:16:57 +02:00
Stephane Le Cornec 05f8bbd635 [FIX] product: use given argument in name_search override
Do not force to use the comptued one. Make an AND between both.

Closes #22396
2018-06-12 16:09:08 +02:00
Nicolas Martinelli 9a3fc2a06f [FIX] base: P3.5 - P3.6 compatibility
In P3.6, the error message has changed.
2018-06-12 15:48:43 +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
Adrien Dieudonne 25955f6d94 [FIX] web: prevent web client from blocking some view
Before this commit some rpc was blocked and we didn't see
lost connection notifications.

Steps to reproduce:
1) Go to any form view
2) Force disconnected from the network
-> The "Connection lost" notification appears
3) Get connection back
-> The "Connection restored" notification appears
3) Close the connection again
-> No notification appears and the user aren't notify
that the internet connection is lost.

Related commit: @47cf31b53

Note: It's now important to notify the user about connection loss
because a recent improvement in mobile app replaces the 'retry screen'
and let the webclient handle connection issues by itself.
The single odoo mobile app is supposed to work with all databases
from 10.0.
2018-06-12 15:41:24 +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
Christophe Simonis d44cd77884 [MERGE] forward port branch saas-14 up to 284ed9216c 2018-06-12 12:19:14 +02:00
mpanarin 4178684fa3 [IMP] mrp: make mrp_bom_structure_report more extensible
by moving child values to a separate method. This way, other modules can
properly add or remove fields to the report without overriding it
completely and breaking the inheritance
2018-06-12 11:56:50 +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
Yannick Tivisse dd3faf40fa [FIX] crm: Don't modify the sales team when removing the salesman
Purpose
=======

Currently, if we remove the salesman on the lead, the sales team will
be replace by either the sales team of the current user or the default
sales team.

That way, by removing the salesman, we loose information about the sales
team, and that way we loose information about the origin of the lead.

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

Don't overwrite the sales team when removing the salesman on the
the lead.
2018-06-12 11:34:03 +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
Daniel Dico 8be5cc0980 [ADD] base: set vat_label for Canada
Closes #25052
2018-06-12 10:19:11 +02:00
Luis González d5d797360a [FIX] base: Avoid exception when showing error in namespaced qweb node
Before this commit, if a SyntaxError or any other exception occurs in a
qweb attribute, and the path to the node contains at least one
namespaced tag, e.g.:

<mynode:node xmlns:mynode="http://example.com/mynode">
    <field t-att-value="'This is a TypeError' + []"/>
</mynode:node>

the following exception is raised, instead of the actual one:
lxml.etree.XPathEvalError: Undefined namespace prefix

After this commit, if the path to the failing node contains a namespaced
tag, the node is not retrieved, to avoid the above exception, So this
one will be raised:

Error to render compiling AST
TypeError: Can't convert 'list' object to str implicitly
Template: module.template_name
Path: /templates/mynode:node/field

In addition, a test case was included, to ensure this works as expected

Closes #24824
opw-1853232
2018-06-12 10:14:29 +02:00
Andreas Perhab e34a9ba58f [FIX] test_pylint: incompatibility between pylint 1.6 and python 3.6
reference: https://github.com/PyCQA/pylint/issues/1349

pylint 1.6 and python 3.5 (and below) should work fine, so no need to
force people to upgrade there.
2018-06-12 10:12:09 +02:00
Long Do 869b833618 [FIX] mrp_repair: fix templates duplicating report when printing it
We are looping twice on docs. To have a minimal diff we just try to reuse
existing variable but with loops correctly taken into account.

Closes #25008 .
2018-06-12 10:05:52 +02:00
hoanglong87 b0f1886f97 [CLA] Update tvtmarine-automation.md 2018-06-12 10:05:52 +02:00
Goffin Simon bf3bb5ef50 [FIX] mrp, stock: Duplicate Detailed Operations
Steps to reproduce the bug:

- Create a stockable product P tracked by serial number with route BUY
- Create PO with 5 P and validate the PO
- On the picking, just set one serial number and create a backorder
- Go on the backorder

Bug:

8 lines were created:
    - 4 lines with one reserved quantity
    - 4 lines with no reserved quantity

Now only 4 lines with one reserved quantity are created.

opw:1847714
2018-06-12 10:01:18 +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