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
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.
Task 1883977
==== Purpose ====
Keep track of journal entries generated using the reconciliation model.
There is no easy way to see a summary of what journal items have been reconciled with a bank statement. This makes troubleshooting difficult. There should be a way to see the detailed history of which bank statement items were reconciled with which journal items.
==== Technical Specs ====
Make a many2one in account.move.line to retrieve the account.reconcile.model having generated this line.
(Make a computed many2many on account.move to the account.reconcile.model)
Add a stat button on the account.reconcile.model form view to retrieve journal entries more easily.
closesodoo/odoo#28752
Purpose of this commit is to make a single flow to sign and pay in the
customer portal. When having signed its document popup for payment is
automatically opened.
This is much better for usability and avoid to have orders being signed
and not paid because the customer did not see it was still to be paid.
This commit is related to task ID 1910532 and PR #29849 .
Since commit 34c47eecd3 wording of link when
sending a quotation by email is broken. Indeed has document in draft is
not correctly considered as having to be signed and/or paid the link is
not labelled correctly.
This commit fixes it. Parameter is also renamed to be more understandable.
This commit is linked to task ID 1910532 and PR #29849 .
Model methods should be private by default unless they need to be
exposed via RPC on purpose (e.g. for the web client).
The `send_forum_validation_email()` method is only called by a
controller and has no reason to be exposed via RPC, hence the conversion
to private.
Closes#30669
Purpose is to ease understanding of applications / categories and their
links with the access rights labelling.
This commit is related to task 1884968 and PR #29176.
- Harmonize quanity done in stock move header
- Replace product_qty by product_uom_qty the purpose is to stop being
confusing when the user uses UoM. Since for 1 dozen it will show 12
reserved and 1 done because product quantity is in quant UoM not move
UoM.
this commit is related to master bug - 1923213.
closesodoo/odoo#30691
currently, group by is applied forcefully that user cannot change.
this commit will remove forced group by and applied as a default group by that user can change.
Task: 1910855
closesodoo/odoo#29727
Currently, non-trivial client interface customisations generally *have*
to go through client actions (a limited amount can use complex HTML in
the form, but it's not that common). This can require a significant
amount of messing around with JS code, and doesn't integrate well with
the rest of the system (primarily due to the loss of the control panel /
search view).
This change re-uses the existing `ir.ui.view[type=qweb]` as actual views
(bound to a model) to provide for flexible views rendered synchronously
server-side without needing javascript development. A few dynamic
behaviours are also provided (on top of bootstrap's which should be
usable out of the box):
* an extension of `a[type="action"]` which allows for more detailed
crafting of the action (not just accessing an action by id and by model,
method)
* a new `a[type="toggle"]` which provides lazy loading of sub-items
(currently by calling a method which returns HTML to insert after the
loading anchor)
* simple fold/unfold (without lazy loading) can be performed through
bootstrap
closesodoo/odoo#28716
When an email was sent from a PO, the sender was by default the user who created the PO.
The sender is now replaced by the current user.
TaskID: 1934477
closesodoo/odoo#30660
A many2one field that is required means that its column cannot contain
null values, however the default ondelete policy for all m2o fields is
`set null`, which contradicts `required=True`.
This patch will, by default, apply the `restrict` policy to required m2o
fields unless the ondelete attribute is explicitly specified. However,
if the policy specified is `set null`, a ValueError will be raised
whenever the registry registers the field as this makes no sense.
The default ondelete policy remains unchanged for non-required m2o
fields (set null)
closesodoo/odoo#30122
This avoids odd behaviour when leaving a `href="#"` on a link with
target=action: without preventing the default behaviour, it would first
switch to the application switcher (/web/#) then actually execute the
action.
Before this, the action manager only supported auto-triggering actions
from (model, method) or (action_name).
This adds support for providing all the action details via data
attributes:
* model (defaults to current action's)
* resid (defaults to none)
* views (defaults to list, form, unless resid is specified then
defaults to just form)
* domain (defaults to [])
* context (defaults to {active_id, active_ids, active_model} from
current action if the model has not changed, empty otherwise)
The action's name/title is either the link's title (?) or its textual
content.
QWeb's rendering currently *requires* that when loading a document
instead of rendering the document itself it will render a sub-node
with a properly labeled t-name. If a view is invoked by id, ir.qweb
will look for a child with a t-name and fix up that t-name such that
the base qweb object will find and render it.
This feature mostly exists for JS compatibility (because a single
document can contain multiple cross-linkable templates, and it was
useful for cross-implementation tests though I'm not sue they're even
checked anymore), and the <template> tag kinda took care of it,
however with a more proper qweb view it becomes more of a liability /
pain in the ass.
Note: turns out there are bits of javascript which read server
templates (???) and need to be altered to correctly handle the lack of
<templates> wrapping.
Purpose of this commit is to store a relationship between slides and users.
Indeed starting from now we will track more user interaction with the slides
module.
In this commit we introduce a model that is used to populate and decorate
the relationship between slides and users, slide.users. From slides or users
point of view it behaves like a many2many. It can also be used to store
more information about the user interaction with the slide.
We use it here to store the user vote. Like and dislike are not static
counters anymore but computed fields based on user votes. It is implemented
as a tristate field.
As it is a technical model no access on slide.users is granted. Controllers
and methods grant access to the relationship in order to avoid information
lead and keep technical details private.
Future commits improving the eLearning use of slides will notably store
information about user having read the slide, taken a quizz or gaining
karma depending on some actions performed on the slide.
This commit is linked to task ID 1934488 and PR #30620 .
In an HttpCase test, when the browser_js method is used, an optional
javascript code can be used to check that the page is ready to execute
the test.
When no 'ready' code is given it defaults to check the
'document.readyState' status.
In some rare cases (discovered by @Xavier-Do) this status is checked on
the 'about:blank' page. As the page seems ready, the test code is
evaluated and fails.
With this commit, when no specific ready code is provided, the test will
wait for a chrome devtools event that ensure the page is fully loaded
before starting the test.
cherry-pick of 03a8819652closesodoo/odoo#30609
- If a fiscal position is set in the point of sale and a product tax
isn't mapped in it, it wasn't applying any tax at all. After this fix,
the tax defaults to the product one.
closesodoo/odoo#30556
Purpose of this merge it to merge various fixes and small improvements
related to slides module. As an update of this module is pending fixing
it before is quite helpful.
This merge is linked to task ID 1933820 and PR #30553.
Purpose of this commit is to clean a bit interface of slides
* separate can_see from can_upload;
* correctly set can_see on partial visibility channels;
* remove upload button for portal users as they have no rights to upload a
document and this is not supported in any way;
This commit is linked to task ID 1933820 and PR #30553.