If a user has an ooom in his Preferences, it should be
used as the default value for a leave ooom.
closesodoo/odoo#33890
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
Purpose
=======
Currently, the ooom field is editable in the leave view but an ir.rule
prevents the employee to save as soon as the leave is approved.
Specification
=============
An employee should be able to edit the out of office message
even if the leave is already approved.
The goal of the to_check checkbox in the reconciliation widget is to set the to_check field present on the move that will be created. However since the UI is not perfect, the to_check checkbox was added on the wizard when we create a new line in the widget, which cause the following problem: what if we select to_check on line1 and then deselect it on line2, previously it was not possible to do this, a warning was thrown to tell the user that he had some line with to_check set and some other not. A better way to do this, and more user friendly is by preventing the user from deselecting the checkbox if some other line has the to_check value set.
closesodoo/odoo#33956
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
The function get_all_data_for_manual_reconciliation got an empty list instead of None. This leads to not query the db. However we want to get results in the default behavior for get_all_data_for_manual_reconciliation
closesodoo/odoo#33711
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
The field job_id is displayed in the tree view but it was not available in the form view
like in 12.0. So it was not possible to change it.
opw:2006084
closesodoo/odoo#33933
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
If you are logged into a company that differs from the company of your
employee, you won't be able to read the informations on that employee,
and you will have a crash.
Instead of taking the employee linked to the current user, we use search
in order to first apply the ir.rules hence we ensure that we will be
able to read the needed informations.
row_number without order is not invariant depending on the readed
fields. The order by clause on the partition solve this.
closesodoo/odoo#33573
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
- On mobile grouping by a field crashes.
This is due to the code assuming a function parameter
is always passed where it is actually an optional parameter.
closesodoo/odoo#33891
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Form sheet's title (with class .oe_title) when in editable mode has a
maximum width. The goal according to FP is to make a clear
differentiation between the main title/name of a record and its other
fields.
An issue with the existing rule in the Project application is that the
"title" row (with class .oe_title) not only contains the name of the
task but also its priority and state.
The aforementioned rule should then be applied only on the "name" part
and not to the whole row to prevent the "state" from moving between
read_only and editable modes.
To do so the maximum width is "moved" from the row element to the task
name's element.
Sadly the current stylesheet in this project is still a regular CSS
file, preventing us from using the SCSS expression coming from
`addons/web/static/src/scss/form_view.scss`.
Task ID: 1946570
closesodoo/odoo#33845
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Before this commit, if you try to define some field tags before the
templates tag in a gantt view you will get a validation error.
closesodoo/odoo#33826
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In the reconciliation widget, we added a to_check functionality. However in some cases, the propositions don't have a default value for
to_check, which result in a warning being thrown when doing a comparison to ensure that all lines have the same to_check value.
This commit add a default value to to_check for all propositions (when loading the data and when performing a quick create).
closesodoo/odoo#33824
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
The point of this warning is to help a view developer realize that
his view is not loaded at all. However, console 'error' and 'warn'
are observed by the runbot clickall tour as meaningful errors
regarding a build resulting status. It makes sense, but it is an
issue for community modules which have a gantt view that only
exists in Enterprise. We don't want to create a bridge module
for each and every module which uses a view that only exists in
Enterprise, so we need to live with this warning. Since its
purpose is for developers only, they can read the log and notice
the error even if we use console.log rather than console.error,
and that will not alter the result of the runbot clickall tour.
closesodoo/odoo#33814
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- Since 12.2 when a record rule forbids you to access a record
an error message is displayed with the list of the record rules
that have forbid the access and an example of the forbidden records.
The issue here is that a specific message is displayed to warn the
user that the record rule may be a "Multi-company" record rule.
To do so, it checks if `company_id` is present in the record rules'
domain but if the domain is empty it crashes.
OPW-2004827
closesodoo/odoo#33801
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
- When validating a payment an "expected singleton" exception is
raised due to the fact that we are using a recordset with multiple
record instead of a recordset with a single record.
OPW-1981632
closesodoo/odoo#33767
Signed-off-by: Christophe Simonis <chs@odoo.com>
If the company is not set on the SO, the creation of a SO line crashes
because `currency` is empty.
opw-2005143
closesodoo/odoo#33783
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Create an Analytic Distribution for:
Product A
Current user (e.g. Mitchell Admin)
- Sell the product in the POS, request an invoice
The analytic account defined is not used.
This is due to the invoice created as SUPERUSER.
We should first take into account the user on the invoice, then the
current user.
opw-2003935
closesodoo/odoo#33758
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Before this commit, the payment memo was copied during the duplication
of a voucher. The issue is that the payment memo is not always shown in
the view, and it's mostly unique by voucher.
Now, the payment memo it's not copied anymore.
opw-1986544
closesodoo/odoo#33708
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The stable behaviour of the mail composer is the following:
- if a template adds new attachments, the composer only has this list
- if a template doesn't add attachments, the list is unchanged
- if no template is set, the list is cleared up
In the case of templates, we also check that both static and dynamic attachments
are added to the list.
We clean up after c6d718f211 and subsequently 516f22c398 which failed to take
into account the fact that the attachement list could be a blend of commands
and ids.
Transforming that is taken care of by _convert_to_write, which semantics was
changed by c6d718f211.
To keep the second behaviour, we thus need to add a (5,) command.
opw 2003197
closesodoo/odoo#33706
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
In `_compute_qty_delivered` function
Python `all` function returns `True` if list is empty; thast why check
if `moves` is not empty to set `qty_delivered` to `product_uom_qty`.
Before the fix, if you had multiple accounts for a specific service, the
settings page was crashing.
(eg: for a service, you have one account specific to a company and
another account with no company set).
We now prefer accounts specific to the current company and tie-break on
the most recently created one
opw-2003744
closesodoo/odoo#33736
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
The stable behaviour of the mail composer is the following:
- if a template adds new attachments, the composer only has this list
- if a template doesn't add attachments, the list is unchanged
- if no template is set, the list is cleared up
In the case of templates, we also check that both static and dynamic attachments
are added to the list.
We clean up after c6d718f211 and subsequently 516f22c398 which failed to take
into account the fact that the attachement list could be a blend of commands
and ids.
Transforming that is taken care of by _convert_to_write, which semantics was
changed by c6d718f211.
To keep the second behaviour, we thus need to add a (5,) command.
opw 2003197
closesodoo/odoo#33707
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
If a field is inherited from another model, the attribute context_dependent
was not propagated correctly.
Example of bug:
>>> product = self.env['product.product'].search([], limit=1)
>>> product.name
'Whiteboard Pen'
>>> product.with_context(lang='fr_FR').name
'Whiteboard Pen' # cache used
>>> template = product.product_tmpl_id
>>> template.name
'Whiteboard Pen'
>>> template.with_context(lang='fr_FR').name
'Marqueur pour Tableau Blanc'
>>> product._fields['name'].context_dependent
False
>>> template._fields['name'].context_dependent
True
Fixesodoo/odoo#33641Closesodoo/odoo#33722
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Since JS refactoring of ActionManager at 32b8cec536, the /apps/<app> controller
was not working anymore as the refactoring dropped the support of `sa` as URL
state.
closesodoo/odoo#33679
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
There was no way to inherit properly action_move_create method.
opw:1974069
closesodoo/odoo#33488
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
If an error is raised when saving a calendar event, the transaction is
correctly rolled back. However, the view is not refreshed and the
incorrect information is displayed.
We simply reload in all cases.
opw-2002186
closesodoo/odoo#33028
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When an error is raised server-side, the complete traceback is displayed
in the JS console. This traceback can be very useful since it might
contain information not recorded anywhere else by default. For example,
access errors due to record rules or SQL constrains do not have their
traceback displayed in the UI or recorded in the log [1], but it is
logged in the JS console.
However, the information is logged in the JS console as a stringified
version of the `result.error` object. The final result is a long and
non-formatted string which is unreadable.
We replace by a new format more convenient for technical teams. The
error is now formatted as:
Error code
Error message
Error data message
Error data debug
This will hopefully give a better starting point for debugging purposes.
[1] SQL constrains tracebacks are only recorded in the log in debug
mode:
https://github.com/odoo/odoo/blob/ec792da72b92b22349b6f325e53fd37d953c7db3/odoo/service/model.py#L122closesodoo/odoo#33650
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>