Commit Graph
125147 Commits
Author SHA1 Message Date
eco-odoo 7dfae39db4 [IMP] web: improve attachment files design
Task: 1893104
2019-03-25 10:23:49 +00:00
Cedric Snauwaert 4d7f052612 [FIX] account: change reconciliation widget m2o tax_id to a m2m tax_ids
closes odoo/odoo#26990

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2019-03-12 09:25:15 +00:00
Martin Geubelle 3b9483f170 [REF] web: correctly reuse read_group old datapoint
Rev. odoo/odoo@5c6a7c9 made a change to reuse an old group datapoint when
performing a read_group, instead of restoring *some* properties of the old
group (so basically a `_.omit` instead of a `_.pick`).

This is a bad idea as some properties were bound to the new datapoint
(`evaluateModifiers` for example) so it doesn't make any sense to update
the old datapoint with theses properties.

closes odoo/odoo#31956

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-03-20 09:06:25 +00:00
Christophe Monniez 8bb46e8b96 [FIX] hr_holidays: use api model instead of multi for dashboard
Before 1ced3bfca, the get_days_all_request method was called with the
context as an argument. As a consequence, because of the api.multi, the
first arg is used as the ids of the record. As the id is not used in
this method, it was not harmful. With the above mentioned fix, there is
no more argument. This causes a traceback when clicking on menu "My Time
Off/Dashboard".

With this commit, the api.model is used instead, that way, the first arg
is not considered as ids.

closes odoo/odoo#32119

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-03-26 09:12:33 +00:00
Robot Odoo e64ed7cece [MERGE][IMP] sale_crm : create partner from lead to new quotation
When creating a quotation from a opportunity that does not have any
customer set, we ended up on a quotation without any customer or any of
the contact information entered on the crm.lead.

With this commit, if no customer is set on the opportunity, when hitting New
Quotation button,  a modal is displayed to ask the user what to do to fill in the
customer field.

- Create a new customer : Use the information from the opportunity to create
automatically a res.partner. Set the res.partner on the quotation
and on the opportunity.
- Use an existing customer : Set this customer on the quotation
and on the opportunity.

Extra
For consistency, in the 'convert to opportunity' modal,
move the 'create a new customer' at the top of the selection values
+ change the group title to 'Customer' instead of 'Customers'

Task-1917332

closes odoo/odoo#30475

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-03-26 10:58:23 +01:00
David Beguin c092d8fc6d [IMP] crm : align partner action in lead to opportunity modal on New quotation modal
For consistency, in the 'convert to opportunity' modal,
move the 'create a new customer' at the top of the selection values
to be align with the New quotation - set partner modal
(crm.quotation.partner)
+ change the group title to 'Customer' instead of 'Customers'

Task ID : 1917332
Closes PR #30475
2019-03-25 14:50:55 +00:00
David Beguin 4c9c249cc3 [IMP] sale_crm : create partner on new quotation if no customer set on opportunity
When creating a quotation from a opportunity that does not have any
customer set, we ended up on a quotation without any customer or any of
the contact information entered on the crm.lead.

If no customer is set on the opportunity, when hitting New Quotation button,
a modal is displayed to ask the user what to do to fill in the customer field.

- Create a new customer : Use the information from the opportunity to create
automatically a res.partner. Set the res.partner on the quotation
and on the opportunity.
- Use an existing customer : Set this customer on the quotation
and on the opportunity.

Task ID : 1917332
Closes PR #30475
2019-03-25 14:50:55 +00:00
Christophe Monniez 9ea4fefed2 [FIX] web: avoid click on home menu in community
A fix attempt for the clickEveryWhere test was made in 39e71353c5.
Unfortunately, the last modification of the fix were not tested on the
runbot and introduced two new issues.

1) The click method on the home menu has been changed to use an enhanced
   _click function. This function crash when the jquery element is empty.
   As this menu does not exists in community, the test miserably fails.

2) A "focus" event was added in the _click function that simulates a real click.
   But the "focus" event is not a mouse event and as nothing to do there.

With this commit, the _click function returns immediatly when the
element is empty.

