When a peer "A" connect to the peer to peer network, if he receive a
stale document from a peer "B", peer "A" will never be able to save.
This situation can make impossible for any new peer to receive a
converging document and block the ability to save until every peer
disconnect from the network.
task-3196778
closesodoo/odoo#114268
X-original-commit: 537f34f764fae3967496d466c420d72d172b241d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
before this commit, on confirming a sale order with a product having Re-Invoice Expenses is set to at cost or sale price and if analytic accounting or full accounting feature is not enabled for user, on confirming sale order access error is shown.
1. create a product with Re-Invoice Expenses as at cost or sale price
2. remove user from analytic accounting group and full accounting feature group (in my case new db with sales and inventory installed only)
3. create a sale order with this product and try confirming it
4. access right error is shown
after this commit, on confirming sale order, access error is not raised.
closesodoo/odoo#114255
X-original-commit: 42206bbd0cc5a86047f3a1b941896c0ceb463efb
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
- Compute the fixed amounts first before managing the percentage.
Suppose a fixed line of 100 plus a percentage line of 100%.
For 1000, the previous behavior was 100 + 1000 = 1100 != 1000
- Manage fixed amounts in multi-currency.
With multi-currency, apply the rate to compute the company amount.
- Ensure the full amount is dispatched exactly with percentages.
Suppose 2 percent lines of 50%. To dispatch 0.03, the previous behavior was computing 0.02 + 0.02 = 0.04 != 0.03 leading to a not balanced journal entry.
- Don't discard the last new line when clicking outside the sheet.
Click on "add new line", then click on the empty space near the form view.
=> The last added line is removed.
closesodoo/odoo#114025
Signed-off-by: Laurent Smet <las@odoo.com>
How to reproduce
=================
Give a badge to an employee, when checking the sent mail, The image and
description of the badge is nowhere to be seens.
Those fields don't display because the description contains P html tags.
The presence of the removed `t-if` is the main cause of the issue.
Adding a `not` to the condition solves the issue. This not was lost
during the Jinja -> Qweb translation (commit 68182ba)
opw-3099419
closesodoo/odoo#114259
X-original-commit: c90add64f91667d5c9f2294029aa674b19981278
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
account_sequence module is adding an extra value to the move name in
order to make it unique. For example if we have more than one vendor
bills with name FA-A 0001-00000088 the result will be:
* record 1: FA-A 0001-00000088
* record 2: FA-A 0001-00000088 (1)
* record 3: FA-A 0001-00000088 (2)
When using document type the vendor bill name should not need to be
unique and it can be repeated, because it depends completely in the
partner, in that case we should not add the "(N)" and leave the name as
it is, because changing the name will result in problems like reporting
VAT BOOK.
latam task 976 / OPW 3204261
closesodoo/odoo#114270
X-original-commit: 6b8f69a8ee51275957346ecf8b72068022096448
Signed-off-by: Josse Colpaert <jco@odoo.com>
To reproduce
============
- on accounting -> Vendor -> Bills
- upload the PDF attached on the ticket
an exception is raised
Problem
=======
PyPDF2 finds that this pdf is encrypted,so we try to decrypt it with empty password,
but the decryption fails which rise an error.
Solution
========
according to this [commit](https://github.com/odoo/odoo/commit/851fe64f7789bb398383c22e3ebbaebb051791f6), when the decryption fails
we skip reading the attachments and carry on to allow the user to upload the document.
opw-3196780
closesodoo/odoo#114269
X-original-commit: 124250d123666ea818d2c8004cadae2ccc43aa0e
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
Prior to this commit, animations on SVG shapes could use a lot of CPU
and make the page stutter on some website + machine combo.
This does not seem to be an "Odoo Only" issue as browsers seem to
struggle to optimise SVG movements and end up consuming a decent amount
of CPU depending on the machine, the size of the SVG and its position
(behind or on top of other elements).
This commit applies a new class which will warn the browser that the
element is animated. Depending on the browser, some optimisations are
done.
On Chrome and Safari, a new layer is created which simplifies the
rendering of the page and sometimes takes advantage of hardware
acceleration.
On Firefox, no optimisation is done yet. This might change in an update
which would take advantage of the CSS Property.
The documentation says to only use `will-change` when an element is
about to change. This is the case however, as most of the shape's
animations are looping. Which is why it's applied to every shape that is
animated.
This optimisation only applies to background shapes with this commit.
Performance improvements observed by (at)rdeodoo on his machine:
- SVG: 200% CPU
- SVG + fix (will-change): 55% CPU
(additional infos available in the PR)
To note: one way to easily see the improvement is on the "Layers" tab of
the Chrome devtools. Before this commit, the entire #wrapwrap is
repainted every time the shape changes (so 60 times per second since
that is the framerate the browser aims for). With this commit, the
#wrapwrap and the shape are contained in their own layers so the
#wrapwrap is only painted once.
Other solutions were considered but not used at this time:
- Reducing the frame rate of the animations. This is not currently
possible because browsers do not offer any way of doing that.
- Removing bits of the shape can reduce its CPU consumption, but
whenever a transform animation is present, the CPU usage remains high.
task-3142001
closesodoo/odoo#114252
X-original-commit: 03418be1c67e71a22f6d2ce79675280f889b663c
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
This commit adds the possibility to navigate between the different views
of the view switcher from the palette command.
closesodoo/odoo#113658
Taskid: 3205658
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, the accounting module had a setting on the selection of taxes used by the sales, purchase, website_sale, ... modules. In addition, the website_sale module had the same setting related to the accounting one.
This PR isolates the tax selection parameter in the website_sale module, and instead of using the tax selection, the accounting module will use rounding method (round per line, round globally).
Selecting one of the two will change the display of all account_move or other view using the tax selection setting.
Display changes:
In round per line, a column tax excluded will always be displayed while a column tax included will be in optional hide.
On the other hand, in the round globally, only the tax excluded columns will be available.
closesodoo/odoo#99209
Task-id: 2954332
Related: odoo/upgrade#3826
Related: odoo/enterprise#30853
Signed-off-by: William André (wan) <wan@odoo.com>
To reproduce the issue:
1. Go to 'res.country.state.csv' in base
2. state_ch_sh is "Shaffhausen"
Error: should be "Schaffhausen"
State code is still SH because
ISO 3166 code for this state is CH-SH
OPW-3199628
closesodoo/odoo#114202
X-original-commit: 245804aabb5cd8b3a84b2a4836b188ec9fb144e1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Before this commit, on iPhone 8 (and lower) it was possible to scroll
the page to the right when there were animated elements in the page.
A "transform: none" property was applied to non-visible animated
elements to prevent the page from expanding to the right. However, this
property wasn't properly overriding keyframe transforms on iPhone 8 and
lower. This has been resolved by adding "overflow-x: hidden" on the
wrapwrap in case "transform: none" is not applied correctly.
Steps to reproduce the issue:
- On iPhone 8 (Safari).
- Drop a few snippets into a page.
- Add a "Fade In-Right" animation to a column of a snippet.
- Scrolls the page so that the animated element is invisible.
- Bug => a horizontal scrollbar appears and it is possible to scroll the
page to the right.
opw-3165651
closesodoo/odoo#114207
X-original-commit: 1354d337eba26f48699d9eb9bc02287383fc10e5
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
When multiple liquidity lines exist on an account.move (occuring before
14.0), the bank reconciliation widget crashes. Taking the sum of the
`amount` and `amount_currency` solves it.
opw-3202392
closesodoo/odoo#114204
X-original-commit: 564f91be019a1f5fe737a01218972dfd9d74d7c8
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
Before this commit:
For the safari browser, when typing any URL and pressing space, and
continuing typing, the cursor jumps before the URL.
After this commit:
Inserting an element into a range clears the selection in Safari.
Hence, use the cloned range to reselect it and now the cursor position remains
at the end of the URL.
Task-3089091
closesodoo/odoo#114192
X-original-commit: fa532d1391aed313a9ea13ac8a4ab9df31c313e3
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
We remove a useless import of GroupByMenu and refactor the processing
of data points in the model.
closesodoo/odoo#114172
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
- create a sale order;
- add products which are based on timesheets for invoicing policy;
- create an invoice an confirm it;
- make a full refund for this invoice with "ADD CREDIT NOTE" button;
- create an new invoice for the sale order.
Issue:
There is no longer a statistics button
that displays the hours worked on the invoice view.
Cause:
To reassign an account move to an account analytic line,
it is necessary either that there is no invoice
or that the invoice is in the cancel state.
The case where the invoice has been refunded is not taken into account.
Solution:
Correct the domain that determines the timesheets (account analytic line)
to be linked with the invoice being created.
opw-3187219
closesodoo/odoo#114167
X-original-commit: 5fa8b13b9c67ba54e5702a13638d047f50a4d797
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
When cancelling a confirmed order the message displayed on the chatter was en English, regardless of the language set for the customer or the user.
After this commit the correct language will be used.
opw-3175301
closesodoo/odoo#114162
Forward-port-of: odoo/odoo#113977
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Before this commit:
When copy-pasting from Discord into Notes, get a text with color and background
color. But when clicking on the trash icon inside the toolbar to remove the
background color, it doesn't remove the background color.
After this commit:
Allowed to remove background color from text using trash icon.
Task-2889682
closesodoo/odoo#114146
X-original-commit: 711ddaf97a5f16b3fe0d5d30dba52e4c9eab8d21
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The button to regenerate work entries was no longer disabled, thus it
lead to a traceback when clicking on it.
The warning message was confusing and misleading.
task-3203225
closesodoo/odoo#114145
X-original-commit: 5325ffd8663f14532b0f43aee25cebdb9a14aec6
Signed-off-by: Kevin Baptiste <kba@odoo.com>
A double line would appear if the resume / skills were empty.
task-3196398
closesodoo/odoo#114144
X-original-commit: 35ffc195e807db3fd5ea1576816c631d219863c0
Signed-off-by: Kevin Baptiste <kba@odoo.com>
OPW 3117373
Task: 57576
The printed invoice hides part of the document type letter in the header.
This commit solves that problem and also this issue: https://github.com/odoo/odoo/issues/108994closesodoo/odoo#113603
X-original-commit: 91581e9090d2382ff584c199efcf3b7206ddac66
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
This commit fixes the style of the "Add a note" element in the
activities menu list. Before this commit, the background was white
because the color was hardcoded in a scss file. This is not longer
the case with this fix.
Also, the input has a transparent background to match with the
background color.
task-3208042
closesodoo/odoo#114143
X-original-commit: 5829183b57478b3316cacda931c2245b17896a63
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
In odoo/odoo#112219 we removed the usage of useListener for
cross-component communication, one such use was to close the pos from
the closing popup. The closeSession method was moved from the closing
popup to the store but the corresponding error handling method wasnt. It
appears that the closeSession method doesn't need to be on the store at
all, only the closePos method. This commit moves the closeSession method
back to the closing popup, so that it has access to the
handleClosingError method again.
closesodoo/odoo#114127
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
This commit, is part of a series of commits that aim to simplifie the
concrete fields API.
In this commit we will remove setDirty prop from concrete fields. Now if
needed the fields can declare itself dirty using triggering
"FIELD_IS_DIRTY" on the model's bus.
Note that this PR partially revert [1] and completely revert [2]
task-id 3179751
[1] : 89c2a3978e
[2]: c79bb3c9c6closesodoo/odoo#114124
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
With DB having only one blog (most common case, but we are used to test
it with demo data where we have two), the query params are lost when
accessing the blog controller without passing a blog.
Eg, `/blog?search=hubble` will redirect to `/blog/travel-1`
This is because the business code is doing an early redirect if we
access the `/blog` URL without a blog post passed to it to redirect to
that blog post URL directly (since there is only one), but that redirect
is not passing the query parameters.
The main impacted params are `state`, `order` and `search` but it's the
same for all others.
Step to reproduce (in later version):
- Be sure to only have one blog
- Drag & drop the search snippet in the homepage or anywhere
- Make it search on blog only (through the snippet option)
Type anything, it will not work and won't do the search. It will just
redirect to the blog page.
closesodoo/odoo#114107
X-original-commit: 41c27fd4912fb9f50ce5f31fff7c17c77b8530f7
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
When uploading a file on a draft record, it crashed.
This happens because the file upload was applied on record
while still in "draft".
This fixes the issue by awaiting chatter is saved, to proceed
with the file uploading.
opw-3204555
closesodoo/odoo#114106
X-original-commit: 45bcd91026b93997e7ba2509c5c4176db269c3c6
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
LE is most commonly used today.
opw-3188129
closesodoo/odoo#114094
X-original-commit: e901ee541407b70fee8bad0d6adc80e0726079d2
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
before this commit, when a verification email is
send to the user when validating the website user
profile, there is no spacing/overlapping between
the email(in italic) and !
after this commit as the italic is removed from
the email, there will be proper
spacing(no overlapping)
closesodoo/odoo#114073
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Earlier, receiving data was size of the file which is not what we
want. And we are trying to decode that as they are in binary form. Which
can not working properly.
So refactor code accordingly.
Task - 3162824
closesodoo/odoo#113953
Related: odoo/enterprise#37650
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
The orderByToString function has been duplicated in spreadsheet. We will
replace it with the one defined in web.
closesodoo/odoo#113873
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
How to reproduce
=================
1. Install `l10n_din5008` and `purchase`
2. Create a RFQ and print a Purchase Order. 2 Titles are displayed
opw-3162177
closesodoo/odoo#113508
X-original-commit: 42e6420e7259f3fe10937c58a73b7c88ead672f6
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Dalcq Jordan (joda) <joda@odoo.com>
Previously when we tried to delete default_website it was deleted.
In this commit we have fixed this issue by preventing user to unlink
default_website.Also we remvoe _unlink_except_last_remaining_website
method.
sentry-3874625419
closesodoo/odoo#113405
X-original-commit: 637af9f747bda0d6b4607d02a0e51d44cf889a89
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Main attachment is quite costly and as it is implemented in mail.thread and is
therefore present in most model. In order to improve performance, we remove it
here from mail.thread and add it through a new mixin,only on model that
effectively use that features.
See sub commits for more details.
Task-2648976
closesodoo/odoo#110734
Related: odoo/enterprise#36164
Related: odoo/upgrade#4262
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Some code cleanup done when moving the main attachment into its own mixin:
- improved docstring
- early returns
- code simplification
No functional changes should occur with this commit.
Task-2648976
Part-of: odoo/odoo#110734
Add mail.thread.main.attachment in the inheritance chain of all models that
use the main attachment feature.
Note that we remove the main attachment from crm_case_15 of the demo data as
crm_lead doesn't use that feature.
Task-2648976
Part-of: odoo/odoo#110734
Main attachment is quite costly and as it is implemented in mail.thread, is
present in most model. In order to improve performance, we remove it here from
mail.thread and add it, through a new mixin, only on models that actually use
that feature.
Technical note: with the current implementation, even if the font-end view
expect the model to implement the main attachment feature and the model
doesn't, it doesn't crash. Indeed, the main attachment on the front-end is only
used to know the first image to display in the image 'carousel' on the right
(widget rendered through the presence of the class o_attachment_preview). And
as 'register_as_main_attachment' of ir.attachment doesn't crash even if the
model doesn't support main attachment feature, the only consequence is that the
first image to display is not persisted (if you refresh after changing the main
attachment, it will get back to the previous one).
Task-2648976
Part-of: odoo/odoo#110734
Steps to reproduce:
- Go to a product with a long name
- Inside the product page go to "print labels"
- Choose "Dymo" as label type and print.
(For barcode you need to add a barcode number to the product.)
Issue:
The product name is not displayed correctly on the label because
is too long.
Solution:
Removing the fixed height int he label seem to have good behavior with
sizing the text.
opw-3120807
closesodoo/odoo#114097
X-original-commit: 37b49c6ced839cd82b77819845a52ba2cf8c4ab8
Signed-off-by: Tiffany Chang <tic@odoo.com>
Commit [1] introduced a usage of `structuredClone` in 16.0 where
it is not supported. This was a mistake introduced by backporting
[2] from master to 16.0.
However, the `structuredClone` was not necessary in the first place
anyway, so this commit removes it.
[1]: c472e600da3237d3cb0a6352a4d26ebb3ed6e20c
[2]: a5036864b1closesodoo/odoo#114082
X-original-commit: 222ad55966d9161394b9412a5baf14043b36baea
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
*: point_of sale, web
Previously, the error handling code was refactored and centralized, in
doing so, we broke the ability to select a table while offline: when
selecting a table we ask the server about the orders for the table. When
offline, this creates an error that was previously caught, and showed an
offline error popup, but continued the rest of the flow normally. The
refactoring centralized the display of offline errors to an error
handler, but removed the catching, causing the error to interrupt the
flow.
This commit fixes that by catching the error again, and when it's a
ConnectionLostError, it dispatched the error in a separate async call
stack (using Promise.reject) so that the display of offline errors is
still centralized, the the flow can continue normally.
closesodoo/odoo#114077
X-original-commit: f45f5e644b4b219b968fa19737d75cc710c823f3
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Before this commit, when moving inner content inside a carousel slide
(with the 'move' button), the carousel was jumping to the first slide.
Steps to reproduce the bug:
- In website edit mode, drag and drop a Carousel snippet onto the page.
- Move to the second slide.
- Click on the column to activate its overlay.
- Click and hold the "drag and drop" button of the column to start
dragging it.
- Release the mouse button.
- Bug: the carousel jumps to the first slide.
task-3006831
closesodoo/odoo#114067
X-original-commit: a09031d5f68de5d23bd9cab1910c6f9c50ad7cfd
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
The test returns an error if today is within 365 days before the next 29th February: datetime.date(2024, 3, 1) != datetime.date(2024, 2, 29)
closesodoo/odoo#114053
X-original-commit: 880c0a76ac6333cbc9a8e89c865eb6caf309e0e3
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Diez Stéphane (snd) <snd@odoo.com>
In this commit, the horizontal sizing options are disabled from the
snippets overlay on mobile view as they were ineffective and
unnecessary.
task-2978500
closesodoo/odoo#113945
X-original-commit: b7359e47ce3888433a31592a365017c1183242a7
Signed-off-by: loco-odoo <loco@odoo.com>
To reproduce
============
- with Invoicing installed, give a user the group Billing Administrator without giving any Administration group
- connect to this user and try to add a bank account
an access right is raised
Problem
=======
the `groups_id` on the action `action_new_bank_setting` is not specified
so when runing the action we check if it has `groups_id`, if not, we check
if the user has the right to write on the target model which is `res.company`
here, which is not for this user because he doesn't have any Administration group.
Solution
========
specify `groups_id` to `account.group_account_manager`
opw-3199435
closesodoo/odoo#114108
X-original-commit: 68090907d1a4f26d66ece6827e0dd502e1d26844
Signed-off-by: William André (wan) <wan@odoo.com>
This reviews [1] (in particular changing my mind about [2] upon further
review). Indeed this was marking potential non editable tab panes as
editable by searching the whole DOM instead of editable savable zones.
In the end, what is searched for is also reviewed. Instead of searching
for a very specific structure, we now mark all oe_structure which are
direct children of tab-pane as editable (if in an editable zone) and
their parent (the tab-pane who have a direct oe_structure child) as
readonly.
[1]: https://github.com/odoo/odoo/commit/5fd99855654d220bafb8887cd0ae267042836d4b
[2]: https://github.com/odoo/odoo/pull/109430#discussion_r1115792052closesodoo/odoo#114069
X-original-commit: d5d646281f1de672cff0e03903b88059ac17be18
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>