Commit Graph
117156 Commits
Author SHA1 Message Date
Odoo Translation Bot 5316406ad7 [I18N] Update translation terms from Transifex 2018-07-01 04:09:17 +02:00
Christophe Simonis 4d0a1330e0 [MERGE] forward port branch saas-15 up to ce84bacd72 2018-06-29 18:39:03 +02:00
Nicolas Martinelli 8643175d00 [FIX] website_sale_wishlist: prevent adding to cart
Extension of commit c4f5b9f751

Instead of disabling only the button on which the user has clicked, we
disable all 'Add to Cart' buttons until the end of the transaction.

Closes #24853
opw-1858080
2018-06-29 10:39:41 +02:00
Swapnesh Shah ef0907d5b0 [fIX] stock: stock.move.line: write
When updating the reservation of an partially available or available
move line, use the current record of the loop and not the whole
recordset.

Closes #25445
2018-06-28 16:06:49 +02:00
Martin Trigaux c02fe10add [FIX] auth_signup: display meaningfull error message
Similar as 676022e3af for reset form
2018-06-28 15:56:16 +02:00
Nicolas Lempereur 8c250b73fa [FIX] account: batch deposit in reconcile uncut
The CSS of reconciliation highly uses `overflow: hidden` to hide
elements, but this cut the bottom part of the "Select a Batch Deposit"
list of deposits.

There is no possible overflow in this situation anyway, since in the
given circumstances the `max-height` is set to none.

opw-1859408
closes #25524
2018-06-28 13:57:53 +02:00
Nicolas Lempereurandqsm-odoo f6d36d81f7 [FIX] mail: discuss smileys on several lines
In the discuss composer on google chrome, when when the smileys have
more width than available, they stayed on one line and would increase
page size (adding an horizontal scrollbar).

This happened really easily in saas-11.3 because we have more smileys,
but still happened in 11.0 depending on the screen size.

opw-1861191
closes #25507

Co-authored-by: qsm-odoo <qsm@odoo.com>
2018-06-28 09:05:36 +02:00
Nicolas Martinelli a0173bbbce [FIX] stock: fix test setup 2018-06-28 08:35:23 +02:00
Nicolas Martinelli 50a10fd736 [FIX] stock: search route name
opw-1862275
2018-06-28 08:16:31 +02:00
Christophe Simonis 9dcc32c304 [FIX] stock: avoid useless changes on UoM in tests setUp 2018-06-27 20:14:47 +02:00
Christophe Simonis d44a4df863 [FIX] stock: correctly check UoM and Locations modifications 2018-06-27 20:13:37 +02:00
Swapnesh Shah bb78b7608a [FIX] hr_payroll: prevents maximum recursion depth
When computing a salary sheet, a maximum recursion error could happen if there
is a cycle in the rules or in the categories.

Add constrains for salary rules and categories.

Closes #25405
2018-06-27 17:44:03 +02:00
Christophe Matthieu 39f0f5db77 [FIX] ir_qweb: send template options in context to the fields
Application of a fix more specific to the problem of the contact widget
which can not serialize the dictionary because it contains the values of
the context of which browse record. (because contact try to
json.dumps options for multi-edition feature in web_editor)

opw-1859848

https://github.com/odoo/odoo/commit/ab85e9594651fd33ffd2747f4d3c5b360e7c7922
2018-06-27 15:11:37 +02:00
Goffin Simon 787a156f0d [FIX] purchase_requisition: origin and partner_ref erased by a requisition
Steps to reproduce the bug:

- Create a product P with routes MTO and BUY
- Set a vendor V on this product
- Create a BOM B with P
- Create a MO M with B
- A RFQ is created with M as origin
- Create a purchase requisition PR with vendor V
- Set PR as purchase agreement on the RFQ

Bug:

- The field origin with M was erased by the name of PR
- The field partner_ref was erased by the name of PR

The fix is inspired by: c914df5a36

