Commit Graph
129699 Commits
Author SHA1 Message Date
Thibault Delavallée 3d034dafc6 [FIX] test_mail: fix some ordering issues in tests
In resend wizard tests

In some cases tuple comparison of states seems to fail. Indeed order seems
to change in some cases depending on installation order. With this commit
we correctly check partner / notification status one by one, avoiding
to rely on order / set length that is not guaranteed.

In mail gateway tests

Add a specific order on name to be clearer about what we mean when fetching
users as a fallback, until better heuristic. Using name is sufficient as
we have no need to rely on complex partner display_name.

Task 2060220 (testing SMS integration)
2019-09-04 08:34:24 +00:00
Julien Mougenot eea560060a [FIX] web: list width should not be calculated when invisible
Before this commit, the width of the headers in a list were frozen
only when the list was seen, but the calculation of the width might have
happened while it was invisible (thus giving the headers 0px).

Now, the freeze AND the calculation only occur when the list is visible
and can actually be evaluated.

Task 2061848

closes odoo/odoo#36175

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-09-04 08:19:32 +00:00
Julien Mougenot 52bd5fa461 [FIX] web: list view: allow buttons width
Before this commit, when entering an empty editable list with buttons,
their width would be set to 0px.

Now, they are considered as fields and given a name, allowing the renderer
to give them their proper width (if any) or a default one.
2019-09-04 07:11:01 +00:00
Julien Mougenot 7329014796 [FIX] web: editable list: ignore empty headers
Before this commit :
- resize handles were all attached at the right side of the list
- empty columns were given a resize handle, causing them to be larger than expected

Now :
- resize handles are attached to their corresponding header
- only non-empty columns are given a resize handle

Fix 2060807
2019-09-04 07:11:01 +00:00
Julien Mougenot 5718861b91 [FIX] web: editable list: invisible list width computed on interraction
Before this commit, if an x2many was in an inactive tab of the notebook,
its column headers widths were all set to 0px

Now, inactive x2many lists do not compute their width until they are visible
and interracted with (e.g. add/delete a record, sort columns, etc.)

Fix 2060418
2019-09-04 07:11:01 +00:00
6ddfe775a3 [FIX] sale: fix invoicing of orders with section line
This commit fixes an error being raised when it was attempted to create the invoice of a sales order containing a section line.

task-id: 2052537

closes odoo/odoo#36326

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>


Co-authored-by: Damien Bouvy <dbo@odoo.com>
Co-authored-by: Antoine Vandevenne <anv@odoo.com>
2019-09-03 12:15:17 +00:00
Julien Castiaux 92773b226f [FIX] payment_authorize: fix external test
The authorize payment API has deprecated their md5 based authentication
in favor of sha512. The `test_10_Authorize_form_render` test was failing
due to no-more-valid tests inputs.

As the `payment.transaction._authorize_form_validate` method verify the
status of the transaction before validating the form thank to 01216345,
calling `_set_transaction_done` is no more valid thus has been removed.

The reference has been changed due to the same commit.

closes odoo/odoo#36139

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-08-27 13:50:16 +00:00
Mitali Patel e85b5c875c [FIX] l10n_*: use company from environment
previously, with multi-company setup, when we switch company from
top right corner, that company was set as current user's main company.
But with commit a5b6f31cf2 it no more changes current user's
company but updates 'company' property of environment for specific
browser tab. So, env.user.company_id has to be replaced with
env.company.

Task: 2052484
Closes: 35851

closes odoo/odoo#35851

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-08-28 06:28:32 +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
Simon Lejeune 6df0c3ef3c [REF] point_of_sale: multi company
Adapt the module to the multicompany changes.

task-1985992
2019-09-03 15:05:04 +00:00
Simon Lejeune bf81b16c09 [REF] sale_stock: multi company
Ensure proper domains are applied and enforced on relation fields thanks
to the `check_company` attributes.

task-1985992
2019-09-03 15:05:04 +00:00
Simon Lejeune 2b802cd510 [REF] maintenance: multi company
Ensure proper domains are applied and enforced on relation fields thanks
to the `check_company` attributes.

