Commit Graph
140847 Commits
Author SHA1 Message Date
Ankita Raval 6e5186c8f9 [FIX] point_of_sale: chatter is broken in pos session
The chatter was not displayed correctly on the pos session because of
missing fields in the view. We've added those missing fields.

TASK-ID: 2030754

closes odoo/odoo#34651

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-09 15:15:07 +00:00
wan d1fab53f07 [FIX] account: group payment
The commit https://github.com/odoo/odoo/pull/32198/commits/c9ec53b4e2373c08d944aac3a6bff2519cb5b13e removed the ability to make one payment for multiple invoices and forced to make one payment per invoice. We should have the ability to choose
Also, reinforce the security for multi company by ensuring the user can
only select a journal from the company the invoices are in, and by
ensuring one can only register payments for invoices issued by one
company.

closes odoo/odoo#35569

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-08-09 14:59:32 +00:00
Shreya Thakrar e0b8e5e0e7 [FIX] website_rating: fix review display in mobile
In mobile view, review display layout is not clean. Stars string is too short
and progressbar is also too short. This is because we have visibility hidden
for 'Remove Selection', visibility property takes space.

In this commit we give more space for stars / text, and in mobile we add an
icon instead of 'Remove Selection' string.

Task 2047409

closes odoo/odoo#35598

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-09 11:47:07 +00:00
asa-odoo 3bd03e27bb [FIX] website_slides: fix quiz completion blocking users in fullscreen
Once a quiz is completed in elearning fullscreen view a pop-up is displayed.
Due to z-index it makes a black overlay on full-screen, so that we can not
click anywhere on the screen.

In this commit we update z-index value fix the issue and make screen clickable.
Website menu is also still clickable.

Task: 2044221
2019-08-09 11:43:44 +00:00
qsm-odoo f7e83b69c6 [FIX] website_event: clean local events snippet before save
The local events snippets is an empty HTMLElement which is filled by
JavaScript on page loading. Before this commit, the filled content was
saved in database. This does not create a real problem as the content
is reloaded as soon as the page loads but you can see old events
flickering before the new events are actually loaded.

Now the snippet is cleaned before saving. This also allows to add
default content with a custo so that it is shown during the events
loading (as we are currently doing on odoo.com...).

closes odoo/odoo#35597

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-09 11:34:21 +00:00
Nicolas Seinlet 3af0b3387f [IMP] hr_recruitment: use search_count to count
closes odoo/odoo#35584

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-09 08:22:54 +00:00
Christophe Simonis 2f90b39a66 [FIX] web_editor: correctly convert inline style on loading
Oversight of previous forward-port.
2019-08-08 15:39:47 +02:00
Christophe Simonis 7321c8e260 [MERGE] forward port branch 11.0 up to dff2e242a5 2019-08-08 15:00:43 +02:00
Christophe Simonis 6e35cbc7ef [FIX] web: correct design of numeric column header
Oversight of previous forward-port.
2019-08-08 14:33:33 +02:00
Christophe Simonis f6c197e5d4 [FIX] account: use correct model
Oversight of previous forward-port.
2019-08-08 13:38:43 +02:00
Christophe Simonis b792ba7d9a [MERGE] forward port branch saas-12.3 up to 752b2553c6 2019-08-08 11:52:13 +02:00
Kevin Baptiste 0b25547fc6 [IMP] hr_holidays: add domain on active time off
Add a domain to only count active holiday allocations on the employee's
profile.

TaskID: 2048672

closes odoo/odoo#35547

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-08 06:43:24 +00:00
Laurent Smet 68a13c99fd [FIX] account: Fix taxes computation for intracomm
Suppose an amount of 1000 with tax 21% having +100%, -100% as repartition:
In that case, the condition preventing a rounding issue must be ignored because
the sum of factors is 0%, not 100%

closes odoo/odoo#35681

