The IntersectionObserver was sometimes started and called its callback
before the scroll was restored, in which case the load more button was
always visible, leading to loading more messages than intended.
To fix, delay the starting of the visible until the scroll is restored.
runbot-35533
closesodoo/odoo#144228
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Currently, increasing the rounding factor for a currency is not allowed
if accounting entries have already been generated in that currency.
However, the restriction currently only applies to the current company.
And since currency records are shared between multiple companies, a user
can create a new company with no accounting entries and then change the
currency's rounding factor, affecting all companies.
This commit checks for the restriction on all companies, and fixes a few
tests that were broken by this change.
opw-3586785
closesodoo/odoo#144226
X-original-commit: 7f8b76ac7ad3730a662203aa88a03d067c1230cb
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Séna Serge Nshimiyimana (sesn) <sesn@odoo.com>
The order of the imports have been changed in websocket_client.py to
follow odoo guidelines
closesodoo/odoo#144188
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Issue:
- Before this commit when we see helpdesk team form view some of the features
names are not aligned with checkbox
Cause:
- Issue was caused because of the icon size is large and so it features names
were not aligned
FIX:
- we have removed the font size of the icon so that text get aligned with the checkbox
task-3463622
closesodoo/odoo#144184
X-original-commit: 9b52a265056d9ee1e82537d1e8bd93b00911d127
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Previously, there was a function called 'start_client' that was invoked
by the 'run' function. As 'start_client' was solely invoked within 'run'
and served no additional purpose, its functionality has been incorporated
directly into the 'run' function.
closesodoo/odoo#144134
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Steps:
- Install project & accounting
- Open project
- Open project.update
- There is profitability section
- Go to accounting module configuration,settings
- Analytic accounting field true or false
Issue:
- Analytic accounting feature true or false the profitability section always
visible in project.update
Cause:
- There is no condition for profitability section visibility
Fix:
- Added required conditions for profitability section visibility
Task-3484413
closesodoo/odoo#135108
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Steps to reproduce (V 17.0):
- Create a new blanket order with agreement type "Call for bids":
- Select only one RFQ
- Use line of agreement
- use quantities of agreement
- Add a product and confirm
- Create a New quotation
- Traceback!
Bug:
typo in the onchange makes it so instead of setting payment_term_id to
false it's a False, which is actually a tupple (False,) meaning payment terms
will be a record set containg one value with Id False instead of an empty
record set (it's wrong but it doesn't really make a difference in this case)
until commit[1] in web_read clean up is used to get the Id from origin Id
for inherited fields ´not vals['id']´ is expected to be true if the value
has an origin Id but in this case it is true because Id is false
(co_records wasn't expected to contains values with Id False if Id is False
it should be empty)
commit[1]:https://github.com/odoo/odoo/pull/128878closesodoo/odoo#144111
X-original-commit: 7c5106a46bc269f2ed4cbeb18f2172b274dd27a5
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
Previously, the demo documents were automatically sent to the OCR when
opened in form view. It's not what we want, those demo documents should
only be sent manually.
This happened because, in the demo data, the main attachment isn't set.
When reading the document, the attachment previewer would select an
attachment as main attachment and, as the OCR relies on the
`register_as_main_attachment` hook, it would be sent for digitization.
Now, the main attachment is explicitly set in the demo data definition.
closesodoo/odoo#144040
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Shop Floor introduces a restriction on how the show_serial_mass_produce
flag is computed :
the components cannot consist of more than 1 lot/serial.
However, this has a side effect on backend views where it is still
required to have full 'Mass Produce' functionalities.
closesodoo/odoo#143286
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Currently, the error occurs while updating a work contract without
selecting any employee.
Steps to reproduce:
- Install a 'Work Entries - Contract' module.
- Go to Employees> Employees> Contracts, And create a new contract without
selecting any employee and also the 'Contract Start Date ' and
'Contract End Date' fields should be after or before the current date.
- Then save it .
- Then change 'Working Schedule' field of the created contract and save it.
- The error is generated.
Error: DatatypeMismatch : column 'hr_employee_id' is of type integer but
expression is of type boolean
LINE 1: ...neration_wizard_id', 'hr_employee_id') VALUES (1, false) ON ...
There's an issue while updating the contract without selecting any employee; As
the system is trying to recompute work entries without employee_id [1].
This commit solves this issue by adding a condition which states that
recompute the work entries; if employee_id is available.
[1]-https://github.com/odoo/odoo/blob/1b504038ce270540ddab28db4ab995d22f2ab2a7/addons/hr_work_entry_contract/models/hr_contract.py#L448-L452
sentry-4654142515
closesodoo/odoo#144180
X-original-commit: 8fc11c9c9be7a654de49664da44d5ba68d23cbd3
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
This commit fixes the behavior hiding the select element when scrolling has
happened. Instead of the 'scroll' event, 'mousewheel' was used, which isn't
triggered when scrolling on a touch device.
Now, the correct event is used, and the listener is given to the actual document
element, instead of being globally listening on window (in case of iframes).
This fix is part of a bug happening in the report editor of Studio, since the
select element wouldn't be reset when scrolling, but kept visible at the same
outdated position.
ticket-3496665
closesodoo/odoo#144178
X-original-commit: f53f8b2f2cba5e586dd376ddd7ec39a16741f66a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, installing the Point of Sale module in a
multi-currency environment could lead to errors. Specifically, if there
were Bank or Cash journals in a currency different from the company's
default, they could inadvertently be selected to create a payment
method for a PoS configuration. This mismatch between the PoS
configuration currency and the payment method's currency resulted in
errors.
This commit resolves the issue by implementing a currency filter when
selecting Bank and Cash journals during the PoS setup. Now, only
journals matching the company's default currency are considered for
creating payment methods.
opw-3606856
closesodoo/odoo#144138
X-original-commit: 22545be292c27870cb3c4694567a45cfe9649971
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Before This Commit:
Currently, the e-invoice is bydefault set to true in journal.
Also there is an option to enable e-waybill in journal.
After This Commit:
Now, the e-invoice will be bydefault set to false in journal.
Also there is no need to have option of e-waybill in journal as we have separate
button to submit the e-waybill.
Task - 3617047
closesodoo/odoo#144128
Related: odoo/enterprise#51737
Signed-off-by: Josse Colpaert <jco@odoo.com>
Before, the url was built with string comprehension.
Now json.dumps is use to ensure that the JSON sent is
valid
closesodoo/odoo#144125
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Before this commit:
No test cases were there for dialog box based link creation.
After thi commit:
Added Qunit test cases for various scenarios
Cases Covered:
* Making links with hotkeys.
* Typing valid url + space should make link.
* Making link with powerbox.
* Selecting text and link button on the toolbar.
task-3087957
closesodoo/odoo#144120
Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
Commit [1] moved page scrollbar to #wrapwrap, which introduced some
issues. This was needed to not have a double scrollbar when the builder
edition panel was moved from left to right.
One of the issue if that the browser print was not working anymore.
A workaround has been found with this commit to make it work again. It
is just reverting the mentioned commit when inside the browser print
preview, which can be achieved through css directly.
Note that in the future, this PR [2] should revert the fact that the
scrollable element is the #wrapwrap.
Also note that while this fix allow printing pages again, there is still
the same behavior as in Odoo 13 and before (where you can print pages
too): the printing preview will not be in desktop size but display the
pages as on tablet size.
[1]: https://github.com/odoo/odoo/commit/4e7be69825163c0a0ff41c882a196fc7f3158fb3
[2]: https://github.com/odoo/odoo/pull/98429
opw-3557672
closesodoo/odoo#144107
X-original-commit: eb0a05319789ebc3732ef623a3811b5bc8b43daf
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is the communitiy counter-part to allow copying a dashboard.
Yet another 'copy' overrride to add the same postfix!
closesodoo/odoo#144091
Task: 3588237
X-original-commit: b39f63b1509e6dc2149b1a09da5a877d45e36be3
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
The goal of this commit is to prevent the text animation overlay from
blocking small text content selection.
Remark: This behavior was already fixed on 17.0 (by [1]) for text
animations and highlights and was backported here for text animation
options.
[1]: https://github.com/odoo/odoo/commit/f64c9f27f1a9106bc009ad2f696845f2c5c58066
Related to task-3285817
closesodoo/odoo#144086
X-original-commit: b69e105149e5f0dc6a469068ab037b717e017144
Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
In the Social Media snippet options, only icons with a `<i>` tag are
considered when updating the social media classes (when adding a new
social network by copying the first one and when replacing the icon by
another one matching the URL). However, there are cases where the icon
is a `<span>` element (with a `fa` class) and not a `<i>`.
For example:
- Replace a social network icon by a real image.
- Re-replace this image by an icon.
=> the icon element tag is `<span>` and not `<i>`.
In this case, after setting its style correctly (e.g. adding the round
shape) to make it look like the other icons, we notice that it does not
behave like the other ones:
- It is not aligned with the other icons, because the CSS rule aligning
them only targets `<i>`.
- Its icon is not replaced by a matching one when changing the URL with
a "relevant" one (e.g. google, facebook).
This commit considers `<span>` icons in the Social Media options, in
addition to `<i>` icons, in order for them to all behave the same way.
opw-3538230
closesodoo/odoo#144076
X-original-commit: a8b5c3045bea0227304306e19ed9d50cf497f518
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
When using the "Social Media" snippet, there are two situations leading
to a traceback. Here are the steps:
1) First issue
- In edit mode, drop the "Social Media" snippet.
- Add a new social network.
- Replace the icon by a real image (so not by an other icon).
- Set the URL of the new social network to a "relevant" one (e.g.
google, facebook).
=> traceback
2) Second issue
- Drop "Social Media" and change the list in order to have the first
social network with a real image as icon: either replace the first icon
with an image, or add a custom one with an image an move it to the top.
- Add a new social network.
=> traceback
Both issues happen because only icons set as `<i>` elements are taken
into account when modifying a social network (`querySelector('i')`) and
this element may not exist if the icon had another tag (like an image or
a span or even a video (as the media dialog allows to upload them)). As
there is no check ensuring that the element exists before changing the
different social media classes, there is a traceback when the `<i>` is
not found.
For the first issue, it happens because when changing the URL, we first
check if it matches with relevant ones or if an icon matching it exists.
If it is the case, we then update the social media classes to set the
matching icon => it can only work if the icon is a `<i>`.
The second issue happens because when adding a new social network, it
actually copies the style of the first one (unless there are none, a new
one is created in that case). If the first one is an image, it fails
when updating the classes because it is not a `<i>`.
This commit fixes these issues by simply adding checks ensuring the icon
element exists before trying to modify it. It also adds tests, ensuring
these use cases work as expected.
opw-3538230
X-original-commit: 0132fa38baee6501f4257dad718359400f1369ad
Part-of: odoo/odoo#144076
When uploading an invoice/bill from an xml,
if the partner is not found, the useful informations
from the xml file should be displayed in the chatter.
opw-3563769
closesodoo/odoo#144073
X-original-commit: 7f00f6e372b91f0a8927805bf4b92b7247ef8db8
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
The values in the "Total" measure are all displayed in the move currency.
Due to this amounts in different currencies are added together.
As a workaround we introduce the possibility to group by move currency.
Thus the user can choose to seperate the values by currency.
The "Total" column was renamed to "Total in Currency" to avoid confusion
There is a remaining problem.
The totals of the individual groups are still added up to form a total.
Previously it was tried to convert the values from the move currency
to the move company currency and then to the active company currency.
The problem is that there is no efficient way to do it correctly.
task-3613358
closesodoo/odoo#144065
X-original-commit: 6d7d86cd0d8335f192112129ee92077f1f25e55b
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Sven Führ (svfu) <svfu@odoo.com>
Due to performance reasons a previous commit was reverted.
This reverts commit 28004b7e92f22cf0f0078d4512f8a5f59c82122c.
The reverted commit i.e. converted the "Total" measure to company currency (at the time of the invoice).
The query to do this (correctly) had performance issues.
task-3613358
X-original-commit: a0121dcc72eb99519ae291e48e4e03a091b234df
Part-of: odoo/odoo#144065
Steps to reproduce:
-------------------
- be in UTC -5 (America/Lima for example)
on the system (and so browser) and the user profile;
- create an event from 4pm to 5pm the next day;
- be at 2pm today;
Issue:
------
We have a notification in activities for this
event today, which is one day too soon.
Cause:
------
To find the events that need to be notified to the user, we use a domain which, in this case,
can be expressed as follows:
```
(
the `start` of the event must be after "now" (the event has not yet passed)
OR
the event `stop` must be after now (the event is in progress)
)
AND
the `start` of the event must be less than the end of the day (the event must be today)
```
The end of the day must be determined, but taking into account the user's timezone.
As the domain has to work with UTC values (because the `start` and `stop` values of the event are in UTC in DB),
in order to determine the end of the current day, we first need to determine which day the user is in UTC.
Logic before this commit (using the example):
```py
start_dt = datetime.datetime.utcnow() # 19:00 (because 14h in America/Lima -5)
start_date = timezone(tz).localize(start_dt).astimezone(UTC).date() # 00:00 next day
end_dt = datetime.datetime.combine(start_date, datetime.time.max) # 23:59 next day
end_dt = timezone(tz).localize(end_dt).astimezone(UTC) # 4:59 second next day
```
The result (for an America/Lima timezone) is that if the event has its `start`
in UTC before 4:59 two days later, the event will be notified.
Solution:
---------
Correct the values used to construct the domain.
Logic after this commit (using the example):
```py
start_dt_utc = now_utc.replace(tzinfo=UTC) # 19:00 (because 14h in America/Lima -5)
start_dt = start_dt_utc.astimezone(user_tz) # 14:00 (because 14h in America/Lima -5)
stop_dt = datetime.datetime.combine(start_dt.date(), datetime.time.max).replace(tzinfo=user_tz).astimezone(UTC) # 4:59 next day
```
Because 23:59 today using user timezone and then converted to UTC gives 4:59 next day.
In fact, the day of a user in the America/Lima (UTC -5) timezone ends in UTC at 4:59 the next day.
If this same user creates an event that starts at midnight (and therefore tomorrow),
the activity must not be displayed before midnight and therefore 5:00 the next day in UTC.
opw-3523558
closesodoo/odoo#144064
X-original-commit: 5a997d34f53d4b00e230b4a9d3131a015b190548
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
This traceback arises when 'write_date' is 'False' in 'max()' function
https://github.com/odoo/odoo/blob/a5ace6fc50df06a30805e639e0e81d35e20d9f3e/addons/product/models/product_product.py#L136-L138
Error:-
TypeError: '>' not supported between instances of 'datetime.datetime' and 'bool'
On the '_compute_write_date' when the 'write_date' is 'False' in 'max()'
function, It leads to the above traceback.
After applying this commit will resolve the issue by computingthe current date,
when 'write_date' is 'False'.
sentry-4398163501
closesodoo/odoo#144051
X-original-commit: de01d9ae7272c80361c53341d681f259cdda4823
Signed-off-by: Altaf Shaik (alsh) <alsh@odoo.com>
Before this commit, refunding a lot-tracked product with a quantity
greater than one in the POS would reset the quantity to one. This
occurred even if the user manually set a higher quantity.
This commit fixes the issue by ensuring the manually set quantity for
lot-tracked products is kept during refunds. This enhancement allows
for accurate quantity retention, improving the POS refund functionality.
opw-3568867
closesodoo/odoo#144050
X-original-commit: e5989cee1cea150b86e6f3d5ae5f2fcdb108fd51
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
Before this commit
==================
Modifying the type of content from video to webpage or webpage to video
violates the constraint.
Technical
=========
When we change the 'slide_type' of the slide.slide model from video to any
other type, or from webpage to any other type, the value url or html_content
is not removed and remains same. However, when switching between video and
webpage, the 'exclusion_html_content_and_url' constraint is violated because one
of them should be null.
After this commit
=================
When the type of content is changed, the existing URL or HTML content is
removed as they are no longer needed.
Task-3474466
closesodoo/odoo#144042
X-original-commit: b68d2f52e9d3d0f18257a17dc1a24db6bee860b1
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Before this commit, the point of sale module would attempt to load all
pricelist items from the database, even if there were a high number
defined. This could cause memory issues.
Although the products loaded into the POS can be limited, all of the
pricelist items would still be loaded, even for not loaded products.
This commit improves the pricelist loading to only load pricelist
items related to the products loaded into the POS. When new products
are loaded, their associated pricelist items are added.
This optimization prevents unnecessary pricelist item loading and
reduces memory usage in cases with large pricelists.
opw-3374866
closesodoo/odoo#143265
X-original-commit: f39e8a125c64e4a225122d975500d78e5925f4bd
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
With [commit 1], the editor toolbar was ported to OWL. One side effect
of this port is that the condition for displaying the font size dropdown
was no longer based on screen size but on the OS / Browser used. This
lead to iPads not having the font size dropdown.
This did not create a direct error on 16.4 but in 17.0, the dropdown was
changed by [commit 2] and the assumption was that it would always be
displayed.
This leads to a traceback when starting website edition on an iPad.
This commit restores the original condition for displaying the font size
dropdown which is based on screen size and not on browser.
Steps to reproduce the bug (17.0):
- Open Website on an iPad
- Start edition
=> Traceback
[commit 1]: https://github.com/odoo/odoo/commit/d7245d2abf528d093226c80e40975e63d61e8997
[commit 2]: https://github.com/odoo/odoo/commit/194f73a9bbad8c3c3fb5c378e7bdfa704aaacdc0
opw-3594634
opw-3590980
opw-3594313
opw-3594615
closesodoo/odoo#144041
X-original-commit: 6be141eab1742ad300805c6deb4805673805c7c9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Test was breaking during the nightly builds. Most likely due to the
same issue as the one that odoo/odoo#131389 fixes, so we apply the
same fix.
closesodoo/odoo#144031
X-original-commit: 900373b2658240570f97998a7d86a6f4c3fb67fc
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
This commit changes the 'cursor-like' icon visible on hovering over a dashboard
in dashboard search panel to a 'pointing hand-like' icon.
Task ID : 3597552
closesodoo/odoo#144021
X-original-commit: a4fc5a4ca5c37d8b6dbe36d9441bfa9a7dc7eb7b
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
Signed-off-by: Khushi Patel (khpa) <khpa@odoo.com>
Issue:
In the Accounting dashboard, when displaying pending checks, there was
a missing space between the number and the word "Check"
(e.g., "1Check to print").
Steps to reproduce:
1. Go to "Accounting --> Vendors --> Payment", click NEW.
2. Choose Checks as the Payment Method, complete the form, and click
CONFIRM.
3. Observe the Accounting dashboard, specifically the Bank journal
section.
Solution:
- Ensured proper spacing between the number of checks and the
text "Check" in the dashboard display.
opw-3591902
closesodoo/odoo#144019
X-original-commit: 2dab1c57ae45a747db0cbbf6101bad824e64f11d
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Kawtar Drissi El Bouzaidi (kdeb) <kdeb@odoo.com>
Currently there is no margin between the top edge and the image below
in the DIN5008 layout.
Thus the image may be cut off when printing the page.
This commit adds a 10mm margin.
opw-3599133
closesodoo/odoo#144013
X-original-commit: 23e6f7c0f8b793d4aa30df8a65b29def516ecb87
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Sven Führ (svfu) <svfu@odoo.com>
The items in the Peppol Bis 3 xml should all have a `Name` tag,
otherwise a validator will raise: "[BR-25]-Each Invoice line (BG-25)
shall contain the Item name (BT-153)." This `Name` is the product's name
or the label in case of invoice line with no product set.
task-3607354
closesodoo/odoo#144012
X-original-commit: cafa302e61a9a4be909629a9a596fd8bbe7e6017
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
An error will be generated when a user tries to import or upload a file into the
invoice module and the file is attached to an image via a URL form but the
image is invalid or cannot be found.
step to reproduce-
- install the `Accounting`.
- open Accounting > Vendors Menu > Products.
- import file (image url must be invalid or not found )
- the error will be generated.
At the time of solving the conflicts of FW mistakenly changed the
"ImportValidationError" to "ValueError". Due to these changes,
the error is shown in the log.
FW - https://github.com/odoo/odoo/pull/137596
sentry-4538772256
closesodoo/odoo#144011
X-original-commit: 581c0c69f368f08bcf9803942027b172b8bc2694
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
This traceback arises when the current day of the date is 31 while the
schedule action (Generate Monthly Sales Closing) runs.
Scenarios to produce the issue:
[1]
* Imagine the 'date_stop' value is '31-10-2023'
* When the scheduled action('Generate Monthly Sales Closing') runs
* The value of the 'month_target will be 9' and 'year_target' remains same
* The value of 'interval_from' will be '31-09-2023' (an invalid date).
[2]
* Imagine the 'date_stop' value is '31-03-2023'
* The value of 'interval_from' will be '31-02-2023' (an invalid date)
It leads to the traceback
Error: 'ValueError: day is out of range for month'
See:-
https://github.com/odoo/odoo/blob/5fb9825384895fd303bd15c3e4f8dbc55d35904f/addons/l10n_fr_pos_cert/models/account_closing.py#L124-L134
After applying this commit, it will resolve the issue by giving a valid date
in all scenarios.
sentry-4589899768
closesodoo/odoo#143982
X-original-commit: 836d2dae11b663c54bc47f7bc020bced3f243bf8
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Altaf Shaik (alsh) <alsh@odoo.com>
Before this commit, a studio qunit test ("edit/delete menus")
sometimes failed on runbot, because it tried to click on a button
in a modal footer, but it found 3 of them, because another dialog
which was expected to be closed at that moment, was still opened.
There was no guarantee for the dialog to be closed because of the
way browser.fetch was mocked. The fetching part was ok, but the
function returned a Response object, whose `json` method is async
(setTimeout-like async, i.e. "real" ticks).
This commit mocks some functions of the returned Response instance
to ensure that, by calling nextTick after a click or whatever, the
fetch operation has been done, the body has been decoded, potential
renderings are finished and the DOM has been patched.
Runbot error 23054
closesodoo/odoo#143980
X-original-commit: 66ef3ae730a233dc510425e0a5baca2973de493e
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
It happened previously that the grid item could be broken if `top` and
`left` style properties were not set on it, which resulted in `NaN`
values being used in the grid-area computation.
This commit makes the drop more robust by obtaining their values through
the computed style instead of the style. This way these properties are
always defined.
task-3554752
closesodoo/odoo#143903
X-original-commit: 7a8fd5792f9eedfebf812b15730259de2b511a58
Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
With this commit 963842381e
ClipboardJS was removed to use the native clipboard api.
But here the innerText was checked instead of the value
so there was nothing to copy in the clipboard.
This commit fix this.
Task-3607299
closesodoo/odoo#143206
Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
Move '_create_mailing_list' as a base mass mailing tool to make it easily
usable by most mail-related test addons.
Improve some logs to ease debugging, notably for marketing automation.
Add a tool to simulate opening a mailing at trace level in addition to existing
tools to simulate a click or a bounce
Task-3506681 (MA: Test cleanup)
Task-2981581 (MA: Fix trace duplication and various issues)
closesodoo/odoo#143088
Forward-port-of: odoo/odoo#143040
Forward-port-of: odoo/odoo#141773
Related: odoo/enterprise#51232
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Add a tool to simulate opening a mailing at trace level in addition to existing
tools to simulate a click or a bounce
Task-3506681 (MA: Test cleanup)
Prepares Task-2981581 (MA: Fix trace duplication and various issues)
X-original-commit: 1d4829e0597e4498663542381882ff810c5e42b5
Part-of: odoo/odoo#143088
Move '_create_mailing_list' as a base mass mailing tool to make it easily
usable by most mail-related test addons.
Improve '_filter_mail' tool by allowing to give an additional 'email_from'
used to filter emails produced under a mock. When having similar records
mailed several times (e.g. several mailings triggered at the same time which
may happen for marketing automation tests) it eases finding the right email
linked to a given mailing / recipient.
Improve some logs to ease debugging, notably for marketing automation.
Task-3506681 (MA: Test cleanup)
Prepares Task-2981581 (MA: Fix trace duplication and various issues)
X-original-commit: aad84dda189e13d76a87e349a7d56d84e584879c
Part-of: odoo/odoo#143088
The test added in 09a4762b will fail randomly, because of the nondeterministic
os.walk access. This commit removes this nondeterminism in the pot.
closesodoo/odoo#143918
Signed-off-by: Raphael Collet <rco@odoo.com>
Steps to reproduce:
- Enable the "Cookies bar" in website configuration > Go to website
(Edit mode).
- Select the cookies bar > Change its layout to "Popup" > The modal
container becomes visible in edit mode only.
The `#website_cookies_bar` element will automatically get one line
height (equivalent to its current `line-height` value) because of the
`contenteditable="true"` added to it, which makes it visible in edit
mode (The container has this default height in all layouts, but it's
hidden by the cookies bar content in "Discrete" and "Classic" modes).
The goal of this commit is to simply hide this element to prevent this
behaviour.
Remark: The same issue occurred on a `.s_popup` parent with an inner
`.modal` element and was fixed in [1] by keeping their visibility
synchronized.
[1]: https://github.com/odoo/odoo/commit/cfd53b8fae3ad9f677df49a03fe6d2945dbb5da2
linked to opw-3485565
closesodoo/odoo#143913
X-original-commit: 4374adfde3627852d0a932f3d10fa74fe0b76a83
Signed-off-by: Robin Lejeune (role) <role@odoo.com>
This changes intend to update current tax group records to fix naming
issues and add missing translations.
closesodoo/odoo#143907
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Upon drop, the fix in [1] did consider invisible the blocks that were
visible within the current preview mode (mobile/desktop).
Because of this `onTargetHide` was be called instead of `onTargetShow`.
This commit changes that behavior so that the correct method remains
called according to the actual visibility, but the `DeviceVisibility`'s
`onTargetShow` is adapted to only add the override if it matches the
current preview mode.
No steps to reproduce for this first change, but third-party options
could have been impacted by it.
This commit also adds that condition on the cleanup that was added in
[2] to keep the `dataset.invisible` state consistent upon toggling the
preview mode.
Steps to reproduce this second issue:
- Drop a Columns snippet.
- Make a column visible only on mobile.
- Make another column visible only on desktop.
- Toggle preview mode several times.
=> `dataset.invisible` was set to `1` on all columns having
device-dependent visibility.
[1]: https://github.com/odoo/odoo/commit/acfca25e48ac9bc227234de860fe8128f0312ed4
[2]: https://github.com/odoo/odoo/commit/174e9fe0d8665d1a81c90a6f7bf5cc9e3361f161
task-3538535
closesodoo/odoo#143640closesodoo/odoo#143875
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>