Commit Graph
128845 Commits
Author SHA1 Message Date
jem-odoo 76f01bfe8c [FIX] project: better computation of hours to close a task
Before this commit, the number of hours the task is
open is computed using the resource calendar. The same
measure expressed in days simply divide the number of
hour by 24. This is not what we intend: we want to know
the number of working days since the task was created,
and not a simple conversion from hours to days.

Task-37561

closes odoo/odoo#30092

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-08-13 12:16:26 +00:00
jem-odoo f499166df0 [REF] resource: move code from mixin to calendar
This commit simply moves methods from the resource
mixin to the calendar, so it can be use without having
a resource.
Indeed, in some case, we want to know the duration (in
days and hours) according to a working calendar without
any resource attached (typically services using a
working calendar).

Task-37561
2019-08-13 12:16:26 +00:00
Kevin Baptiste f9fafcdcfb [IMP] hr: improve employee profile usability (back2basics)
Improve the usability of the employees profile / "My Profile"

TaskID: 2048672

closes odoo/odoo#35587

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-13 13:00:40 +00:00
RomainLibert 39a0162b80 [IMP] hr_holidays: Improve general UX (back2basics)
TaskID: 2048892

closes odoo/odoo#35541

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-13 13:35:17 +00:00
Thibault Delavallée fad9a64181 [FIX] mail: fix typo in variable name
Shame TDE, shame !

closes odoo/odoo#35693

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-13 12:57:41 +00:00
mcm-odoo 49bd48ccd2 [IMP] website_slides: make course picture editable in frontend
Purpose of this commit is to allow website designers to change course images
directly from front-end.

Task 2026846
2019-08-13 12:57:19 +00:00
Lucas Lefèvre bb55252b67 [FIX] hr: Display company in form view
The company of an employee should be displayed
in a multi company setup.

closes odoo/odoo#35680

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-13 09:14:35 +00:00
RomainLibert 1ca4c49ca1 [IMP] hr: synchonize image_1920 depending on self edit setting
Currenty if the self edit setting is deactivated, a user has to be
hr_user in order to change its employee image through the employee
profile.
The problem is that if the image on the employee is currently
not set, we should copy it through the employee profile whatever the
setting value

closes odoo/odoo#35542

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-13 12:50:21 +00:00
Sébastien Theys 67e3924bfe [IMP] tools, product, website_sale: rename image_variant_max
Follow up of 58a2ffa26f

Variant specific field `image_raw_original` was meant to be renamed to
`image_variant_1920` instead of `image_variant_max` to follow the same naming
convention as the other fields (having the pixel number in the name).

closes odoo/odoo#35493

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-06 12:29:13 +00:00
jbm-odoo 853a773ee4 [IMP] settings: Improve general UX (back2basics)
TaskID: 2043133

closes odoo/odoo#35382

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-13 12:32:30 +00:00
Sébastien Theys 054baf94a6 [IMP] product: improve constraints & messages on attributes & values
Usability improvements:

- Prevent the user from doing actions that will lead to exceptions.
- Improve error messages when exceptions do happen.

Also add more constraints to keep the database in a consistent state.

task-2035609

closes odoo/odoo#34833

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-09 12:49:31 +00:00
Romain Derie fae0579106 [FIX] sale_coupon: remove em tag from report
In master, em tag are not displayed in PDF report.
Strangly, the space to display the element is taken but the element content is
invisible.
If the action report is change from PDF to HTML, the element is displayed as it
should, in italic.

As having `Code:` in italic is not that mandatory, this commit removes the em
tag to display `Code:` again.

closes odoo/odoo#35685

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-13 10:42:26 +00:00
svs-odoo e4ac262c98 [IMP] stock: paste multiple SN in lot_name field
When user doesn't use automatically generated move lines, he/she can
copy a list on Serial Number in the `lot_name` field, it will create a
new move line for each value with the corresponding `lot_name`.

Also, as we need a line break char to split the field value, we need the
field is a testarea as a simple input can't have value with breaklines.
So, the `lot_name` need to be a field text instead of char.

Task #2028780

closes odoo/odoo#35532

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-08-13 09:07:48 +00:00
svs-odoo 1d675780c2 [IMP] stock: adapt assign serial numbers
In detailed operation view, the method to generate and assign multiple
SN numbers will create a move line depending of the SN name the user
defined and the number of SN to generate. These features are only
accessible if picking option "Pre-fill Detailed Operations" is disabled.
Also, hides the quick "Assign Serial Numbers" button in the same case.

