Commit Graph
103778 Commits
Author SHA1 Message Date
Aurélien Warnon bf3ed3fc7c [FIX] website_slides: fix courses completion on user profile page
This commit fixes the courses (slide.channel) completion displayed on the user
profile page. It uses the number of completed slides instead of the percentage
of completion. This is due to the completion field having been updated
recently to store number of completed slides instead of a computed percentage
for performances reasons [1]

Commit linked to task ID 1978530 (fixes linked to internal testing).

[1] See 534822e54c
2019-05-03 09:43:27 +00:00
qmo-odoo 8af1fe54ad [FIX] website_slides: Add back the slide type icons in the lists
This commit adds back the slide type icons on the sidebar list
in fullscreen and not fullscreen mode.

Commit linked to task ID 1978530 (fixes linked to internal testing).
2019-05-03 09:43:18 +00:00
qmo-odoo fa24d7df3a [FIX] website_slides: fix join course widget selector
This commit fixes the selector for the slide_course_join widget. This issue
comes from the removal of the selector 'o_wslides_wrap' recently removed
when cleaning the DOM [1].

Commit linked to task ID 1978530 (fixes linked to internal testing).

[1] See e5c7e43c71
2019-05-03 09:43:15 +00:00
qmo-odoo f4b5b709a1 [FIX] website_profile: allow administrators to update profiles
Before this commit, only the users who validated their email could change
their own profile. In addition to that behavior we let administrators update
all profiles.

Commit linked to task ID 1978530 (fixes linked to internal testing).
2019-05-03 09:43:12 +00:00
Toufik Ben Jaa f907ffdeb9 [FIX] hr_payroll: allow to request leaves
- When having multiples contracts, at least one open and one closed, we may
  not be able to request a leave.

  This issue is triggered if the closed contract has no end date.
  The code checks if the leave you try create overlap over multiple contracts.
  But if a contract has no end date and is closed, the check may never
  succeed.

  So if a contract has no end date and is closed we don't take it in
  account.

closes odoo/odoo#32909

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-05-02 11:34:36 +00:00
Denis Ledoux fd0a10026c [MERGE] forward port branch saas-12.1 up to b11930047f 2019-05-02 09:45:14 +02:00
Denis Ledoux b11930047f [MERGE] forward port branch 12.0 up to c9913152ec 2019-04-26 18:14:18 +02:00
Gert Pellin 26c4acc761 [FIX] point-of-sale: discount line on ticket
Before this fix an extra line with the price without discount will be
printed even if there is no discount on the product.

After this fix the line will only be printed if there is a discount.

The error occured due to the use of t-else instead of t-elif.

closes odoo/odoo#32989

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-26 13:44:33 +00:00
Antoine Guenet 27eb8ba617 [FIX] web_editor, website: never indent/outdent list groups
The "comparisons" website snippet uses a list group with the class set
on a UL. In consequence, the web editor considers it as a regular list
and may try to outdent it, which is not the expected behavior with a
list group. This fix ensures that ULs with the `list-group` class cannot
be in/outdented.

closes odoo/odoo#32709

Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2019-04-25 10:03:14 +00:00
Antoine Guenet cb9263a823 [FIX] web_editor: properly merge a LI with text with a LI with text in P
A list item with text can be written as <li>text</li> or as
<li><p>text</p></li>. Issues occurred when both syntaxes need to be
merged together. Namely, the <p>text</p> was being appended to the other
list item, thereby creating a visible new line.
2019-04-25 10:03:05 +00:00
Antoine Guenet 41088bb311 [FIX] web_editor: properly handle delete in nested lists of all syntaxes
This addresses various bugs that occured with nested lists - including
lists that are nested with a UL within a LI (as opposed to a UL directly
within another UL).
2019-04-25 10:03:00 +00:00
Antoine Guenet 8e89ffb175 [FIX] web_editor: properly convert a checklist to an ordered list
The `o_checklist` class was preserved when converting a checklist to an
ordered list.
2019-04-25 10:00:43 +00:00
Odoo Translation Bot 01a5464509 [I18N] Update translation terms from Transifex 2019-04-28 06:07:42 +02:00
Sébastien Theys 26d951f7e1 [IMP] base,product,website_sale: move image fallback mixin -> variant
Backport of d3d58b60dc

Only the variant is using this code, so it was a bad idea to make the mixin
more complicated than it had to be.

Update the image tests to make sure this is working correctly. The test were
only testing the size of the images, now they also test the actual content.

Part of task-1949729

