Steps to reproduce the bug:
- Drop a "Form" snippet on the website.
- Add three fields and rename them by "a", "b" and "b".
- Change the conditional visibility of the first "b" and make it depend
on "a".
- Change the conditional visibility of "a" and make it depend on "b".
- Save.
-> Traceback "Maximum call stack exceeded" appears.
A field with a conditional visibility is visible if at at least one
field with the dependency name is visible. The problem is that in our
case, it exists a circular dependency between "a" and one of the "b"
leading to an infinite loop during this check. Before this commit all
the fields of the form were checked and all the labels of the fields
that do not create a circular dependency were proposed in the file
visibility selector. The problem is that in our case, one of the "b"
field does not create a circular dependency while the other does. To
solve the problem, the `_recursiveFindCircular()` function has been
adapted in order to not propose a label that would create a circular
dependency in the file visibility selector.
task-3291044
X-original-commit: f010b128be29e884c89dd58f1c575a163e229d5b
Part-of: odoo/odoo#140928
In f0b7838f the event_barcode was moved from enterprise to community, so
the menu for the registration desk changed. As this menu was blacklisted
in the clickbot, it started to fail in the nightly tests.
While at it:
* remove useless and noisy log
* log when a menu is skipped instead of telling that it was tested
closesodoo/odoo#140805
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Steps:
- Install Project
- Open project module
- Actived Task Dependencies
- Select any project
- Now select any task
- Go to Sub-Task notebook
- Add sub task
- Select any other project in the sub task
Issue:
Currently, we cannot create sub task of another project in the form view.
Fix:
- we can create sub task of any project.
Task-3508241
closesodoo/odoo#140794
X-original-commit: 5c2471f4ed1f61b0ba75e05280eccf39a6a44f62
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit fixes a contrast and readability issue on the active tab
within Settings on small devices.
Prior to this commit, an active tab on mobile view would use a primary
background, while nothing would be declared for its text color.
This would cause readability issue, with a dark text on a primary
background.
To avoid this kind of issue, we set a `text-bg-primary` class to our
button to ensure it gets readable, and also set a `shadow-none` to
prevent the `tip` of the tab to appear in mobile, since it would use
another color.
task-3580676
closesodoo/odoo#140751
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
This commit, fix the issue that some tests fails on other month than
October, this occurs because the current date wasn't patched on the
tests.
Moreover, this commit removes the log "Clicking on: Control Panel menu",
this log is not very important, and can increase significantly the size
of the log.# with '#' will be ignored, and an empty message aborts the
commit.
closesodoo/odoo#140728
X-original-commit: 3538513c87098aab21bd2224fbf6a338ffd5b577
Related: odoo/enterprise#50046
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
As of https://github.com/odoo/odoo/pull/114024, `display_name` is
implicit in every form view (see the use of addFieldDependencies in the
Form controller). Therefore, when you create a new record for this
model, it calls the first `onchange`, which will compute display_name
for a new record (id without origin). Some `_compute_display_name` don't
handle new records correctly and raise a traceback. These models are
sometimes directly accessible:
- Accounting > Account Group > New => Traceback
- Contact > Contact Tags > New => Traceback
Other models are inaccessible by default (no view to access or create a
new record), but if someone creates a view for them with studio (or
modifies an existing one to allow creation):
- `crm.iap.lead.role`
- `crm.iap.lead.seniority`
- `chatbot.script.answer`
- `payment.token`
Change the code of `_compute_display_name` on these models to be more
defensive and avoid (potential) tracebacks. Similarly, change the
`convert_to_display_name` of `fields.Datetime` to take into account
`None` value.
closesodoo/odoo#139592
Related: odoo/enterprise#49721
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
The MacroEngine has a stop function that allows to completely
disable it. Before this commit, it correctly disconnected the
"main" mutation observer, but it didn't disconnect the mutation
observer for iframes.
In web_tour tests, we mock the MacroEngine to stop it at the end
of tests, but this didn't stop the iframe mutation observer.
This had an highly undesirable side-effect in tests: the qunit
suite stopped during mass_mailing tests, because the iframe
mutation observer detected a change which produced the log of
"test successful", which ended the whole suite. Some tests were
thus never run anymore (fortunately, we're only talking about a
few qunit modules).
closesodoo/odoo#141143
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
It is not possible to add to comparison a product without variant. But
before this commit, if you add the product to the wishlist, it is
possible to add it to comparison. This commit prevents this button from
appearing in case the product has no variant.
Solves #139175closesodoo/odoo#141016
X-original-commit: c7f43cd9313129eef18dc80d62b3211790c7dbfd
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
When bank statements are imported using Enterprise's account_online_synchronization,
or when invoices are created from incoming email using mail aliases on
`account.journal`, journal entries can end up with a fiscal position from the default
company of the user that the `account.move` creation runs as, or the import fails
with an error "'Draft Entry' belongs to company X and 'Fiscal Position' belongs to
another company".
While account.move's `_compute_fiscal_company_id` calls `account.fiscal.position`'s
`_get_fiscal_position` with actual company of the move, it passes one or two
`res.partner` records to this method that were still browsed with the default company
of the executing user which could result in a fiscal position from that company,
instead of the company of the journal entry.
closesodoo/odoo#141059
X-original-commit: 71bd4f1378f56b333830cbc5aa11c1c55dcefcc3
Signed-off-by: William André (wan) <wan@odoo.com>
Co-authored-by: William Andre <wan@odoo.com>
__accessible_branches() used to call search() to get the children companies, but doing so, it returned them sorted according to res.company's _order, so (sequence, name). Because of that, a branch company with a name coming before it's parent's in alphabetical order, if they had the same sequence (which is the default), would always be returned before it by this function.
This behavior caused some issues, as it was assumed the order of the element it returned would be the same as in the company selector ; respecting the hierarchy of branches, with parent companies coming first.
This was spotted in Accounting, with the following setup:
- A company named "main", with one branch called "branch".
- "branch" has one sub-branch called "branch branch".
- Enable "main" and all its sub branches in the selector ; "main" is the active company.
Here are the issues that were found in Accounting:
1) Click on the "new" button in the Customer Invoices' tree view. Don't change anything in the form that opens, and check the value in the company_id field of the invoice being created. It should be "main", but it's "branch" instead.
2) (when applying the fix commit on the enterprise branch related to this one)
When printing an accounting report, the route called to generate the file restores the active companies from the options' multi_company key https://github.com/odoo/enterprise/blob/16.0/account_reports/controllers/main.py#L21 . Because of that, if the report does not support multicompany, but only branches of the active company (see corresponding enterprise commit for details), if the first company in this list is one of the branches instead of the main company, the companies computed for the report will be different.
In our example, "branch" will be first in the list, so the options for the file export will be computed with "branch" as main company, enabling only its branches that are selected in self.env.companies ; so only "branch" and "branch branch" will be in the report ; which is wrong, as we also want "main".
X-original-commit: b0d716a0e618ddc78d6ca80b5bc7b796ed27905a
Part-of: odoo/odoo#141033
Versions:
---------
- 15.0+
Issue:
------
Depending on the font, string & window size, the `oe_search_box`
placeholder may get cropped awkwardly.
Cause:
------
The search field can't guarantee adequate width to show the full
placeholder string.
Solution:
---------
Add `text-overflow: ellipsis` CSS rule for `oe_search_box` elements to
make it clear the placeholder was cropped.
Related:
--------
- odoo/enterprise@b69c7da11a
- odoo/enterprise@5e47eaf30f
opw-3504281
closesodoo/odoo#141070
X-original-commit: 18cbb2913537bab0748f0a4e7ed466f259c8fa77
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
=== ISSUE 1 ===
Prior to this commit, card colors in the index list were static,
creating a contrast issue if the page background color changed.
This commit fixes this issue.
=== ISSUE 2 ===
Prior to this commit, the popover text color and the shadow created
color issues when the background color of the page was dark.
To fix that and maintain consistency, we use the common Bootstrap
shadow and force the text color to be dark.
task-3559012
Part of task-3097005
closesodoo/odoo#141069
X-original-commit: ac61d3ba59b9fa10e300cbf065d73c165e1d7af0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
**Before this commit**
Open within a dialog a popover that has a child
using the useAutofocus hook.
As the dialog has become the UI active element,
and as the popover's element tree is a sibling
of the dialog element (since both use the overlay
service): the autofocus mechanism wanted by the
popover's child does not work at all.
**After this commit**
The popovers now can also become the UI active
element, leading to the above use case to work properly.
closesodoo/odoo#140885
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
**Good to know first**
The UI active element takership system is
directly bound to the focus trap mechanism.
**Before this commit**
If an element become the UI active element but has no
tabable elements in its tree, we force its tabindex
to the -1 value to make it programmatically focusable.
That way we ensure the focus is effectively trapped.
**After this commit**
The tabindex is no more forced at all.
Instead, if we detect that there are no tabable elements
inside the UI active element candidate, it simply does not
become the UI active element.
In other words, this commit kind of weakens the focus trap.
But this is perfectly fine for our use cases, i.e.:
- dialogs always have at least one focusable button (close, ok...)
- the website wysiwyg-adapter has a ton of focusable elements
**Why ?**
We need this change to permit other UI pieces to make use of
the active element takeover mechanism, i.e. popovers.
Part-of: odoo/odoo#140885
**Before this commit**
If a UI active element taker has its first or last
tabable element rendered conditionnaly, the focus trap mechanism will
not work properly.
**After this commit**
It works as intended.
Part-of: odoo/odoo#140885
There is a visual "glitch" in the website builder, there is a 2px white
bar (2x1px border) at the bottom of the screen in edit mode.
Steps to reproduce:
* Enter edit mode on a page
* Drag & drop a few snippets to have a scrollbar
=> The bottom white bar appears
closesodoo/odoo#140979
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Since we remove jQuery UI[1], the owl component `AutoCompleteWithPages`
doesn't work correctly on Safari.
When we clicked on the `AutoCompleteWithPages` input the code in the
`AutoComplete` component `onFocus` make a selection on the input of the
`AutoComplete` component and not on the `AutoCompleteWithPages` input
this make a unwanted effect such as blur the clicked input and focus
the other input. This commit fixes that.
Steps to reproduce:
* With Safari, open the `Website` app
* Click on `Site` > `Edit Menu` > `Add Menu Item`
* You can't type in the url field and if you spam click on its.
Sometimes, it produces a browser crashes
Links
[1]: https://github.com/odoo/odoo/commit/99f5ae32d3ee4a3dcc75e31ad0a88f42d6ce3589
Part-of: odoo/odoo#140979
Before this commit:
Message type of rating messages for Livechat Session in demo data was not set,
which led it to set default type `email`.
Which would lead to display the `Show/hide original email` button.
After this commit:
Set `message_type` as `notification`.
task-3502745
closesodoo/odoo#140975
X-original-commit: 1b33e019ba7cf9b1dc272a0fedc1b8534b9e8867
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit forces the color of all buttons in the header to have a
better-look consistency.
Steps to reproduce:
* Open Odoo on small screen
* Go to Sale
* Create a new SO
* Click on customer field to open the Kanban view => BUG
the clear button is not visible (enterprise)
closes odoo/odoo#141040
Forward-port-of: #50123
X-original-commit: aa748820d06ddd84465c404ce158e882307dbda6
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Before this commit service threshold value for 'unit'
unit of measure display (1 unit = 8.00 hours) but since
https://github.com/odoo/odoo/pull/99785 PR we take 1
unit equals to 1 hours not 8 hours.
This commit display (1 unit = 1.00 hour) to dispay proper
value according to calculation.
task-3282848
closesodoo/odoo#141039
X-original-commit: d27209ef9bc4f57a8f7401e5271915763df5eeb1
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Prior to this commit, on mobile, we couldn't see the entire offcanvas
menu because the browser's UI was hidding part of it.
To fix that, this commit adapts the height of the offcanvas menu using
`dvh` unit.
task-3582657
closesodoo/odoo#141032
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
When we're exiting the import view, we need to have ids of the imported records
to confirm that the import was successful and to filter on import records if
needed.
This commit adds an optional resIds parameter.
task-3549609
closesodoo/odoo#140969
X-original-commit: bb968c5e197e37c0391209420655a777821aa3f1
Related: odoo/enterprise#50141
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
Before this fix, a condition of the form (field_name, "in", expr) would
be "stringified" in such a way that expr would be wrapped in a list, e.g.
we would get by expressionFromTree the expression
field_name in [expr]
Here we prefer to keep expr as it is since we have no information on its
type at evaluation. That is we transform the above condition into
field_name in expr
closesodoo/odoo#140966
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Steps to reproduce:
- Install Sale and Purchase and enable UoM
- Change 'Acoustic bloc screen' purchase UoM to dozen
- Create a PO for that product
- Access the product page from PO line
- Wrong Sales price
Bug:
the jsonrpc to read product data needlesslt sends the UoM in the context
which leads to the sales price being updated by _compute_product_lst_price
Fix:
remove UoM from procut context as it is not necessary
opw-3434574
closesodoo/odoo#140957
X-original-commit: fe04d61a886fa7b461ebf9bda2d7479fb69281cd
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
**Before this commit**
Open some popover then a dialog.
The popover appears in front on the dialog.
Examples:
- Calendar > Click an event (popover opens) > Open command palette
- Open a facet domain editor dialog in any app, then open any model
field selector popover and open the command palette
**After this commit**
Each first-level child of the overlay container
starts with the same z-index and with a value
that is greater than the higher value we can find
in the bootstrap z-index master list.
This solves the aforementioned overlaping issues.
closesodoo/odoo#140953
X-original-commit: 9682cfa174fb39ec9d9874951ea9ee2884058d96
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Before this commit, the user could drag the first employee displayed
in the gantt and drop him on one of his subordinate. By doing that,
the manager of that employee will be his subordinate and a cyclic
will occur and no record will appear when the org chart will be
reloaded because no employee will have no manager set.
This commit fixes the issue by improving the cyclic detection when
the user uses the drag and drop feature. That is, the action will be
blocking when the system detects the user tries to drag and drop a manager
to one of his subordinates.
closesodoo/odoo#140951
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, some recent changes altered the generic view for
Org Chart view of `hr.employee` model. The problem is those changes
also altered the other hierarchy view used in others models.
This commit moves the recent specific changes to hierarchy view
of `hr.employee` model to be sure to alter only the org chart view
of that model.
Part-of: odoo/odoo#140951
When we add a many2many field related to Project, an error is thrown
when we add 2 or more projects
Steps to reproduce:
1. Install CRM, Project and Studio
2. Go to CRM and open any quotation
3. Trigger Studio
4. Add a many2many field related to the Project model
5. Close Studio
6. On the CRM form, click on Add a line and select 2 projects, the 2
projects must have the same sequence (new projects will have a
sequence of 10)
7. An error is thrown
Problem:
The "name" field used in the order of the list view for project was not
present in the view so there was an error when trying to sort the list
by this field
opw-3526101
closesodoo/odoo#140950
X-original-commit: 334e6fc41725fe0bd7e6bae8e2153c6abedc71cf
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
In this commit we adjust the pos module such that, in the
corresponding enterprise commit, we can more easily add the
tax letters corresponding to each orderline in the receipt.
closesodoo/odoo#140974
Related: odoo/enterprise#50134
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
To reproduce:
- Install studio and account.
- Invoicing/Accounting, menu Customer > Invoices
- Activate kanban view
- Put filter "My Invoices"
- Enter studio mode
=> There is a traceback in the logs, even if not shown in the view.
When entering studio in kanban, a card with default values is created.
The problem was that the journal wasn't computed, and so, broke
the onchange_partner_id function
It was because move_type, while being in the default, wasn't in the view,
and so wasn't in the values given by the js.
closesodoo/odoo#140927
X-original-commit: 629176269614467c637543b11fc556a63ee70c5b
Signed-off-by: William André (wan) <wan@odoo.com>
Current behavior:
When the user language uses a different decimal separator than the
"." (dot), the tip amount is not formatted correctly and the amount is
incorrect. e.g. 1.5 is interpreted as 15.0
Steps to reproduce:
- Change the current language decimal separator to "," (comma) and
thousand separator to "." (dot)
- Open restaurant (make sure tip after payment is enabled)
- Add a product to the order
- Pay by bank
- Click on tip 20%
- The tip amount is incorrect (too high)
opw-3525033
closesodoo/odoo#140926
X-original-commit: f0cd80fbb55e0f234800c6be4696ff8e1533978b
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
Steps:
- Open Settings > Users
- Change the name of the user by typing it multiple times
- Go to the portal view of the website
- Among the Documents select Task > select a task where our user is set as an
employee
Issue:
- When that particular task is chosen, under the Timesheets, the name is found
repeatedly in the table.
Cause:
- The text is not truncated due to which the name overflows.
Fix:
- adding a class 'o_portal_my_doc_table' in the table which helps to truncate
the text
closesodoo/odoo#140922
Task: 3383519
X-original-commit: b7952e2cf649584906ddab57386b711e06de9ba2
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Description of the issue/feature this PR addresses:
The "View My Services" button of the widget should open
the IAP accounts tree view, just as the main "View My Services"
button of the general settings.
Current behavior before PR:
View my services widget redirected to iap website
Desired behavior after PR is merged:
Updated the widget to redirect to tree view of services
task-3580190
closesodoo/odoo#140904
Signed-off-by: Louis Baudoux (lba) <lba@odoo.com>
If the web client gets into a bad state and piles on errors (or
exceptions) this leads to a mess with hundreds of kilobytes of
warnings being logged as we try to set an already failed tour to
failed (and also take screenshots), as in
http://runbot142.odoo.com/runbot/static/build/53098209-master/logs/test_only.txt
Also update `has_failure` to directly depend on an exception being
set, as that should be a more reliable indicator. And much like the
case of an error log skip trying to set the tour to failed in
`_set_exception` if it's already failed. Although in that case do log
the traceback as an `error`.
closesodoo/odoo#140879
X-original-commit: 96c501036a6dcb216e82e0dfa42b59a9b917d742
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
We currently have two date fields, "date" and "invoice_date". Before this pr,
the "date" column was before the "invoice_date" field. We think it's more
logical to have "invoice_date" before the other, since it's the legal date.
What has been done:
- Swap in the tree view the two columns
- Swap in the search view the two columns
closesodoo/odoo#140878
Related: odoo/enterprise#50107
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Steps:
- Install Field Service
- Open the Field Service module
- Click on the configuration
- Go to the Worksheet Template
- Now go to the kanban view
- In view, Click on dropdown menu of any card
Issue:
- In kanban view, when we are viewing in dropdown menu colors are not correctly
centered.
Fix:
- Added in kanban color picker mb-0 & ms-2 for margin space from bottom & left.
Task-3508241
closesodoo/odoo#140807
X-original-commit: 97e90710f5f2e300131df442bba833a5e7ece29e
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit adds the "alt+u" shortcut to open the cog menu in order
to match with the behavior of the actions menu.
task-3560446
closesodoo/odoo#140798
X-original-commit: fbf245cb81453e1fedbfd4649a8284546da44ffb
Related: odoo/enterprise#50074
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Prior to this commit, the patched setup functions of Order did not match
the original signature.
closesodoo/odoo#140893
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>