Commit Graph
107880 Commits
Author SHA1 Message Date
qsm-odoo f5d337680a [FIX] website: fix missed forward-port
A forward-port ported this commit:
https://github.com/odoo/odoo/commit/c12f2cd5ccc72a680ab741b4ce16d3913dd3854e#diff-473476fda8a8b38a9ee4480eb2bf2e2eR150
But ignored that a more recent one did remove the related code:
https://github.com/odoo/odoo/commit/0eafeab1#diff-473476fda8a8b38a9ee4480eb2bf2e2eL173

The result was misindented breaking code.
2017-05-12 14:12:30 +02:00
Josse Colpaert c91c3726a7 [FIX] mrp: for the cost calculation and traceability, we need to include all moves
When calculating the cost price or the traceability between the consumed
and produced quants in a production order, we need to take into account
the extra moves that are added in the action_done (move_validate)

opw-715541
2017-05-12 12:24:12 +02:00
qsm-odoo f83f9d702a [FIX] website: slideshow image gallery was not responsive
The slideshow image gallery code was quiet old and ugly. This commit
refactores it so that it works better, especially its responsiveness.

Before this commit, the number of thumbnail images was limited to 10.
If there were more images than 10, the user was able to navigate
between groups of 10 images thanks to arrow buttons. The problem is
obvious: on small devices, 10 images is too much. Now this "10" limit
is not fixed, it is determined according to the width of the browser
at the time the user loads the snippet.

Some animation and style was also wrong in some cases.
This commit was made as a 10.0 fix, the snippet should keep improving
in advanced versions.
2017-05-12 10:08:27 +02:00
Richard Mathot d994f51c60 [FIX] website_sale: hide horizontal rule if there is no availability warning 2017-05-11 18:18:25 +02:00
qsm-odoo 7fc788b694 [FIX] website_sale: "Confirm order" button had fixed width
Putting fixed width on button is obviously always a bad idea as
traduction may change the inner text size. Besides, removing the
fixed width does not change the design anyway.
2017-05-11 17:05:38 +02:00
Aaron Bohy d068c4cac1 [FIX] sale: group_sale_layout shouldn't imply group_user
Because when it does, it can create a cycle in the graph of
implied groups. This happens when the option 'Sort products
in sections with subtotals and page-breaks' is checked in the
Sales settings. In this case, being in group_user implies to be
in group_sale_layout, and being in group_sale_layout implies to
be in group_user.

This is a problem for groups display in the 'Users' form view: the
employee groups are no more linear, and thus no more displayed as
a selection field, but there is an 'Employee' section where each
of the employee group can be checked. Activating the option in the
Sales setting should have no impact of the groups hierarchy of HR.

Moreover, there have been several imilar issues on production
databases, probably due to this cycle, but that we haven't been
able to fully understand/reproduce yet: with this option in the
'Sales' settings activated, after a mysterious operation, the
'Users' form view was broken, because the selection field
'sel_groups_'for HR was still referenced in the view, but didn't
exist anymore (as HR groups weren't displayed as a selection field
anymore).
2017-05-11 15:14:07 +02:00
Aaron Bohy 067815f97d [FIX] purchase: sort order_line by sequence
Commit 9d4efc8 added the sequence field on model
'purchase.order.line' and added this field in the
tree view (with 'handle' widget), to allow to
re-order the purchase order lines in the purchase
order form view.

However, for this to actually work, the default order
on the model should be on sequence field, otherwise
the rows will still be ordered by id even if the user
changes their sequence value by re-ordering them.
2017-05-11 10:15:10 +02:00
Goffin Simon 508e5ed9dd [FIX] stock: PO line with unit_price = 0 and cost_method = 'real' or 'average'
Let's consider the stockable product P with an internal category set
with cost_method = 'real' and 'average'. When creating a PO with P
and a unit_price=0, after delivering the product, the cost transfered to
the stock valuation account  was equal to the product cost multplied by
the product quantity instead of the unit_price set on the PO multiplied
by the quantity.

PS: The quant is created with the stock.move in _quant_create_from_move and the unit_price
set on the stock.move is taken with function get_price_unit.

opw:740865
2017-05-10 15:14:57 +02:00
Goffin Simon a1aed26d52 [FIX] account: Payment cancelled when cancelling statement line
Steps to reproduce:

1. Create a payment of 999 with bank
2. Create a statement line of 1000 on bank journal
3. Go to reconcile interface, choose the 999 line and make an adjustment of 1
4. The payment has been reconciled with the statement line, and one new journal
entry has been created for adjustment of "1"
5. Cancel statement line (you need to enable this functionality on bank journal)

