Commit Graph
117020 Commits
Author SHA1 Message Date
jem-odoo 7f736f8db6 [FIX] hr_timesheet: avoid rounding error
When adding a timesheet with a number of minute that has many
decimal (once converted into float), the planned_hours field
might be recomputed. So, it might be a rounding error during
this recomputation, making the field value change. Since this
field is tracked, a message is post in chatter (like Planned
Hours: 50 -> 50.0033333"), which is not useful ...

opw-1849693
2018-05-30 16:22:45 +02:00
Thibault Delavallée ed0202df18 [FIX] hr_holidays: improve leave summary view
* order leave summary entries by date descending in order to ease HR
   leave officers and managers daily job;
 * reorder list view of summary entries and add the employee to have
   more relevant information displayed;

Linked to task ID 1853352, feedback from internal use.
2018-05-30 13:55:00 +02:00
Thibault Delavallée f59af61801 [IMP] hr_holidays: add a description on hr.leave.report
This is a good practice to always have a description set on models.

Linked to task ID 1853352, feedback from internal use.
2018-05-30 13:54:56 +02:00
Thibault Delavallée 146a8329b4 [FIX] hr_holidays: reorder fields in leaves search view to search on employee first
Because this is important. Otherwise people don't understand and begin
eating too much stuff, leading to the parking having holes because of
overweight. Also penguins. And crabs.

Linked to task ID 1853352, feedback from internal use.
2018-05-30 13:54:47 +02:00
Géry Debongnie aaea6fd088 [FIX] web: small performance fix in calendar view
In some cases, the calendar view sends a trivial domain, such as
["partner_id", "not in", []]

This is clearly not really useful, and it could hurt performances in
some cases (for example, if the partner_id field is a related on a large
table, and non stored).

This is clearly not a complete fix, but it is easy, safe and does not
hurt.
2018-05-30 11:47:06 +02:00
Christophe Simonis a2f275dfc4 [MERGE] forward port branch 11.0 up to 4ea3838d89 2018-05-29 20:00:31 +02:00
Christophe Simonis 4ea3838d89 [MERGE] forward port branch saas-15 up to 6be9593a0c 2018-05-29 19:24:08 +02:00
Christophe Simonis 6be9593a0c [MERGE] forward port branch saas-14 up to 459efb4276 2018-05-29 19:02:43 +02:00
Christophe Simonis 459efb4276 [MERGE] forward port branch 10.0 up to 2288a89564 2018-05-29 18:45:00 +02:00
Christophe Simonis 2288a89564 [MERGE] forward port branch 9.0 up to ea0fcd52d9 2018-05-29 17:52:20 +02:00
pimodoo fedec79a8b [FIX] base: missing rng attribute 'force_save' on fields
Th view validation when attribute force_save is set on a field raise an
'Invalidation error' because there is no rng attribute for 'force_save'.

This attribute disappeared during the refactoring in rev: https://github.com/odoo/odoo/commit/70942e4cfb7a8993904b4d142e3b1749a40db806
2018-05-29 17:18:49 +02:00
Martin Trigaux dcd708d133 [FIX] web_planner: add missing context
To have the translated version of tooltip_planner displayed

opw-1850066
2018-05-29 14:34:13 +02:00
Odoo Translation Bot ca653c8c44 [I18N] Update translation terms from Transifex 2018-05-29 14:14:28 +02:00
Goffin Simon f349d2f3ab [FIX] mrp: A traceback was raised when creating a warehouse
When creating a warehouse, a traceback was raised if the xml_id: mrp.route_warehouse0_manufacture
was not found.

opw:1852761
2018-05-29 14:14:24 +02:00
Goffin Simon b5ea61bf72 [FIX] product: Print "Products Labels"
The number of characters must be taken into account to print the
barcode. With 13 characters -> EAN13, with 8 characters -> EAN8 else
-> Code128

Backport of 12b11c1e6f

opw:1849965
2018-05-29 14:06:06 +02:00
Lucas Perais (lpe) 94a7bef5db [FIX] web: domain evaluation in parented m2o in o2m list
Model A has a o2m to model B
Model B has a m2o parent_id on B

In A's form, add a B item,
then in the m2o, create record
Save and New
Click on the m2o

Before this commit, the python crashed on name_search.
This was because we sent the virtual ids to it

After this commit, there is no crash

OPW 1850212
closes #24948
2018-05-29 13:44:23 +02:00
Richard Mathot c88da086b5 [FIX] hr_holidays: missing model renaming/split after a0f4f6548b 2018-05-29 13:34:52 +02:00
Nicolas Martinelli 32821843c4 [FIX] payment: pre_msg
The `pre_msg` field was removed from the payment process in commit
14081b848f. We hide the field since it is confusing for end users. A
proper refactoring will be done in master.

opw-1849413
2018-05-29 13:02:39 +02:00
Goffin Simon 12b11c1e6f [FIX] product: Print "Products Labels"
The number of characters must be taken into account to print the
barcode. With 13 characters -> EAN13, with 8 characters -> EAN8 else
-> Code128

opw:1849965
2018-05-29 12:27:58 +02:00
qdp-odoo 7bd1694008 [FIX] hr_payroll: removed deprecated-and-broken menuitem 2018-05-29 10:44:56 +02:00
Goffin Simon fce72f902e [FIX] delivery: Translate the delivery method on SO line
In this way the name of a delivery method can be translated on a SO line.
Inspired from function 'product_id_change' in model 'sale.order.line' where
the description of a SO line must be in the language of the partner.

opw:1849656
2018-05-29 10:11:00 +02:00
Josse Colpaert eabcb9ff1a [FIX] stock_account: setting standard price with multiple real-price outs with negative quants fixes #24925
Somehow the function treated multiple records with
 the new api translation from 9 to 10.

Steps to reproduce:
This applies to delivery orders and manufacturing orders. As an example:

Create an MO with 2 products on the BOM
Both products must have real time costing with FIFO
The first product on the bom must not be available
For the second product on the BOM, the standard_price must be different from the cost of the next quant to be consumed
Complete the MO, letting the first product result in a negative quant
Current behavior:
The standard_price of the second product on the BOM does not get updated.

Behavior after this fix:
The standard_price of the second product on the BOM gets updated.

Thanks to matt454357.
2018-05-29 08:24:02 +02:00
Lucas Perais (lpe) 9654f6b8e0 [FIX] web: o2m editable decorated, paged, ordered supports adds/cancel
Have a decorated (conditional on field) editable list, with a default_order.
Have more records than the pager allows.

Add an item, and hit escape to cancel addition.

Before this commit, the cancellation crashed because the first record on the other page
was trying to evaluate the decoration for its row, which is wrong in the first place.
This was because creating a record increases the limit of the list, to be able to see the record
being created.
At cancellation though, that limit was never decreased.

After this commit, the whole flow happens without problem.

OPW 1844495
closes #24682
2018-05-28 17:25:51 +02:00
Arnold Moyaux 575b8f3764 [FIX] stock: Diplay return in tracability report
Since saas-11.2 stock_tracability refactoring do not use
level on moves orig/dest and filter on return is
not usefull anymore. It should display all return order
by date.

This commit remove the codition on the return inside the search
on move lines.
2018-05-28 15:46:10 +02:00
qsm-odoo ea0fcd52d9 [FIX] web_editor: properly save a t-field in a t-ignore environment
When a t-field element was in an editable t-ignore environement,
modifying it was leaving the edit mode style attached to it. This
was because of:
1) When the t-field element was changed, it was marked dirty but
   also its parent editable container. Fixing this, only solves
   the case where only the t-field (and not one of its neighbors)
   is changed but it was worth fixing anyway.