task-1985992
2019-09-03 15:05:04 +00:00
Simon Lejeune 20692736a9 [REF] delivery: multi company
Ensure proper domains are applied and enforced on relation fields thanks
to the `check_company` attributes.

task-1985992
2019-09-03 15:05:04 +00:00
Simon Lejeune 9d4a552690 [REF] mrp_subcontracting: multi company
Ensure proper domains are applied and enforced on relation fields thanks
to the `check_company` attributes.

task-1985992
2019-09-03 15:05:03 +00:00
Simon Lejeune 96406dc2a9 [REF] mrp: multi company
Ensure proper domains are applied and enforced on relation fields thanks
to the `check_company` attributes.

Make sure unbuild have proper sequence for each companies.

The produce wizard and workorders company is the one of the production.
The BoM line company_id is the one of its bom_id.
Added some tests.

task-1985992
2019-09-03 15:05:03 +00:00
Simon Lejeune 4a03178146 [REF] stock_picking_batch: multi company
Ensure proper domains are applied and enforced on relation fields thanks
to the `check_company` attributes.

task-1985992
2019-09-03 15:05:03 +00:00
Simon Lejeune d43d25020e [REF] stock_account: multi company
Ensure proper domains are applied and enforced on relation fields thanks
to the `check_company` attributes.

Adapt `_compute_value_svl` to return the valuation for a specific
company.

Every time a property is read, make sure `force_company` is properly in
the context.

Fixed the ir.rule.

task-1985992
2019-09-03 15:05:03 +00:00
Simon Lejeune 27a4c07187 [REF] stock_dropshipping: multi company
Now that company_id is required on the picking type, make sure we create
as many dropship picking type/rules/sequence as there are companies

task-1985992
2019-09-03 15:05:03 +00:00
Simon Lejeune b6f053b25e [REF] stock: multi company
Ensure proper domains are applied and enforced on relation fields thanks
to the `check_company` attributes.

product.template
- make responsible a property field in order to ensure proper next activities when a product
  is used between multiple companies
stock.putaway.rule
- added a company_id field
stock.move.line
- company_id is not related anymore since a move line can exist without a move until its validation
stock.package_level
- added a company_id field
stock.picking.type
- company_id is now required
stock.production.lot
- added a company_id field, adapted the constraint accordingly
stock.quant
- check the consistency only in inventory mode
stock.quant.package
- company_id is now empty if the package is empty
stock.picking
- company_id is now related to the one of its picking type

Added some tests.
Moved stock_traceability in the `report` directory.
Removed useless /tests/tours/route.js.

task-1985992
2019-09-03 15:05:03 +00:00
Simon Lejeune 504b5fe5a9 [ADD] fields, models: company consistency check
Assigning `check_company=True` to a field will
- set a default domain filtering the companies
- allow to call `_check_company` on the records to ensure the domain is
  respected

Setting `_check_company_auto = True` on a model will ensure
`_check_company` is called at create and write, enforcing the multi
company domain.

Joint work with Raphael Collet <rco@odoo.com>

task-1985992
2019-09-03 15:03:45 +00:00
mcm-odoo 896f649285 [IMP] website_slides: 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;

Task 2049640 (website slides back2basics and fiximp)
2019-09-03 15:02:10 +00:00
Thibault Delavallée 4cac01e124 [FIX] website_slides_forum: allow website publisher to create forum
Security file was buggy and not imported.
2019-09-03 15:03:11 +00:00
mcm-odoo e53c398789 [IMP] website_slides: revamp "New Course" menu
Purpose of this commit is to change the modal to make it more mobile friendly.
Notably remove the two columns.

Task 2049640 (website slides back2basics and fiximp)
2019-09-03 15:02:45 +00:00
Michaël Mattiello 37bf69dd9d [FIX] website_slides: fixes some display issues in eLearning frontend
Fix some display issues in eLearning

  * 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;

