In the compute function _compute_move_without_package, we use self
instead of picking variable, which leads to traceback when more than one
picking is computed
closesodoo/odoo#28482
Purpose
=======
1/ A team leader is not able to validate leaves for his own team.
2/ Another person than the manager can be supposed to validate the leaves for a certain employee
Specification
=============
1/ New hierarchy: Team Leader < Officer < Manager
People in Team Leader access group will now be able to approve leaves for employees in their team.
- Added the new access group
- Added rules for people in this group to read or write appropriate records
2/ Add 'leave_manager_id' field on employees to refer to the Team Leader.
- Added the new field to Employee model
- Added the field to the view so that it is visible
- Modified a filter in a view so that it is more relevant according to its name (My Team Leaves)
- Added a filter in a view for managed employees
TaskID: 1888653
closesodoo/odoo#28352
Purpose :
=======
On the Contract form view the field label for the "contract type" is "Employee Category".
Then it will be good if we keep the same label on the group by also...
Right now on the Group By it is "Contract Type"
closesodoo/odoo#27560
Purpose
=======
A lot of companies don't use the module hr.attendance but are faced
to employees distraction, they forget to record leaves.
In big companies, it is not easy to controle presence and
check if everyone is present in the office.
Specification
=============
1/ Review Human Resources menuitems
- Employees
- Contract
- Department
- Reports
- Employee Presence
- Configuration
- Settings
- Employee
- Tag
- Contract
- Types
- Templates
- Challenges
- Challenges
- Badges
- Goal History
2/ Add option in hr settings to decide the company policy
- [ ] Controle Presence of Employees
- [ ] According the system login --> Based on the bus presence (Present if 'away' or 'online')
- [ ] Following number of sent emails --> Based on the sent mail.message during the day
- [ ] According to the IP address --> Based on the ip address when requesting a long polling, stored on a res.users.log
3/ Add an employee presence view
This view is only for the hr manager and the data is computed when the hr manager goes to it
Clicking on this menu item will generate all kanban of employees grouped by state (present, absent, to define)
On each employee cart, an action can be requested as:
- Send a sms to the employee
- Send an email to the employee
- Create a leave for the employee
4/ Use this email template to contact the employee
Dear %(employee_name)s,
Exception made if there was a mistake of ours, it seems that you are not at your office and there is not request of leaves from you.
Please, take appropriate measures in order to carry out this work absence.
Do not hesitate to contact your manager or the human resource department.
Best Regards,
closesodoo/odoo#28307
If the recipients are passed by setting 'default_recipients' on the context,
then don't overwrite the content with the method '_get_default_sms_recipients'.
For example, as an employee is a mail.thread, then the method '_get_default_sms_recipients'
exists on it. Calling this method will erase the content of the field 'recipients' that comes
from the default_recipients key in the context.
If we want to use this wizard on something else than a partner, we should avoid this
kind of overwrite.
Purpose
=======
A lot of companies don't use the module hr.attendance but are faced
to employees distraction, they forget to record leaves.
In big companies, it is not easy to controle presence and
check if everyone is present in the office.
Specification
=============
1/ Review Human Resources menuitems
- Employees
- Contract
- Department
- Reports
- Employee Presence
- Configuration
- Settings
- Employee
- Tag
- Contract
- Types
- Templates
- Challenges
- Challenges
- Badges
- Goal History
2/ Add option in hr settings to decide the company policy
[ ] Controle Presence of Employees
[ ] According the system login --> Based on the bus presence (Present if 'away' or 'online')
[ ] Following number of sent emails --> Based on the sent mail.message during the day
[ ] According to the IP address --> Based on the ip address when requesting a long polling, stored on a res.users.log
3/ Add an employee presence view
This view is only for the hr manager and the data is computed when the hr manager goes to it
Clicking on this menu item will generate all kanban of employees grouped by state (present, absent, to define)
On each employee cart, an action can be requested as:
- Send a sms to the employee
- Send an email to the employee
- Create a leave for the employee
4/ Use this email template to contact the employee
Dear %(employee_name)s,
Exception made if there was a mistake of ours, it seems that you are not at your office and there is not request of leaves from you.
Please, take appropriate measures in order to carry out this work absence.
Do not hesitate to contact your manager or the human resource department.
Best Regards,
On mobile (specifically in landscape orientation as the height of the
viewport is narrower), the content appear over the bottom toolbar
instead of going below.
Solution is in 2 parts:
* raise the toolbar way above the content
* make the toolbar opaque
closesodoo/odoo#28429
In some cases, and for historical reasons, the groupby property can be
expressed as a string (for example, 'stage_id') instead of a list of
strings (for example, ['stage_id']).
However, the support was not complete. A crash could happen in some
cases. For example, if there is a group_by: 'stage_id' property in the
context of an action, it works in list view, but adding that view to the
dashboard would result in a crash, without this commit.
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
closesodoo/odoo#28408
Before commit 60f143c8e7, the dashboard
parameters did not use the parameters from the action, so some important
information could be lost.
However, in this same commit, the action context overrides the context
from the user defined views, which means that some information is lost.
For example, customized group bys are ignored.
This commit fixes the issue with some careful context manipulation.
Some special care was done to remove the groupby from the action context
if it is not empty, because that same logic is used in views.
Introduced by: 3d46887d38
Before this commit, creating an invoice from a SO always chose
the payment_method=all when the number of invoice linked to the SO >0
OR all the lines of the SO were with invoice_policy = 'order'
After this commit, creating an invoice from a SO just choose the payment_method=all
when the number of not canceled invoice linked to the SO > 0 AND when there are at
least one downpayment in the SO
SO:
Steps to reproduce the changement of behavior:
- Create a SO for 10 units (invoicing policy based on ordered quantities)
- Create the invoice for 10 units (from SO) and validate it
- Change ordered quantities to 5 units
- Click on create invoice on the SO
The payment method chosen was delivery instead of all. So choosing the default option
lead to a user error saying: there are no invoicable line instead of creating a credit note.
opw:1904258
closesodoo/odoo#28426
In some cases, and for historical reasons, the groupby property can be
expressed as a string (for example, 'stage_id') instead of a list of
strings (for example, ['stage_id']).
However, the support was not complete. A crash could happen in some
cases. For example, if there is a group_by: 'stage_id' property in the
context of an action, it works in list view, but adding that view to the
dashboard would result in a crash, without this commit.
- Create 2 companies A & B
- On a product P, define 2 suppliers (same vendor), one for each
company, but with a different Vendor Product Code
- Create a PO in A for P
Both supplier codes are proposed in the Many2one widget, while only the
code for A is expected.
Fixes#27857
opw-1894952
closesodoo/odoo#28402
Purpose
=======
When an employee leaves the company, the fleet manager must ask to the insurance company
a claim report for this employee. But in oddo, there is no easy way to have an history
of the drivers.
Specification
=============
1/ On the employee form, add a stat button: "x cars". The button shouldn't be displayed if the count = 0.
Make a bridge (auto_install: True in the manifest) depending on hr (hr.employee) and fleet (fleet.vehicle.assignation.log)
- Add a field employee_cars_count (computed) to count the amount of cars the employee drove.
- Add an method action_open_employee_cars, that return an action (ir.actions.act_window)
that open on the fleet.vehicle kanban filtered on cars the employee had driven.
2/ In this bridge module, add on the fleet.vehicle.assignation.logs a button (like in expense) to upload
documents about the car for a particular employee (PV, rapport d'assurance, blabla). On the employee
form view, add an action button (with groups fleet_manager) to print all the related documents
(all the attachements on the fleet.vehicle.assignation.logs for the employee).
closesodoo/odoo#28077
The module lacks demo data to have a nice visual display when testing the application
Add allocation requests and leaves request for several employees
TaskID: 1906478
closesodoo/odoo#28427
Since the split between hr.leave and hr.leave.allocation (See https://github.com/odoo/odoo/commit/a0f4f6548bdb9a26151fc8a292d152fc67d1a13c),
the field manager_id has disappeard from the hr.leave.allocation model.
When modifying the parent_id field on an employee, the change is reflected
on the related employee leaves and allocation by overriding the write method.
As the field doesn't exist anymore, this obviously leads to a warning.
The correct fix it to reintroduce this field.
The module lacks demo data to have a nice visual display when testing the application
Add allocation requests and leaves request for several employees
TaskID: 1906478
As empty arrays are considered truthy, the call to `/web_unsplash/get_app_id`
would always be performed even if no Unsplash images.
closesodoo/odoo#28421
Before this commit:
Reserved column appeared with 0 qty when Delivery Order goes to done Stage
After this commit:
Hide Reserved column when Delivery Order goes to done stage.
This task is related to #1888361Closes: #27223closesodoo/odoo#28409
Let's assume a form view with field A and B (a one2many list), with
a column with attrs column_invisible depending on A.
If the user sets A manually, everything works fine (the column is
hidden/shown directly). However, if A is updated by an onchange
(e.g. depending on the number of rows in B), it doesn't. This
rev. fixes that issue.
Related to Issue: 1851451
Co-authored-by: Priyanka Kaakdiya <pka@odoo.com>
payment_term.id, creates a tuple wich works if payment_term.id is set
in case payment_term.id is False this creates the tuple (False,) which
is then converted by the Odoo ORM to a account.payment.term(False, )
record set, which in term may cause weird behaviour as this value does
not eval to false in cases like `if self.payment_term_id:`
Closesodoo/odoo#28397
Before that, when reversing an account.move, if two lines of the move shared the same account, we tried reconciling them once for each line: it worked the first time but triggered an error message the second, since the lines had already been reconciled.
On the BoM structure report the price on line with a
child BoM is inchoerent. Also the sum of all lines in
the report is not always equals to the total of the parent
line.
For the first issue, it happens due to commit 17b6256955
that use the number of operation cycle as quantity.
The second issue happens because sometimes the rounding is not done
at the smallest level and thus the rounding of the sum is different than
the sum of the rouding.
[IMP] stock: don't show move fully in package
When the move lines in a move are all linked to a package level,
we don't want to see the move anymore. We cannot keep only a domain on
moves their-selves as it depends on the move lines linked to it.
So we use a compute field to filter the moves to show, and the inverse
function just appends the new/modified moves to the move_lines.
TASK-ID: 1865671
closesodoo/odoo#28401
When the move lines in a move are all linked to a package level,
we don't want to see the move anymore. We cannot keep only a domain on
moves their-selves as it depends on the move lines linked to it.
So we use a compute field to filter the moves to show, and the inverse
function just appends the new/modified moves to the move_lines.
TASK-ID: 1865671
After 12744bc81ebdaa1671a953c14ba54c637d6a9255, x2m operations are
fully batched, and deletions are processed last when the operations are
flushed, regardless of the order in which they were specified by the
write() or create() call.
This carries a risk of violating (non-deferred) unique SQL constraints,
when the operations for deleting previous lines and re-creating new
ones are processed in the same batch.
This patch executes the deletions before other operations during a
flush, which should be safer with regard to SQL constraints.
An extra constraint is added in test_performance.line to simulate this
corner case, then covered by an extra unit test.
Another unrelated test had to be altered to avoid violating the
new constraint.
This can be reproduced easily by upgrading the `project` module in master,
due to the unique constraint[1] on `ir.actions.act_window.view`, that
gets violated when processing the batch write on this o2m[2].
[1] https://github.com/odoo/odoo/blob/ccc42f16/odoo/addons/base/models/ir_actions.py#L288-L289
[2] https://github.com/odoo/odoo/blob/ccc42f16/addons/project/views/project_views.xml#L394-L396closesodoo/odoo#28314
Before that, taxes were only applied with the most recent currency rate, which caused problems in multi currencies, when reconciling statement lines made in the past with invoices, causing the amount currencies in the payment account.move to be wrong.
//Scenario to reproduce the issue (from customer ticket 1903497):
(for a company with USD as base currency)
1. Create a new bank journal for EUR payments
2. Create a new customer invoice for 90€
3. Create a new tax for the reconciliation model, price-included and amounting to 15%
4. Create a new reconciliation model using this tax
5. Use the currency rates from the demo data, add one that is closer to current date than the most recent one.
6. Create a new bank statement for the created EUR bank journal. Make sure that the transaction is less than the actual amount due on the invoice so that we can apply the reconciliation model. Also make sure to set a date on the transaction that lies in the past at some point when the currency rate was (significantly) different.
7. Hit the reconcile button, select the amount due from the invoice and apply the discount reconciliation model(take note of the amount on the created tax move line). Now reconcile.
What is the current behavior that you observe?
Now go back to the bank statement and check the created journal entries. You will see a difference in the amount currency values of the payment and the tax account move line. This difference should not exist.
Revert commits da2140b726, e65c8826ef and 06cd145a79. They
introduce an incorrect UOM.
The original issue was an `AccessError` due to the fact that the
employee chosen was not in the same company than the user. Therefore,
instead of changing the logic of the UOM selection, we make sure to
select the employee in the appropriate company first, then fall back on
any company then.
opw-1888299
The ir.mail_server Model includes a sequence field, promising that the
lower sequence number have higher priority when multiple server
configurations are available.
The servers are already used based on that parameter since 00bd7274c4 but this
was not enforced at the _order level.
Make it coherent everywhere
closesodoo/odoo#28313
Due to the implementation of PEP-475[1] in Python 3.5, revision
e98e8e9b1b used the recommended technique
of wakeup file descriptors in order to detect interruption of sleep() and
select() by signals, when running in multi-process mode (workers > 0).
The technique works well, however the initial patch never bothered to
read the byte that is written to the wakeup pipe when a signal is
processed. This does not matter when the signal is meant to shut down
the server, but it matters when the signal is SIGQUIT: it simply prints
thread dumps, and continues operating normally.
As a consequence, that byte remains in the wakeup pipe forever, causing
all the subsequent select/sleep calls to return immediately because
the wakeup fd *is* already ready. The symptom was that worker
processes would start cycling their main run loop very fast after
receiving a SIGQUIT signal, eating 100% CPU.
This patch ensures we always empty the wakeup pipe after an interruptible
call, to avoid this effect. It also refactors another occurrence of the
"empty pipe" pattern, in the PreforkServer, and incidentally uses readable
aliases for the file descriptors bound to the ends of the wakeup pipe
(wakeup_fd_r / wakeup_fd_w).
[1] https://www.python.org/dev/peps/pep-0475closesodoo/odoo#28356
This commit extend commit https://github.com/odoo/odoo/commit/ef48b81ab127dd717a4a9d106edd5c51121bc8f7
When you have a cart on multiple session and confirm the card in one of them,
you could still access your cart from other session (note that you could not do
anything with it as it would be reset when adding product or changing qty).
Closes#28210
Creating a service and stockable that create a PO on SO confirmation
(with different suppliers) will indeed work, but the status button
will only display 1 PO. The problem is that stock is not linking
the SO line with the PO line.
Thus, we prefer desactivated the button displaying the wrong value, as
it brings confusion to the user.
A proper bugfix should be done in master, to correctly link SO line with
PO line making the PO count correct.
opw-1905189
closesodoo/odoo#28410