Bug:The payment journal entry of 999 is deleted and payment remains confirmed

After the fix: The payment journal entry of 999 is UNRECONCILED and the payment
entry still exists.

opw:741619
2017-05-10 15:10:02 +02:00
zeroheure 7a9d57bd1f [FIX] doc: various typos and missing words
Closes #16903
2017-05-10 13:54:21 +02:00
zeroheure 94f37fa9c8 [CLA] signature for zeroheure (Xavier Brochard)
Done at #16903
2017-05-10 13:54:21 +02:00
Aaron Bohy e4e2735e87 [FIX] web_kanban: traceback when quickly drag&dropping
... records on models having a sequence field (e.g. project.task).

When a record is dragged and dropped, the following RPCs are done:
 - write (the new group id on the moved record)
 - read (the moved record)
 - resequence (the column where the record has been moved to)

To perform the resequence RPC, we need to retrieve the list of ids
of the records being in the column. We do that by iterating over
the cards in the column and reading the id in their data attribute.

However, a traceback might occur if the resequence was triggered
exactly when the user was holding a record over the column being
resequenced, because jquery-ui creates a placeholder for the record
being dragged and dropped, and this placeholder doesn't have the
required data attribute.
2017-05-10 11:10:38 +02:00
Nicolas Martinelli 4e205b7549 [FIX] l10n_fr_hr_payroll: identification number
The field `ssnid` is used on the payslip. However, it is not available
in any view, therefore it is impossible to fill it.

We replace by the `identification_id`, which is the field commonly used
for identification.

opw-742204
Closes #16798
2017-05-10 09:39:35 +02:00
Martin Trigaux ecf3555dee [FIX] pad: bad reference to old menu
The configuration has moved.

Fixes #16828
2017-05-09 17:20:58 +02:00
Aaron Bohy 7e98e32959 [FIX] web: traceback when quickly clicking on back button
Before this rev., there might be a crash when the user quickly
clicked several times on the browser's back button. This crash
occurred in the code saving/restoring the scroll position of the
current action.

When clicking fast on the back button, several actions are
executed but don't wait for each other (those actions are triggered
by the hashchange event), so when it is fast, and mainly when the
appswitcher is involved, it may happen that we try to get the
scroll position of an action that isn't loaded yet.

opw~741814
2017-05-09 14:54:15 +02:00
Goffin Simon e25563dca6 [FIX] stock: Impossible to fill the partner field in mobile
The field partner_id was hidden in mobile.

opw:728272
2017-05-09 13:29:24 +02:00
Josef Kaser a37bcaa197 [CLA] signature for JosefKaser
Closes #16887
2017-05-09 13:19:26 +02:00
Raphael Collet faba6daf7c [FIX] models: attribute pool on a model's class's may be falsy but not None
Modify the test to match `None` instead of any falsy value.  The latter
triggers a bug when installing a just-deinstalled module (point_of_sale).
2017-05-09 11:31:52 +02:00
Goffin Simon 71410e3c99 [FIX] sale_mrp: function _get_bom_component_qty deleted in 10.0
The function _get_bom_component_qty has been deleted by odoo@2ddc35a
But this function was still used in 10.0 in function _get_anglo_saxon_price_unit.

opw:742462
2017-05-09 11:11:22 +02:00
Thibault Delavallée 16884487e7 [FIX] website_form: do not subscribe administrator to all records from website form
As administrator is used to create all records from website form he is
also put into followers. This creates a lot of unnecessary notifications
and/or emails depending on the system configuration.

Using the magic context key this behavior is modified. Administrator
will not follow every records created through the website form anymore.
2017-05-09 09:31:11 +02:00
Nicolas Martinelli 8d9f0c8d94 [FIX] account: double journal entry in reconciliation
- Create a bank statement for Partner A, with one line of 1000 EUR
- Open the reconciliation widget (click on "Reconcile")
- Using another browser, open the same reconciliation widget
- Create an entry for the opened balance in browser 1, click on
  "Reconcile"
- Create an entry for the opened balance in browser 2, click on
  "Reconcile"

The entries are created twice, no check is performed to verify that the
statement line is already reconciled.

opw-741824
2017-05-08 15:37:25 +02:00
Nicolas Martinelli ee6e2f5771 [FIX] sale_timesheet: new line in task description
Task description is a HTML field, therefore the new line should be
defined thanks to a line break.