2) Before saving an element, the potential 'o_editable' and
   summernote classes were not removed of its descendant and were
   thus saved.

Bug found with task-38069, merged in stable as it might occur there
too.
2018-05-28 12:20:07 +02:00
Aaron BohyandAdrien Dieudonne 2aeb763768 [ADD] im_support
This rev. adds a new module enabling the livechat support from
the webclient. It allows employee users to communicate with
livechat operators of another database, assuming that a counterpart
addon is installed on that database.

Task 26762

Co-authored-by: Adrien Dieudonne <adr@odoo.com>
2018-05-28 07:30:12 +02:00
Aaron Bohy 10161f9d61 [FIX] bus: co-existing instances of bus.bus
Before this rev., it was not possible to have co-existing instances
of bus.bus, each one polling its own server, for several reasons.

First, the Bus class couldn't be overridden or parameterized to
specify which server and route to call to perform the longpolling.

Second, when several instances of bus.bus coexisted, their use of
the localStorage (for the CrosstabBus) conflicted, and as a result,
only one of them actually polled.

This rev. makes it possible, and it was necessary for the new addon
'im_support'.

Task 26762
2018-05-28 07:30:12 +02:00
Aaron Bohy 5aa0e0bc24 [FIX] web: Controller: concurrent control panel updates
Let's assume the following scenario: in a kanban view with a
domain, remove that domain and quickly click on a record to open it
in form view. On a slow network, it may happen that the reload of
the kanban view (triggered by the domain change) returns after the
load of the form view.