Also, the "focus" event is removed from the _click
simulation but a focus method is used to give focus to the close button.

Giving the focus to the cancel button is itself a fix for the
DateTimePicker field (see 39e7135).

closes odoo/odoo#32082

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-03-25 08:16:24 +00:00
Raphael Collet d87443a213 [FIX] convert: enable kwargs in tag <function>
closes odoo/odoo#31417

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-03-22 16:42:14 +00:00
Raphael Collet 1ced3bfca4 [FIX] *: pass context in kwargs in rpc calls 2019-03-22 16:42:08 +00:00
Raphael Collet 579965adc5 [IMP] api: RPC calls must always pass context as a keyword argument 2019-03-22 16:36:06 +00:00
Christophe Simonis 5df4746c9a [MERGE] forward port branch saas-12.2 up to 230ad8c381
closes odoo/odoo#32088

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-25 11:13:41 +00:00
Christophe Monniez 39e71353c5 [FIX] web: focus on close button when before closing a modal
During the clickEverywhere test, when a modal is opened, the hide method
is called to bypass it. This is not realistic and does not work in some
cases.

For example in Point of sale, menu "Reporting/Sales Details", a modal is
opened with a DateTimePicker (tempus dominus) already opened.
When hiding or closing the modal, the DateTimePicker needs to perform
some cleanup. If the modal is simply hidden, the DateTimePicker is not
cleanly destroyed.

With this commit, a modal is closed by clicking on its close button and
before that, the focus is set on the close button to let the
datepicker widget do its stuff on losing focus.

Also, a more realistic click is done by trigerring more events (code
adapted from tour helper).

closes odoo/odoo#32038

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-03-22 10:28:15 +00:00
Romain Estievenart 230ad8c381 [FIX] web: Add support of button type object on One2Many KanbanRecord
Before this commit, there were a crash if you tried to add an optionnal
product in a new sale order without saving it.

Apply same logic as in the ListRenderer: buttons with type="object" are
disabled for no saved yet records, as calling the python method with no
id would make no sense.

To avoid to expose this logic inside all Kanban views, we define a
specific KanbanRecord Class for the One2many case.

This could be refactored to prevent from duplicating this logic in list
and kanban views.

Original Task ID: 1945006

closes odoo/odoo#31695

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-03-22 10:26:13 +00:00
Swapnesh Shah 3a56e34169 [IMP] mail: highlight re-send alert in BS style
closes odoo/odoo#31890

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2019-03-22 09:18:01 +00:00
Alexandre Kühn 7269fb32f4 [FIX] mail: offline status icon
Revision on https://github.com/odoo/odoo/commit/07a261db7196d3f7aa7d50d98575c5b6efca9242

When a user is offline, the icon status should be an outline bullet.
However, since the commit above, the offline icon was a plain bullet.
Also, the offline icon is hidden when displayed next to user avatar.

Task-ID 1957966

closes odoo/odoo#31970

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2019-03-21 10:39:13 +00:00
Antoine Guenet 1d5daff152 [FIX] web_editor: prevent overriding of toolbar CSS by themes
While waiting for a larger fix of the themes, force prevent overriding
of the web editor's UI CSS by themes. This is achieved by applying
`!important` on all web editor UI CSS. This is a temporary fix until
the themes CSS is fixed and/or the new web editor library is ready.

closes odoo/odoo#31721

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-21 12:57:57 +00:00
Robot Odoo fa93a60e91 [MERGE][FIX] website_slides: clean course and lesson pages layout and fix various small UX issues
Purpose of this merge is to at last perform a cleaning of layout and design for
eLearning pages still not completely updated with magic layout touch.

Impacted pages
 * course (channel) main page: better top and banner, better navigation.
   Improve training content list display, clean documentation content list
   display and navigation;
 * lesson (slide) main not-fullscreen page;
 * lesson (slide) fullscreen page / widget;
 * homepage: clean navigation;

This merge also contains various fixes and UX improvements for fullscreen
lesson display as well as user profile page. Thanks to @stefanorigano and
@qmo-odoo for their input.

This merge closes tasks 1941250 about fixes and layouting of new eLearning
application. Thanks for your attention.