Task #2028780
2019-08-13 09:07:48 +00:00
svs-odoo a831e01464 [FIX] stock: don't display precreated moveline
For picking of type receipt, don't display pre-created moveline so user
are encouraged to create move lines instead of modify the existing ones.

Task #2028780
2019-08-13 09:07:48 +00:00
svs-odoo 08fec2cd42 [IMP] stock: new move lines take putaway location
When user create a new move lines, if a putaway is applyable, the
default `location_dest_id` will be define from the putaway.

Task #2028780
2019-08-13 09:02:51 +00:00
Simon Lejeuneandsvs-odoo 1d9ffe45be [REF] stock: hide show reserved option on form view
This way we keep the current behavior of the barcode client action but
we don't display move lines on receipt.

Users could edit the view, display "show_reserved" and check it to get
back the old behavior in the form views.

task-2028780

Co-authored-by: svs-odoo <svs@odoo.com>
2019-08-13 09:02:51 +00:00
Simon Lejeune 01b052d7db [REF] stock: show reserved set as false on receipt picking type
task-2028780
2019-08-13 09:02:50 +00:00
Simon Lejeune ffd5d5a097 Revert "[REM] *: removes 'show reserved' Picking option"
This reverts commit 8d33cd1268f1119ede1a2e5a3465ee8a4dafc6fb.
2019-08-13 09:02:50 +00:00
Robot Odoo 47d50dba22 [MERGE] web, various: improve ribbon widget and its use
PURPOSE

Have a nice ribbon widget to display state of records: part II

SPECIFICATIONS

A POC for a new ribbon widget has been recently introduced at 02fbb73.
It adds a ribbon on the top right of a form to make some status more visible
and more user friendly. This commit greatly improves the design of this
ribbon in order to have a real ribbon.

You have to specify the text attribute to show the text on the ribbon.
You can also specify a bg_color attribute to color the background with a
bootstrap background color class according to the business meaning of the
flag displayed in the ribbon.

CRM: Replace Won / Lost bootstrap badges by ribbon widgets in lead /
opportunity form view.

Various: Next to 883c96b and recent ribbon widget update some form
views have to be updated. It is best displayed following those rules

* after oe_button_box in order to fix overlapping;
* before image to overlap it cleanly;

LINKS

Task ID : 2032621
PR : #34662

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-13 15:52:52 +02:00
Mohammed Shekha d4de4cd94a [FIX] survey: handle error.datetimepicker in survey's datetimepicker
Purpose of this commit is to handle error.datetimepicker event of
datetimepicker element. If not handled then window.onerror will handle it and
give unexpected warning via crashmanager. Note that this issue comes from commit
e6d4ab84da which binds window.onerror in frontend
also and hence uncaught javascript error is also handled by it.

As we do not want to raise crashmanager if user enters wrong value in
datetimepicker let us handle it in survey.js correctly.

Task 2044512
Also see https://github.com/odoo/odoo/pull/32132

closes odoo/odoo#35609

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-13 12:07:34 +00:00
Patrick Hoste 175994cbe2 [FIX][IMP] various: correctly place ribbon widget in form views
PURPOSE

Have a nice ribbon widget to display state of records: part II

SPECIFICATIONS

Next to 883c96b781 and recent ribbon widget update some form views
have to be updated. It is best displayed following those rules

  * after oe_button_box in order to fix overlapping;
  * before image to overlap it cleanly;

LINKS

Task ID : 2032621
PR : #34662

Task
2019-08-13 11:29:44 +00:00
Patrick Hoste c52c8da491 [IMP] crm: replace Won / Lost bootstrap badges by ribbon widgets
PURPOSE

Have a nice ribbon widget to display state of records: part II

SPECIFICATIONS

Replace Won / Lost bootstrap badges by ribbon widgets in lead / opportunity
form view.

LINKS

Task ID : 2032621
PR : #34662
2019-08-13 11:28:55 +00:00
Patrick Hoste 82d563b035 [REF] web: make ribbon widget great and user friendly
PURPOSE

Have a nice ribbon widget to display state of records: part II

SPECIFICATIONS