Before this rev., when this happened, the form view was correctly
displayed but the control panel contained the buttons, searchview,
pager... of the kanban view.

Note that this fix is quite ugly, but it won't be necessary anymore
as soon as the control panel won't be shared between actions and
controllers, i.e. as soon as each controller will have its own
control panel.
2018-05-28 07:24:16 +02:00
Odoo Translation Bot 01d024d2d5 [I18N] Update translation terms from Transifex 2018-05-27 07:03:37 +02:00
Odoo Translation Bot a89e46fdc0 [I18N] Update translation terms from Transifex 2018-05-27 04:10:26 +02:00
Odoo Translation Bot 63401868a5 [I18N] Update translation terms from Transifex 2018-05-27 00:26:12 +02:00
qsm-odoo 38ac59871e [FIX] portal, web_editor: keep BS 'img-responsive' *opt-in*
Bootstrap 'img-responsive' behavior was opt-in for a reason but commit
https://github.com/odoo/odoo/commit/f79b00c3b71e02f73537cb17285a6902fc0906b5
tried to defy that anyway. This would break existing client databases
... or at least our odoo.com.

This commit adds the img-responsive class for *new* *editor* images
(still with inline-block display), preventing breaking libraries or
custom (prod) images.
2018-05-25 17:58:54 +02:00
Fabien Meghazi 32c5392f5f [ADD] http: addons preload opt-out for socket activation
Before this patch, early connections made to a 11.0 Odoo server running
on Python 3 and deployed in threaded mode with socket activation would
generate invalid registries.
With this patch it is now possible, when this deployment mode is used,
to opt-out addons preload by setting the following environment variable:

    ODOO_PRELOAD_ADDONS=no

Note: this environment variable is only available for v11.0 as later
versions does not preload anymore (cf: 1a39c9b)
2018-05-25 15:33:31 +02:00
Nicolas LempereurandGoffin Simon 7703f1fb16 [FIX] mass_mailing: have unsubscribe in multi lang
Since 953a693df link not corresponding to a route are tought multilang
by default.

Thus in the mass mailing, if the user had not the default language on
the website he would have eg. a /fr_FR/unsubscribe_from_list placeholder
in the mail.

The placeholder is replaced by a real link pinpointing to the items the
given person would unsubscribe to, but having /fr_FR/ part prevented
that.

With this PR, there is a dummy route so /unsubscribe_from_list is
explicitely known as not multilang.

opw-1850696
closes #24912

Co-authored-by: Goffin Simon <sig@odoo.com>
2018-05-25 12:16:30 +02:00
Christophe Simonis 58e3552246 [MERGE] forward port branch 11.0 up to 2ca7296000 2018-05-25 11:50:02 +02:00
Christophe Simonis 2ca7296000 [MERGE] forward port branch saas-15 up to dbb2b9bf73 2018-05-25 11:08:39 +02:00
Aaron Bohy 04ba755f82 [FIX] web: AbstractController: handle concurrent reloads
Let's assume the following scenario in a Kanban view with a default
filter. The user removes the filter, and quickly adds a new one.
On a slow network, it may happen that the second reload request
returns before the first one. On odoo.com, this is easy to
reproduce on the tasks Kanban view.