opw:1860430
2018-06-27 13:30:09 +02:00
Nicolas Lempereur f52a5a7255 [FIX] base: print multi record report no outlines
In b446930dc there has been a number of changes in report to improve
performances.

In one of these change, printing several documents with result such as:

```
<div class="article"><h1><span data-oe-model="mymodel" data-oe-id="1" data-oe-field="myfield" /></h1></div>
<div class="article"><h1><span data-oe-model="mymodel" data-oe-id="3" data-oe-field="myfield" /></h1></div>
```

The system will know it is rendering 2 mymodel records (with IDs: 1, 3)
and will try from the document to determines what part (called
"outlines") of the PDF corresponds to these IDs.

This is done by splitting the document over semantical delimitations
such as h1, h2, *.

If all is fine: each part of the PDF will be saved for each record, so
if we print records 1 and 3 they will be saved separately and will be
possibly used as is the next time they are to be printed.

But in the instance of printing a report which has:

- field that are displayed,
- several records printed at the same time,
- save and getting document back from attachment enabled,
- no h1 or other semantic delimitation

The matching of part of PDF and outlines can't be done since there is no
outlines, this was not expected by the code and caused an error.

With this change, if there is no outline each part of the PDF will not
be saved as attachment.

opw-1856469
closes #25496
2018-06-27 13:21:13 +02:00
Gert Pellin c7247c07b6 [FIX] product: Product variants attributes are not shown in pricelist report (#25497)
Product variants are only shown by product name and price with no distinction between them.

related to task #1861988
2018-06-27 11:57:46 +02:00
Nicolas Martinelli 152519cd65 [FIX] mrp: BOM Cost quantity format
Correctly format the "quantity" column.

opw-1862158
2018-06-27 10:55:51 +02:00
Goffin Simon 5e3b471f4a [FIX] mail: Playing video not working on iOS
Steps to reproduce the bug:

- Go to Odoo on Safari browser
- Go to CRM > Operations > Manufacturing orders
- Select a MO and log a note on it with a video attachment
- Try to watch the video

Bug: it's not possible to watch the video

HTTP servers hosting media files for iOS must support byte-range requests, which iOS
uses to perform random access in media playback. (Byte-range support is also
known as content-range or partial-range support.)

Odoo server doesn't support partial requests with accept-ranges

opw:1857873
2018-06-27 09:42:42 +02:00
Gert Pellin deb1c7d4f6 [FIX] crm: Bug in new opportunity dialog (#25482)
in edit_dialog added 'default_type': 'opportunity' to context.

There was a bug in specific workflows of creating a new Opportunity resulting in the Opportunity saved as a Lead.
Infected workflow:
a) Create a opportunity from the Kanban view
b) Click in create and edit
c) Save the opp
d) from this opp create a new opp by clicking on create
The second Opportunity will be saved as a Lead

related to task #1857855
2018-06-27 09:08:50 +02:00
Lucas Perais (lpe) cda2ac9b71 [FIX] event, event_sale, website_event: allow portal access to own registrations
OPW 1859364
2018-06-26 15:07:42 +02:00
Pierre Masereel f6b3247c31 [FIX] purchase: remove move_dest_ids when PO line cancelled
When a PO is confirmed, cancelled, set back to draft and confirmed
again, the push rules don't apply because the PO lines have
move_dest_ids. So we remove those move_dest_ids from PO lines, to allow
push rules to be applied on the newly confirmed PO.

OPW-1859363
2018-06-26 15:02:51 +02:00
Christophe Simonis 24f18e995e [MERGE] forward port branch saas-15 up to bda926034a 2018-06-26 14:58:48 +02:00
Arnold Moyaux d0dc4c60bd [FIX] purchase: dropshipping sequence in multi company
Usecase to reproduce:
- Create 2 sequence for PO(one for each company)
- Create a product with dropshipping
- Connect on the demo user with an active company different than the
admin company
- Create a SO for this product
It will create a PO with the admin's company sequence.