closes odoo/odoo#31977

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-21 14:29:56 +01:00
Christophe Simonis 88102776f1 [FIX] mrp: adapt test to use new fields
Oversight of previous forward-port.
2019-03-21 14:24:31 +01:00
Christophe Simonis 4eff0af02e [MERGE] forward port branch saas-12.1 up to 6878c9f342 2019-03-21 13:58:37 +01:00
Thibault Delavallée ae636d0739 [FIX] website_slides: remove reference to google+ in lesson statistics update
Let us consider this great social network is not necessary anymore.

Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:45:40 +00:00
qmo-odoo 3e09ed1506 [FIX] website_slides: fix various non-fullscreen view issues
This commit provides a few fixes for the non-fullscreen view:

  * remove the subquiz link on slides of type 'quiz' in the sidebar;
  * hide completion icons in sidebar if not member;
  * only show the 'embed on your website' option when a slide has an embed
    code. This will prevent slides of type 'certification' or 'quiz' to
    display an empty embed box;

Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:44:57 +00:00
qmo-odoo 258a1e41b0 [FIX] website_slides: fix various quiz-related issues
This commit provides a few fixes for quiz feature:

  * fix amount of karma won by the user in a quiz;
  * correctly display the fact that a subquiz was completed by the user instead
    of just looking like a non-completed quiz;
  * going on a previously completed quiz, good answers are hightlighted and
    inputs disabled;
  * effectively put the quiz in readonly mode if not a channel member.

Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:44:09 +00:00
qmo-odoo adf80cf708 [FIX] website_slides[_survey]: fix various fullscreen issues
This commit provides a few fixes for the fullscreen view:
  * make external links associated with a slide clickable again in fullscreen
    mode;
  * hide completion icons if not member:
  * add margin to subquiz icon in header;
  * add dedicated button to exit the fullscreen mode;
  * change "Pass certification" button to "Test Certification" if not member
    of the channel (for website publishers);

Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:43:03 +00:00
sri-odoo 64b4461229 [FIX] websiste_slides: perform small tweaks on elearning homepage
In Top menu, replace 'My courses' with 'Search' and adapt responsivness
for small devices. Truncate card's description and perform minors design
tweaks. Also add some slides-specific layouting to email validation banner.

Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:42:19 +00:00
sri-odoo af41430b31 [FIX] website_slides: improve documentation course layout and not fullscreen lesson page
Purpose of this commit is to perform a cleaning of

 * documentation course: add a new specific navigation for documentation
   course with a sort option and filters on slide types; clean overall layout
   of documentation course to have a better-looking result as this page was
   still not really updated;
 * lesson not fullscreen page: global layout and cleaning of not-fullscreen
   page to have a better-looking result. Notably related slides for
   documentation slide is set on right, and some UX bits are tweakes;

Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:39:36 +00:00
sri-odoo f0ec67f106 [FIX] website_slides: improve upload modal overall design
Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:39:31 +00:00
sri-odoo 7d27a6d6bf [FIX] website_slides: improve quiz and its success modal layout and design
Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:39:23 +00:00
Thibault Delavallée de139a8508 [REF] website_slides: cleanup scss ordering, remove unused classes, add placeholder images
Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:39:20 +00:00
sri-odoo d372c8c42f [FIX] website_slides: improve course overall layout and training content list
Purpose of this commit is to improve the global look of course layout
(notably banner, navigation, course / channel informations). Content list
layout displayed in training (orderable) is also tweaked and improved.

Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:39:14 +00:00
sri-odoo d5c6c908f4 [FIX] website_slides: fix course navigation design
Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:39:11 +00:00
sri-odoo b2e555eb0b [FIX] website_slides: fix various fullscreen layout issues
Improve overall widget layout, perform some small tweaks. Also remove
top title as it is not wanted.

Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:39:07 +00:00
sri-odoo 7d0d49b4e3 [FIX] website_profile: improve top banner and navigation and apply various tweaks
Improve the email validation banner and allow adding custom classes when
calling its templates. Also improve top banner design as well as navigation
and tabs.