Original PR: odoo/odoo#32253

closes odoo/odoo#32814

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-25 09:01:46 +00:00
Antoine Guenet fe2496350c [FIX] web_editor: properly paste text in non-HTML fields
This resolves an issue with pasting in text only mode (no HTML): the
list of nodes to paste was being modified with the `_mergeAdjacentULs`
method which is irrelevant to text nodes. Because of that, a corrupted
list of nodes was inserted into the DOM.

opw-1962743

closes odoo/odoo#32454

Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2019-04-25 11:33:00 +00:00
Toufik Ben Jaa c42ccf2ca7 [FIX] lunch: performance issue when retrieving lunch orders
- When retrieving lunch orders for specific users, the search could take a
  long time to be resolved.

  To fix this issue we rewrote the SQL View that retrieves the
  information for lunch orders.

closes odoo/odoo#32908

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-04-24 09:56:09 +00:00
Aurélien Warnon 8c145f6407 [IMP] (website_)survey: hide header/footer when taking a certification
Purpose
=======

We need to hide header and footer of survey and website layouts when
the user is taking a certification ("certificate" field of survey.survey).

This is done to have a more "immersive" taking and avoid that the user
clicks on other links in the layout header or footer and moves to another page.

closes odoo/odoo#31503

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-24 06:40:24 +00:00
8bcb17b674 [FIX] web: grouped Kanban: traceback on click during reload
Have a grouped Kanban view with an x2many field. Interact with the
searchview, and then click anywhere.

The fetch of the x2many relational data is batched for the whole view
a single RPC for all groups) since e10fd346.

If the click occurs before all search_read are done (i.e. before the
fetch of relational data is started), there is a crash.

This is due to a call to get({raw: true}) to obtain the current model's
state, which is currently being reloaded and in an intermediate state.
Ideally, this shouldn't happen, but with the sync API of get, we can't
change that easily. So at most, we can ensure that it doesn't crash.
Moreover, sensitive functions requesting the state for the data can do
that in the mutex to ensure that the state isn't currently being reloaded.

Related to Issue: 1937149

closes odoo/odoo#32587

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>


Co-authored-by: Mohammed Shekha <msh@openerp.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
2019-04-24 07:07:41 +00:00
Aurélien Warnon 11b24c6b45 [IMP] website_sale_slides: improve course purchase flow
Slight improvement to the course purchase flow that directly redirects the user
to the checkout process when he buys a course.

closes odoo/odoo#32649

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-23 13:46:43 +00:00
Yannick Tivisse e716fabbdc [FIX] l10n_be_hr_payroll: Take Basic instead of Gross for IP part 2019-04-23 14:54:58 +02:00
Nans Lefebvre b7f4ff4b54 [FIX] hr_expense: fix payment entry of expenses paid by company
Create an expense paid directly by the company, validate and post entries.
While the account move lines are correct, the payment is not: it is always null.

opw 1962500

closes odoo/odoo#32956

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-25 13:45:47 +00:00
Lucas Perais (lpe) 61f82c077d [FIX] stock: traceability report: direct children displayed
Configure a route to be in 3 steps
make a PO, validate all three pickings
Go on the final picking, the one that has the destination to the Stock
Click on the smart button to access the traceability report
unfold as many lines as you can

Before this commit, the first picking of the whole tree (Vendors to Input)
appeared as a direct child of the final picking,
as well as a child of the intermediary picking (as it should)

- Quality > Stock
	|
	- Input > Quality
	|	|
	|	-Vendors > Input
	- Vendors > Input

After this commit, the final picking contains only the intermediary
which in turn contains only the origin

- Quality > Stock
        |
        - Input > Quality
                |
                -Vendors > Input

OPW 1970286

closes odoo/odoo#32953

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-25 12:30:43 +00:00
Denis Ledoux 7228c10884 [MERGE] forward port branch saas-11.3 up to 6fd637e131 2019-04-25 15:47:09 +02:00
Jorge Pinna Puissant 101a28b8dc [FIX] sale: allow multi-record capacity to action_done
Fine-tuning : 6b7bb096e1

closes #32944

closes odoo/odoo#32947

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-25 09:44:36 +00:00
Nicolas Martinelli 9378552a89 [FIX] stock: print Traceability Report
The Traceability Report printing option is hidden since the report is
pretty much unusable.

opw-1973161

closes odoo/odoo#32939

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-25 08:09:28 +00:00
82c13975f1 [IMP] website_sale_comparison: add test tours
Pretty much the whole module is covered by the tests in this commit:
- standard comparison, from shop, from product page
- comparison with more complicated product configuration
- the comparison page itself
- the alternative products