Before this rev., when this occured, the result of the first
request was displayed, whereas it should have been ignored as
another request was done later on.
2018-05-25 08:11:49 +02:00
Christophe Simonis dbb2b9bf73 [MERGE] forward port branch saas-14 up to cafe56da80 2018-05-24 19:40:05 +02:00
Toufik Benjaa b2aab354c4 [FIX] payment: Remove lang when creating payment transaction
- Having a lang set when trying to create a payment transaction can cause issues due to uninstalled langs on the database.
2018-05-24 19:24:26 +02:00
Christophe Simonis cafe56da80 [MERGE] forward port branch 10.0 up to 3051d1dd2f 2018-05-24 18:24:12 +02:00
Christophe Simonis 3051d1dd2f [MERGE] forward port branch 9.0 up to 34f567dd39 2018-05-24 16:55:28 +02:00
Christophe Simonis 34f567dd39 Revert "[FIX] mass_mailing: unsubscribe not working in multi lang"
commit a3ab33f212 introduced invalid code
2018-05-24 16:50:09 +02:00
LofbergValentin 6e1b660f9c [FIX] hr_attendance: Keep the kiosk session alive
closes #1800442

Purpose
=======

Odoo sessions are expired when no action has been triggered
for the last 7 days. For kiosk mode, this doesn’t make sense.

It means that once a week, a person with the rights to the
employee under kiosk mode, has to come to the screen and log in again.

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

Trigger an action to keep the Odoo session alive.
2018-05-24 16:47:12 +02:00
Christophe Simonis 299b613da3 [MERGE] forward port branch 9.0 up to 919a1af936 2018-05-24 16:31:23 +02:00
Goffin Simon f9ce42c763 [FIX] sale_timesheet: ZeroDivisionError
To avoid a division by zero.
Courtesy of @tbe-odoo

opw:1850023
2018-05-24 16:29:12 +02:00
jem-odoo 919a1af936 [FIX] purchase: correct product cost in reporting
product.product inheritS from product.template, and they both
define the 'standard_price' field, but implement it differently;
 - product: the field is a company dependent one (so non stored)
 - template: the field is a computed one based on tis variants

For the first case, since the field is not stored in database, when
doing SQL query, we have to get the value from the table ir_property.
That is what purchase report does, but instead of searching on resource
'product.product', it does it on 'product.template'. There are
obviously no entries in ir_property table for 'standard_price' field
on product template. As consequence, the "product value" (cost)
is always null in purchase reporting.
This commit fixes that by modifying SQL query to get the good
value from ir_property table.
2018-05-24 16:21:06 +02:00
Nicolas Lempereur 56e3100a0b [FIX] stock: remove return return test dead code
In saas-11.2, the traceability has been rewritten and there is no notion
of upstream/downstream, also the code tested seems to have become dead
in some instance (in particular: the one this test tested), so will be
improved soon.

opw-1845444
closes #24887
2018-05-24 15:35:58 +02:00
Yannick Tivisse 28179bc8cb [IMP] base: Add support for private addresses
This is a backport of commit https://github.com/odoo/odoo/commit/2f15a5fa647d55df36c9019df467802a3aa9b4e3

Purpose
=======

Add the possibility to create private addresses, only accessible for a subset
of users.

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

- Add a new 'Private' partner type
- Add a res.groups in base 'Access to Private Addresses'
- Add ir.rules for the following behavior:
    - Every employees/internal users can read non-private addresses
    - Only users in group_private_addresses can access private addresses
- Add in base a simplified form view for private addresses

The following points won't be backported:
- A HR Officer is automatically granted in group_private_addresses
- Use the simplified form view to open the address_home_id form on employees
That's because it requires to update 'base' to make it work. If a user only
update 'hr', this will break his instance while 'base' isn't updated.

But these modifications can be applied manually quite easily.
2018-05-24 13:53:46 +02:00
Jeremy Kersten 0179b4370b [FIX] stock: error during fwd-port 2bc6ea1b37 2018-05-24 10:01:57 +02:00
Rémi Rahir 4c08e2a945 [FIX] iap: install web_settings_dashboard along with iap 2018-05-24 09:56:02 +02:00