If a leave request is refused by the manager, the button reset to draft is displayed, but the employee cannot use it because he doesn't have the write access rights on his own leave requests
In 'refuse' state, all the form is readonly, but the employee should be have to reset his own leave to draft to modify it and re-submit it.
Some view extension (in this case mainly counters on partners, like
small Sales Orders counter badges etc.) should not be visible if you
don't have the relevant rights.
If an analytic account is not linked to sale order, do nothing (and do not return False which is not a valid value for a write ({} would have been valid)). We should allow the simple analytic accounting without sales order.
It often occurs that users get nasty error messages like "missing value
for column xxx" when trying to create objects. It can happen if the
objects uses a sequence as default value that is not defined in an
available company.
We try to give a hint to the glory support person who could be confused
by that.
The dictionary `_group_by_full` is replaced by a field parameter `group_expand`
that is assigned to the method name. The API of the method has been simplified
as well:
@api.multi
def _read_group_stage_ids(self, domain, read_group_order=None, access_rights_uid=None):
# the stages are given by self.ids (wrong model);
# read_group_order is the order given to read_group() on self;
# return stages.name_get(), {stage.id: stage.fold)
_group_by_full = {'stage_id': _read_group_stage_ids}
is now written:
stage_id = fields.Many2one(..., group_expand='_read_group_stage_ids')
@api.model
def _read_group_stage_ids(self, stages, domain, order):
# stages is a recordset;
# order is the order to use on stages' model;
# return a recordset which is a superset of stages
When increasing the amount on a confirmed purchase order line,
an extra move is created in the incoming picking.
When the purchase creates the moves in the picking on confirmation, it takes into account
the procurements that triggered the purchase order and creates a move for every procurement.
This is necessary in order to make the next steps ready.
With this commit, when you increase the quantity, it will take into account the amounts of moves
already created for a procurement and not link the new move with a procurement if not necessary.
This case can be tested by confirming the PO with less than foreseen by the procurements and increasing
the amount afterwards. (which is more of a corner case, but it is good to do things right)
The dashboard must be visible for non-'group system' users, hence
the sudo call + only display the link to modify the client id
if the user has sufficient access rights.
Small visual correction for live users counter in the dashboard.
This is linked to the previous commit.
This commit adapts the widget extension and backend controller of
the website admin dashboard to prevent a crash if the user does not
have sales rights.
This is linked to the previous commit.
This commit adapts the widget extension and backend controller of
the website admin dashboard to prevent a crash if the user does not
have sales rights.
The Website Admin dashboard displays graphs for sales, analytics,etc.
using a (somewhat easily) extensible js framework.
Unfortunately, this framework is ACL unaware, meaning that it will
completely and silently crash if you are missing any of the required
access rights.
To solve this, extensions must now specify not just a graph name
but a necessary group for it and set the value for this group in
the extension of the backend controller.
This commit also
- make the icon visible for the group 'Website Designer and Editor'
(not juste the Settings group, which is extremely restrictive)
- make the button to set the Google API key only visible to people
with sufficient access rights
This will improve the onbarding of project and the usability in general.
Project: When creating a project a small modal opens with one or more fields, and you have to click on it just to type the project name.
Usability: one many2one (and others), when clicking on "Create and Edit", the focus is set on the first field.
This allows to import acccount.move.line via csv and provide the field 'tax_ids' (which is needed for the tax statement).
This option is now a context's key, replace the key 'dont_apply_taxes' which was now useless
The system was lost with the editor refactoring which came with saas-10
and commit bf39884a5c.
Indeed the show() method of the BuildingBlock class was removed as the
widget is now always showed but the show_blocks() method it called was
not removed (and thus was not called anymore).
As a fix, the show_blocks method is now called again, on snippets
initializations and each time a snippet is dropped or removed.
The quantity event handler is not correctly unbound when its action
is deleted, resulting in multiple window.prompt asking the quantity
of the products if you go mulitple times trough a view when a widget
implementing the barcode thing is used.
There seems to be a bug in the framework ("barcode_scanned" events
are registered the same way than the "keypress" one on core.bus
but they don't have suffer from the same issue).
Uncheck use tasks and/or use issues and/or allow timesheets
all links are still available from the kanban
timesheet is available from the form view
tasks and issues hidden in the form view
NB: allow_timesheets was defined in timesheet_grid, but it should be standard in hr_timesheet
The .dropdown is in a .btn-group environment while a .btn-group can
only contain .btn or .btn-group elements.
This induced problems where the m2o options covers the full overlay
environment, preventing clicks on the customize dropdown.
When an onchange return a NewId for a many2one, the expected result is
a False value.
It appear for computed many2one that can return currently created
record like `res.partner.commercial_partner_id` field.
* Do not read multiple DOM data on each scroll. Simply read this when
necessary (edition / initialization).
* Throttle scroll event and debounce resize events (-> performance in
edition and navigation improved).
* Do not save useless data in the DOM.
* Have the parallax state consistent if the page undergo other changes
* Simplify DOM structure and LESS
- Allow to better see how to place snippets inside the area
- Before this commit, default parallax had different height on
chrome and firefox
Currently some customers receive the automatic notification 'Quotation
viewed by customer'. This should not be the case as this notifciation
is purely internal and should only be sent to the quote responsible.
Notification is now a note with the responsible being directly in the
recipients.
Conflicts:
addons/website_quote/controllers/main.py
Backport of 14f07cb96f
opw-687957
When doing a reconciliation, make sure that the tax amount is properly
rounded to the currency precision. Otherwise, if the rounding policy of
the company is "round globally", the amount recorded won't be rounded.
opw-688399
Closes#13452
An issue arises in the following use case:
- Company rounding policy in "round globally"
- Tax excluded of 20 %
- Create a statement of 3.80 EUR
- Reconcile the statement thanks to the reconciliation widget
- Click on "Choose counterpart" in order to manually create a line to
reconcile with the 3.80 EUR statement
- Add an amount of 3.17 EUR, and choose the 20 % tax
The widget creates an extra line of 0.00EUR . This is because the
remaining amount is 0.004.
The reason lies in the `monetaryIsZero` function. There is a hardcoded
decimal precision of 4, while it should be 2 for EUR.
We add an extra parameter to the function so it is possible to adjust
the decimal precision required. Only the problematic calls are modified
to avoid unnecessary intrusive modification.
Closes#13452
opw-688399
In some specific cases,it is necessary to call the `compute_all` method
and prevent any rounding to be done. This adds some flexibility in the
method to override rounding thanks to a 'round' context key.
Related to #13452 and commit 2e4777bb32
opw-688399
Commit b309f3ab54 made the snippet remove
button always be there by removing the "preventParentEmpty" mixin.
Instead of preventing to remove the only child of a snippet, the system
was changed to remove the parent if this only child is removed. This
also applies on the system which hide the remove button if the child
cannot be dropped anywhere in the DOM.
Unfortunatly the image gallery snippet relied on the remove button to
be hidden for its content images. Indeed, it was implemented so that
the "remove" button is hidden but a "remove image from gallery" was
there in the customize menu. The solution is to remove this option and
copy its behavior on the standard remove button.
Note: this probably was not done before because the on_remove feature
was broken (fixed with commit 5e9ebcfb01).