opw-741240
2017-05-08 15:28:02 +02:00
Martin Trigaux 5c009b5f31 [FIX] product,stock: create a company for non-admin users
The typical multi-company record rule is
['|',('company_id','child_of',[user.company_id.id]),('company_id','=',False)]

As the company is just created, the current user does not belong to the company.
Create first without company (to still check the access rights) and after add
the company in sudo

Can not apply the same patch for stock as locations and sublocations are created
based on the warehouse company.

Fixes #16807
2017-05-08 14:41:14 +02:00
Lucas Perais (lpe) 6513658957 [FIX] account: account_invoice_report: make the calculation of product_qty right
Before this commit product quantity was computed as if the uom on the product represented the *unit* in which a product was sold
Hence, in the report, it produced something like this:
I sell 10 packages of something, which is sold essentially by 10 itself = which makes a total unitary quantity of 100
This wrong behavior has been introduced in 10.0 by 9c5d4cd60c

After this commit, the computation is done to match the *standard* unit of measure in which a product quantity is *represented*

OPW 741745

Closes #16834
2017-05-08 14:18:02 +02:00
Felix 20facf5cf9 [FIX] web_calendar: prevent crash when the color field is undefined
Add a check for the presence of color field. (only applies when "useContacts" is not set)

Before this fix, if the view xml does not set "useContacts", the calendar view fallback on the color attribute (not required) which may be non-existent on the model and on the view.
web_calendar.js:799 is using "if (color_field.type == "selection")" so its throwing this error when color is not defined:
Uncaught TypeError: Cannot read property 'type' of undefined
2017-05-08 13:41:51 +02:00
Felix 9e870d9a0a [CLA] Signature for fxkopp 2017-05-08 13:41:38 +02:00
Odoo Translation Bot 8f2722896b [I18N] Update translation terms from Transifex 2017-05-07 04:30:47 +02:00
Olivier Dony 6921da00b3 [FIX] auth_signup: properly log password reset requests 2017-05-05 17:02:46 +02:00
Olivier Dony 21482ac263 [FIX] website_mail_channel: filter correct channel type
The public mail channel controllers should only deal with
their own channel types.
2017-05-05 17:02:46 +02:00
Olivier Dony ff59e24093 [FIX] im_livechat: do not add public user to livechat channels
Public users (website visitors) do not need to be part of
a livechat channel to talk with the operator, they are using
a dedicated mechanism.
Explicitly including them is redundant and bloats the database.
2017-05-05 17:02:46 +02:00
Olivier Dony 831a2a00e3 [FIX] longpolling worker: enforce memory limits
The GeventServer process was not enforcing the
configured memory limits. In the unlikely event
of a service handling hundreds of concurrent
longpolling requests on hundreds of different
databases, this could render the Registry LRU
ineffective in keeping a low memory footprint.

Even after being evicted from the LRU, these
hundreds of registries would still be referenced
by their in-progress requests, so the memory
would not be freed. An Odoo 10 registry can
typically take 15MB of memory, so this could
become a problem.
2017-05-05 17:02:45 +02:00
Olivier Dony 5a15d97387 [FIX] tools.cache: fix stats dump with gevent
Gevent processes have pseudo-thread objects
that do no always have a `dbname`attribute.
This could crash the process upon receiving
a USR1 signal.
2017-05-05 17:02:45 +02:00
Olivier Dony 8fbbe04a50 [FIX] tools: always preload PIL with basic formats
Ensures that only the desired list of images formats are made available
via PIL: BMP, GIF, PNG, JPEG, TIFF and PPM.
2017-05-05 17:02:45 +02:00
Christophe Simonis d5cdb77717 [MERGE] forward port branch saas-11 up to b7e4ce93c4 2017-05-05 16:01:38 +02:00
Christophe Simonis b7e4ce93c4 [MERGE] forward port branch 9.0 up to c65db01eb7 2017-05-05 15:43:56 +02:00
Christophe Simonis c65db01eb7 [MERGE] forward port branch saas-6 up to 96650373f8 2017-05-05 15:34:30 +02:00
Christophe Simonis 96650373f8 [MERGE] forward port branch 8.0 up to e3081dbb7e 2017-05-05 15:31:08 +02:00
Jérome Maes e3081dbb7e [FIX] ir_cron: log message in the right place
Log message in except clause to force displaying
traceback in logger exception.

Courtesy of chs
2017-05-05 13:57:32 +02:00
Nicolas Lempereur 89ad23bc2d [FIX] web: auto_search false and search view
By default auto_search is set to `True` on window actions, this mean
that for example on a list or kanban view the records will be searched
on the view opening without any user action needed.

