On sales order form view, we display a "project overview"
stat button. It redirects to the overview of the only
billable project of the SO.
To avoid access error, and because this dahsboard is usefull
only for project manager, only those ones will have access to
this overview. So, stat button (Sales order) and label on
project kanban are aonly visible for manager.
From the stat button of SO form view, we want to
see all the timesheet with the employee on the
list view. So the action used should be "all timesheet"
and not "my timesheet".
After that, we simply remove the defautl filters to
avoid confusion for the current user. And for performance
issue, the domain of the action does not include timesheet
ids, but the SO lines ids (should be less numerous).
`compute_sudo=True` execute the compute method as super
user, to avoid access error. This also allow to trigger
other computation in cascade without being stopped by
access right error if the system has job to do.
However, during a onchange, the method is not executed
as super user, so access error can raise. An explicit
`sudo()`in the compute method is required, in addition
to the 'compute_sudo` on the field (usefull when storing
value).
This commit avoid the problem when a user (that is no
timesheet user) try to add a SO line the delivered qty
is based on its related timesheets (analytic lines).
When trying to convert -1.5 into a time format, instead
of displaying -1:30, the widget will show -2:30, which
is confusing. The float time qweb widget does not handle
correclty negative, when its javascript version works
correclty.
This commit fixes this problem.
Purpose
=======
Add the possibility to create private addresses, only accessible for a subset
of users.
Specification
=============
- Add a new 'Private' partner type
- Add a res.groups in base 'Access to Private Addresses'
- Add ir.rules for the following behavior:
- Every employees/internal users can read non-private addresses
- Only users in group_private_addresses can access private addresses
- Add in base a simplified form view for private addresses
- A HR Officer is automatically granted in group_private_addresses
- Use the simplified form view to open the address_home_id form on employees
Before this commit, the compare button from the customized view "Alternative
Products" would create the URL by joining `alternative_product_ids` which are
ids from product.template.
But the route /shop/compare is supposed to receive variants (product.product)
IDs.
Thus, it would try to search given product.template IDs in product.product
records.
It would then show incorrect items or no items at all if the ID does not exist.
Now, we create the URL with the first variant (product.product) of the
product.template.
Obviously, the first product.product is arbitrary but we can't retrieve all the
variants ids, it would most of the time returns too many items.
opw-1840321
In a situation where there's a negative quant next to a positive one,
they should be merged when the scheduler runs or when the user open its
inventory view. However, if in the meantime the user reserves and
unreserves, there may be some issues.
The system will only reserve on positive quant ;
the system will unreserve on the first encountered quant (even negative)
The issue is the second part of the early break condition:
float_is_zero(available_quantity, precision_rounding=rounding):
The issue here is `available_quantity`. In a reservation scenario, it
represents the maximum quantity we can reserve across quant. It is
useful so we do not lose time loopin over quants where nothing will be
available. In an unreserve scenario however, it represented the same
thing, which is wrong. In the case you reserved all the quantities,
`available_quantity` will be 0 we'll loop only on the first quant where
we won't do anything.
As the code doesn't check the success or failure of the unreserve, move
lines were unlinked while the reserved quantity on the quants were not
updated, resulting in the desynchronization of the move lines/ reserved
quantities.
This continues the work done at [1] to track down the "cannot unreserve
more than" errors.
[1] cce6030c0d
Assume a one2many field inside a form, displaying field A in its
list view, and a field B in its (dialog) form view. Moreover, there
is an action button in the dialog, which updates the value of B.
Before this rev., B wasn't correctly reloaded when the button was
clicked, because the BasicModel reloaded the fields on the list
view (i.e. field A), whereas it should reload the fields in both
views.
This fix is twofold. First, we force the viewType to 'form' when
the record is reloaded, instead of the default ('list'), so that
fields in the form view are correctly reloaded. Second, when we
open the form view in the dialog, we add the fields of the list
view to the dict of fields of the form view, so that the form
is aware of those fields and can ask the model to reload them
(still without displaying them).
Fixes#24189
When the virtual machine used to build MS Win package takes too much
time (to build or to test the build), a warning is logged and the VM is killed.
Before this commit, the PID of the process was passed as an argument to
the warning method, causing a traceback.
Instead of searching for ids in the whole cache, search for the ones we will potentially prefetch.
Example: imagine you have 1K records in cache, and only 3 records in your prefetch set. Instead of retrieving the 1K records that have a value in cache, retrieve which of the 3 records that have no value in cache.
Add some private information on the employees like:
- Certificate: Bachelor, Master, Other
- Place/Date of birth
- KM Home/Work
- Emergency Number/Contact
- ...
Also move some already existing private information from hr_contract to hr.
1/ fleet: Improve stages demo data
Remove the old one and defined stages that are more realistic.
2/ hr_contract: Add a access right group on contracts
Some private information are on the contracts. Add a special group to display the
contracts, independant of the other HR access rights.
3/ hr_contract: Add 'reported_to_secretariat' field on contracts
Informative field to be greened when the related information is sent to
the secretariat or the government.
4/ l10n_be_hr_payroll: Use the adapted wage as basic salary on payslips
It's possible to take more holidays days than the allowed legal days.
In that case the effective wage is the 'wage_with_holidays'.
This specific wage should be used as basic salary when computing the payslip.
5/ l10n_be_hr_payroll: Track visibility onchange on wage_with_holidays
6/ l10n_be_hr_payroll: Remove cars domain on contracts
Doesn't make sense to restrict the available cars on backend.
A HR user is supposed to know what he does.
7/ l10n_be_hr_payroll: Rename 'Total Employer Cost' into 'Employee Budget'
8/ hr_contract: Add 'active' field on contracts
Add the possibility to archive contracts.
9/ l10n_be_hr_payroll: Remove unnecessary field dependencies
Since https://github.com/odoo/odoo/commit/2304edd46cc12aaef4fddaa22887ff51f51581bc,
the total_depreciated_cost field on the fleet.vehicle is stored.
This commit removes the field dependencies that are not useful anymore.
10/ l10n_be_hr_payroll: Allow to use several transport mode
It should be possible to use several transport mode between
- A company car
- A public transportation
- Another transport mode
This commit split the selection field into 3 boolean fields.
The payroll rules have to be modified too to take all the costs into account
on payslips.
11/ hr_contract: Rename 'Contract Type' into 'Employee Category'
12/ l10n_be_hr_payroll: Introduce a new 'Intellectual Property' advantage
Intellectual property rights guarantee their holders a temporary and territorially
restricted, exclusive exploitation of their intellectual property. This monopoly
stimulates innovations that are indispensable for economic growth, but can go against
the right of free competition which is indispensable for the free market economy.
13/ l10n_be_hr_payroll_fleet: Add company car information on employee contracts
It makes sense to display this piece of information on the employee contract.
It allows HR users to see users information about the employee company car without
having access to the whole fleet module.
14/ hr_contract: Add next activities on contracts
It makes sense to plan activities on contracts like renewals, signatures, ask missing information,...
It's possible to take more holidays days than the allowed legal days.
In that case the effective wage is the 'wage_with_holidays'.
This specific wage should be used as basic salary when computing the payslip.
It should be possible to use several transport mode between
- A company car
- A public transportation
- Another transport mode
This commit split the selection field into 3 boolean fields.
The payroll rules have to be modified too to take all the costs into account
on payslips.
Intellectual property rights guarantee their holders a temporary and territorially
restricted, exclusive exploitation of their intellectual property. This monopoly
stimulates innovations that are indispensable for economic growth, but can go against
the right of free competition which is indispensable for the free market economy.
It makes sense to display this piece of information on the employee contract.
It allows HR users to see users information about the employee company car without
having access to the whole fleet module.
The precision digit on the produce lines is not set to the product unit
of measure one. That can lead to a lost of precision when a small values
are set in the manufacturing order and not in the produce wizard.
OPW-1838077
When moves of a MO are generated, they are rounded up to the decimal
precision of the rounding, what is not done in the wizard.
So to keep it consistent, we also round up the quantity to consume in
the wizard.
If document viewer is opened from chat window and when document viewer is opened then focus
remains on it's modal, pressing escape should set focus back to chat window's input element,
if file selecor dialog is opened and if user press ESCAPE on file selector dialog to cancel file selector
dialog then it should not close chat window instead it should set focus on chat window input and on
second ESCAPE key chat window should be closed
also increase z-index of document viewer dialog so image remain on top of cht window
OPW: 1777937
When an internal locations has its `scrapped` field set to True,
reserving will increment the quant's `reserved_quantity` while
unreserving will bypass the reservation mechanism (as in a supplier
location). This leads to a desynchronisation between the
partially_available/available move lines and the quant's
`reserved_quantity`, leading later on to "cannot unreserve more than
available" errors.
To prevent this kind of issues, there's a `should_bypass_reservation`
method set on the location that we *should* use everywhere, it was
implemented by [0]. Sadly, this line was not adapted since its
implementaton in [1].
Co-authored by len-odoo <len@odoo.com>
opw 1837900
[0] e1cea2640f
[1] 0469d2e712
This constraint was added during the Great Accounting Reform of v9, in
an attempt to help users avoid reconciliation mistakes.
It turns out that such mistakes are difficult to make in normal
situations, since the system only offers matching entries to reconcile,
so the constraint is largely redundant.
On the other hand, it does block legit cases of reconciliation,
such as those where a large number of lines with different partners are
reconciled together. This often happens when reversing a Journal Entry
that encompasses multiple customers, such as a POS closing entry, or a
manual entry.
To make the system more flexible, let's consider that when a manual
reconciliation breaks the "single partner" rule explicitly, it's for a
good reason, so we should allow it.
OPW: 1840437
Backport of 8e73023f68
This constraint was added during the Great Accounting Reform of v9, in
an attempt to help users avoid reconciliation mistakes.
It turns out that such mistakes are difficult to make in normal
situations, since the system only offers matching entries to reconcile,
so the constraint is largely redundant.
On the other hand, it does block legit cases of reconciliation,
such as those where a large number of lines with different partners are
reconciled together. This often happens when reversing a Journal Entry
that encompasses multiple customers, such as a POS closing entry, or a
manual entry.
To make the system more flexible, let's consider that when a manual
reconciliation breaks the "single partner" rule explicitly, it's for a
good reason, so we should allow it.
OPW: 1840437
When creating a transfer from:
Dashboard > Planned Transfer
The scheduled date is not configurable as explained in commit:a57a290bd89bee0c50c9c1b03e7185c0497e89ed
opw:1838620
When we edit a list view and change page before the change has been
savec, the saving and page changing will be done concurrently thus
possibly causing an error if the page is changed before the saved is
finished: the save will try to modify the page that is no more
displayed.
In this change, the list view editable wait for the saving to be
finished before reloading its content.
note: for 9.0 up to saas-15
opw-1839149
closes#24471