task-1929151

closes odoo/odoo#32901

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


Co-authored-by: Priyanka Kakadiya <pka@odoo.com>
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2019-04-24 14:54:35 +00:00
Denis Ledoux 6fd637e131 [MERGE] forward port branch 11.0 up to b71b78035b 2019-04-24 14:31:10 +02:00
Denis Ledoux b71b78035b [MERGE] forward port branch saas-15 up to 0c46c8a929 2019-04-24 10:04:05 +02:00
Denis Ledoux 0c46c8a929 [MERGE] forward port branch saas-14 up to 6fd092e131 2019-04-24 09:31:49 +02:00
Denis Ledoux 6fd092e131 [MERGE] forward port branch 10.0 up to 4730a884b4 2019-04-23 17:16:26 +02:00
Goffin Simon 1da058f8ed [FIX] stock: Error when re-installing manufacturing application
Steps to reproduce the bug:
- Install MRP
- Uninstall MRP
- Install MRP

Bug:
An error was raised by sql constraint 'barcode_company_uniq' which ensures that
a barcode for a location is unique per company.
But when uninstalling MRP, some locations such as pbm_loc_id or sam_loc_id are set to
active = False and when re-installing MRP, the function _create_missing_locations tried
to re-create these locations and the sql constraint was raised.

opw:1967534

closes odoo/odoo#32882

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-04-23 13:37:18 +00:00
Yannick Tivisse 4b0b00dbd9 [FIX] hr_holidays: Avoid erasing values on onchange if set
closes odoo/odoo#32790

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-04-24 12:27:17 +00:00
Lucas Lefèvre 08da07b1ca [FIX] hr_holidays: Fix deleted default employee
The goal of commit 2dbce5e was to handle the company
holiday type in onchange which was probably forgotten
when the company type was introduced.
However because the last `elif` was changed to `else`,
the `else` clause is executed in some situations where
it shouldn't.

e.g. If holiday type is `employee` and an employee is set,
the `else` clause is (obviously wrongly) executed.
This is particularly a problem if the employee is not
HR user nor manager. In that case, the field employee_id
is invisible and its value has been deleted by the onchange.
The allocation cannot be saved because it violates the
sql constraint (employee is null).

Also, the `mode_company_id` and `category_id` should be set
to `False` when the holiday type is not company/category.
2019-04-24 12:26:27 +00:00
Lucas Lefèvre d6242a340d [FIX] hr_holidays: Allow create department leave
1. Open form view to create a leave
2. Change the leave type to 'By department'
3. Choose the department of the current user
4. Save the leave
5. Approve the leave
=> ValidationError, cannot have two leaves at the same time.

In `@api.onchange('holiday_type')`, when choosing by department
it sets `employee_id`, `mode_company_id` and `category_id`
to `False` ONLY if the department is not already set.
But by default, the employee is set to the user's employee
and the department is set to the employee's department.
Therefore the employee is never set to `False` and the
department leave is linked to this employee.
When validating the 'department' leave, an 'employee'
leave is created for each employee in the department.
For the current user, it crashes because the deparment leave overlaps with
the 'employee' leave since the department leave is linked to
the employee.
2019-04-24 12:24:13 +00:00
Nicolas Martinelli 17ac11d5aa [FIX] stock: add operation in mobile view
Since it is possible to create an operation in the regular list view, it
should also be possible to do it in the kanban mobile view.

opw-1963527

closes odoo/odoo#32907

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-24 09:52:26 +00:00
sri-odoo 3d463640fc [IMP] website_slides_survey: add a specific background for certification channels
This commit introduces a specific icon/design for certifications. It is applied
to channels having at least one slide of certification type.

Linked to task 1958372
Related to PR #32648
2019-04-23 09:40:35 +00:00
sri-odoo cf0d12a9f4 [FIX] website_slides_forum: fix navbar overflow and mobile bg
Linked to task 1958372
Related to PR #32648
2019-04-23 09:34:52 +00:00
sri-odoo 8b61a4d18c [FIX] website_sale_slides: tweak and fix course price
Purpose: clean display of price for payment-based courses.

Linked to task 1958372
Related to PR #32648
2019-04-23 09:34:49 +00:00
sri-odoo 6867f7ba9f [FIX] website_slides: fix display of 'All Courses' menu in mobile
Purpose: clean and fix display of All Courses menu in mobile