A POC for a new ribbon widget has been recently introduced at 02fbb737b9.
It adds a ribbon on the top right of a form to make some status more visible
and more user friendly. This commit greatly improves the design of this
ribbon in order to have a real ribbon.

You have to specify the text attribute to show the text on the ribbon.
You can also specify a bg_color attribute to color the background with a
bootstrap background color class according to the business meaning of the
flag displayed in the ribbon.

LINKS

Task ID : 2032621
PR : #34662
2019-08-13 11:28:51 +00:00
fja-odoo 20efea970a [IMP] *: display some onchange warning with notif
* = base, web, sale, stock, sale_stock, stock_account

Warnings for the onchange now takes a type to know if it needs to be
displayed with a notification. Else it is displayed with a dialog
notification (like before).

Related to https://github.com/odoo/odoo/pull/32132 and
https://github.com/odoo/odoo/pull/35209

Part of https://github.com/odoo/odoo/pull/35342

task-2047628

closes odoo/odoo#35342

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-09 15:47:09 +00:00
fja-odoo 79d7904b4f [FIX] web: fix the display of one line warning
Warning message without breakline were not displayed correctly using pre
tag.

Related to https://github.com/odoo/odoo/pull/32132 and
https://github.com/odoo/odoo/pull/35209

Part of https://github.com/odoo/odoo/pull/35342

task-2047628
2019-08-09 14:17:31 +00:00
fja-odoo 83310f4404 [IMP] *: change title and subtitle of warnings
* = portal, test_website, web, website

The title will now be "Someting went wrong." and we will no longer
display the error type as it is not usefull info to the user.

The message of the warning modal was not displayed right if too long.
Now it will be displayed properly.

Related to https://github.com/odoo/odoo/pull/32132 and
https://github.com/odoo/odoo/pull/35209

Part of https://github.com/odoo/odoo/pull/35342

task-2047628
2019-08-09 14:17:31 +00:00
fja-odoo 9c3fe4aae2 [IMP] web: keep toast open when hovered
Previously non sticky toast were automaticaly closed after a delay.
Now while a toast is hovered it will stay open and when the cursor
leaves the toast, the delay is reset.

Related to https://github.com/odoo/odoo/pull/32132 and
https://github.com/odoo/odoo/pull/35209

Part of https://github.com/odoo/odoo/pull/35342

task-2047628
2019-08-09 14:17:30 +00:00
Hetashree Chauhan 0cc30bf083 [IMP] sale(_*): replace confirmation date with order date
* pos_sale, sale, sale_crm, sale_management, sale_stock, website_sale

Purpose of this commit is replace the confirmation date field with
order date from sale. As order_date and confirmation_date of sale order
are having same value so no need to keep two fields, remove confirmation
field and instead use order date.

cretae_date use as order Date and replace the order_date on confirmation
of the order as confirmation date.

task-2027274
closes: #34571

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-08-13 09:40:12 +00:00
Romain DerieandPratima Gupta e87cec8c49 [IMP] sale_coupon: allow discount on multiple specific products
Before this commit, a discount could only target the whole order, the cheapeast
product or a specific product.

With this commit, it becomes possible to select multiple specific products.
This will ease some realistic ecommerce flows.

For instance, one might create a promotion targetting all his bikes by simply
adding all bikes products into the specific products field. This is easily done
with the many2many widget on the form view.

task-33737

closes odoo/odoo#35500

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>


Co-authored-by: Pratima Gupta <pgu@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
2019-08-13 09:21:52 +00:00
Romain Derie 779e47caf3 [FIX] sale_coupon: finish renaming products from b62ebab58
Commit b62ebab58 refactored "all the brol" but left half the occurences
untouched.
It was therefore hard to read and understand the tests as the same items would
be referenced with 2 names.
2019-08-13 09:21:52 +00:00
Mathieu Duckerts-Antoine 52181a2219 [FIX] web: favorites have unique descriptions
In the favorites menu, it was possible to create two
favorites with the same name (contrarily to the
specifications). The root cause of the problem was that
the submenus of the favorites menu were not updated at
all. This commit fixes that situation.

