Since 5cf9d55bbc, attachments are always records.
Before, they could also be named tuples, so helpers were needed.
Since they are now useless, we can remove them to clean up things.
closesodoo/odoo#38414
X-original-commit: 63a937a954c310af88cec214d683f61c64263407
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
In fact, "not filename.endswith('.pdf')" does not
"Check if the attachment is a pdf".
Some pdf files have filenames with a pdf extension, but .PDF, .Pdf
work generally just as well, and it's also possible to live without a file
extension.
In any case, it doesn't prevent from crashes because of corrupted files,
or files that are not pdf files but have the extension.
opw 2075933
X-original-commit: 3f63447d8f25f6ff8a4d9951a74db069d41332f3
If a field does not exist, writing it creates a warning in the logs.
This would for example prevent a valid test to pass.
This is needed because extract_state is a field from account_invoice_extract,
which is not a dependency of account_facturx.
X-original-commit: bb03b05df39097a954388ba6b00c025989351f16
Since https://github.com/odoo/odoo/pull/34297, sudo() allows to keep
current user information when creating/modifying records.
There is no need anymore to use with_user(SUPERUSER_ID) to have sudo rights.
This commit ensures the user information is kept when creating pos sessions,
instead of having OdooBot as create_user.
closesodoo/odoo#38441
X-original-commit: aff1dc1ea68c345fb2632f9666dc298f685b8748
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
if partner_ids and template_id are set, a traceback happens.
Indeed, some mail fields are not taken from the res_ids when partner_ids
is set.
When trying to update the values with the one from the template, the
existing values are popped, which raised an error as those keys weren't
set.
closesodoo/odoo#38434
X-original-commit: c8ad614718674b55e9af5edd062ded958136e7ac
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
This issue is relevant for MX Localization because Cash Basis is created
with the rate of the payment, and not with the rate of the invoice as is
done for odoo core.
closesodoo/odoo#38399
X-original-commit: 10bb81c837c0d88ac4ec396442bd86a654c78646
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
When there are many events at the same moment in a calendar,
events are thin and on mouse hover the event take all the width.
Before this commit, when we drag or we resize a event in calendar,
the event returns to the state thin.
After this commit, the width event stay width during resizing and
draging.
closesodoo/odoo#38384
X-original-commit: 405294602070590083a2b438f631615f72000292
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to reproduce:
- Export a partner with country set to False, using EXCELL
- Try to import it with the xls file
Bug:
It raised: "No matching record found for name 'False' in field 'Country' at row 2"
opw:2080376
closesodoo/odoo#38379
X-original-commit: 01caf1e44f653a8e9bf5edd583bc2421905d9464
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This fix is similar to 8020033; both are workarounds for the bug (limitation)
introduced by 9d87d15db6.
In this case, the currency_field is a related field, and these fields are only
computed after scalar values are written in database.
As a result, this value is not rounded at creation.
It is a problem since typically accounting reports are written directly in SQL,
and thus reuse the values directly.
Anyway even in the ORM the convert_to_cache optimised this away using the
assumption that 'the value should have been rounded in convert_to_column'.
It follows that in the report, errors can be accumulated
to the point where the report is not balanced.
This needs to be fixed in database by going through every existing line.
Of note: the limitation that was readily acknowledged has not been worked around
anywhere, in fact almost every single currency_field is a related one.
Also of note, commit afef71d6b should "Always round monetary values in database"
while it explicitly checked for the presence of the currency_field in the values
and while not introducing a mechanism to make sure it would always be in the
values.
opw 2066849
closesodoo/odoo#38376
X-original-commit: 937893379ba8c149c681b61a951ca507df798e6b
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Allow the edition of Lead Time only when the SO is not confirmed yet
since the modification of the scheduled date on an existing picking is
not expected.
opw-2083070
closesodoo/odoo#38375
X-original-commit: ee8476c8d57c06c724a9777494a86a88c623bd2c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This controller never really worked in the last 3 versions.
It was fixed in 11.3 with e9350993ca but broken with refactoring in 12.0 at a
higher level with 19eacf7d23.
It was even worse in 13.0 as it was leading to a traceback: `view_type` field
got removed with 3cd7ed07a2 but this controller was still reading that
field.
closesodoo/odoo#38355
X-original-commit: a5c4e262449fef03d05d5250e4523832db5fbf00
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
The product count was not returned in the product page thus the search
count feature that you can enable in the customize was broken.
Now we reset the search in the product page.
Part of https://github.com/odoo/odoo/pull/37135
task-2070507
X-original-commit: db5447f8cae4c7976fca8d751e2494cba73d2d5f
Avoid trailing space:
In translation content, these tends to be skipped during translation,
making the message inconsistent. There is already a translation for
the term without the space so can reuse it.
Merge "setup"
Use the same writing to avoid having two similar messages
Remove unnecessary comma
Merge PayPal and Paypal
Courtesy of Primesh on Transifex
closesodoo/odoo#38348
X-original-commit: c1fb136cc684eba0cdeec302f27268ccda7fa5d2
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
On l10n_latam_invoice_document, if a sales/purchase journal use documents, then the journal sequences are not used, with this improvement the user don't see fields that are no needed (Credit Notes Next Number) and also it avoids the creation of the refunds sequences that is not going to be used
closesodoo/odoo#38335
X-original-commit: 1b647b8ead1fc70c18223914c96619c7f9a21b6e
Signed-off-by: Josse Colpaert <jco@openerp.com>
* Ensure compute always sets partner_id.
* Don't show "to" when partner_id is not set
closesodoo/odoo#38334
X-original-commit: 7e122140b13fce5cf466376fe9fcb631e4b6bd75
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Group the upgrade of upstream dependencies with the installation of a
new theme into a single install/upgrade operation. This fixes cache
misses occurring when accessing the state of a module after having
upgraded other modules.
closesodoo/odoo#38331
X-original-commit: 03b796b9e92e6eeeee877beaea133bdb6de0c6a3
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
We update the version of the build for IoT Box
closesodoo/odoo#38328
X-original-commit: be464a3759a4fe395334a1b26b90f7395e031d1a
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
When a box was unable to reach the Odoo server the customer display
show a white screen.
With this fix we show the default POS Client display with IP address
closesodoo/odoo#38315
X-original-commit: 290c2be72cd8305fbf8093d782604e8b0f4a80c4
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
For simplicity marker popup fields are declared as a direct child of the root
element.
consistency in the name of marker popup fields
added new 'hide_name' and 'hide_address' option in the calendar view
task-2009017
closesodoo/odoo#37433
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
- fix condition to correctly display company logo placeholder
- use avatar_grey on the "Contacts & Addresses" as white on white is not visible
- use `cover` to avoid excessive zoom on mobile
closes#38001closesodoo/odoo#38319
X-original-commit: 1210cb70bec421936c9d332b1347797bc83845cf
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
The parent was expected to return a dict, but it can also return None in some
cases. When that happens, the overrides were crashing because it is impossible
to assign a key/val to None.
Note that using `if` conditions like this also prevents from writing on the dict
if it is existing but empty, but due to the definition of the parent, if there
is a dict, it will not be empty.
closesodoo/odoo#38316
X-original-commit: 3525fad3b1729286d139b19a4a92f1821d94ad88
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
When a background video was used in a mega menu, it was only working in
edit mode. Indeed, the background video size is computed on page load
(and on window resize) but as the video is inside a hidden dropdown
menu in this case, the size cannot be properly computed.
This commit fixes the issue by recomputing the video size on dropdown
menu opening.
task-2080590
closesodoo/odoo#38314
X-original-commit: 66ec1c19b63fe26e559ed2d8d7359df974ade789
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Prior to this commit, un-checking 'Deduct down payments' on the invoice wizard had no effect: down payments were still deducted from the final (regular) invoice.
task-2081012
closesodoo/odoo#38326
X-original-commit: 4ef49cafec13e614c788354bc35fd232abab296b
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
* web_editor
The purpose is to force our dropdown style in our UI so that themes do
not break it anymore (same way all the other elements are forced (cards,
headings, etc)).
task-2059538
closesodoo/odoo#38321
X-original-commit: 4ef0eac5ba134f462f72f3e9c60e5c9fc95f3a8c
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
Create a Project with tasks, archive it, delete it.
The project is deleted, but this should not happen:
tasks are present, but they are hidden because when the project is
archived all its tasks are archived too (active flag is set to false).
On project unlinking only active tasks are checked, thus allowing the
deletion. Using a context flag to avoid filtering the non active tasks.
opw-2080515
closesodoo/odoo#38320
X-original-commit: 71a79f26e6319c6987397950c7f9df6c61dfb0d9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Install both Sale Management and Invoicing. Create an invoice without
any line, save it and cancel the entry. Print the canceled invoice,
traceback.
The python's `max` function requires an non-empty iterable to retrieve
the maximum element. For line less invoices, the value must be None.
closes#38175closesodoo/odoo#38336
X-original-commit: d0402f9c42001f7e33256e30f58ac27e8738ac57
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The replenish action shouldn't be accessible through the action dropdown
(it makes no sense to replenish consumables or services).
It is already accessible on the product/template form when applicable.
Closes https://github.com/odoo/odoo/issues/38238closesodoo/odoo#38332
X-original-commit: 52d7008da888f1a84e38c6b110450062ac3bceaa
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
On a customer invoice, click on 'Print ISR' => Error
This is because of computed fields not set.
opw-2081567
closesodoo/odoo#38325
X-original-commit: ed6dd79703bd1e02a8c3d9f13d12e2baa157ec36
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Commit 5a9e1af64a has the unfortunate side-effect of crashing early
if for any reason the content cannot be decoded.
However, simply ignoring that the content cannot be decoded is no better idea:
some functions pipe the result to decoding functions that crash the same.
The resulting traceback pollutes the log with uninformative message such as:
binascii.Error: Incorrect padding 5 0.002 0.016
In case the content cannot be decoded (data corruption, or simply missing file)
we return a clean 404 instead, which is morally almost equivalent,
and is clean even from functions that depend on binary_content.
opw 2072586
closesodoo/odoo#38318
X-original-commit: a68f7e6e72dbfd44e14c2f293fa6dc6aa402308a
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Allows the quick create on m2o in list views
Before this commit, when entering a new value in a many2one in a list and
exiting the cell through a click, the quick-create modal appeared for the
duration of the mousedown.
Now, the modal remains and allow to edit the new many2one value
Task 2076380
closesodoo/odoo#38289
X-original-commit: c00f84eb0a176b8d23927080078eb02dc2e5d806
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
`l10n_it_edi` inherits `fetchmail.server` model and extends its form view,
however it does not have `fetchmail` in its transitive dependencies.
closesodoo/odoo#35744
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The wrong order was used in the row_number call, which lead to ids
changing when writing on `is_favorite`
closesodoo/odoo#38278
X-original-commit: 28ebe6d4849a692d234b4c256332525aa71132e5
Signed-off-by: Romain Libert (rli) <rli@odoo.com>
When on Firefox, with sale_product_matrix and sale_quotation_builder installed,
clicking anywhere on the matrix (after opening it) raises a traceback.
It is due to the fact that isBody tries to access anchorNode.nodeName, which
is unexpectedly unaccessible as anchorNode is {Reserved}.
Due to the absence of clear documentation of the possible reasons of this problem,
it was decided to reuse the existing fallback on 'return null', which avoids the
traceback.
closesodoo/odoo#38277
X-original-commit: 70c484e72bffc9ab759df3c376ad9157acec3965
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Have a lead with a partner on it, convert it to opportunity
in the conversion wizard, tick "don't link to customer"
Before this commit, the opportunity has been linked to the
lead's partner
After this commit, the opportunity is not linked to any partner
OPW 2077692
closesodoo/odoo#38262
X-original-commit: f1d270e441320e16bf38261f64a473a5296d6719
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
We don't want the browser to fill inputs in the backend.
Most of the time this is useless but sometimes it is
even problematic. For example, focusing an input in a
modal can trigger autofill not only in the modal but
also in the whole page. If there is an input outside
the modal and it is recognized by the browser as a
candidate to fill, bad things occur.
For that reason, we set the attribute autocomplete to
"none" by default for input elements.
Note that "off" does not work all the time because
the browsers sometimes decide to ignore it.
Task ID: 2076730
closesodoo/odoo#38039
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
https://packages.debian.org/buster/python-pil
As of today, python-pillow is at 5.4 in the latest debian release
This allows to deprecate the older versions progessively
Newer versions have new features like the exif_transpose method in 6.0
as discussed at #37448closesodoo/odoo#38245
X-original-commit: 4ad7a99df0a25122cf6872f880e07b6148c82ea8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
.. and first menu is a container with # as url.
There is a particular case where the / url would loop endlessly.
1. Unpublished the homepage /
2. Edit the menu so the first menu is a container. There is a hint telling you
a container menu should have its URL set to `#` as a good practice.
3. This will lead to endless loop for public user as the code will check if the
homepage can be accessed. Since it is unpublished, it will then fallback on
the first menu which is not '/' and redirect to it.
Sadly, the code was not expecting `#` to be handled as `/`.
opw-2081969
closesodoo/odoo#38234
X-original-commit: cff11bdb66f1dda41cf333a28b67df7ef20a3de9
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Before this commit and since beaa30a3d1 it was not possible to download a
digital product.
The `search_read()` would return move line which does not have any `product_id`
which will later crash when accessing `product_id` in the for loop.
Search_read result would be:
[{'id': 20, 'product_id': (38, 'eBook: Office Renovation for Dummies')},
{'id': 21, 'product_id': False},
{'id': 22, 'product_id': False},
{'id': 23, 'product_id': False}]
task-2063307
closesodoo/odoo#38225
X-original-commit: b045be2814cee96c9723f0c9d07462e07cab4773
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>