Commit Graph
126133 Commits
Author SHA1 Message Date
qmo-odoo e8e8d7a956 [FIX] website_slides_survey: certification slide url
Before this commit, in fullscreen mode, clicking on the "pass certification"
button would redirect the user to the "non-fullscreen" view.
After this commit, the button directly redirects the user to the survey page.

To avoid generating user_input of survey (test entry or not) for
certification slides in fullscreen mode (table of content), we decided
to create those user_input lazily: we redirect the user to a route that
create (or reuse) the correct user_input.

Task-1946511
2019-03-15 20:38:58 +00:00
Aurélien Warnon 44ae98d3dd [IMP] survey: add a download button at the end of certification process
Purpose
=======

When the user successfully takes a certification, he can download the certification
document using a new "Download certification" button.
(In addition to receiving an email containing the certification)

Also cleaned a bit the way certifications are downloaded.

Task-1941250
2019-03-15 20:38:58 +00:00
jem-odoo 34f7266792 [FIX] website_slides: avoid putting unexisting attribute on object
In this computed field, an attribute is assigned to the record
but this attribute does not exist. Python authorized this but
this makes the code ugly and this is definitely not a good
practice.

Task-1941250
2019-03-15 20:38:58 +00:00
jem-odoo 954e8ca6d4 [FIX] website_slides: prevent to mark a certification as done
When a certification slide is display in no fullscreen
mode, the done button is clickable. Same applies to quiz
slide.
This commit prevents user to manually mark a slide as done
for slide type that requires an other action (submit answer,
pass survey, ...).

Task-1941250
2019-03-15 20:38:58 +00:00
jem-odoo 32c5632aa5 [FIX] website_slides: auto set done successfull quizz
For now, in no fullscreen mode, if the quiz is succeed, the
user progress is not updated because the quiz is not set
to done.
This commit implements this call to mark slide as done and
green the check bullet.
We decided to unify the submit RPC call with the done one,
so a quiz (or a slide with questions) can only be done when
submitting answers. As consequence, we need to prevent some
slide type to use the /set_completed route (quiz and certif).

Task-1941250
2019-03-15 20:38:58 +00:00
Aurélien Warnon 55f61d95bf [FIX] website_slides: avoid access error when submitting quiz
Purpose
=======

The quiz_submit method and the action to set the quiz done both use
the slide_partner relation that has to be accessed in sudo mode.

Task-1941250
2019-03-15 20:38:58 +00:00
sri-odoo 54261c4e3e [IMP] website_slides: embedded player restyling
The style and DOM structure of the embeded player (used
to display PDF file) is old, and it needed a little refresh
to be adapt to bootstrap4 and modern styling.

Task-1941250
2019-03-15 20:38:58 +00:00
sri-odoo 69fb136a48 [FIX] website_slides: styling fullscreen mode
Since the fullscreen widget has been revamped, it needed
to be pixel perfect. This commit cleans the CSS and DOM
structure in order to optimize and sublime it.

Task-1941250
2019-03-15 20:38:58 +00:00
Robot Odoo 77fa2d6903 [MERGE][IMP] website_slides, website_*: email validation, comment restrictions with karma and search user profile
This merge is improving various points linked to eLearning.
Impacted modules: website_profile, website_forum, website_rating and website_slides

- Move validation email from website_forum to website_profile to use the feature in both Forum and elearning. The purpose is to give first karma points to allow users to comment, vote, ... on slides.
- Add search bar in 'all users' page. To do so, we needed to introduced the `karma_position` field.
- Restrict comment, review and vote based on user's karma in eLearning (minimum karam required to review/vote/comment, like in forum). This feature required to add 3 stored fields, with the benediction of chs !
- Fix channel completion computation and linked karma gain. Also provide some test on karma gain.

See sub commits for more details.

Task-1943788

closes odoo/odoo#31321

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-03-15 20:00:40 +01:00
David Beguin 5798ca28bf [IMP] website_slides : improve get slide access computation
As slides are returned in sudo to the template, the user rights were
checked via a can_access variable set in the template directly.
In order to disable the vote for user that cannot get access to the course
all the checks are now done in backend (also to avoid to get access to slides
in sudo mode with rpc calls). We add now, for each slide on the course view,
the access and vote rights to the template : can_access and can_vote.
Those two are computed in backend, using the user's access right instead of admin's.
But, as if the user is not member of the channel, he cannot get access to the
course slides (expect for Free Peview ones), so the check on can_vote
will crash. This is why we check the access rights before checking can_vote,
for each slides (as free preview slides are still accessible,
even if the user is not in channel members).