closes odoo/odoo#34902

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-08-13 08:18:16 +00:00
Mathieu Duckerts-Antoine 397e00f181 [FIX] web: toggle favorite correctly updates other filters status
When toggling a favorite filter, the options used by
the active date filters/groupbys and the field created
via autocompletion were not correctly cleared, leading
to strange situations. This is fixed by this commit.
2019-08-13 08:18:16 +00:00
Mathieu Duckerts-Antoine ff70f9683f [DOC] web: update search view documentation on filters.
Document the changes brought by a previous commit
that modifies the date filters functioning.

Task ID: 2028787
2019-08-13 08:18:16 +00:00
Mathieu Duckerts-Antoine 6d4ac56b0f [IMP] *: adapt xml files to new date filters functioning
A previous commit modifies the way in which
date filters work in the Filters menu.
In particular, the attribute default_period of filters
with date attribute cannot take anymore values
like 'this_week', 'last_7_days',...

This commit modifies the xml acoordingly by replacing
the attributes date and default_period by a suitable
domain.

Task ID: 2028787
2019-08-13 08:18:15 +00:00
Mathieu Duckerts-Antoine d561868bfa [IMP] web: review date filters and groupbys functioning
This commit modifies the functioning of date filters
in the control panel Filters and Group By submenus.

For a filter with date attribute set, the list of
proposed options is shorter but allows a bigger set of
domains to be quickly created (through combinations of the options).
The resulting list of domains is different of the previous one:
domains like "Today" or "Last Week" are left aside but many others
(and their unions) are now accessible.
The domains generated in that way are no more dynamic but it is still possible
to save dynamic filters in general.

This commit also reintroduces the multi selection of options for groupbys of type
date/datetime in the groupby menu.

Task ID: 2028787
2019-08-13 08:18:06 +00:00
Alexandre Kühn 7d8977182b [IMP] web:tests: patch Date.now
Before this commit, when we use `testUtils.patchDate`,
the function `Date.now` was not using the fake date for reference.

This is an issue with the lib momentjs, which instantiate the
current date as follow:

```
new Date(Date.now())
```

Because of this, we were handling patched date and unpatched moment
objects.

Task-ID 1902848
2019-08-13 07:57:10 +00:00
Nathan de Pryck 02903076c9 [FIX] iap: multi-company for iap account
If "force_create" is false and no account was
previously create, the function will raise an
error. With this fix, an empty recordset is
returned.

closes odoo/odoo#35664

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2019-08-13 08:11:05 +00:00
William Henrotin fff2a30afb [IMP] sale_stock,sale_mrp: available quantities on sales order
Selling a product you don't have in stock anymore triggers a message
without pertinent information about available quantity.

This commit adds a little widget on sale order line to inform the salesman
there are not enough quantity available. Clicking on it will reveal:
* The estimated delivery date
* The actual quantity on hand
* The quantity forcasted at the estimated delivery date

For kit product, the quantities are the maximum occurence of kit available
regarding components quantities.

Task 2003485

closes odoo/odoo#34336

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-08-13 07:54:38 +00:00
Simon Lejeune c2c9d6d143 [FIX] stock: virtual_available and to_date
When updating the schedule date of a picking, the schedule dates of its
stock moves are updated. However, their date field isn't. According to
the help of the date field, its value should be equal to the
expected_date field until the move is done. That's probably why the
virtal_available computed field only take care of the date field its
`to_date` domain.

As this is a long standing issue, it seems safer to adapt the computed
field's domain instead of fixing the date should be equal to expected
date until done thingy.

task-2003485
2019-08-13 07:54:38 +00:00
William Henrotin d32f21cbc8 [IMP] stock: forcast report improvements
The forecast report added in b311d9c always shows the stock in all locations
even in multicompany/multiwarehouse.
This commit change the SQL query that gather the product quantities over
time to take the warehouse into account and be able to filter on it.

regarding stock.move, the warehouse is the source location one in cast of outgoing
move and the destination location one in case of the ingoing move.

Furthermore, the SQL query doesn't filter the product on their type. That
means a stock move on consumable product will be shown even if this product

Task : 2003485
2019-08-13 07:54:38 +00:00
William Henrotin bbd8d31cdd [IMP] stock: introducing free quantity on products
The stock module adds 4 quantities on products:
  Quantity on hand
  Incoming quantity
  Outgoing quantity
  and Forecast Quantity

