Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master misc191 jke #31274

Open
wants to merge 27 commits into
base: master
from

Conversation

Projects
None yet
@JKE-be
Copy link
Contributor

JKE-be commented Feb 20, 2019

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

hch-odoo and others added some commits Jan 29, 2018

[ADD] stock: Report Forecasted Inventory
Purpose of this task:
Show forecasted inventory for all products.
Before this commit we have to search forecasted inventory for each product individually.
There is no way to check all the forecasted inventory in a single menu.

After this commit:
User can search for all forecasted inventory from the menu 'Forecasted Inventory'.
Features added.
1. Menu for Forecasted Inventory has been added.
2. Default measures has been set to 'Quantity' and 'Cumulative Quantity'.
3. Pivot view is grouped by product (vertical) and by weeks (horizontal).

Why query changes required:
User can search for all forecasted inventory from the menu 'Forecasted Inventory'.
Features added.
1. lines only those containing any stock move will be shown.
2. Reference field added.
3. We remove 'week' from the query, instead of we fetch all the data according to 'date_expected',
and we create three group_bys (i.e. group by date, week and month)
so it is easy for the user to check report according to day, week and month.

This commit is related to task 36088.
[master] hr_expense: Make consistent selection field
The field payment mode in the expense sheet is related with the same
field in the expense, but this must be consistent, and if a new option
is added in the expense must be considered in the sheet.

In Odoo v11 > is not necessary indicate the selection parameter in the
field definition.

closes #30933
[IMP] tools: float_utils, precision rounding must be positive
Adding a new rule to verify that precision_rounding is positive.

Before this commit:
when a precision_round was 0 or smaller than 0 the float_utils
functions gave as results:
* float_is_zero(0.0, precision_rounding=0.0) -> False
* float_round(1.25, precision_rounding=0.0) -> 0.0
* float_compare(1.0, 1.0, precision_rounding=0.0) -> 1

These results where at least not correct at worst not logic.

Now, the function raises an error when the precision_rounding
is not positive
[FIX] account: validation error not raising
In an account_bank_statement, when the type of the journal wasn't bank
and the currency was not defined (the currency in account_bank_statement
is optional) and the amount was zero.

Before this commit, the validation error that raise when the amount is
zero, wasn't working. This because, self.currency_id.is_zero is always
False, when currency is not defined.

Now, we take into account if currency is defined.
[FIX] sale_margin: product margin round error
In a SO without customer:

Before this commit, the _product_margin wasn't working. This because,
as the customer is not defined, the pricelist isn't defined either,
and therefore currency of the pricelist is also undefined.
When you call the round function, in an undefined currency
an error is raised.

Now we take into account if customer is defined.

closes #30675
[IMP] sale,purchase,...: Improve description of demo data product
Purpose of the task is some demo data values are not matching with the products
mentioned so update the demo data values with matching product.

Task: 1892754

closes #28573
[IMP] web, *: remove explicit references to `session_id`
Since rev. f4d541e the `session_id` cookie uses the `httponly` flag so
it cannot be accessed through client side script. But before this rev. the
`session_id` was still provided by the server to the webclient (in session_info,
mostly) and was stored and accessible. This made XSS injection more
dangerous than they should be as it was very easy to steal the `session_id`.

As the browser automatically set the `session_id` on every request to the server,
the webclient shouldn't need any explicit reference.
[REF] web, *: remove JSONP support
JSONP can be entirely replaced by the CORS mechanism, which is simpler.
We support CORS in our routes since 8.0 (9cce88a), so it's about time
to get rid of JSONP.
[REF] im_livechat, *: remove JSONP in favor of CORS
When embedding the livechat on an external website, we used to make JSONP calls.
As the support of JSONP calls has been dropped, we now use the CORS mechanism
instead.
[IMP] product: Use the vendor code in 'Customer Ref' if set
Currently the 'partner_ref' field is used when generating purchase orders
lines. It computed like this:

Customer Ref : Vendor Product Name on the supplier info
            OR internal reference of the product
            OR product name

As we can set an alternative internal reference for the vendor,
that should be used instead of the internal reference of the product,
this commit will compute it as follows:

Customer Ref : Vendor Product Name on the supplier info
            OR vendor product code on the supplier info
            OR internal reference of the product
            OR product name

closes #28573
[IMP] base: Allow to sum fields on partner merge wizard
When merging 2 partners, we could want to sum fields instead of
keeping one of the values. Example: Loyalty Points

This commit adds the necessary support to achieve this.

This commit is related to task #1869488.

closes #30141
[IMP] web: force activeActions to be boolean
The docstring says they are boolean, but they actually aren't
(e.g. edit="0" in the arch would lead to activeActions.edit=0).

This could cause issue if that value is used to toggle a class
with jQuery, as in this case the flag argument *must* be a boolean.
[IMP] web: add kanban searchPanel
This rev. defines a searchPanel widget used in Kanban views to
refine search according to specific dimensions. This wigdet is
displayed as a sidebar to the left of the kanban view.

Part of task 1892462

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
[IMP] hr: use searchPanel in Employee kanban view
Part of task 1892462

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>

closes #30517
[IMP] lunch: use searchPanel in New Order kanban view
This rev. updates the 'New order' kanban view to make it use a
searchPanel.

Minor changes on the custom lunch_kanban view were necessary to
 - obtain the desired layout,
 - correctly combine the lunch widget (top bar) domain with the
   searchPanel domain.

Part of task 1892462

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
[REF] website: restore skipped test
This reverts commit ba0fe34, as this
should be ok with recent forward-port.
[IMP] web, *: remove explicit references to `session_id`
Before this rev. the `session_id` was provided by the server to the webclient (in
session_info, mostly) and was stored and accessible. This made XSS injection more
dangerous than they should be as it was very easy to steal the `session_id`.

As the browser automatically set the `session_id` on every request to the server,
the webclient shouldn't need any explicit reference.

Since rev. f4d541e the `session_id` cookie uses the `httponly` flag so
it cannot be accessed through client side script.

Task 1905359

closes #30098
[IMP] web: add 'Last 5 Years' as a period option
This commit adds the option 'Last 5 Years' in
the list of periods available to selection in
the filter menu and the time range menu for
the date/datetime fields.

Task: 1916017

closes #29423
[FIX] website: adapt tests to new editor and new html editor
Scss tour was broken due to recent task that shows only 2 new custom scss
files if not in edit mode. As the tests was trying to read `website.ui.scss`
that is now in debug mode in a filter, it would not be found.

Html tour was broken due to new editor that changed the save process.
For some reason, after the drag & drop of a snippet, clicking fast on save
would not fire RPCs as it would not be considered as dirty.
(Editor would then close, you would still see the modifications even if nothing
was saved on DB)

closes #31067
[REF] website_slides: rework slide's public and embedded views
Purpose
=======

A slide's 'Embedded views' are reworked as 'Public views' to simplify
the model and be more compliant with the new 'is_preview' field.

The rule is now the following:

A slide is a preview or the view is done as public user (once per session)
-> increment public_views

A slide is viewed as a logged in user that has access to the content
-> increment slide_views
Technically slide_views is a compute of the slide_slide_partner count.

Tests are also added to ensure it is effectively working.

This commit is a sub-part of task ID 1940360 (eLearning integration with
survey) and task ID 1902304 (main eLearning task).
[FIX] website_slides: fix computation of members
Members is better computed using a sudo to avoid every access rights issues.
Moreover trigger is updated so that cache is correctly invalidated and
recomputed. Having the trigger on the relational model correctly triggers
the recompute when calling main API methods to add a channel member.

This commit is a sub-part of task ID 1902304 (main eLearning task).
[FIX] website_slides: improve can upload / publish computation
New rules are

 * on channel type documentation: can upload like before (employee or upload
   groups specified); can publish like before (can upload and publisher)
 * on channel type training: can upload like before (employee or upload
   groups specified); can publish restricted to channel responsible

Tests are added.

This commit is a sub-part of task ID 1902304 (main eLearning task).

closes #31082

@robodoo robodoo added the CI 🤖 label Feb 20, 2019

@C3POdoo C3POdoo added the RD label Feb 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.