Commit Graph
124195 Commits
Author SHA1 Message Date
Yannick Tivisse 82d4a9a885 [IMP] hr_payroll: Install the correct module when enabling accounting
Closes #29207
2018-12-06 13:15:36 +01:00
Yannick Tivisse c45bb4abda [IMP] l10n_br_hr_payroll_account: Remove useless dependency 2018-12-06 13:15:36 +01:00
Yannick Tivisse 19b6129e90 [IMP] l10n_in_hr_payroll: Add dependency to l10n_in 2018-12-06 13:15:36 +01:00
Yannick Tivisse bac90d6afd [IMP] l10n_be_hr_payroll: Add dependency to l10n_be 2018-12-06 13:15:36 +01:00
RomainLibert 6f5dc5733f [IMP] lunch: reintroduce lunch_alerts, change display of wizard
We want to be able to use alerts in order to display a message to the
users.
We want to have a minimal display in the wizard.
We want to link the toppings to the categories instead of the suppliers.

closes odoo/odoo#29301
2018-12-06 09:33:30 +00:00
Christophe Simonis e1f9499d26 [MERGE] forward port branch 12.0 up to 053bb45706 2018-12-05 18:46:15 +01:00
qmo-odoo 1da63f0ab0 [IMP] salesteam: Simplify sales team config and improved team dashboard
Reason:
  *Sales team configuration is too complex with fields you
   don't understand and that bring no added value
  *Remove the team type, every team should be able to handle
   a POS or a website for example
Contains:
  *Removal of the team_type, use_quotations, use_leads fields
  *Removal of the graph configuration fields
  *Adapting the filters that were based on the team_type
  *Clear distinction between the team dashboard behavior in crm
   from the one in sales
  *Cleansing of now dead code due to the removal of the previously
   mentionned fields

Task: #1830105
Enterprise PR: #3006
Closes: #28063
2018-12-05 15:32:53 +00:00
Thibault Delavallée 58997a9557 [REV][IMP] base: Improve search and ordering in settings
This reverts commit 01173f3745.

This commit added improvements in search and ordering of settings. However
due to DOM manipulation some events are not bound correctly. Notably saving
settings could be broken if several different tabs are modified before
saving.

After checking more in-depth settings code it appears it will be difficult
to ensure a proper re-rendering and re-ordering of settings without having
to modify deeply the code. This is therefore more a task for JS framework
team.

closes odoo/odoo#29285
2018-12-05 14:38:41 +00:00
qsm-odoo 73987067fc [REF] website_sale: use new colored cards
Since https://github.com/odoo/odoo/pull/29253, we change the way cards
can be colored by always using the background color class on the card
element itself instead of its header and footer (and by changing the
way it looks by doing so).

