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
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
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
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
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
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.
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
closesodoo/odoo#28851
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
closesodoo/odoo#28459
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.
closesodoo/odoo#29218
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
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
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
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
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
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
* 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
closesodoo/odoo#28025
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
closesodoo/odoo#27805
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
closesodoo/odoo#29132
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
closesodoo/odoo#28442
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.
TaskID: 1856876
With this commit, when a kit is processed trough an immediate transfer,
the quantity done set on the kit is now propagated to its components.
TaskID: 1896772
closesodoo/odoo#28998
* 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
Since project only handle task (project.issue has
been merged into tasks), the global satisfaction
field is not required anymore, as it is the same
as task satisfaction percentage.
Task-1903565
We don't want to bloat the company settings with the choice of the barcode nomenclature. We move this settings to event_barcode and stock_barcodes.
task id 1903864
closesodoo/odoo#28346
On test fixes: Because the company now have parenthesis in its name,
formatting email addresses adds double quotes around the name.
e.g.: "My Company (San Francisco)" <example@exmaple.com>
* do not display the scrap button in receipt (we don't want to allow
products not coming from your stock)
* no scrap button when any picking is done
* don't display the scrap moves, the user needs to go to the stat button
Task ID 1913275
closesodoo/odoo#29097
The fields property_cost_method ad property_valuation are never shown on the products but they sometimes are set. This creates confusion and some difficulties in the migration (the cost method/valuation on the products are different than the one set on the categories).
We remove them and only use the one on the categories.
Task: 1866333
closesodoo/odoo#26008
Purpose
=======
For payroll purpose, we need to manage attendances.
For instance, someone is working only mondays, tuesdays and fridays, but works exceptionally an other day.
It must be recorded.
Specification
===========
The new models are used to represent attendances, extra hours and leaves (as `hr.benefit`s) in a new window called "Benefits".
The schedule of employees for the full month is visible in that view (calendar view).
First the benefits needs to be generated (via a button) based on the calendar attendances and leaves.
The manager can then check benefits, delete or add some. Only the benefit name and type can be edited (not start and end dates).
Once benefits are correct, they can be validated. Validation will fail if they are some leaves to approve or if some benefits overlap on the same day.
Benefits cannot be deleted or edited once validated.
When benefits are all validated, a button appears to generate payslips.
Additional development
==================
Most of the time we don't what is the next action that should be done when creating payslips or payslip batches.
- Improve the layout, the buttons of the payroll object.
- Refactor a little the code to reuse existing chunks of code instead of reinventing the wheel in several methods.
- Remove the hr.rule.input model.
- Remove an useless report.
See each individual commit for more information.
TaskID: 1912944, 1903239
closesodoo/odoo#29065
property_cost_method is removed from product.product and product.template.
And use property_cost_method of product.category everywhare.
In This -
Used property_cost_method of product.category instead of cost_method or property_cost_method of product.template.
This commit is related to task#1866333.
product.product and product.template.
And use property_cost_method of product.category everywhare.
In This -
Used property_cost_method of product.category instead of cost_method or property_cost_method of product.template.
This commit is related to task#1866333.
Same than for payslips. Improve the flow to make it clear what is the next action
instead of displaying all the buttons.
And refactor a little the code to be more efficient, and reuse existing method instead
of using this horrible 'onchange_employee_id' method.