It happens because _run_buy use a sudo since SO user don't always
have the purchase and inventory rights. However the company is not
forced and thus the used company for sequence is the admin company.

opw-1860802
2018-06-26 13:43:08 +02:00
Arnold Moyaux 52f323545a [FIX] stock: inconsistent state after unpack.
Usecase to reproduce:
- Update quantity in stock with a product inside a package
- Reserve a picking with this package.
- Go on the package form view and unpack it.
The package does not exist anymore on the quant, the reserved move line
still having the package as source package.

When the user try to unreserve the move lines, it will try to unrerserve
a quant with this package that does not exist anymore and then return
the error message 'can not unreserve more than you have in stock'.

This commit removes the source package on move lines that contain the
unpacked pack.
2018-06-26 13:16:52 +02:00
Arnold Moyaux bd5ca8c612 [FIX] stock: be able to update stock module (demo data)
Due to commit 74737865d5 when a user
with demo data try to update stock it will return the location
constraint because the demo data try to update the supplier location
with the usage supplier. However there is no check if the usage is
really modify or just in values.

This commit add a check in order to only select locations with a new
usage or that effectively change the 'scrap location' switch.
2018-06-26 13:16:52 +02:00
Ivan Yelizariev 5cecd0a197 [FIX] web_editor: restore website context for assets editor
The assets editor controller was stripped of the website context with
https://github.com/odoo/odoo/commit/198673bf35f14e3a797d2ff09208a289e12bec4e

It was however needed by some client customizations.
2018-06-26 12:58:00 +02:00
Nicolas Lempereur fadb3e155e [FIX] addons: no unsubscribe for unsubscribed
The `/groups` route display mail.channel and allow:

- a public user to subscribe specifying a mail address
- a logged in user to subscribe/unsubscribe itself

The `/groups?unsubscribe` route is the same but only allow:

- a public user to unsubscribe specifying a mail address
- a logged in user to unsubscribe itself

When a user is logged in, there is the oddity that all mail.channel
appear as to "unsubscribe" even if the user is not subscribed.

With this commit, the unsubscribe is shown only if user is subscribed.

opw-1861208
closes #25439
2018-06-26 11:37:57 +02:00
len-odoo f28875b1b7 [FIX] crm: make the force assignation field visible in wizard
Commit: https://github.com/odoo/odoo/commit/83a4374
Introduced a parameter force_assignation to choose to overwrite the salesman
when converting a lead to an opportunity.
However the field had never been made visible in the wizard view.

opw 1859447
2018-06-26 10:39:26 +02:00
len-odoo d7f5a1b25e [FIX] delivery, sale, sale_order_dates: ignore delivery line in commitment date computation
The commitment date is computed using every line from the sale order.
When the picking policy is set to direct, it takes the earliest date
among the sums of the order date and lead time.
However when the delivery is set, is adds a line with an order date of 'now' and
no lead time.
This date thus necessarily becomes the commitment date, bypassing what was
intended by setting a lead times on products.

We simply ignore delivery lines in this computation.

opw 1855646
2018-06-26 10:35:57 +02:00
Nicolas Lempereur 8188e6c802 [FIX] project: default on email as suggested recipient
With 82ca3d3f in 11.0 it was possible to have an email address on a
task, without specifying a partner.

Because of a small issue, this address was not suggested as a possible
recipients like it was in a project.issue object.

opw-1858170
closes #25427
2018-06-25 12:30:45 +02:00
William Henrotin 85f8e4761b [FIX] uom: useless constrain on purchase UoM
The purchase UoM doesn't interfere with account move line at all so we
can remove this check.

Task id: 1844684
2018-06-25 09:20:55 +02:00
William Henrotin 74737865d5 [FIX] stock: block changing location usage if reserved moves
This commit block users to change the location usage (or set it as scrap
location) if there are moves starting from this location.
This commit ensure the stock management will remain consitent.