Setting it to `False` disable this.

Doing this had two drawbacks:

- depending on race condition, the view could be displayed before the
  search view was loaded,

- the code expected `active_search` to be present which was not the case
  in this instance.

Before 151c9074 the second issue would not happen (active_search was set
directly resolved if a search was not to be done) and this commit also
wait for the search view being ready before showing the view.

opw-741186
opw-741546
closes #16805
2017-05-05 13:31:11 +02:00
Thomas Binsfeld d7afa84169 [FIX] purchase: seller selection
- Create an article with one supplierinfo (with a delivery delay and a
  min. quantity > 0) and a customer delivery delay
- Trigger the creation of a PO by a procurement order for this article

The supplier delivery delay is not taken into account in the date order
of the PO because the seller is not selected.

This is because the procurement quantity is not sent to the seller
selection.

opw-16702
Closes #16702
2017-05-04 17:01:50 +02:00
Nicolas Martinelli 514bdcb0f1 [FIX] tools: unnecessary error logging
The limit of 64 characters on the XMLID has been removed a long time
ago. This error is therefore not necessary anymore.
2017-05-04 16:48:31 +02:00
Damien Bouvy fc06646cf9 [MERGE] forward port branch saas-11 up to e460616 2017-05-04 09:35:37 +02:00
Damien Bouvy e460616428 [MERGE] forward port branch 9.0 up to fb25735 2017-05-04 09:25:50 +02:00
SodexisTeam 8797f53174 [FIX] mrp: Propagate cancel and split
The option "Propagate cancel and split" is not set properly on the
finished products' stock move.

opw-741475
2017-05-04 08:38:20 +02:00
Goffin Simon b2ab0a8d50 [FIX] mrp: MO with a serial numbers
Steps to reproduce:

1. Create two products A and B that require a serial number
2. Create a product C with no trcking
3. Create a BOM for a A with two components B an C
4. Create a MO for A with  qty > 1
5. Check availabiltity and produce the first A
6. Record the SN for the first assembly

Bug: When producing the second assembly, it was not possible to
record the SN for the components.

opw:741316
2017-05-03 15:58:32 +02:00
Raphael Collet 77e7799d5a [FIX] registry: use a weak dictionary for model_cache to avoid memory leaks
The class attribute `model_cache` refers to model classes, which refer to their
own registry.  This cache potentially keeps all past registries alive!
2017-05-03 15:57:27 +02:00
Nicolas Lempereur 8f1cc2fadb [FIX] web_kanban: double click double action
When multiple clicking fast (and with the server not too fast), we could
end up with an error (eg. "Cannot read property 'controller' of null").

Something has been done previously to improve this when switching
between views in: fc8a4b5e. This commit do something similar to limit
multiple click on kanban records (doing it as in 26f91c429).

opw-705329
closes #16698
2017-05-03 15:29:16 +02:00
amoyaux 85e21d1725 [FIX] stock : scheduler release lock too fast
Issue: 741582

This bug happens when you click multiple time quickly on 'run scheduler' button
or if you call 'run reordering rules' and then 'run scheduler' rapidly
It could create duplicate PO or MO.

This happens because the run_scheduler function free the lock while it should
not. ProcurementSudo was created with the old cursor that contains the lock and
the record set that search returns also contains this cursor. The run will call the record set with the bad cursor and commit the lock instead of the wanted
behavior.

This commit creates the ProcurementSudo with the new cursor that does not
contains the lock.
2017-05-03 13:43:21 +02:00
Nicolas Martinelli fb257353fa [FIX] account, purchase: performance when adding PO
- Create 5 PO with 40 lines each for Partner A
- Create an invoice
- Add each PO thanks to the field "Add Purchase Order"

The process takes more and more time for each PO.

Most of the time is spent in the recomputation of the secondary fields
(in the `onchange` method of "models.py"). The root cause is the cache
invalidation due to the relational fields recomputed as superuser by
default.

opw-740485
2017-05-03 12:57:23 +02:00
Lucas Perais (lpe) 4a0f9da2e1 [FIX] board: invalidate cache when board is modified
Before this commit, when the user modified the dashboard, it was not always visible without refreshing the web client
For example, display the current dashboard, then go to another view and add an extra view in the dashboard, then go back to the dashboard.
The reason is that the dashboard layout is actually stored in the arch of a form view, and that arch is cached by the data manager.

This is why each change to the dashboard arch requires that we clear the cache.

OPW 740739

Closes #16691
2017-05-03 09:24:00 +02:00