Purpose of this merge is to update main addons and set activity types used
for automated activities as master data. This means they cannot be removed.
Indeed those activity types are used in business flow to generate activities
and removing them may break some flows.
This commit is linked to task ID 1907970 and PR #29257.
Purpose of the task is to improve the usability of activity types and
activity scheduling.
Another purpose is alto to protect some master data activity types by flagging
them and preventing their deletion.
Containing
* make the activity type as master data so deletion will be prevented;
* improve the usability of the activity type;
* prevent the deletion of activity type which are used for automated activity;
* change the usability of activity scheduling modal;
This commit is linked to task ID 1907970 and PR #29257.
Purpose
=======
Every change to invoice is indicated in the chatter - the state, the
person, and the time is indicated in the chatter.
This is currently not the case for payment - It should be the
case, as if I were in charge of these things, I would like to know who
did what and when.
Specification
=============
Add chatter followup on payment to know who
did what and when.
Related Task ID : 1880825
* website_forum, website_gengo, website_mail_channel, website_sale
Retrieving the global context is now the root's job, this will prevent
problems when trying to extend the values the context has.
See upcoming improvements with https://github.com/odoo/odoo/pull/29442closesodoo/odoo#30816
last_year_mo_order was removed in commit 4a350ff8cc. However it was still used in action_view_mos.
This commit adpat the action context in order to keep the same behaviour than previously.
task id 1922547
closesodoo/odoo#30347
As usual, I mess up with forward-ports. This one was actually nasty, as
no syntactic error was introduce, while only failing because of this
left over `console.error` call.
Task 1915154
The chatter will mainly be used for communication / messages
Add the chatter to account.move
Do not generate message at the record creation
Do not track any field
closesodoo/odoo#29274
Issue:
- Create a RFQ for a stockable product
- Try to validate
- A required field "deliver to" (picking_type_id) is not set
Rev [1] moved the stock related part of purchase_requisition to
purchase_requisition_stock.
It implements an onchange on the purchase order setting the
picking_type_id of the one of the requisition. When no requisition is
set, it wiped the default one.
We fix the issue by only using the picking type of the requisition if a
requisition is actually set.
[1] 826f927a1e
Task: 1935077
closesodoo/odoo#30685
Before this commit, it was possible for the user to click on the Sign button
even when the signature area was empty, which would lead to an error message.
Now we disable the button when the area is empty.
Related to enterprise PR: https://github.com/odoo/enterprise/pull/3535
PR: #30653
Purpose
=======
We would like to be able to manage multi contracts payslips and contract transitions.
Specification
=============
General flow:
1/ Benefits are generated based on contracts's calendar.
2/ When validating additionnal benefits, calendar.attendances are created in the contract's calendar
3/ Create one payslip per contract in state [open|pending|close]
4/ For each payslip, generate worked day lines based on the contract's calendar
New Constraints:
1/ An employee cannot have more than one contract at the same time (excluding draft, closed and cancelled contracts).
2/ A leave cannot overlap multiple contracts.
3/ A contract cannot have starting and ending dates such that a leave become in the middle of
two contacts.
New state for a contract: Incoming. It means it's ready and will be running soon.
An incoming contract automatically becomes 'Running' if the start date is passed (cron)
Number of hours and days are always correct (according to the contract's calendar) on payslips as the
flow starts from the contract's calendar.
However, it is not correct in the Time Off app because it's counted based on the employee's calendar.
The number of days/hours for hr.leaves should be computed according to
the contract at the time of the leave.
e.g. If I currently work full time and I request 2 weeks off next month where I'll be working only
3 days/week and 5hours/day (other contract), It should count 6 days and 30 hours.
- in hr.benefits form view show the contract (below employee field)
TaskID: 1903483
closesodoo/odoo#30181
The user have to enter the final lot number on workorder when he process
a component. The purpose is to register the use of components for
tracability report. However currently the user could create different
final lot during the process. It would result in inconsistencies since
components could be used for lot/SN not produced and a wrong
tracability.
This commit ensure that once a lot/sn is created during a WO, it has to
be used in the following workorders.
closesodoo/odoo#27984
Currently _action_assign will try to add new reservation to existing
move lines. With mrp it could be problematic with the following usecase:
- 2 product A in stock
- Create a MO for 2 final product tracked and consuming 4 products A
- Reserve -> It will create a ml with 2 product A.
- Product -> It will fill the ml with 2 quantity done for first lot
- Add 2 product A in stock (4 in total)
- Reserve -> It will increase the reservation on the existing move line.
It's a problem since the new produce (wizard or wo) will create a new
move line because the existing move line have a lot_produce_id and can't
be used for a different lot/SN anymore.
This commit only increase reservation if the move line has not been used in
order to create a lot.
Usecase : create a bom in unit with a component tracked by serial and
quantity to produce = 1 unit
Create a manufacturing order with a UoM different that the bom one
(e.g. Production request = 1 dozen)
Launching the produce wizard or a workorder will show to the user
a workorder line with 12 component units to consume. But as the
component is tracked by serial. We would like to get 12 differents
lines of 1 unit. This commit take care of this specific case.
To record a production via a manufacturing order, the user can either
use the produce wizard or the workorders views. Those two objects was
technically different but act more or less the same. This commit aims to
merge the similar behaviors in common code
We introduce two new abstract models :
1. Abstract workorder to share workorders and the produce wizard
2. Abstract workorder lines to share active_move_line on workorder and
product_produce_line on the wizard. Those abstract line keep the information
about the quantities and lot number to put on component move lines and
finished product move lines
Task : 1891864
purpose of this commit is to remove default parameter of "casesensitive",
because default parameter is ES6's feature. it's not supported in IE9.
closesodoo/odoo#30751
Following the new editor's merge at https://github.com/odoo/odoo/pull/29775,
'web_editor.BodyManager' stopped being used by the editor and the
related file was moved to website without being renamed or considered.
Hopefully, the editor replaced it by something else so the `BodyManager`
makes no sense on its own anymore. This commit merges its features
with the only other component which still used it: `WebsiteRoot`
See upcoming improvements at https://github.com/odoo/odoo/pull/29442
(related to task-1932066)
closesodoo/odoo#30740
Same logic as for the mail.message or ir.attachment, when a record is deleted,
drop the ir.translations linked to it as well.
Fixesodoo/odoo#25105
Co-authored-by: Raphael Collet <rco@odoo.com>
closesodoo/odoo#30721
During the unit tests, I have noticed that the test window was doing a
lot of work after the test were completed, it was using CPU and using RAM
in jigsaw pattern. Eventually after being left alone for a few hours,
the window would just crash.
This was due to an unlimitted chain of deferred running when an image
field had a load error.
The situation is as such:
1. The image is put in the DOM with an onError handler
2. There is an error, as the image is a dummy text for the tests
3. The onError is called, it clears the image field, then calls _render
4. _render re-adds an image with the same onError handler <----------
5. The onError is called - again - it clears the image field - again |
(wich does nothing this time because the value is the same) - |
then calls _render - again |
6. The second time _render is called, go to step 4 --------------------
... In the meantime, the widget has been destroyed by the test,
so it should not do anything anymore.
This fix breaks the loop, as well as bind the onError handled with 'one'
instead of 'on'.
closesodoo/odoo#30716
If no Undistributed Profits/Losses account can be found, Odoo tries to
create one with number '999999'. However, such an account number might
have been created manually by a user. In this case, the account creation
fails.
opw-1932701
closesodoo/odoo#30719
When a colored kanban tile is colored, and there is a color attribute on
the tile HTML element indicating a color field (eg. when a kanban view
with color dropdown is created in studio), there was a HTML element over
the whole tile preventing to click on links or other sub element of it.
This HTML element is just a transparent used for accessibility to
contain the tile color intelligible name, so this commit just size it
over the area of the color (currently in base bootstrap ~3px at the left
of the tile).
opw-1932283
closes#30717
Purpose of this merge is to clean the way we manage exiting answer when
inviting partners or emails to participate to a survey.
When wizard finds that some recipients are already linked to answers it
displays a bootstrap warning with the name of duplicate recipients and
display the field allowing to choose between two options
* resend: send the same token and answer;
* new: create a new token and answer;
It will be useful notably with certifications support as number of attempts
to succeed is limited. Allowing people to retake certifications should be
made clear to survey managers.
This commit is linked to task ID 1935176 and PR #30689 .
Purpose is to clean a bit those fields. A field holding the number of send
invitations is added as well as a button. It allows to directly jump on
answer linked to an invite which helps dealing with private surveys.
This commit is linked to task ID 1935176 and PR #30689 .
A field exists to differentiate answers done manually through frontend of
survey and answers created through invitation. The field was not correctly
set by the invite wizard. This commit fixes it.
This commit is linked to task ID 1935176 and PR #30689.
Before this commit, when clicking on the activity view icon
from an item in the systray activity menu, the activity view
had no search filter by default.
This commit now auto-select 'My Activities' in the activity
view when redirected from the systray activity menu.
closesodoo/odoo#30702
Before this commit, when a user had some meetings planned today
and open the systray activity menu, the counter would disappear.
This was caused by a weak computation of the counter that relies
on activity having always a total counter. This was not the case
for activity that are today's meetings: Counter would be computed
as `NaN`, and since `NaN` is falsy, it won't display the counter.
Today's meetings have no reason to have a counter, so this commit
fixes the issue by letting those activities not change the
computation of the counter.
closesodoo/odoo#30695
If xlwt is not installed on the server, the option is disabled.
However, the first element was checked, even if it is disabled.
Trying to export record without xlwt was causing a traceback.
Introduced at b60de0db41 where xls is now the first choice
closesodoo/odoo#30724
On mobile, swiping right/left switches to next/previous record.
This feature prevents the horizontal scroll of the form notebook's tabs by
overtaking the swipe gesture on those elements.
This issue had different consequences depending on the platform:
- on iOS: the tabs cannot be scrolled at all.
- on Android: the tabs can only be scrolled by using a two-fingers
gesture
This commit restore the horizontal scroll on the tabs but also keep the
swipe-gesture to navigate records.
opw-1929267
closesodoo/odoo#30658
As of 12.0 the superuser account (UID 1) is only meant to be used for
advanced debugging, and non-superuser admin accounts are used for
day-to-day administration.
Adapts the admin detection system to allow non-superuser admins to
select the report layout as well.
The payment reconciliation screen can't be opened if there is no partner
on a payment, and currently crashes with a traceback.
Rather than hiding the button which could cause surprises for users, we
can raise a proper error to explain why it can't work, for the cases
where a payment has no related partner.
This could happen for example when a customer paid via a direct
/website_payment/pay link.
When we use "Send invitation again" on a survey.user_input, it will send
the first survey.user_input it finds corresponding to:
- the state "new" or "skip",
- the partner it must be sent to,
- the survey the user_input corresponds to,
- the email it must be sent to,
or if none found, it could be create a new one.
This is an okay behavior in most instance, but in the case of
hr_appraisal where a manager could have same survey to fill for
"employee A" and "employee B" and when you send them again, we would receive two
mails linking to the same employee.
With this changeset, the current behavior is kept but when an existing
user_input is resent, we prioritize itself before searching a matching
one.
opw-1934478
closes#30693