The vote widget is disabled if user's can_access or can_vote = False, enabled otherwise.
If user have access but have not enough karma, the controller will handle this
case and return an error to the user telling him he has not enough karma to vote.
If user can vote but cannot access, the controller will handle this
case and return an error to the user telling him he has no access to the lesson.

Task ID: 1943788
PR #31321
2019-03-15 15:05:54 +00:00
David Beguin d4db21a9cc [IMP] website_slides : allow review, comment and vote only if enough karma
To avoid eLearning to be spammed, the comment, review and vote behaviours
are now allowed only if the user has enough karma to do it.

Here is the new behaviour on courses and slides rating / comment / vote
    -If allow_comment is checked on Course :
        - Review (rating) is allowed on Course only if enough karma
        - Comment is allowed on slides within the course
            only if enough karma and course type is 'training'
        - Vote is allowed on slides within the course
            only if enough karma and course type is 'documentation'
    -If allow_comment is not checked on Course :
        - Review (rating) is not allowed on Course
        - Comment is not allowed on slides within the course
        - Vote is not allowed on slides within the course
    - Rating is not allowed on slides within the course anymore

Task ID : 1943788
PR #31321
2019-03-15 15:05:54 +00:00
David Beguin 81cebf3485 [FIX] website_slides : fix and add tests on karma gain
Fix karma channel completion computing and karma gain :
    set to complete only if not completed
    and handle eventual multi course completion
