- Apr 19, 2023
-
-
Adrien Widart (awt) authored
[1] could be improved as we could even remove the `create` override introduced by [2]. That way, we avoid: - a useless `create` layer - a possible write on an AML just after its creation The method `_get_computed_account` is called during the AML creation process: https://github.com/odoo/odoo/blob/8c8d657c85f76bd74d663843382af3dde8d885b8/addons/account/models/account_move.py#L2058 https://github.com/odoo/odoo/blob/8c8d657c85f76bd74d663843382af3dde8d885b8/addons/account/models/account_move.py#L1933 Note: the test checks the use cases of both commits [1] 66ea264f [2] f36c5c8a OPW-3251714 closes odoo/odoo#117920 Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
-
Adrien Widart (awt) authored
[1] is not enough. First, when installing `stock_account`, the post-install hook will only add `False` values to the first company. We should do it for all existing ones Second, the field `property_valuation` is company-dependent: https://github.com/odoo/odoo/blob/640907ec1852c4e477957c865549a87d3ae840dd/addons/stock_account/models/product.py#L708-L714 And when creating a new company, its value will be (by default) `manual_periodic`. Therefore, the other properties should also be set to `False`. Note about test modification: for the tests in `stock_landed_costs` module, we set the categ to auto so the stock accounts are defined. Otherwise, when validating the landed costs, it will lead to an error https://github.com/odoo/odoo/blob/608ed487b61c81e38a5d0b856732a8b94c6df64a/addons/stock_landed_costs/models/stock_landed_cost.py#L416-L417 [1] 9dc7835c OPW-2746384 Part-of: odoo/odoo#117920
-
- Apr 18, 2023
-
-
Alexandre Kühn authored
Before this commit, when opening Discuss from chat window and then accessing the settings page of a channel, the breadcrumb showed "Unamed" as the name of the App instead of "Discuss". This happens because the client action was not named when expanding the chat window by opening Discuss app. closes odoo/odoo#118941 Signed-off-by:
Sébastien Theys (seb) <seb@odoo.com>
-
Nasreddin Boulif (bon) authored
Steps to reproduce: - Install `mass_mailing` module - Create a new mailing - Set a subject and a mailing list - Select for the mail body the template "Thank you for joining us!' - Add a dynamic placeholder (e.g. ${object.email}) - Click on "Send" - Open the email received and click on "View Online" Issue: The dynamic placeholder is not replaced. Cause: The controller does not re-render the body based on the res_id. Solution: Use `mailing` variable (that inherit from `mail.render.mixin`) to re-render the body based on the res_id if available (same as when sending the mail). https://github.com/odoo/odoo/blob/d3a6a20788c78ddaaff0919ea627e7b10c7ab81c/addons/mail/wizard/mail_compose_message.py#L476 opw-3133975 closes odoo/odoo#112054 Signed-off-by:
Nasreddin Boulif (bon) <bon@odoo.com>
-
Julien (jula) authored
Backport: https://github.com/odoo/odoo/pull/117343 __Current behavior before PR:__ The size of an image field is guessed using the field name. For instance, an image field with `field_name = "XXXX_123"` is resized to 123 pixels when fetched. This is can be an issue if a user creates an image field using studio in a form view. If the user sets the label of the field as "Image 1", the technical name will become `x_studio_image_1`. Therefore, the image field will be resized to 1 pixel width. Note that in version anterior to 16, only the placeholder is resized since `image_guess_size_from_field_name` is never called when there is an actual image. __Description of the fix:__ Refactor the `image_guess_size_from_field_name` method to return `(0, 0)` when the field name starts with `x_`. closes odoo/odoo#118932 Signed-off-by:
Sébastien Theys (seb) <seb@odoo.com>
-
Ivan Yelizariev authored
Method `_invalidate_documents` is used to invalidate cache on moving message to a new record. However, it must be skipped if the message wasn't attached to any record before. Before this commit it gives `KeyError` on reading `self.pool[False]`. STEPS: * install `hr_referral` module * open `Settings >> Technical >> Messages` * open a record with empty values in Related Document Model/ID * set any values in those fields opw-3056859 closes odoo/odoo#106521 Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
-
- Apr 17, 2023
-
-
Guillaume (gdi) authored
This commit creates a new util which clicks on edit and waits for the edit mode to be started. This way, we make sure that the edit mode is enabled before testing the next step of the test. This avoids race conditions during tests. Note that we leave the old clickOnEdit util as it could be used in custom codes and we don't want to break them. task-3203820 closes odoo/odoo#116490 Signed-off-by:
Romain Derie (rde) <rde@odoo.com>
-
Benoit Socias authored
When clicking on the pseudo-block that appears in an empty page, the snippet icons bounce. However, if a snippet is selected it is not deselected and the icons are not visible. This is a problem after the previous commit because if an item is selected within an "On Hover" mega menu when this pseudo block is clicked, the mega menu is closed, but the snippet remains selected. This commit removes the snippet selection before bouncing the icons to avoid this problem. Steps to reproduce: - Add a mega menu. - Set "Sub Menus: On Hover". - Select an element inside the mega menu. - Click on the "DRAG BUILDING BLOCKS HERE" pseudo-block. => The mega menu was closed, but its inner element remained selected. task-2825376 closes odoo/odoo#110258 Signed-off-by:
Vray Benjamin (bvr) <bvr@odoo.com>
-
Benoit Socias authored
When a mega menu "Sub Menus" are configured as "On Hover", it becomes very difficult to edit its content. This commit changes the behavior of the "On Hover" while the page is being edited: - it disables the hide on exit (`mouseleave`) - it prevents the show on hover if another dropdown is already opened - it hides the menu when the page is clicked outside of the opened menu This commit also disables the preview of the "Show Sign In" option which is not previewed anyway, so that it does not deselect the mega menu when hovering the options. task-2825376 Part-of: odoo/odoo#110258
-
Matheus Leal Viana (malv) authored
The issue is when we create a new PO with notes/sections and these notes/sections are showed on purchase reporting and only the products were supposed to appear there. This issue happens because the SQL query wasn't applying any filter to the lines. The solution is apply a filter by display_type. Steps to reproduce: 1) Go to Purchase App -> Purchase Orders -> Create a new PO with notes/sections 2) Go to Reporting -> View as pivot 3) You'll be able to see the section/notes you just created closes odoo/odoo#118020 Opw: 3245933 Signed-off-by:
Adrien Widart <awt@odoo.com>
-
roen-odoo authored
Current behavior: If you add a sale description to a product, it will not be added to the invoice created from the PoS. Steps to reproduce: - Add a sale description to a product - Create a PoS order with this product - Create an invoice from the PoS order - The sale description is not added to the invoice opw-3221481 closes odoo/odoo#117974 Signed-off-by:
Joseph Caburnay (jcb) <jcb@odoo.com>
-
- Apr 16, 2023
-
-
Odoo Translation Bot authored
-
- Apr 14, 2023
-
-
niyasraphy authored
from april 3, the transifex has changed domain from www.transifex.com to app.transifex.com after this commit, the transifex project url in the system parameter will be updated to the new domain closes odoo/odoo#118574 Signed-off-by:
Martin Trigaux (mat) <mat@odoo.com>
-
Thomas Lefebvre (thle) authored
When creating an employee with a private contact, the contact will not be automatically added to the employee's followers. The desired behavior is that the contact is added to the followers even if it has a private address. Commit: 8760a4d0 However, this behavior will not be possible because adding a contact with a private address is forbidden. Commit: 20536e1b Solution: The solution is to use the private method `_message_subscribe`. This is not a problem in the business case. Indeed, the people who have access to the employee's file also have access to the private contacts. Moreover, the access rights of the public method `message_subscribe` do not concern this business case. opw-3249646 closes odoo/odoo#118572 Signed-off-by:
Kevin Baptiste <kba@odoo.com>
-
Hubert Van de Walle (huvw) authored
Steps to reproduce ================== - Go to Inventory > Operations > Replenishment - On the top right, set the pager to 1-1 - Select the only record - Click on Select All - Click on Order/snooze The action is only called for the records in the current page Cause of the issue ================== The `getSelectedRecords` function only returns records on the current page Use the `getSelectedIdsWIthDomain` function opw-3259642 closes odoo/odoo#117894 Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
-
- Apr 13, 2023
-
-
Benoit Socias authored
When replacing an image by a pictogram inside columns, the pictogram right-alignment is neutralised by the fact that the section of the card inside the column spans over 100% width. This commit makes pictograms in those sections rely on their auto width instead - thus letting the right-alignment happen as expected. Steps to reproduce: - Drop a "Columns" block. - Replace an image by a pictogram. - Select the pictogram. - Click on the "Float Right" icon in the toolbar. => Pictogram remained aligned to the left. task-2841127 closes odoo/odoo#90410 Signed-off-by:
Quentin Smetz (qsm) <qsm@odoo.com>
-
Benoit Socias authored
Align images to the right by using an auto left margin. Steps to reproduce: - Drop a "Columns" block. - Select an image. - Resize image to 50%. - Align image to the right. => Image did not get aligned to the right. task-2841127 Part-of: odoo/odoo#90410
-
roen-odoo authored
Change hardcoded pricelist id to avoid test failures. opw-3206618 closes odoo/odoo#118477 Signed-off-by:
Christophe Monniez (moc) <moc@odoo.com>
-
Tom De Caluwé authored
As of this commit, only confirmed leaves will be considered when computing the current leave or absence of an employee. Additionally, a bug in the is_absent search implementation was fixed: before this commit, the same results were returned for absent and non-absent searches. opw-2877328 closes odoo/odoo#105451 Signed-off-by:
Kevin Baptiste <kba@odoo.com>
-
Guillaume (gdi) authored
This commit patches the font awesome library to add an icon for the TikTok social network. Users are now able to add these icons with the media dialog. Now, the TikTok icon works like all other font awesome icons, with the new class introduced by this commit: `fa-tiktok`. Technical note: In order to add this new icon, a new font that contains only the TikTok logo has been created. task-3235451 closes odoo/odoo#116383 Signed-off-by:
Vray Benjamin (bvr) <bvr@odoo.com>
-
- Apr 12, 2023
-
-
Nasreddin Boulif (bon) authored
Steps to reproduce: - Configure incoming mail server and set it to create X record on incoming mails (X can be any model with a chatter) - Create a CSV file and set the encoding to UTF-16 - Send the CSV file through Gmail to the Odoo instance - Go to model X and open the created record - In the chatter, click/download the CSV file - Open the downloaded file with Geany (or any file editor that can show the file encoding) Issue: The file encoding is not the same as the original file (utf-8 instead of utf-16). Working with Outlook. Cause: The difference between Outlook and Gmail is that Gmail provides the charset of the file. The content of the mail is retrieved using `email` python lib. The lib will try to retrieve the charset of the file and fallback on `ASCII` if not available, then return the decode content. ```python def get_text_content(msg, errors='replace'): content = msg.get_payload(decode=True) charset = msg.get_param('charset', 'ASCII') return content.decode(charset, errors=errors) ``` Example: content = b'd\x00a\x00,\x00,\x00,\......' Outlook: charset = 'ASCII' return => 'd\x00a\x00,\x00,\x00...' Gmail: charset = 'UTF-16LE' return => 'da,,,,,\n,,,,,\....' In the post process of the attachment, the content is encoded in 'utf-8' (to then encoded in base64) before creating the attachment record. Content encoded to 'utf-8': Outlook: b'd\x00a\x00,\x00,\x00...' Gmail: b'da,,,,,\n,,,,,\n....' Therefore, when writing the file on the disk, the encoding is based on the binary content. Solution: When parsing the mail, add the encoding charset to the `info` variable. Then, when creating the attachment, use the charset in `info` (or fallback on 'utf'8' if no charset set) to encode the content. opw-3089009 closes odoo/odoo#111298 Signed-off-by:
Nicolas Lempereur (nle) <nle@odoo.com>
-
Thomas Lefebvre (thle) authored
Issue: When a project is shared with portal users, only timesheets that are linked to tasks will be displayed. Solution: Change the domain that selects the timesheets to be displayed to take into account timesheets that are not linked to a task, but are in a project to which the portal user has access. opw-3253632 closes odoo/odoo#118329 Signed-off-by:
Xavier Bol (xbo) <xbo@odoo.com>
-
- Apr 11, 2023
-
-
MerlinGuillaume authored
Tracked binary fields do not produce any message in the chatter Steps to reproduce: 1. Install Sales and Studio 2. Open any quotation 3. Trigger Studio and add a signature field to the form 4. With debug mode enabled, edit the field (by clicking on MORE when the field is selected) and set the Enable Ordered Tracking to 1 5. Close Studio 6. Edit the signature and save 7. No message appears in the chatter to track the value Solution: Remove the `tracking` field from binary fields to prevent the user from trying to track it Problem: We shouldn't track binary data in the chatter and we cannot use the filenames opw-3055108 task-3255810 closes odoo/odoo#117821 Signed-off-by:
Guillaume Merlin (megu) <megu@odoo.com>
-
Xavier-Do authored
Making a test post_install using @tagged should always remove the at_install tag. The main reason for that is that runbot split config select if an at_install or post_install tests should be executed is using negation: `--test-tags -post_install`. The reason for that is that giving a positive tag will replace the "standard" tag and non standard tag could be executed if giving `--test-tags at_install` (without negation) Since runbot tests in parallel builds, one of them using `--test-tags -post_install` and the other `--test-tags -at_install`, a test that is both post install and at install wont be executed at all. Also, a tests with both tags will be executed twice in a normal flow, usually not intended. The correct way to make a test post_install is to use @tagged('post_install', '-at_install') closes odoo/odoo#118042 Signed-off-by:
Christophe Monniez (moc) <moc@odoo.com>
-
Mahamadasif Ansari authored
"ERROR: Unknown Unsplash URL!" is generated when we try to add premium Unsplash images. This is because when we add the unsplash image, it accepts the image whose URL starts with "https://images.unsplash.com/" but the premium image URL starts with "https://plus.unsplash.com/ ". This commit solves the above issue by checking that the premium splash image link starts with the correct format. sentry-4075507166 closes odoo/odoo#118147 Signed-off-by:
Romain Derie (rde) <rde@odoo.com>
-
niyasraphy authored
before this commit, on clicking the picking calendar view, it allows the quick adding from the calendar view and entered value is going to the name field of stock.picking model. after this commit, quick adding will be disabled and on clicking form will be opened with selected date. closes odoo/odoo#112605 Signed-off-by:
Tiffany Chang <tic@odoo.com>
-
kir-odoo authored
This commit prevents inclusion of negative qty SO products from the calculation of its estimated shipping weight. Negative qtys can indicate a return, which would be a separate picking from the delivery => we shouldn't subtract their weight from the delivery. This subtraction, may have resulted in shipping rates being calculated as lower than they should have been within the SO. Additionally fixes the following use case (requires Fedex connector): - create a SO with 2 products with the same weight - set 1st product qty = 1 - set 2nd product qty = -1 - add shipping => Shipping Method = Fedex US - click on "Get Rate" An error will occur because the SO._get_estimated_weight() = 0, and you cannot have a rate for weight = 0 TaskId - 3028023 closes odoo/odoo#104658 Signed-off-by:
Tiffany Chang <tic@odoo.com>
-
niyasraphy authored
before this commit, while duplicating an user, karma points is also getting copied to newly created user after this commit, the copying of karma on duplicating an user will be stopped. closes odoo/odoo#118155 Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
-
- Apr 09, 2023
-
-
Odoo Translation Bot authored
-
- Apr 07, 2023
-
-
Denis Ledoux authored
As a developer, when you craft your records set manually, and wrongly use the API and set something weird in `ids`, something else than a tuple of integers, `repr` should help you to understand you did something wrong. e.g. before ```py In [1]: env['res.partner']._browse(self.env, '(1,)', 'bar') Out[1]: res.partner(1,) ``` after ```py In [1]: env['res.partner']._browse(self.env, '(1,)', 'bar') Out[1]: res.partner'(1,)' ``` We could put an assert in `_browse` to make sure `ids` is a tuple of integers, but this is considered a non-stable change, as it will suddenly crashes when you will update Odoo while it wasn't the case before. closes odoo/odoo#118076 Signed-off-by:
Denis Ledoux (dle) <dle@odoo.com>
-
niyasraphy authored
before this commit, the controllers directory is imported twice in the init file. after this commit, the duplicated import is removed. closes odoo/odoo#118069 Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
-
Julien Van Roy authored
After 863fa450, the UBLVersionId node was removed from the Bis 3 and its inheriting formats. Thus, the fonction infering the format from an xml etree needed to be apdated too, since we can no longer rely on the `UBLVersionID` node for UBL Bis 3 and its inheriting formats. The `CustomizationID` node is used. closes odoo/odoo#118043 Signed-off-by:
Josse Colpaert <jco@odoo.com>
-
Florent de Labarre authored
In case of the amount of the transaction is not the same of the order. A customer can be a misunderstanding between the amount paid with the acquirer and the amount show in the confirmation page. closes odoo/odoo#117869 Signed-off-by:
Antoine Vandevenne (anv) <anv@odoo.com>
-
Renaud Thiry authored
Precommit hooks would stock data until a call to ``cr.flush`` was made. Notably, this happens when the ``assertRaises`` method is called. Functions were applied on records already cleared from the cache. This change adds a cleanup call for `SavepointCase` as it keeps the same cursor for all tests. Cursor precommits can now be safely executed inside tests. Task-2834304 closes odoo/odoo#117555 Signed-off-by:
Thibault Delavallee (tde) <tde@openerp.com>
-
Maruan Aguerdouh (magm) authored
Steps to reproduce: - Install Sales as an example. - Go to Products, and try to filter them by Sales Price. - You have 0.0 as default value, now try to remove it and put 5. Issue: We can't delete the leading 0 even though the filter is still working as expected. Solution: Changed the `t-on-input` to match `t-on-change` as this is what we use in future versions, like 15.0. opw-3131261 closes odoo/odoo#114837 Signed-off-by:
Aaron Bohy (aab) <aab@odoo.com>
-
- Apr 06, 2023
-
-
Julien (jula) authored
__Current behavior before PR:__ The `abort_and_redirect` method uses `werkzeug.utils.redirect` which converts the input URL to a string in werkzeug 0.16.1. However when running odoo with python 3.10, [werkzeug version 2.0.2 is used](https://github.com/odoo/odoo/blob/8985426bf38affedb82990bd2158049b4d6b0bce/requirements.txt#L58). In this version if the input is not a string `TypeError: replace() takes 1 positional argument but 3 were given - - -` is raised. __Description of the fix:__ Calls `to_url` method on `url_redirect` to convert it into a string before passing it to `abort_and_redirect`. __Steps to reproduce the issue:__ 1. Run odoo-bin with python 3.10 **or** directly use `werkzeug` version 2.0.2 (`pip install werkzeug==2.0.2`). 2. Go to http://localhost:8069/web/database/selector (in private window) 3. Open a database in Odoo 14 ↳ Internal Server Error Closes: https://github.com/odoo/odoo/issues/111490 opw-3222058 closes odoo/odoo#117959 Signed-off-by:
Julien Castiaux (juc) <juc@odoo.com>
-
Jacky (trj) authored
The content of the override of `can_be_merged_with` should only be executed when we're in France. The previous implementation resulted in breaking the `test_05_tip_screen` when this module was installed with pos_restaurant. closes odoo/odoo#117942 Signed-off-by:
Joseph Caburnay (jcb) <jcb@odoo.com>
-
Christophe Simonis authored
closes odoo/odoo#117891 X-original-commit: c38b5baaeac28a7952601878a5b5efadf7f52984 Signed-off-by:
Christophe Simonis <chs@odoo.com>
-
Yolann Sabaux authored
Steps to reproduce: - company currency = USD - set a partner P with a `property_purchase_currency_id` in EUR - create a bill with Azure partner and set an bill line - change to partner P issue -> the currency of the line has not been change - change to Azure issue -> no change about the currency Cause: - We update the move.currency_id but not the line_ids.currency_id - after setting Partner P, we try to set a partner that no `property_purchase_currency_id`, we do not enter in the condition opw-3233527 closes odoo/odoo#116852 Signed-off-by:
Cedric Snauwaert <csn@odoo.com>
-
- Apr 05, 2023
-
-
Julien Van Roy authored
Tag UBLVersionID should not be present for UBL Bis 3 and its inheriting formats. opw-3249153 closes odoo/odoo#117792 Signed-off-by:
Quentin De Paoli <qdp@odoo.com>
-