Commit Graph
126256 Commits
Author SHA1 Message Date
Priyanka Kakadiya 624fdc77d4 [IMP] google_drive : better google drive configuration
Improve the configuration setting of google drive to make it more userfriendly
Display a message when google drive is enabled but no token have been generated

Task: 1894961

closes odoo/odoo#29562
2019-02-14 11:40:57 +00:00
Robot Odoo af199c4ced [IMP] web: mobile kanban tabs UX
This merge change the mobile kanban tabs UX by allowing to scroll
through them and go directly from a column A to B. It also improve the
readability independently of the title's length.

This behavior is heavily inspired by Material Design.

See: https://material.io/design/components/tabs.html

It's also an opportunity to refactor the mobile kanban renderer code to make it
more robust and readable.

Task: 1893168

closes odoo/odoo#29024
2019-02-14 16:33:38 +01:00
Romain Estievenart 6ac1ce8579 [IMP] web: mobile kanban tabs UX
The mobile kanban title tabs required to move from column to column
1-by-1 to go from the first to the last column. Focusing everytime to
only the active column has ugly side effects when the titles are long
(eg. text overlapping).

This commit change the mobile kanban tabs UX by allowing to scroll
through them and go directly from a column A to B. It also improve the
readability independently of the title's length.

This behavior is heavily inspired by Material Design.

See: https://material.io/design/components/tabs.html

Task: 1893168
2019-02-14 09:51:04 +00:00
Romain Estievenart 1fca14bfa1 [REF] web: cleanup the layout update for the mobile kanban view
The goal of this refactoring is mainly to improve the code readability
of the layout update in the mobile kanban renderer by focusing on each
parts separetaly:
 * mark current column as the active one.
 * compute the title tabs' position.
 * compute the content column's position.

Task: 1893168
2019-02-14 09:42:11 +00:00
Romain Estievenart 848ea507ec [FIX] web: column data not loaded on mobile kanban view
This commit apply those changes:
 - Avoid overflow widgets array by checking its boundaries when the user swipes
   on the kanban column.
 - Extract the success callback update layout to avoid duplicated code.

Task: 1893168
2019-02-14 09:33:57 +00:00
Romain Estievenart 829003178e [FIX] web: error on mobile when kanban groupedBy change
Sometimes when the groupedBy view is changed the index of the current
active column overflow the kanban tabs length.

In this commit this effect is avoided by resetting the active
kanban column to the first one when the groupedBy is changed.

Task: 1893168
2019-02-14 09:25:21 +00:00
Romain Estievenart 9b65b50dfd [FIX] sale_timesheet: responsive table
On small screens, when we click on the overview of a task
inside the "project" app, the displayed table doesn't fit the screen.

This commit only add missing parent "div.table-responsive" to add
responsive support.

opw-1907877

closes odoo/odoo#31092
2019-02-14 08:06:01 +00:00
Aurélien Warnon 8e2c67005e [IMP] website_slides: add is_preview management in backend/frontend
Task #1902304

Purpose
=======

The 'is_preview' field implied some functional behavior but it was not
manageable from back-end nor front-end.

It can now be configured on the slide upload form (front-end view) and on
the slide form (back-end view).