Finally perform some minor tweaks on design.

Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:38:56 +00:00
sri-odoo da17740634 [FIX] website_rating: fix rating popupcomposer display
Improve overall widget layout, fix stars design and perform some small
tweaks.

Commit linked to task ID 1941250 and PR #31977
2019-03-21 11:38:47 +00:00
Arnold Moyaux eff31f5336 [IMP] account: allow to override _get_reason
Do not pass the function reference instead call it
on self in order to be able to override it.

task_id: 1909413

closes odoo/odoo#30993

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-03-21 08:59:36 +00:00
Pierre Paridans 45e3e432a3 [FIX] web_editor: html field with long links
Following the refactoring of the web_editor (JS & CSS) when adding a
long link in a task's description the line starts to overflow from the
field and create an horizontal scroll.

This commit restores the CSS word-wrap properties to the form field html
allowing to nicely break the line on a word basis, preventing a possible
overflow.

Also it doesn't make sense to apply it on an iframe.

Task ID: 1942179

closes odoo/odoo#31988

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-03-21 08:53:51 +00:00
Arnold Moyaux 277e32d2dc [IMP] stock: allow to change picking on returns
The code that generate the return lines is moved inside
an onchange. The purpose is to allow an inherit that will
modify the picking_id of the wizard. It should trigger the
new return lines without a call to default_get.

task_id 1909413
2019-03-20 14:22:09 +00:00
RomainLibert 6878c9f342 [FIX] hr_payroll: handle timezones coherently in hr.benefit
This commit simplifies the way the timezones are handled in hr_benefit.
Creating a benefit now uses naive datetimes obtained by converting from
the employee's timezone into UTC and then stripping timezone
information.

closes odoo/odoo#31968

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-03-20 11:07:01 +00:00
qsm-odoo 20ae38a62d [FIX] website_blog: restore sharing feature
Broken by renaming mistake of
https://github.com/odoo/odoo/commit/6d67ce5b7cc6f8686a142ca3a834f5bfd98a56d1

closes odoo/odoo#31955

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-03-19 17:30:24 +00:00
Toufik Ben Jaa f0db37b277 [FIX] hr_holidays: allow to create leaves with no validation
- The creation of leaves using "no validation" are not possible
  if the `SUPERUSER` is not in the "Holidays / Team Leader" because
  the validation is made using `sudo`.

OPW-1951316

closes odoo/odoo#31952

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-20 09:08:53 +00:00
Christophe Simonis 6faf9b76cd [FIX] web: adapt new test to new version
Oversight of previous forward-port.
2019-03-19 17:40:56 +01:00
Christophe Simonis 23cb7a9030 [FIX] mrp: create mrp.production via Form in test
Allow to confirm it before planning production.
2019-03-19 16:21:03 +01:00
William Henrotin 9c53a141dc [FIX] mrp: missing default uom
purpose: on a MO, producing via the 'Produce' wizard give the ability to add any additionnal product into the production. 
The issue is that the UoM of the new line is empty and so will trigger an error later in the flow. 
This commit add a new onchange on product_id to ensure the field product_uom_id will be set accordingly

closes odoo/odoo#31950

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-03-19 15:18:27 +00:00
Martin Trigaux 04370bff18 [I18N] export saas-12.2 source terms
closes odoo/odoo#31985

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-20 14:59:50 +00:00
Christophe Simonis c50d7d6bc5 [MERGE] forward port branch 12.0 up to 82c4393fd0 2019-03-19 15:14:23 +01:00
Julien (juc) Castiaux 82c4393fd0 [FIX] website: facebook page id regexp
Some valid facebook pages appear as broken by the preview although
they load perfectly fine afterward.

At facebook, an id is required to perform requests to their graphql
endpoints. The ID is part of the URL of the page, sometime (like Odoo)
the ID is the name of the page and sometime (like LACME France) it is
a generated 9-digits id shown in the URL after the name of the page.

Example of two valid page URL and their page ID:

    https://www.facebook.com/Odoo
                             ^^^^
                             ----

    https://www.facebook.com/LACME-France-910072559192969
                                          ^^^^^^^^^^^^^^^
                             ----------------------------