Removes unused karma gain rules.
Add karma unvote rule to loose the karma gained if user changes his mind.
Test karma gain on each users.
    Note : technically, public user could be member of a course,
    but functionally speaking, this case should and could never happen
    (it's a non sens anyway)
    -> public user has not been tested for this reason.

Task ID : 1943788
Closes PR #31321
2019-03-15 14:59:40 +00:00
David Beguin d7cc1520f4 [IMP] website_profile, gamification, : add search bar in all users page
This commit adds the search bar in 'All users' page in order to filter on name or company name.
To be able to keep the position, a non stored computed field has been added on res_users
to get the position depending on the user's karma.

The podium (top 3 users) is now displayed only if there is no search applied and if the page = 1
because it has no sens anymore in other cases.

Special thanks to @jem-odoo who helped me finding smart solution for position computing.

Task ID : 1943788
PR #31321
2019-03-15 14:59:12 +00:00
David Beguin fb40c6bf60 [IMP] website(_profile,_forum,_slides): move validation email to profile and use in forum and elearning
Email validation was necessary on the forum to be able to begin to use the forum
(ask or answer questions, vote, etc..)

As the new elearning also uses karma since 705376a982,
the email validation is now also necessary in the eLearning platform.

This is why this commit is moving the email validation process to website_profile
and extend website_slides (eLearning) and website_forum to use this feature.

In function of where the user asked to send him the validation email,
the user is redirected on the forum or on the elearning when he clicks on
'Validate my account' in the received 'email validation' email.

Task ID : 1943788
PR #31321
2019-03-15 14:58:28 +00:00
Christophe Simonis bbedcdb190 [MERGE] forward port branch saas-12.1 up to ff1bca32f3 2019-03-14 19:44:55 +01:00
Sébastien Theys fec83667bb [FIX] web: fix kanban_image when called for a different record
The issue is manifesting for example in the Contact kanban view where the
company image should be displayed in small. Before this fix, the person image
was displayed twice instead.

Following PR #30881 and commit: f78b7a76d6

The fix introduced by the above commit highlighted another issue with the
method: if the `model` and `id` given in parameter are different than the
current record, the method returned the url for the current record instead of
the requested record.

To fix the issue, we return the `raw_value` only if the requested record is the
current record. Otherwise, we return the manually built url.

PR: #31842

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-14 14:10:54 +00:00
Andrea Ulliana e73ad6127e [FIX] website: restore ace editor resize and line numbers
Following the new editor's merge at https://github.com/odoo/odoo/pull/29775,
the gutter in ACE Editor was broken. We were not able to resize and view
the line numbers anymore.

closes odoo/odoo#31838

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-14 10:22:16 +00:00
Nicolas Martinelli b5921fbfa8 [FIX] sale: exclude all attributes
With the demo data:
- Go to Sale > Products > Products, search for 'Customizable Desk'
- Click on 'Configure Variants'
- For variant 'Legs: Steel', add all attribute values for the
  'Conference Chair'
- Create a SO, add a line with 'Configure Product'
- Select the 'Customizable Desk' with 'Legs: Steel', add

Boom boom, traceback at template rendering at
`first_possible_combination[variant_id_index] == value_id`

This is because the `parent_combination` is not taken into account when
evaluating `_is_add_to_cart_possible`.

closes odoo/odoo#31496

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-14 08:08:45 +00:00
Nicolas Martinelli 35221a3243 [FIX] product: exclude without attribute values
With the demo data:
- Go to Sale > Products > Products, search for 'Customizable Desk'
- Click on 'Configure Variants'
- For variant 'Legs: Steel', remove the attribute values for the
  'Conference Chair'
- Create a SO, add a line with 'Configure Product'
- Select the 'Customizable Desk' with 'Legs: Steel', add

The 'Conference Chair' is displayed in the 'Available Options', while it
shouldn't.

The methods `_get_own_attribute_exclusions` and
`_get_parent_attribute_exclusions` compute the exclusions based on the
attribute values. Since there is no values in our case, the exclusion is
not taken into account.

We add a specific case to search for exclusions without values.

opw-1945460
2019-03-14 08:08:45 +00:00
Christophe Simonis f5ab04ce50 [FIX] web: adapt new test to extra rpc call made on view loading 2019-03-13 17:55:13 +01:00
Christophe Simonis afe8e97800 [MERGE] forward port branch 11.0 up to c23d1186e7 2019-03-13 16:52:40 +01:00
goran.kliska d2a6554932 [CLA] add Decodio Applications CLA
closes odoo/odoo#31824

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-13 15:48:30 +00:00
Christophe Simonis c23d1186e7 [MERGE] forward port branch saas-15 up to 21ef0f4f6d 2019-03-13 16:15:34 +01:00
Christophe Monniez 0201d896d8 [FIX] packaging: include pot files
Since #26134 the po files are compared with pot content when loading a
translation. If a term is found multiple times in a po file, the terms
that does not exists in the pot files are ignored. If the pot files does
not exists, the unicity constraint leads to an error.

Closes #31583

closes odoo/odoo#31823

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-13 15:10:02 +00:00
Christophe Simonis 21ef0f4f6d [MERGE] forward port branch saas-14 up to d5a8b238fa 2019-03-13 16:06:34 +01:00
Christophe Simonis d5a8b238fa [MERGE] forward port branch 10.0 up to 49ca43d75c 2019-03-13 13:23:43 +01:00
tarteo a9a8eeac1d [FIX] account: show missing 'Go to bank statements' button
When importing bank statements, a rainbow man is shown but with no action button
The active model is account.bank.statement.import in this context

Before this commit, the rainbow man was staying with no possible action

closes odoo/odoo#30723

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-13 10:44:15 +00:00
Nicolas Martinelli 1c912767d1 [FIX] stock_account: dropship & AVCO
- Activate: 'Order-Specific Routes' and 'Dropshipping'
- Create a stockable product in AVCO + AUTO
- Purchase the product at $10 and validate the receipt
  => One product @ $10 in stock
- Sell the product via dropshipping
- A PO is generated, change unit price to $20, validate
- Validate the picking

The product in stock has now a cost of $15, i.e. the dropship impacted
the cost of the product.

Now if the product in stock is sold, the product will go out at a cost
of $15. This will lead to a wrong accounting valuation (0 product in
stock with -$5 in stock).

opw-1922289
opw-1935272
opw-1937672

closes odoo/odoo#31786

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-03-13 09:55:40 +00:00
Martin Geubelle 170c7632f2 [FIX] web: hide handle on readonly x2m
The widget handle was displayed on x2m fields in form views, even when
the field was readonly, which makes no sense.

It is now correctly hidden.

Fixes #30580
opw-1937833

closes odoo/odoo#31743

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-13 09:31:37 +00:00
David Beguin 85b0b37dcc [IMP] survey : add retry survey button if no scoring or nbr of attempts left > 0
In order to allow the user to ealisy retake the survey he just either passed
or failed (in case of scoring activated), a retry button is added not only
in case of failed scoring survey (like it was already the case)
but also for non scoring survey.

This button is also added in the review survey page, to get direct access to
retry the survey.

The rule is the following and apply to all survey types :
If not quizz passed (this will be always true for non scoring survey):
    if is_attempts_limited
        if attempts left
            Add retry button
    else
        Add retry button

Task ID : 1950429
PR #31802

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-13 08:20:54 +00:00
Jeremy Kersten 20fa4e7ba1 [FIX] website_form_editor: fix dependencies 2019-04-08 08:09:26 +02:00
Jeremy Kersten 20f17a0948 [MRG] website_form_editor: move to community 2019-04-08 07:28:34 +02:00
Jeremy Kersten a8f83f6541 [FIX] website_form_editor: prepare move to community 2019-04-08 07:26:57 +02:00
asa-odoo e16fbee993 [IMP] sale: terms and conditions improvement
purpose: de88a727b2 introduced
a change in the sale order view. it reduced dramatically the size
of the 'terms and conditions' widget.
This commit set back easily readable dimensions

Task : 1950799

closes odoo/odoo#32129

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-05 11:55:01 +00:00
Thibault Delavallée 0b47b2f22c [REF] l10n_it_edi, website_forum: give email_from / author when creating messages and mails
Purpose: clean mail.mail creation code and use standard mail creation or
template send_mail method. In those addons we ensure author and email_from
are set to maching values, leading to more consistent emails.

Related task ID 1965040
PR #32459

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-05 14:05:31 +00:00
Thibault Delavallée ea3f4690aa [REF] crm_iap_lead: correctly use template to send emails
Purpose: clean mail.mail creation code and use standard mail creation or
template send_mail method.

In crm iap lead we can avoid custom mail creation by correctly using
send_mail method of mail template and its arguments.

Related task ID 1965040
PR #32459
2019-04-05 14:05:31 +00:00
Thibault Delavallée e7905b820d [REF] calendar: clean strange email send code
Purpose: clean mail.mail creation code and use standard mail creation or
template send_mail method.

In calendar there was strange code creating an email based on a template
then updating some values on its mail.message record created through
inherits. It seems simpler to correctly set some specific email arguments
to MailTemplate.send_mail() method and avoid this kind of code construction.

Related task ID 1965040
PR #32459
2019-04-05 14:05:31 +00:00
Thibault Delavallée 742effec8d [FIX] mail_template: correctly compute / update attachment_ids in send mail
Attachments when generating an email based on a template are done in two
steps, see notably [1]. However mail generation replaces attachments using
a 6 command. This means existing attachments given through email_values
are not correctly managed and this leads to invalid command given to the
m2m field.

This commit fixes that by correctly generating a list of commands, using
4 (add) for new attachments coming notably from reports linked to the template.

Related task ID 1965040
PR #32459

[1] https://github.com/odoo/odoo/commit/f789005c9a6c26322565a1af7cc4e57a60eab9f0
2019-04-05 14:01:13 +00:00
Christophe Monniez f60636aefa [IMP] web_tour: add a startTour helper on odoo
As a start_tour helper was added on the python side (PR #32316),
a javascript helper counterpart was needed as suggested on the PR.

closes odoo/odoo#32441

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-04-05 08:53:14 +00:00
Darshil Trivedi bedfaac989 [IMP] point_of_sale: point of sale onboarding improvement.
- Improved description of point of sale application
- Removed status from card like 'In Progress' and 'Unused'
- Click on top-right corner of POS kanban card, it shows 'Sessions' and 'Sales Orders', now it will shows 'Orders' and 'Sessions'. (for usability purpose).
- Improved Multi-Currencies wording same as invoicing
- Removed 'Advanced Currencies Setup' from settings(when clicking on 'Multi-Currencies').
- Improved list view label on 'Point of Sale'.
- Added 'PoS Product Categories' feature in 'Restrict Available Product Categories'.
- In PoS config setting, 'Pos Interface' string is put instead of 'Order Interface'.
- Filter and display issues were there when setting 'Currencies' from 'Multi-Currencies', now it is resolved.
- String 'PoS Product categories' is put instead of 'PoS Category', as it seems meaningful.
- 'Restrict Available Product Category' is ticked but any category is not selected (it means it is kept blank), then all categories are shown at POS screen.
- Allow to set default category from the available categories
- 'iface_start_categ_domain_ids' is removed because domain for 'iface_start_categ_id' is given directly in the model. So 'iface_start_categ_domain_ids' will not be required anymore.

 This commit is related to task id: 1925458

closes odoo/odoo#30808

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-04-04 12:34:01 +00:00
Shreya Modi c7c0221a48 [IMP] Delivery: Hide shipping button
On a sale order, if all for product are services, we hide
the delivery related button ('add a shipping cost' and 'recompute delivery price')

Task : 1940491

closes odoo/odoo#32145

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-04-05 06:59:03 +00:00
Juhil Somaiya 6f42b5ed0f [IMP] website_sale: make 'description_sale' editable in frontend
With this commit, `description_sale` is now editable in frontend.
We also display a clear placeholder to warn user that anything in this field
will be reflected on backend document (SO/Invoices).

task-1951231

closes odoo/odoo#32206

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-05 04:50:32 +00:00
Sébastien Theys 1b8b76cf7a [IMP] tests, *: add start_tour helper
Enterprise counterpart of https://github.com/odoo/odoo/pull/32316

closes odoo/enterprise#3987

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-04-04 08:45:38 +00:00
Sébastien Theys df7326f0be [IMP] tests, *: add start_tour helper
Before this commit, the syntax to start a tour was extremely verbose.
With this new method, it is possible to start a tour by just giving the
essential parameter: the tour name.
The full set of features from browser_js are kept by using **kwargs.

closes odoo/odoo#32316

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-04-04 08:44:59 +00:00
Robot Odoo 7529bd35fa [MERGE][IMP] sale_*: report and portal fine tuning
This merge changes lot of small things in sale modules. The 3
main points are
- Sales Orders form view: reorganize fields for a better usability
and renaming labels
- Sale PDF report: renaming labels and titles, moving some report section
- Quotation Portal: improving style, moving section and renaming labels

Task-1920476

closes odoo/odoo#30550

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-04-04 16:28:14 +02:00
asa-odoo fb2fc0b3d8 [IMP] sale, account, purchase, repair, POS, delivery: shorter fields label
In described Modules, there are some fields label like Unit of measure, Discount,
Ordered Quantity, etc... in views(list,form), report and portal, that are messy
and barely readable when lots of features are installed.

Purpose of the task is to shorter that all fields label to make clean view in
order to make it more readable without getting labels uselessly spread out on
several lines

Related to task #1933746
Closes #31962

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-04-04 09:38:18 +00:00
Prakash Prajapati f5628b1b8d [IMP] sale: Improve the Sale order mail template.
Rename the attachment file name.

Restore the option : have the name of the customer who viewed the quotation on the email notification

TaskID: 1920476

closes odoo/odoo#30550
2019-04-04 08:59:01 +00:00
Prakash Prajapati c76c93a9ac [IMP] sale, website_sale, *: Improve the sale order form.
Relabel placeholder of terms & conditions.

Restructure tab "Other Information".

Improve the tooltips.

TaskID: 1920476

closes odoo/odoo#30550
2019-04-04 08:59:01 +00:00
Prakash Prajapati 407834d1ca [IMP] product: “Public Price” into “Sales Price” in the pricelist.
TaskID: 1920476

closes odoo/odoo#30550
2019-04-04 08:59:01 +00:00
Prakash Prajapati 4327fbebfd [IMP] sale, sale_management, sale_stock: Improve in the portal view.
Small changes in quotation portal view:
* Reposition the 'Expiration Date'
* Added Incoterm info
* Added ":" after address
* Rename Details => Pricing
* Rename Optional Products => Options
* Remove "discount" in the column "discount" after the % In the
section "Options" add "10% discount" like in the printed report
* Add payment terms note

Purpose is to make it a little more beautiful and cleaner
for end user.

Task-1920476
2019-04-04 08:59:01 +00:00