Forecast Quantity is equals to Quantity on hand + Incoming quantity -
Outgoing quantity. Those two last ones are computed from the open stock
moves wainting to be validated but the reservation is not taken into account.
This commit introduces a fifth quantity 'free_qty' that acts like the forecast
one but only with reserved quantities.
2019-08-13 07:54:38 +00:00
Arnaud Baes 47bb7ab3f5 [FIX] mrp: Context parsing error on MO's picking_type.
Follow up of revision https://github.com/odoo/odoo/commit/fd6aa428ce7b7ab03ba920b1c020f5862f56f731.

TaskID: 2052332

closes odoo/odoo#35660

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-08-12 14:38:31 +00:00
Christophe Monniez 1fc62ae3e5 [FIX] web: remove white spaces in ttf file names
Since ed18095127, some google fonts are included. The "Open Sans" fonts
prevents RPM packaging to work because of white spaces in file names. This
is a Python setuptools bug (https://bugs.python.org/issue809163) which is
not yet fixed.

With this commit, the "Open Sans" directory and ttf files are renamed
into "Open_Sans", solving the packaging problem.

closes odoo/odoo#35661

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-08-12 14:48:12 +00:00
Sébastien Theys 3620cb68a0 [FIX] mail, portal, account: clean up portal attachment
Follow up of 61de1c263a

- Remove the dangerous **kw from the route in favor of specifying useful args.

- Use the existing method to link attachments to message instead of duplicating
the logic in an incomplete manner.

- Fix an issue where the actual email would not be sent if the message was empty
but an attachment was defined.

- Ensure the send attempt is done immediately instead of after the cr commit.
The goal is to show potential error messages correctly to the user with the
crash manager instead of a generic error page.

This also increases the send timeout and prevents the error in the first
place in most situations.

closes odoo/odoo#35263

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-12 16:27:00 +00:00
Robot Odoo 7cb3972b10 [MERGE] website_slides: improve daily use and onboarding of eLearning
PURPOSE

Improve daily use of eLearning by improving backend actions (notably
attendees management) and performing a back2basics improvement
flow on front-end (duration computation, allow to install surveys directly
from frontend for certifications, various design improvements).

SPECIFICATIONS

See sub commits and tasks for more details.

LINKS

Task ID 2045620 (PR #35415) allow to remove attendees from backend
Task ID 2007294 (PR #35516) better duration computation
Task ID 2026846 (PR #34592) onboarding and back 2 basics

closes odoo/odoo#35635

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-12 19:12:13 +02:00
mcm-odoo 2ab0bd3236 [IMP] website_slides: add button to install Surveys application in Slide Upload modal
PURPOSE

Ease discovering of eLearning features by allowing to install surveys
directly from frontend in order to allow certification.

SPECIFICATIONS

Add a button in Upload a document to install Surveys. This button only
appears if surveys is not installed.

When button is clicked, ask for confirmation before installing survey.

LImitate this feature to group system: system people should see the button
and use standard ACLS about module installation.

LINK

Task ID 2026846
2019-08-12 15:40:36 +00:00
mcm-odoo 9554e9d3f8 [IMP] website_sale_slides: make course price editable in frontend
The price is now shown for people that can publish and editable with
"editor and designer" or "sale manager" rights like in eCommerce.

Task 2026846
2019-08-12 15:40:36 +00:00
Aurélien Warnon 5e4f37a1f8 [REF] website_slides: remove index_content field from slide.slide
The 'index_content' field was only filled when uploading from the frontend.
That would lead to inconsistent results when creating/updating 'presentation' slides from the slide.slide form view.
The field was also not cleaned if the slide content changed.

As it's usage was not very clear (only on a 'search', and not very intuitive), we simply removed the field.
2019-08-12 15:40:36 +00:00
Aurélien Warnon 5269d8c27f [REF] website_slides: improve duration computation of a slide/course
The completion time of a slide now has default values for slides of type

  * video (duration of the YouTube video);
  * PDF (number of pages * 5 minutes);

This computation is done when uploading a slide in frontend or by an onchange
in backend. Field can still be given / modified by elearning people as
result may not be reliable (pdf parsing is not accurate, and/or you may
estimate time differently from strict page-based computation).

The course will sum up all durations of its (active) slides. Display has been
changed from "x minutes" to "x hours y minutes".

Task ID 2007294
2019-08-12 15:40:36 +00:00