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
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
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
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
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.
This field brings nothing more than the payslip lines.
Btw the term is badly chosen, it doesn't display the lines by salary rules category,
it displays the payslip lines that have a category.
The printed report is not very useful too. The only interesting part is the
contribution register at the end of the report, and there is already a dedicated
report for that.
There are currently 2 models:
- hr.rule.input to link some inputs to an hr.payslip.rule
- hr.payslip.input to add some additional inputs on a payslip.
The first model is actually there to automatically add inputs on the
additional inputs on the payslip. This is problematic because these
rules are always added (For example a salary reduction due to a
police fine). As these inputs are always added on the payslip, the
the related rules are always computed with an amount of 0.
We decided to remove this mechanism for the following reasons:
- If the rule is important and common, then define the needed values on
the contract, and compute the rules from that.
- If the rule is not so important, it should be added manually when needed.
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.
Closes#28261
Purpose
=======
More flexibility is useful when using the _attendance_intervals method (resource.calendar) in other modules when inheriting resource.calendar
Specification
=============
The commit adds a `domain` parameter to the _attendance_intervals method in resource.calendar, allowing
to better control attendances from which to compute intervals.
+ small refactoring: extraction of duplicated code in method
If the wizard to generate payslip was launched without an ´active_id´ in the context.
A ´journal_id´ entry was set to False in the context later leading to a crash at payslip creation.
The crash happens because, at creation time, the journal_id of a ´hr.payslip´ is set to the journal_id
in the context if its present. Since this context entry is False and the journal_id field is required,
creation crashes.
Before this commit, the web client evaluated all modifiers
(readonly/invisible/required) in some cases, even if it only needed one
of them. This is clearly not optimal, and I even suppose that for large o2m,
it could even have a noticeable effect on web client perceived speed
This commit simply make sure that we evaluate only what we need in those
cases. Note that it is not really a testable improvement, hence the
lack of tests.
closesodoo/odoo#29171
Traceback when the responsible is not set on an activity
since it's a required field. In this case we will use the
odoo system responsible for the activity.
Also reintroduce the default value for the responsible as
the user that create the product. The purpose is to avoid
to log all the activity for the odoo system but to dispatch
the exception between user, if a user create the product he
will probably be responsible for it. It is always possible
to remove the responsible or to modify it.
Task ID - 1913168
closesodoo/odoo#29138
hs code was dropped in 12.0 however it shouldn't have been (commit 2d738f8563). commit 498dbc548b created a new module in order to avoid losing hscode for existing database during migration.
This commit set it back as before.
closesodoo/odoo#29167