This commit removes the use of the old way (introduced by
https://github.com/odoo/odoo/commit/64719b71d5997c0463a9f8cde4fb8d1f5c88967a).
Note that this commit leaves the `bg-*-light` definitions for now; they
are meant to be improved in the future anyway.

closes odoo/odoo#29253
2018-12-05 10:33:48 +00:00
qsm-odoo ddf2d2dd66 [IMP] web: patch BS4 to have beautiful colored cards
BS4 colored cards do not have a very popular design. This will reset
them to a BS3-like one: only the header and footer are colored and the
body will use the color of a default card background with a light
opacity (to let the chosen color appear).
2018-12-05 10:31:37 +00:00
David Beguin a1aec33736 [IMP] crm, mass_mailing_crm : remove useless override of message_get_default_recipients
As CRM inherits directly of blacklist mixin, no need to re-override
the message_get_default_recipients in the bridge module.
This code was even not in the good place.

Anyway, email_normalized can be directly used in the
message_get_default_recipients override in crm module itself.

Task ID : 1915317
Related Task ID : 1896677

Closes PR #29261
2018-12-05 08:36:14 +00:00
Robot Odoo 5ae1432ae6 [MERGE][FIX] survey: allow to launch tours by fixing assets, tour declaration and dependencies
Purpose of this merge is basically to allow launching survey tour in browser and command line. Several fixes are necessary to achieve that purpose. See sub commits for more details.

This merge is related to task ID 1915356.

closes odoo/odoo#29264
2018-12-05 12:18:52 +01:00
Thibault Delavallée 63bfd0c1bf [FIX] survey: make dependency to web tour explicit
This commit is related to task ID 1915356 and PR #29264.
2018-12-05 10:24:52 +00:00
Thibault Delavallée 987a249719 [FIX] survey: fix base URLs for survey tours tests
Currently surveys tours are launched starting from / . However on this page
survey assets are not launched meaning ready code for survey tours is never
true.

Correctly setting base URL to be on a page loading survey assets unlocks the
ready code computation and allow to launch tests from command line notably.

This commit is related to task ID 1915356 and PR #29264.
2018-12-05 10:24:06 +00:00
Aurélien Warnon 1291ac11af [FIX] survey: add missing assets to launch tours
Tours in survey cannot be launched due to missing assets. Currently on runbot
website is installed before survey and with a nice side effect tours are
launched and green. However with survey installed without website tours
cannot be launched either in browser or using command line.

This commit is related to task ID 1915356 and PR #29264.
2018-12-05 10:10:39 +00:00
Juhil Somaiya b77c924563 [IMP] mrp: Operation set manual time as default
When the user create an operation, the system set the
operation time based on previous workorders. However they
don't exists since we just created the operation and the
default time is 60 minutes. It would be easier to ask for
a default value based on fixed time and let the user modify
it later manually after some workorders.

The commit is related to task id: 1910342

closes odoo/odoo#29208
2018-12-05 09:14:11 +00:00
Antoine Prieels (ANP) 523f3a0e68 [IMP] crm_reveal: Usability Improvements
- Rename labels and reorder fields
- Add support for states
- Add contact_filter_type
- Add filter_on_size

closes odoo/odoo#28968
2018-12-04 09:25:16 +00:00
lul-odoo 48254cc8a1 [IMP] hr_org_chart: Allow recursion in hierarchy
Employees can appear multiple times in the org chart

Purpose
=======

Allow recursive hierarchy (an employee can be its own manager; e.g. the CEO is manager of everyone
but is also member of a department managed by the CTO who is himself managed by the CEO).
This means an employee might appear in multiple place in the organisational chart.

The button to see more of the hierarchy in the organisation chart opens all employees under the N+2 of the
current employee being displayed but does not open the view of the N+2.

Specification
=============

Add 'subordinates_ids' computed field on 'hr.employee' to get all subordinates (direct and indirect).

closes odoo/odoo#27900
2018-12-06 13:56:45 +00:00
lul-odoo 24609722f1 [IMP] hr_payroll: Add tests for benefits
Some behaviors were not tested.
Add 2 tests for payslip generation with additional benefits (type leave or not)
It checks that corresponding worked_day_lines are created in the payslip.

Add a test for validating a multiple day benefit: it should be split by day.

closes odoo/odoo#29304
2018-12-06 09:21:48 +00:00
qsm-odoo 8f184b3585 [FIX] web, *: make gray utilities available for all bootstrap
* web_editor

Before this commit, the web_editor app defined gray utilities: bg-* and
text-* classes for gray colors (on top of theme colors). Those are now
defined for all bootstrap (note that this was already the case as the
web_editor file was put in the backend and in the frontend). The
difference is that now the gray utilities are defined just after
the standard bootstrap. This allows to complete and fix
https://github.com/odoo/odoo/pull/29253/files as text-muted in gray
card bodies were not using the correct color without this (see code
comments for details).

closes odoo/odoo#29290
2018-12-06 10:05:57 +00:00
Robot Odoo a98f1319d5 [IMP] web: add better modal scrolling for frontend
Odoo overrides the modal behavior to make the modal-body scroll
instead of the <body/> when the modal would overflow the window. This
was however only done for "technical" modals i.e. the ones of the Odoo
UI, not the website/portal ones which are displayed to visitors.

This commit makes the behavior active for all bootstrap modals wherever
bootstrap is used.

closes odoo/odoo#29277
2018-12-06 14:38:08 +01:00
qsm-odoo c59a7e1b80 [IMP] web: add better modal scrolling for frontend
Odoo overrides the modal behavior to make the modal-body scroll
instead of the <body/> when the modal would overflow the window. This
was however only done for "technical" modals i.e. the ones of the Odoo
UI, not the website/portal ones which are displayed to visitors.

This commit makes the behavior active for all bootstrap modals wherever
bootstrap is used.
2018-12-06 11:13:05 +01:00
Christophe Monniez 3671d41ab7 [FIX] lunch_hr: remove deprecated pycompat helper
Python 2 helpers were removed in 758382b3a .
Also, fix a typo in a search domain.

closes odoo/odoo#29258
2018-12-05 07:38:58 +00:00
David Beguin 3ca10b9692 [IMP] im_livechat : optimize reports queries
Before, the duration and time to answer where computed based on the
mail channel creation date and
- the first message date from operator (for time to answer)
- the last message date (for duration)
But as the mail channel can be created long ago before the first message,
the result was not really representative.

Now, we are basing the computation only based on the messages.
Time to answer : first message date from operator - first message date
Duration : last message date - first message date

It allows, with the add of the second join on mail_message,
to simplify the extraction of those two indicator by removing the long
subselects.

Also, we fix the nbr_message in operator by adding the missing distinct.

Special mention to @jem-odoo who clearly did (almost) all the work :
This guy is amazing ! After a long and mature reflexion,
he finally put all his mighty power to enhance thoses reports
to give the users a wonderfull experience full of flowers and
peacefull sun, but also fast as a energized rabbit superhero !
Hail to him ! The One, the Only, the Chosen..
If you see him around the corner, please give him all your love
and gratitude ! Voilà voilà..

Task ID : 1895998
Closes PR #28283
2018-12-06 09:30:22 +00:00
David Beguin f513ee902c [IMP] im_livechat, website_livechat : add livechat username
To avoid that people know the complete name of the support members
(for privacy purpose), a username can be used.
Users have the opportunity to set and modify their username in
their user preferences.

If the username is not set, the complete name will still be used.

If the username is set, it is used for the discussion title, the
name of the message sender, the name of the team members in the
channel statistics. All of this, only in the livechat context.

Task ID : 1895998
Closes PR  #28283
2018-12-05 14:37:14 +00:00
David Beguin bfb18f4326 [IMP] im_livechat : avoid double notif for public livechat channel and clean method
As in super, we add uuid and message if channel is public
we have to exculde the public channel to add the same in a livechat case

Also, _channel_message_notifications is a bit rewritten to remove useless
code. Indeed, notifications will always be filled in as
_channel_message_notifications is only called by _notify that ensure that self
is not null and that message is singleton. In super, the notifications will then be
filled in and in override, no need to check if notifications is not empty.

We take the message dict from notif to avoid calling message_format a second time.

Task ID : 1895998
Closes PR #28283
2018-12-05 14:37:13 +00:00
David Beguin ce20c29f82 [IMP] website_livechat : show ratings per operators in channel stat webpage
This commit adds more precision about ratings per operators for a
specific channel. Only the operators that have been rated on the last 100
feedbacks have their statistics displayed. The other operators that did not
worked (or have not been rated) on the last 100 feedbacks are still displayed
but are flaged as 'Not rated yet', so we still can see who is working on this
channel.

Task ID : 1895998
Closes PR #28283
2018-12-05 14:37:13 +00:00
David Beguin 95aa9f278f [IMP] im_livechat : store assigned livechat operator
By adding a livechat_operator_id on the mail.channel, we ensure that,
even if the operator of the discussion is removed from the operators
of the livechat.channel, we can still know who was the operator,
at the time of the discussion.

In that way, we can still keep the history of the former assigned operator.

[IMP] im_livechat : simplify channel and operator reports

As Operator_id is required for livechat channel,
we can assume that if livechat_operator_id is not null,
then it's a livechat channel. also, as we have the partner_id
stored in livechat_operator_id field, no need to join
partners and users tables anymore to get the operator
of the channel.

Task ID : 1895998
Closes PR #28283
2018-12-05 14:37:13 +00:00
David Beguin 2986a5a412 [IMP] im_livechat : add measures to channel report to be used in Dashboard
Adds some indicators in channel report in order to use them in the new
enterprise livechat dashboard. Those indicator are added here to re-use
directly the channel report view. It allows the users to use also those
new indicators in the existing reports.

- No answer indicator
- Days of activity indicator
- Day number indicator
- Country of visitor :
    This makes able to see from which country comes the visitors
    and make statistics with it.

    If no GeoIP server are installed, or if the country is not found,
    or if visitor is logged in but has no country configured, the country
    si set to 'Unknown'.

Also, align sessions and operator report title on menu name

Task ID : 1895998
Closes PR #28283
2018-12-05 14:37:13 +00:00
David Beguin 8c8f219b47 [IMP] im_livechat : uses anonymous name only if visitor is anonymous
Before, if the visitor was logged in, anonymous name = user.name.
But if we use anonymous name field even if visitor is not anonymous,
we cannot know, in stat e.g., if the session was really made with
an anonymous visitor or not as the field is always filled in.

Now, if the visitor is not anonymous, we use directly the user.name
but we do not fill in the anonymous name. So that if anonymous name
is null, we know afterwards that the session was made we a real
anonymous visitor.

Since the anonymous name is empty if visitor is logged in,
we cannot use anonymous_name anymore to get the title of the session window.

Task ID : 1895998
Closes PR #28283
2018-12-05 14:37:10 +00:00
Martin Geubelle 9281ae81f9 [IMP] mail: clearer no content helper on activity view
Task 1889687

closes odoo/odoo#27898
2018-12-05 11:36:17 +00:00
Martin Geubelle 4533ad0703 [FIX] mail: get systray activities for custom models
Getting systray activities for custom models (i.e. created with Studio) crashed.

If it's a custom model, its `_original_module` attribute is not correctly set so
trying to retrieve the icon based on this attribute does not work.
2018-12-05 11:36:17 +00:00
Martin Geubelle f48021846a [IMP] mail: reflect inheritance of mail.activity.mixin on ir.model
The boolean field `is_mail_activity` on `ir.model` allows to create custom models
that inherit from model `mail.activity.mixin`.

Task 1889687
2018-12-05 11:36:17 +00:00
Geoffroy Larue 87ab98832e [IMP] crm: usability improvements
Purpose : Various relabelling and design improvements in crm:
- opportunity, lost reason, lead, team, tag forms
- hide "convert to opportunity" button for inactive/lost
leads (actually nothing happened when clicked anyway)
- Checkbox in crm.team to hide all alias related fields
- New many2one field appearing in crm.team form to select the user to
whom lead created by alias will be assigned.
- Set the admin as leader of the initial crm.team

closes odoo/odoo#28851
2018-12-03 14:12:43 +00:00
Dhaval Panchal e1e0826eee [IMP] mrp: generate lot on MO
Add a button to generate a lot or serial number when producing on a
manufacturing order.

Task ID : #1909007
PR : #28677
2018-12-05 09:36:57 +00:00
Robot Odoo 6ea207a356 [MERGE] rating,project,livechat: refactor API for performance issue
This commit makes several improvement in order to speed up and clean
the rating API. No functionnal changes should be obsered.
Multiple point are covered here:

1/ introduces a parent.mixin: since we want to extract the satisfaction
percentage on parent rating model (project, team, livechat channel),
providing a mixin to standardize this computation in a performant and
lazy way seems a good optimization (more details in the concerned
commit).

2/ cleaning API: some methods needed to be private and/or renamed.

3/ Better integration in the business application: use the new parent
mixin, remove legacy code and fields, ...

Task-1903565

closes odoo/odoo#28459
2018-12-05 12:18:20 +01:00
Pierre Masereel b8c4b42250 [IMP] web: state_selection widget readonly if field readonly
The current implementation of the state_selection widget always makes it
editable even if the field is readonly.

We improved this behavior by removing the handle of click on the widget
when the field is readonly, but keeping it even if the view is not in
edit mode, because it used for example in project to change state even
when view is not editable.

closes odoo/odoo#29218
2018-12-05 07:38:30 +00:00
jem-odoo 37293f4644 [MOV] rating: extract mixin in new file
This commit simply move code for both rating.mixin
and rating.parent.mixin in their own file to ease
the reading of code, and fit the guidelines.

Task-1903565
2018-12-04 13:28:19 +00:00
jem-odoo adc25752f3 [REF] rating,*: make some methods private
Impacted modules: im_livechat, project and rating

This commit restricts the access to some method of the rating API. Indeed,
some of them are internal business and should not be called from anywhere
to avoid breaking the rating flow.
This commit also rename some method to fit guidelines. This should not
bring any functionnal changes.

Task-1903565
2018-12-04 12:48:20 +00:00
jem-odoo 9be23c2f63 [IMP] rating: don't call compute method directly
The correct way to trigger a recomputation of a field is not
to call directly the compute method. The ORM offers mecanism
to do it: we have to flag the field as "recompute to do" and
then call `recompute` method (availble on every models). This
one will call the recompute method of all fields marked as
"to recompute".

This will optimize the performance by doing recomputation in
batch.

Task-1903565
2018-12-04 12:48:19 +00:00
jem-odoo 2aa7399d0c [IMP] im_livechat: make channel use rating parent mixin
No functionnal changes are done in this commit. Even
the period of rating to take into account to compute
livechat channel satisfaction (introduced at
5b60e05ce4)
stays the same, but use the parent mixin mecanism.

Task-1903565
2018-12-04 12:48:19 +00:00
jem-odoo 52e2ec2ef9 [IMP] project: make project use rating parent mixin
No functionnal changes are done in this commit. Everything
stays the same, but use the parent mixin mecanism.

Task-1903565
2018-12-04 12:48:19 +00:00
jem-odoo 47479401cb [IMP] rating: introduce the parent mixin
When creating a task, the satisfaction of the project is recomputed even
if the task has not rating. This can lead to performance issue:
concurrency error in Postgresql can happen if a task is created when
somebody else tries to update the project.
The satisfaction recomputation will give and concurrency error whereas
it will return the same satisfaction percentage, since the task has no
rating.  The same problem will happens in every modules implementing
the rating feature: project, helpdesk and livechat.

This problem leads us to create the rating.parent.mixin in order to
retrigger the computation only when a new rating appears on the
parent object. We also unstore the field to make its computation lazy.
Maybe in a near future, this field will be computed in SQL directly.
The parent mixin allow us to standardize the behavior to all parent
rating models.
These optimizations should reduce the number of computation and speed
up the task creation.

opw-1902502
Task-1903565
2018-12-04 12:48:13 +00:00
lul-odoo 47480a5a89 [FIX] stock: Fix typo in demo data
closes odoo/odoo#29242
2018-12-04 12:07:33 +00:00
qmo-odoo 01173f3745 [IMP] base: Improve search and ordering in settings
Allows users to not only search on settings name but on their description too.
Improves search results relevance :
Instead of the actual fixed order, top results should be about the module
selected in the left panel

Task : #1893252
closes : #28094
2018-12-04 10:19:08 +00:00
Robot Odoo ef826f1f27 [MERGE] web_editor, *: improve media dialog
* web_unsplash, website_sale

- Visual improvements and cleaning in each tab: video, documents,
  pictogram, images.

- Only one search input for both the local library and unsplash.

- Replace the idea of multiple pages by adding a 'Load More' button.

task-1896705

closes odoo/odoo#28025
2018-12-04 17:57:00 +01:00
Cedric Snauwaert 7d6a9924e5 [IMP] account: possibility to edit amount in reconciliation widget
Before we could only make a partial payment that was equal to the value of the statement line if the payment was greater than the statement line.
Now we can modify the value of any line (black line) used in the statement reconciliation widget. This allow to have the following:

Statement line of 500
Payment 1 of 500
Payment 2 of 500

We can reconcile the statement line with 250 from payment 1 and 250 from payment 2.

Task: 1870895

closes odoo/odoo#27805
2018-12-04 14:37:54 +00:00
mgh-odoo 82ffd8b55f [REF] stock: unlink 0 quant on stat button
Since v12, the unlink of 0 quants is delayed in the scheduler tasks for
performance reasons. When going through the stat button of the product
templates and product products to see the quants. the scheduler hasn't
run and the 0 quants are still present. As this is confusing for some
users, we run the quants unlink and merge at these times

- product.template -> On hand
- product.product -> Om hand
- stock.production.lot -> locate

Task: 1913642

m

closes odoo/odoo#29132
2018-12-04 11:29:55 +00:00
Robot Odoo e8ac4d7996 [MERGE] lunch, lunch_hr: automatize lunch flow
We would like to automatize lunch as currently all orders are manually ordered and validated, and a cash move has to be manually created each time you want to credit the wallet of some user.

In this commit we add a new widget that comes with the kanban view and will allow to take orders in a friendly manner.
We also add a lunch.supplier model and an integration with the hr module in order to filter what products you can order depending on your working location, this also allows you to configure an automatic ordering via email.

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

closes odoo/odoo#28442
2018-12-04 15:40:50 +01:00
qsm-odoo 78a30d44cf [REF] web_editor, web_unsplash: review load more feature
* Simplify the code
* Make the feature mork without unsplash
* Handle corner cases

task-1896705
2018-12-04 11:17:23 +00:00