Linked to task 1958372
Related to PR #32648
2019-04-23 09:34:43 +00:00
sri-odoo e5c7e43c71 [IMP] website_slides: reduce bootstrap customization and improve circular progress design
Purpose: reduce some customization and ease eLearning link with themes. For
that purpose use the body class name propagation recently added.

Linked to task 1958372
Related to PR #32648
2019-04-23 09:34:42 +00:00
sri-odoo e621e728e4 [IMP] website_profile: reduce bootstrap customization and improve circular progress design
Purpose: reduce some customization and ease eLearning link with themes. For
that purpose use the body class name propagation recently added.

Also mask the initial part of the circular progress, removing the border
radius effect.

Linked to task 1958372
Related to PR #32648
2019-04-23 09:34:41 +00:00
sri-odoo e59c034bf5 [IMP] website: allow to set custom class on body in frontend layout
Purpose: allow <body> to accept other classes rather than just the
'o_connected_user' one. It is useful notably to tweak the display of some
pages without breaking themes.

Linked to task 1958372
Related to PR #32648
2019-04-23 09:34:38 +00:00
Odoo Translation Bot 8815f9744c [I18N] Update translation terms from Transifex 2019-04-21 06:08:14 +02:00
Nicolas Martinelli 77c708c516 [FIX] website: sign-up in multi-website
- Create 2 companies A & B
- For each company, create a website linked to a different URL and
  activate 'Free sign up' and 'Specific User Account'.
- As a public user, go to website of company B
- Go to 'Sign in > Don't have an account?' and create an account

The user is created in company A (the company of the user template)
instead of company B (the company of the website).

We set the company of the user based on the company of the website.

opw-1962197

closes odoo/odoo#32823

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-19 08:54:22 +00:00
Nicolas Martinelli 3a0f05f334 [FIX] website_sale: multi-website
- Create 2 companies A & B
- For each company, create a website linked to a specific URL
- As a public user, visit website of B
- Buy a product, register your address

The partner is in company A (the company of the superuser) instead of
company B (the company of the website).

opw-1962197

closes odoo/odoo#32822

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-19 08:00:25 +00:00
Swapnesh Shah c423e5fe04 [FIX] doc: fix a typo
closes odoo/odoo#32746

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-24 06:53:51 +00:00
Nans Lefebvre 0cce154794 [FIX] stock: use float comparison to assign moves
We remove the remaining comparisons to use the precision rounding of the UoM.

opw 1969888
closes #32707
closes #32745

closes odoo/odoo#32844

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-23 08:08:58 +00:00
Toufik Ben Jaa 30e7a64cbd [FIX] hr_holidays: fix logic of a onchange on leave allocation
- When changing the `holiday_type` of a leave allocation while having an
  employee set and if this `holiday_type` has as its value `employee`
  the field `employee_id` is set to False.

  This is not the intended behavior. We want the field `employee_id`
  to be filled if the `holiday_type` is set to `employee`.

closes odoo/odoo#32886

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-04-23 15:22:16 +00:00
Aaron Bohy 3c40d732bf [FIX] web: crash in editable lists with date field
Backport of 7bc53ac30e.

Assume an editable list view with a date(time) widget, click to
edit a line, focus the date field (the datepicker opens), press
ESC: there is a crash in the lib, and the datepicker remains open
forever.

This fix is twofold:
 - we added a check in the lib to prevent it from crashing (it is
 easily reproducible: it crashes when an opened datepicker is
 removed from the DOM).
 - we added an event handler of ESC keydown event to hide the
 datepicker before the field is removed from the DOM.

closes odoo/odoo#32647

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-04-23 06:58:16 +00:00
Nans Lefebvre d6ad22227c [FIX] sale_timesheet: update delivered quantities when changing the sale_line_id
Create a SO with two lines (sol_1, sol_2) selling a given service.
On the corresponding Project/Task, set the partner so that the sale_line_id
can be chosen to one of the lines.
Add an AAL with x hours, save.
This updates the delivered quantity (x) on sol_1.
Edit, change the sale_line_id to the second one:
it updates the delivered quantity on sol_2 (to x) but not on sol_1.
Has a result, the delivered quantity has been doubled.

The issue is that the quantities are only recomputed on the SOL that we write;
instead they should be recomputed on the old one and the new one.

We base ourselves on 371a92fb which solved a similar bug to add the recompute on
both lines.

opw 1959509

11.0-opw1959509-sltmsht-len

closes odoo/odoo#32820

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-19 07:56:17 +00:00