Task id : 1844684
2018-06-25 09:20:55 +02:00
William Henrotin 850bb6cae4 [FIX] stock: block updating uom factor if reserved moves.
This commit block users to change unit of measure factor. if there are
reserved move on product using this UoM. This will allow the quantities
to be correctly unreserved when the stock move will be confirmed.

Task id : 1844684
2018-06-25 09:20:55 +02:00
Nicolas Martinelli f89d4201c7 [FIX] sale: default invoicing policy
The default invoicing policy setting is not compatible with the logic
implemented in a222afb7d4.

opw-1860867
2018-06-25 09:14:30 +02:00
Nicolas Martinelli 2e4a75cbee [FIX] auth_signup: do not send email to duplicated user
When duplicating a user, an email was sent to a user at the email of the
previous user (as the create is called before changing the email).

opw-1853359
2018-06-25 08:37:24 +02:00
Odoo Translation Bot f9737d79e7 [I18N] Update translation terms from Transifex 2018-06-24 04:09:30 +02:00
Denis Ledoux 6edf49e36f [IMP] ir_qweb: provide a clean way to ovverride the AssetsBundle to use
This revision follows revisions
- 9cd982bcc8
- df4072b0b4

We noticed modules implementing multi-websites features
override `_get_asset` to be able to provide their
own overriden `AssetsBunble` class.

Private methods are meant for internal usage of the code/module,
overriding is never a good idea given the fact their signature
can change. As this is the case in commit
9cd982bcc8.

That said, we understand their was no other way to go.
We therefore decide to provide one,
by adding a method that can be overriden to pass
their own AssetsBunble class instance.

opw-1860136
2018-06-22 15:36:28 +02:00
Nicolas Lempereur cb047ae69d [FIX] web_editor: keep border when side style differ
Since e94702d8 when transcoding an element for the purpose of sending it
by mail, if the element had:

 border-bottom-style: solid;

in the CSS resulting from classes, it would be simplified to:

 border-style: 0 0 solid 0;

which is wrong since 0 is invalid for border-style, the default being:

 none

opw-1852839
closes #25423
2018-06-22 14:25:36 +02:00
Adrien Dieudonne bd004b8267 [FIX] *: Avoid BlockUI for some rpc
Before this commit, the point of sale displayed a loading message
every 5 secondes if the barcode scanner was configured.

This issue is due to the following commit: @1aacc96
After this commit,some calls may block the interface when they did
not do it before.
It concerns all rpc done with ajax.rpc and all done with a new
session.

We have now to explicitly set shadow property.