closes odoo/odoo#31073
2019-02-13 14:32:41 +00:00
Thibault Delavallée 752a3a5169 [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 odoo/odoo#31082
2019-02-13 18:20:05 +00:00
Thibault Delavallée 370c525d77 [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).
2019-02-13 18:20:05 +00:00
Aurélien Warnon 82ce815a8c [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).
2019-02-13 18:20:05 +00:00
Romain Derie 74a98ea0be [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 odoo/odoo#31067
2019-02-13 18:02:00 +00:00
qsm-odoo 63e64c5420 [REF] website: restore skipped test
This reverts commit ba0fe3437f, as this
should be ok with recent forward-port.
2019-02-13 12:57:12 +00:00
Priyanka Kakadiya bd0e0605cc [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 odoo/odoo#29423
2019-02-13 15:47:20 +00:00
Jorge Pinna Puissant d132870cab [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 odoo/odoo#30675
2019-02-13 08:24:41 +00:00
Jorge Pinna Puissant 30961d5616 [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.
2019-02-13 08:24:35 +00:00
Jorge Pinna Puissant e270e9e0cc [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
2019-02-13 07:05:13 +00:00
Aaron BohyandMathieu Duckerts-Antoine 73fa0748da [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 odoo/odoo#30517
2019-02-13 12:23:28 +00:00
Aaron BohyandMathieu Duckerts-Antoine d6fa1a65f0 [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>
2019-02-13 12:23:28 +00:00
Aaron Bohy a2350c77c3 [REF] lunch: linting pass on lunch_kanban widgets 2019-02-13 12:23:28 +00:00
3a5f6bfa9f [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>
2019-02-13 12:23:28 +00:00
Aaron Bohy 33207ed452 [REF] web: linting pass on kanban tests 2019-02-13 12:23:28 +00:00
Aaron Bohy 0eaee45659 [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.
2019-02-13 12:23:28 +00:00
Pratima Gupta ba5a2b47ac [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 odoo/odoo#30141
2019-02-13 10:35:42 +00:00
Robot Odoo 2d3dbff965 [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. odoo/odoo@f4d541e the `session_id` cookie uses the `httponly` flag so
it cannot be accessed through client side script.

Task 1905359

closes odoo/odoo#30098
2019-02-13 14:16:25 +01:00
Prakash Prajapati 984bf2492a [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 odoo/odoo#28573
2019-02-13 09:43:36 +00:00
Martin Geubelle 7abeaf56b3 [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.
2019-02-13 09:38:30 +00:00
Martin Geubelle 06de564074 [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 (odoo/odoo@9cce88a), so it's about time
to get rid of JSONP.
2019-02-13 09:38:30 +00:00
Martin Geubelle 016f9612ba [REF] web: clean ajax and session 2019-02-13 09:38:30 +00:00
Martin Geubelle 31664422c1 [IMP] web, *: remove explicit references to session_id
Since rev. odoo/odoo@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.
2019-02-13 09:38:30 +00:00
Prakash Prajapati 30128860da [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 odoo/odoo#28573
2019-02-13 09:20:25 +00:00
Luis Torres 25bb9eab17 [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 odoo/odoo#30933
2019-02-12 23:43:26 +00:00
Arnold Moyaux 9f5de8b116 [IMP] stock, mrp: report forecast cell clickable
closes odoo/odoo#30464
2019-02-12 12:12:14 +00:00
Hetashree Chauhan d3f14f6a1d [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.
2019-02-12 12:12:14 +00:00
Thanh Dodeur 0284e5f3fd [REF] account: prepares hooks for reconciliation requests
This commit changes some methods so they can be used in the account_documents enterprise bridge
and adapts activity tests for the new request on upload_file feature.

task: #1928404
related to: odoo/enterprise#3607

closes odoo/odoo#30950
2019-02-11 14:33:15 +00:00
Aurélien Warnon 9352bb682f [IMP] website_slides: improve channel's "members_count" computation
Task #1937160

Purpose
=======

Performance improvement:

The members_count computed field now uses a compute_sudo with
a read_group allowing to compute all the members_count of the recordset
in a single query.

closes odoo/odoo#31013
2019-02-12 09:22:29 +00:00
Prakash Prajapati 3259bad899 [IMP] sale: Improve invoice order wizard
Improve wording of invoice modal.

Task:1939613

closes odoo/odoo#31011
2019-02-12 08:39:20 +00:00
William Henrotin 3989661c1f [REF] delivery: new delivery carrier wizard
Adapt external carriers tests by using the new delivery wizard in sale order.

Task : 1908654
2019-02-11 13:56:36 +00:00
William Henrotin a1f22d599d [FIX] website_sale_delivery: remove unused variable
3bf8e75379 changes the only call to
has_delivery to a check on another variable. This commit removes
the field from the model as it's now useless.

Task : 1908654

closes odoo/odoo#28976
2019-02-11 13:55:55 +00:00
William Henrotin de88a727b2 [REF] delivery: new delivery carrier wizard
On a sale order, the delivery carrier choice was done directly
on the form view. To get an estimated delivery price, the user need to
click 'add to order' to create a delivery fee line. To get the exact
delivery price on the sale order, the user needed to leave the sale
order without delivery line in order to get the exact price from the
picking at its validation.
As this flow was not so clear, this commit adds a new wizard to choose
the delivery carrier and check its commition fees. This add a line in
any case.

The wizard will be launched from a new button on the sale order

Task : 1908654
2019-02-11 13:55:55 +00:00
William Henrotin 8938afa3f6 [IMP] delivery: invoicing policy of delivery price
The delivery carriers get a new field to specify the invoicing
policy. The two cases are :
  - Estimated cost: the delivery price is charged directly on
the sale order based on the estimated fee
  - Real cost: the delivery price is estimated from the sale order
but not added in the delivery line (we get a line with quantity=1 and price = 0).
Once the delivery is validated, the delivery price is recomputed.
The new price depends on the integration level. If it's 'rate', the price is
the estimated one (carrier.rate_shipment()). If it's 'rate_and_ship, the price
is the one given by the carrier at the delivery

The bases carriers (fixed_on_rule and base) always use 'Estimated Cost'
as their price should not be changed between the sale order creation
and delivery validation

Task : 1908654
2019-02-11 13:55:55 +00:00
Robot Odoo 8b7605c9e5 [MERGE][ADD] website_slides_sale: allow to sell slide.channel
Purpose of this merge is to be able to sell courses [1] when using the
slides / eLearning platform.

This commit adds sale capabilities on a slide.channel. A slide.channel can
now have the 'payment' visibility, that requires a 'product_id' configured
on the channel.

When a customer purchases a product linked to a channel, he is added to the
members of the channel (see slide.channel.partner_ids) when his order is
confirmed.

This merge is linked to task ID 1937160 and PR #30914. Future tasks will
improve homepage of channels and clearly show public, private and payment
based channels [2].

[1] see task ID 1902304 (main eLearning task) PR #29876;
[2] see task ID 1936153 (new homepage for slides) PR #30770;
2019-02-11 20:29:40 +01:00
Aurélien Warnon a15810e0c2 [IMP] website_slides: add a setting to install website_sale
Purpose
=======

With the new 'website_slides_sale' module users can now sell slide.channels.

This commit adds a setting to let the user know he has to install website_sale
to be able to sell courses / documentation.
2019-02-11 17:47:35 +00:00
Aurélien Warnon e5536fc07b [IMP] website_slides: add invite wizard for 'invite' slide_channel
Purpose
=======

Currently, the slide_channels having a visibility configured as 'invite' could
only add members manually.

This commit adds an 'Invite' button on top of the slide channel form that opens
a wizard allowing to send emails to contacts and also make them members of the
related slide channel.
2019-02-11 17:47:22 +00:00
Aurélien Warnon 779d9c9b90 [IMP] website_slides: add a "Attendees" stat button on slide.channel
Task #1937160

Purpose
=======

This commit adds a "Attendees" stat button on the slide.channel form view
showing the members (partner_ids) count.

On click, it redirects to a tree view of slide.channel.partner. The tree
view is configured as editable to be able to administrate members
(add/update/delete).
2019-02-11 17:47:10 +00:00
Aurélien Warnon 9b7bee73e5 [ADD] website_sale_slides: allow to sell slide.channel
Task #1937160

Purpose
=======

This commit adds sale capabilities to a slide.channel. A slide.channel can
now have the 'payment' visibility, that requires a 'product_id' configured
on the channel.

When a customer purchases a product linked to a channel, he is added to the
members of the channel (see slide.channel.partner_ids) when his order is
confirmed.

The feature is added in a new module 'website_sale_slides' that comes as a
bridge auto-installed between 'website_slides' and 'website_sale'.

The final goal is to be able to sell "courses" (see task #1902304).
2019-02-11 17:46:40 +00:00
Christophe Simonis 6e8dff1952 [FIX] purchase: correctly extract date from datetime
Oversight of previous forward-port
2019-02-11 14:23:33 +01:00
Nicolas Martinelli 44b791f5d7 [FIX] hr_expense: multi-currency
- Set your company to USD
- Create an expense in EUR:
  Amount: 100
  Tax: 15% Excluded
- Validate, post the journal entries

It crashes because of a missing `.id`, but on top of that... not a
single AML is correct.

opw-1938570

closes odoo/odoo#30987
2019-02-11 12:44:06 +00:00
Christophe Simonis 75eec26da3 [MERGE] forward port branch saas-11.3 up to 728bb2a28e 2019-02-11 12:47:52 +01:00
Nicolas Martinelli f221936f8b [FIX] stock: location company
Force the location and destination location's company to match with the
picking and picking type company. This is to prevent users to move
products between companies without using a transit location, since stock
valuation is not supported.

The record rule `stock_location_comp_rule` gives access to children
companies. The domain added in the view is more restrictive, and allows,
for a company A, transfers from locations:
Company A -> Company A
Company A -> No Company
No Company -> Company A

opw-1893276

closes odoo/odoo#30952
2019-02-11 11:14:26 +00:00