Task 2049640 (website slides back2basics and fiximp)
2019-09-03 15:02:31 +00:00
Michaël Mattiello 8c9473fd78 [IMP] website_slides_{*}: improve backend UI, views and user actions
Purpose of this commit is to perform a back2basics on eLearning backend
views. It helps users in their daily use of eLearning and improve UI.

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;

LINKS

Task 2049640 (website slides back2basics and fiximp)
Task 2058595 (eLearning v13 testing)
2019-09-03 15:02:21 +00:00
laaandMichaël Mattiello c4eba6f5b1 [FIX] website_slides: 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

Task 2049640 (website slides back2basics and fiximp)
Task 2061672 (new content bug report)

Co-Authored-By: Michaël Mattiello <mcm@odoo.com>
Co-Authored-By: Alexis Lacroix <laa@odoo.com>
2019-09-03 15:02:18 +00:00
Thibault Delavallée 3f4bd44075 [FIX] website_slides: 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 commit 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.

Task 2058595 (eLearning v13 testing)
Task 2064112 (fullscreen bug report)
2019-09-03 15:02:16 +00:00
Thibault Delavallée 6d22405987 [FIX] website_slides: do not crash if there is any issue loading quiz data
Template displaying quiz should not crash if call to server did not answer
correctly. Minimal fix is to have void data to display. Real issue is that
unreadable quiz should not be displayed. This will be fixed in an upcoming
fix.

Task 2058595 (eLearning v13 testing)
Task 2064863 (quiz bug report)
2019-09-03 15:02:14 +00:00
Thibault Delavallée 1aeba9b900 [FIX] website_slides: do not put odoobot responsible of demo courses
Yeah Odoobot is great but have you tried Admin ?

Task 2058595 (eLearning v13 testing)
2019-09-03 15:02:10 +00:00
Damien Bouvy f6ab2198d7 [FIX] website_sale: don't assert, just check
If the session is unbound before a call to this route, this assertion
will raise. The point of this code is not to crash when the parameters
are incorrect or the session unbound - the point is to avoid leaking
incorrect information.

Simply return an empty object to the JS code, it will stop polling after
a single failed attempt instead of crashing.

closes odoo/odoo#36356

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-03 07:38:57 +00:00
svs-odoo 9e100a7d3b [FIX] sale,stock: relabelling
`sale`
Delivery Lead Time  -> Lead Time

`stock`
Assign owner        -> Assign Owner

Task #2058665

closes odoo/odoo#36132

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-03 13:33:30 +00:00
svs-odoo 16ee89a662 [FIX] stock: restart a canceled inventory
When an inventory is canceled, the user is able to edit its locations
and products fields. So, if he/she does and then restart the inventory,
it can have some lines who don't match these fields.

Now when an inventory adjustment is canceled, we delete all its lines.
Its lines will be recreated when the inventory adjustment will be
restarted. Thus, lines will always corresponding to their inventory
`location_ids` and `product_ids`.
Also, a confirmation popup was added to ask if user really want to
cancel the inventory when he/shes clicks on the cancel button (to avoid
users delete their on going inv. adj. by miss clicking).

Task #2058665
2019-09-03 13:31:52 +00:00
svs-odoo d3ef8a958b [FIX] stock: forecast quantity only on warehouse
Before this commit, forecasted quantity in the product stat button and
in graph/grid view wasn't always equals.
The issue was the forecasted quantity is based on quant in location who
is child of warehouse location, and the `report.inventory.quantity` used
in graph/grid view didn't filter on warehouse location (took all
internal location).
So, completes the domain on `report.inventory.quantity` to get only
quantity in the warehouse.
Same change is applied to the Forecasted Inventory report.

Task #2058665
2019-09-03 13:31:22 +00:00
svs-odoo 63852bc1a1 [FIX] product_expiry: add space before "days"
In the product form view, add a space before the "days" word to avoid to
have the value sticked to days.

Task #2058665
2019-09-03 13:31:22 +00:00
svs-odoo 89c09e786d [FIX] stock: reordering rules scheduler message
The informative message about the scheduler on the reordering rules
form view takes now all the width.

Task #2058665
2019-09-03 13:31:22 +00:00