opw-1860493
2018-06-22 13:13:18 +02:00
Jeremy Kersten df4072b0b4 [FIX] base: keep _get_asset for retro compatibility
Return of _get_assets has been altered with commit 9cd982bcc8
We keep it for retro compatibility, but devs that override it before need to
override now _get_asset_node to be called correctly by t-call-asset.
2018-06-22 11:10:50 +02:00
Swapnesh Shah 55e2d249a6 [FIX] hr_payroll: Ad missing ValidationError import 2018-06-22 10:55:43 +02:00
Nicolas Lempereur 06d89a8440 [FIX] web: onchange on not loaded inline list view
Let's assume a one2many A inside a form view, such that the one2many
views (list, not editable, and form) are defined inline, and there is an
onchange on A. There is another inline one2many B editable list
displayed in the inner form view (and B isn't in the list). There are
two records on the one2many A, both of them having one record in their
one2many B. Edit the first record of A, and edit it's subrecord in B.
Click on save. This triggers an onchange on A and the onchange returns a
command 5 (DELETE_ALL), and two commands 1 (UPDATE). Now edit the second
record of A, and simply close the dialog (e.g. 'Discard'). Save the main
record: the record in one2many B of the second record of A has been duplicated.

This occured because the code in BasicModel messed up information coming
from the onchange (UPDATE command) and from the read (performed when
opening the second record), thus producing a CREATE command instead of
an UPDATE one.

This rev. ensures to properly mix the read data with the onchange
result, by transfering the changes over the list datapoint created after
the read.

opw-1836785
closes #25330
2018-06-22 10:19:51 +02:00
Nicolas Martinelli adeb570b5a [FIX] mass_mailing_event: stat button overlap
In some languages (e.g. German), the text on the stat button overlaps
the button next to it.

opw-1858981
2018-06-22 09:58:59 +02:00
Nicolas Martinelli 7cd13f3b55 [FIX] point_of_sale: settings access
Make settings accessible to POS manager only.

opw-1857771
2018-06-22 09:55:11 +02:00
Adrian Torres 9ddf2c6932 [FIX] crm: reset dashboard_graph_model on uninstall
Before this commit:
    * Install `sale_management`, `crm`
    * Uninstall `crm`
    * Go to sales -> sales channels
    * Boom! The view is broken

This happens because both CRM and Sales share the sales teams view, yet
CRM's override of the model adds a selection_add to the
dashboard_graph_model selection field, when it is uninstalled, records
whose dashboard_graph_model field are set to one of the values
introduced by CRM keep this no-longer-valid value and upon accessing the
view it crashes.

This is a known limitation of selection fields and the selection_add
feature.

To solve this, an uninstallation hook has been created for CRM which
will fetch all records whose dashboard_graph_model is set to
`crm.opportunity.report`, and update the field of all these records to
None (NULL).

Fixes #25363
2018-06-22 09:18:51 +02:00
len-odoo f557f34b75 [FIX] website_sale: set confirmation mail template setting to readonly
In website_sale setting, there is a field 'Confirmation Email' that is not used,
and which purpose is to have a conveninent link to edit the mail templates.
Since it is an editable setting, this confuses the users.
It was in readonly before commit:
https://github.com/odoo/odoo/commit/65a7531c8b5c713969e49a5fab9d4672524c3ba8#diff-3f25fe0e27881e9c6655bbb6974c84abR59
which removed the readonly without any apparent reason.

We put it back into readonly mode.

opw 1860167
2018-06-22 08:24:26 +02:00
Arnold Moyaux 1740b179bf [FIX] stock: resupply propagate pull rules
Use case to reproduce:
- Create a production warehouse that manufacture and a supply warehouse that deliver your product (manufacture and supply dist. WH checked on prod WH.)
- Create a product with a BoM and resupply, MTO and manufacture checked on its routes.
- Modify the resupply pull rule that go from prod/WH to transit location
from MTS to propagate
- Create a Quotation and confirm it.
The user error 'no procurement rule found' is raise.

It happens because the move from customer to Prod/WH are correctly
created but the rule manufacture is not found. It couldn't be find
due to a wrong warehouse on the stock.move. The pull rule use the
supply warehouse instead the warehouse that they serve when they
generate the stock move value.

This commit remove the propagate_warehouse_id on the second rule between
the stock location and the transit location.
2018-06-21 16:21:54 +02:00
Christophe Simonis c5ed372970 [MERGE] forward port branch saas-15 up to 152d42041e 2018-06-21 10:57:42 +02:00
Nicolas Martinelli 1fe119da3b [FIX] barcodes: nomenclature
Loads the barcode nomenclature only if one has been is defined. Indeed,
from commit 80e89c7a11, the POS config unset the
`barcode_nomenclature_id` field if the barcode support is not activated.

opw-1859928
2018-06-21 10:40:59 +02:00
Nicolas Martinelli 0aa2bc0acf [FIX] point_of_sale, sale_mrp, sale_stock: sort moves
`sorted` returns a new sorted recordset, but doesn't modify the actual
one. Therefore, the current code doesn't work as expected.

opw-1824734
2018-06-21 10:31:06 +02:00