`^` denotes the page id and what odoo uses as page id after the commit
`-` denotes what odoo used as page id before the commit

opw-19494444

closes odoo/odoo#31922

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-03-19 10:26:58 +00:00
Romain Derie a09236848c [FIX] link_tracker: prevent undeterministic order on new/recent filter
Before this commit, ordering by `create_date DESC` and `write_date DESC` could
lead to undeterministic order if multiple records had the exact same date.
This is the case during tests as `crate_date` is set to transaction start time.
(That's what NOW() in PSQL does)

Now, we enforce that order to avoid randomness.

Related to #31829

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-03-18 13:54:23 +00:00
Romain Derie d0cd971afb [FIX] website_links: fix remaining bugs and restore skipped test
This commit is following c78da8a80 that fixed website_links module.

We had to merge it with a skipped test as there was an error only appearing
with Docker (on runbot or on local with Docker).

This commit fix that test error and some other remaining bugs not found during
the first fix:
1. Fix the test error by adding a step to show recently used links. Indeed the
   bug was that newest links would return inconsistent order as both 2 links
   created during the steps have the same creation date.
   On runbot it would click on the wrong link, the one which has 0 clicks.
   Then JS would crash (see error bellow).
2. `websiteLinksCharts` JS animation class would execute all the `start`
   method code even if there was no `_totalClicks`. JS would then crash as
   `beginDate` would not be set correctly. Before the refactoring all that code
   would be skipped as surrounded by an if/else condition.
3. BS3 to BS4 broke the nav-tabs layout to switch between 'Newest, Most Clicked
   and Recently Used. `mt16` needed to be removed.

Closes #31829
2019-03-18 13:54:11 +00:00
Lucas Lefèvre b5c31bddfd [FIX] hr_payroll: Generate payslips with datetime
When payslips are generated from the benefit calendar
view by clicking on the "Generate Payslips" button, the js
puts the start and end date in the context.
Start and end are js Date objects, respectively the start and end of the month

e.g.
start: `Fri Mar 01 2019 00:00:00 GMT+0100 (Central European Standard Time)`
end: `Sun Mar 31 2019 23:59:59 GMT+0200 (Central European Summer Time)`

The Dates are first transformed to a string before being sent to the server
by `time.datetime_to_str`.
Because this function change the timezone to UTC, the start date becomes
the previous day at 23:00:00.
The payslip start date is therefore wrongly set to the previous day.

closes odoo/odoo#31919

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-03-18 13:20:29 +00:00
David Beguin a13e33ddda [FIX] website_slide{_survey} : apply various fixes on elearning views
- Fix certification card in user's profile page

Since design review, certification card were not displaying well.
This commit applies the course card template on certification card
and modifies the way the certification get downloaded by calling directly the
controller instead of using class catched in javascript that calls afterward the
controller.

- Allow review button only if allow_comment in FS mode + redirect url

'write a review' button in fullscreen mode must not be displayed if the course
is not in allow_comment mode. Also, the url if this button was redirecting
to slide view in non fullscreen mode. As no review can be done from this point,
the url redirect now to the course view.

- Fix fullscreen slide height.

- Fix all slides view per category pager and page rendering

Since the introduction of categorized data dictionnary that is given to the template,
if a category is empty, it's rendered anyway, which is good for publisher,
to quickly see all existing categories.
But other users should not see those empty categories.

Also, if the slides from a course are filtered (with View all button) by category,
all the slides should be reachable, using the pager. This was not the case as
categorized slides dictionnary returned no slides if page <= 2.
(as bound of array was from offset to limit and offset and limit were equals)
The number of slides per category must be overwritten if search category is activated,
to see more than the 4 first slides of the category.

Finally, if search category is activated, only the target category should be displayed,
and not the others, for performance reason.

- Show 'not verified' next to user's name if user karma = 0

Instead of using the email_validation_done flag. As email validation is only used
to offer the user some karma in order to be able to interact in the forum or eLearning.
If the user already has karma, he is already considered as active and 'verified'

- Correct URL of certification in FS mode

Task ID : 1941250
Closes PR #31567

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-19 13:03:51 +00:00