Signed-off-by: Josse Colpaert <jco@openerp.com>
2019-08-13 09:37:00 +00:00
Mathieu Duckerts-Antoine ba4ce71bf5 [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#35495

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-08-07 15:24:06 +00:00
Mathieu Duckerts-Antoine 691a8a690c [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-07 15:10:57 +00:00
Shreya Modi 752b2553c6 [FIX] mass_mailing: remove unsupported color picker on mailing lists
-There is unsupported color picker which is not required to differ
mailing lists thus removing it.

task-2042384

closes odoo/odoo#35494

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-07 12:45:33 +00:00
Goaman b384a00fe2 [FIX] web_editor: Do not remove block
Do not remove block in _removeNextEmptyUnbreakable.

Before this commit, when you tried to remove insert a character in
a td, with an empty td after the first one. The function
_removeNextEmptyUnbreakable removed the empty td. It was for
example breaking snippet in the website and mass_mailing.

closes odoo/odoo#32096

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-08-07 15:00:25 +00:00
Nicolas Martinelli dff2e242a5 [FIX] document: PDF indexing
Backport from 12.0, commit : 1b753b0d53
note: there was also report of PDF content blocking that when indexed
blocked an instance worker indefinitely

Since PyPDF2 gives bad results for PDF indexing, stop using it since it
raises more issues than it helps users.

opw-2044679

closes odoo/odoo#35310

closes odoo/odoo#35525

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-08-07 11:30:51 +00:00
fja-odoo 22e0f88bce [FIX] website_sale: fix quantity display in cart
Some CSS was removed in a big refactor. It is used to display properly
the quantity input in the cart.

Introduced in commit: 5521bcd81c
From PR: https://github.com/odoo/odoo/pull/31147

closes odoo/odoo#35484

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-07 11:30:19 +00:00
David Monjoie d0e8059330 [FIX] web_editor: disable custom handling for Safari MacOS 2019-08-07 10:09:28 +00:00
jem-odoo 5d64a5114e [FIX] project_timesheet_holidays: multi company issues
Partial backport of ef1afb7b69

Task-1999686
Closes #35520

closes odoo/odoo#35526

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-08-07 09:18:47 +00:00
David Monjoie 5578b98ad7 [FIX] web_editor: fix selecting snippet template text 2019-08-07 08:49:47 +00:00
David Monjoie 97e6b7f126 [FIX] web_editor: fix snippets preview on drop not displaying 2019-08-07 08:49:46 +00:00
David Monjoie cfbe4bbe42 [FIX] web_editor: fix snippets reloading traceback 2019-08-07 08:49:46 +00:00
Shreya Modi 1b234b1be7 [IMP] l10n_uk: updated website link
-website link now redirects to accounting page of odoo.com portal

task-2040072
Closes #35513

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-07 05:59:52 +00:00
Christophe Simonis 77dca40215 [MERGE] forward port branch saas-15 up to d8524aadf8 2019-08-21 15:19:38 +02:00
Nans Lefebvre 67d82b875c [FIX] account: round balance in the default_get of account move lines
Edit journal entries (account.move).
Create a new line. Credit and debit values are filled in with the default get.
Conveniently, if lines_ids is given in context this computes the right value to
balance existing move lines. However, this is done by float operations.
Let e be the resulting epsilon in balance.
As a result a new line may contain e, 0 for credit, debit (or respectively).
If the user fills in the 0 value with v, then the new line contains e, v.
This violates the constraint that exactly one of the two values should be nonzero.

We get the currency from the journal to round adequately the balance.

opw 2046137

closes odoo/odoo#35815

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-19 14:31:45 +00:00
Pieter Paulussen 9e57917376 [FIX] account: fix account_move_line's default_get()
Backport of 50ee1c964b.
Previous version was buggy, as it was already patched by 54c2c0874 and 862c2455.

When creating a journal entry manually, the computed value for the next line
was not taking into consideration all existing lines.
Was PR #25298. Courtesy of Pieter Paulussen (Dynapps)
2019-08-19 12:33:51 +00:00
Andrea Grazioso (agr-odoo) 3bc4d91e9b [FIX] website_sale_comparison: translate product attribute categories
Install the module "Product Comparison". Go to
Website>Configuration>Attribute Categories, then create or edit a category.

No translate button is present when editing the field, there should be one
on the right edge to enter the translation menu.

Adding the missing option in the model.

opw-2052331

closes odoo/odoo#35838

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-20 10:02:15 +00:00
Nans Lefebvre e34de5c565 [FIX] mail: preview of almost empty mail templates
The lxml.html.fromstring method does not accept an encoding parameter, so the
preview crash if the going through this branch, i.e. if the root is an empty tag.

opw 2054368

closes odoo/odoo#35817

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-20 09:19:10 +00:00
Nicolas Martinelli 7cbc088d84 [FIX] purchase: return dropship
Backport of 4da82776ff.
Because of e38ed7c7 the code moved between versions, but is otherwise identical.

- Set an internal location as a return location
- Create a SO with a dropship product, validate and deliver
- Return the product, and choose the internal location as the return
location.

The received quantity on the PO is counted twice.

Since the return is an 'in' move linked to a PO, it is automatically
counted as incoming quantity.

This case is quite specific, so we explicitly add an exception in case
the origin move was a dropship, but the return is not a returned
dropship.

opw-1958228

opw 2045685

closes odoo/odoo#35831

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-20 08:46:36 +00:00
Lucas Perais (lpe) 5e3d49bc47 [FIX] im_livechat: livechat rating computes well
Open a livechat session between a visitor and a user
That is, open the / controller as public user, and click,
on the bottom right corner, on "Have a question ? Chat with us."
Exchange at least one message to open the session

From the visitor side, close the window. There is a proposal to rate the discussion
Assign either the green face or the yellow one
(The red one is a bit trickier)

Now, on the user side, check the list view of LiveChat sessions

Before this commit, the rating of those sessions were 0
This is because:
The rating.rating < Many2One > mail.channel link is not a foreign key
(rather, it is composed by char::res_model; Integer::res_id)
and doesn't make the reciprocal field recompute, which in turn doesn't make
our relevant field compute

After this commit, the last_rating field field is recomputed and appear in the list view

OPW 2052964

closes odoo/odoo#35830

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-20 08:12:32 +00:00
Nicolas Martinelli 0f878e4839 [FIX] tools: epsilon magnitude
The following rounding is incorrect:
```
>>> float_round(6.6 * 0.175, precision_digits=2)
1.15
```

Indeed, 6.6 * 0.175 = 1.155 ≈ 1.16.

In this specific case, the `epsilon` computed is not sufficient. A
precision of 53 gives:
normalized_value = 115.49999999999997
epsilon = 1.2823075934420547e-14
=> new normalized_value = 115.49999999999999

Bad luck, this is just not enough to tip the value in the right
direction.

However, a precision of 52 is sufficient:
normalized_value = 115.49999999999997
epsilon = 2.5646151868841094e-14
=> new normalized_value = 115.5

The value of 53 was chosen from the `binary64` number format precision.
In case of Python, the corresponding machine epsilon is 2^-52 [1].
Therefore, using 52 instead of 53 does make sense.

It is worth noting that the value of the machine epsilon
2^-52 = 2.2204460492503131e-16, which is still 2 orders of magnitude
below our dynamic estimation.

[1] https://en.wikipedia.org/wiki/Machine_epsilon
[2] `numpy.finfo(float).eps = 2.2204460492503131e-16`

opw-2047368

closes odoo/odoo#35565

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-08 12:06:31 +00:00
Alexandre Kühn 964efa3026 [FIX] mail: keep notification on receiving new messages from document
Revision on https://github.com/odoo/odoo/commit/17bb0ca443f54bc231b03794e776bbc6992ffdfa

closes odoo/odoo#35497

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-08-06 13:06:42 +00:00
Mohammed Shekha fdcf0a8404 [FIX] web: handle widget not visible
In edit mode handle widget is not visible instead 3 dots are displayed
the reason is, css of overflow is applied on handle widget, while
overflow related stuff should not be applied on handle widget element

to fix this issue, remove overflow related css for handle widget element

task-2041196

closes odoo/odoo#35252

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-08-06 12:39:12 +00:00
Julien Mougenot 71805ff41d [FIX] web: add a single pixel to handle in lists
Before this commit, handle was cropped in some views, showing an ellipsis
instead of the actual handle.

Now, handle has enough space to display properly.

closes odoo/odoo#36387

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-09-03 13:49:57 +00:00
qsm-odoo 6f2b17d259 [FIX] website: restore css loading for website elements
For some reason, with the recent changes and reverts with the editor,
some CSS ended up lazy loaded even though it was needed straight ahead
(switch, customize modal, etc).

This commit restores the assets structure that worked before. Note:
the website.edit_mode.scss file is however kept in the lazy loaded css
even though it was not like that before. The part that should not be
lazy loaded in it is moved to another file.

task-2064157

closes odoo/odoo#36368

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-03 15:33:10 +00:00
Debauche Stéphane 2450a36108 [FIX] mail: mention a channel from a channel
Before this commit, when mentioning a channel from a channel,
it crashed with following error:

```
TypeError: unhashable type: 'list'
```

This commit fixes the issue by providing a list of channel ids,
instead of a list of `[4, channelID]`, when mentioning channels.

closes odoo/odoo#36359

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-09-03 15:24:17 +00:00
qsm-odooandAndrea Ulliana 1345702258 [IMP] website: add the ability to create mega menus
Allow users to create complex website menus, also known as "mega menus".
Mega menus are enabled individually via the edit menu dialog, then their
content can be customized by dragging snippets in them like any other
snippets area in edit mode.

task-1925319

closes odoo/odoo#36097

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>


Co-authored-by: Andrea Ulliana <aul@odoo.com>
2019-09-03 15:31:42 +00:00
qsm-odoo 2d64bb58cd [FIX] web_editor: prevent removing a main editable area
When a snippet part is removed, like a column, we check that one of
its ancestor has a snippet editor attached and we remove all the empty
element up to and including that ancestor if possible. This way, if we
remove the last column of most snippet, the whole snippet is removed.

The problem is when that ancestor is a main editable area that should
not be able to be removed.

The case is currently probably never occuring but it could be backported
if needed. This is made in preparation of the mega menu task, during
whose implementation it was discovered.
2019-09-03 15:31:42 +00:00
Odoo's Mergebot d73d7b0724 [MERGE] website_slides: apply various fixes
PURPOSE

Purpose of this merge is to provide fixes and usability fixes or
improvements in eLearning.

SPECIFICATIONS

Improve "New content" modal: upload new course content should be revamped
-------------------------------------------------------------------------
* general layout: https://drive.google.com/a/odoo.com/file/d/1zbNO0Vg1262ijkXA6pwSuenMI0h4NsPm/view?usp=drivesdk
* remove picture tab;
* display as two column with preview on right on change of picture
or document;

Do not put odoobot responsible of demo courses
----------------------------------------------

Do not crash if there is any issue loading quiz
-----------------------------------------------

Do not allow fullscreen to bypass ACLs
--------------------------------------
Currently fullscreen takes all information from categorized slides to
display its menu. In order to avoid calls to server some information
is prepared in DOM to speedup loading. It means slide information is
available even when not being member of a course which leads to some content
leak.

This merge fixes that by correctly checking that a slide can be accessed
before allowing to have access to its information and embedded code. Access
of a slide is either member of a course, either course publisher.

Correctly set sequence of newly added content
---------------------------------------------

Purpose of this commit is to add new content at last position in frontend.
Indeed backend uses last position in embedded list view, frontend should
do the same. Moreover when having a lot of content, having everything at
the bottom of the screen at the same position of Add content / section
buttons makes sens.

Specifications

* when adding a new category: add it as last category;
* when adding a new slide in a category: add it as last slide of the
category;

Specific case of slide without category

* when adding a new slide without category: add it as last slide of the
channel (display it as last) but keep it on top in backend view
(display as first);

Improve content list display in frontend of eLearning

* contents without section are now at the bottom;
* fixed alignment of buttons icon (Add Content and Add Section)
* fixed broken design because of title too long

LINKS

Task 2049640 (website slides back2basics and fiximp)
Task 2058595 (eLearning v13 testing)
Task 2064112 (fullscreen bug report)
Task 2061672 (new content bug report)

Improve backend UI, views and user actions
------------------------------------------

Containing

* channel kanban view tweaking;
* channel form view: some spacing and renaming improvements. Also set
advanced field (new content email, share template) as group no one;

* slide kanban view tweaking;
* removed sections from kanban and list view for contents;
* contents form view: various improvements, with notably

* removed field website_url;
* set publishded date is now readonly, tracked and in group_no_one as
it is automatically set when publishing the lesson, and people should
not update it manually;
* removed the sum "Content" and replaced it by a stat button
* reword quiz constraint error messages;

* rating views improvements:
* revamped the kanban view of rating that were a bit broken;
* added a pivot view in Reporting/Reviews;
* updated graph view in Reporting/Reviews;

This commit also provides some usability fixes

* prevent sending email if new content is category;
* email: Prevent displaying an image if there is no image;

Fixes some display issues in eLearning frontend
-----------------------------------------------
* fix the share button in documentation. It was not working as model was
not correctly placed;
* fix top3 users banners broken in mobile;
* fix left menu of fullscreen being behind content on mobile (image, video);
* removed upload button in training channel aside as there are already
buttons available for that purpose;

Revamp "New Course" menu
------------------------
Purpose of this commit is to change the modal to make it more mobile friendly.
Notably remove the two columns.

Allow website publisher to create forum
---------------------------------------
Security file was buggy and not imported.

closes odoo/odoo#36348

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-03 18:18:54 +02:00
Odoo's Mergebot 9aefd9e8c6 [MERGE] stock, mrp and related addons: multi company
Add a `check_company` attribute on relational fields to apply a default domain restricting the records to the one of the record's company or without company.
Add a `check_company` method on Model to ensure these domains are respected.
Add a `check_company_auto` attribute on model to call `check_company` at create and write.

Use this in stock, mrp and related addons.

Joint work with
William Henrotin <whe@odoo.com>
Arnold Moyaux <arm@odoo.com>

task-1985992

closes odoo/odoo#36222

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-03 18:18:29 +02:00
Arnold Moyaux e4d64afc1d [REF] purchase_stock: multi company 2019-09-03 15:05:04 +00:00
Arnold Moyaux a5f07e16ad [REF] purchase_requisition: multi company
Adapt purchase_requisition to the multicompany changes.

task-1985992
2019-09-03 15:05:04 +00:00
Arnold Moyaux 20713735bf [REF] purchase: multi company
Adapt purchase to the multicompany changes.

task-1985992
2019-09-03 15:05:04 +00:00
Simon Lejeune b43b61e13d [REF] stock_landed_costs: multi company
Display company_id on the form.

task-1985992
2019-09-03 15:05:04 +00:00
Simon Lejeune 03925faa48 [REF] product: multi company
Add an optional company_id on product.packaging to be able to share
of restrict them, similar to what's done for product.product.

task-1985992
2019-09-03 15:05:04 +00:00
Arnold Moyaux 13d6f64a73 [FIX] mrp: same method name
Conflict between:
commit ed64250503
commit 16e7a4b4c7
2019-09-03 15:05:04 +00:00
Simon Lejeune ae9ac488ad [REF] website_sale_stock: multi company
Adapt the module to the multicompany changes.

task-1985992
2019-09-03 15:05:04 +00:00
Simon Lejeune 0f3b3e4afd [REF] product_expiry: multi company
Adapt the module to the multicompany changes.

task-1985992
2019-09-03 15:05:04 +00:00