- May 26, 2023
-
-
Walid authored
Steps to reprodue: - Create a dropshipped product - Sell the product to a client with a different language set - Print the delivery slip Bug: delivery slip is currently being printed in the vendor's language Fix: Print the delivery slip in the client language when possible opw-3193015 closes odoo/odoo#121305 Signed-off-by:
Adrien Widart (awt) <awt@odoo.com>
-
Arnold Moyaux authored
Use case: It happens that a product is consumed in different operations. So it needs two distinct BoM lines. Since commit [1] the stock.move in pbm are not merged. However [1] was design for kit. In our case we would like to have only one stock.move for all the quantities. The fix is not perfect because it won't work if we confirm at the same time a move with a kit and without it. But at least it will let people using MO without kit has the correct behavior + remove a duplicate of the function [1] commit 741d2fe9 closes odoo/odoo#120835 Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
-
- May 25, 2023
-
-
stcc-odoo authored
Steps to reproduce: - Install industry_fsm_report, website - Create Project P, add column/stage PC. - Edit stage, Email Template = Task: Intervention Schduled. - Edit the template > Advanced Settings > Optional report to print and attach = Worksheet Report (PDF). Save everything. - Go to website, "contact us" page > Edit the form, Action = Create a task, Project = P > Save Issue: When you first submit the form, it will fail, but the task will be created and visible in project P. By instinct, the user will submit the form again, so the task will be duplicated. The second form submit will return a success message. When submitting a form, we first generate a savepoint (added in commit [1]). Since this is the first interaction with the report system, during the handling of the form, the assetsbundle will be generated (see keyword 'commit_assetsbundle'), which will cause a commit. Finally, assuming no other error is raised, we try to delete the savepoint. However, since a commit was executed, then the savepoint will no longer exist, which will cause an error status to be returned. Solution: When submitting a form, pass `commit_assetsbundle=False` to the record creation, which prevents the commit from happening. This solution has a downside; creating the record also sends an email and the report attached to that email will have broken styling. This is still an improvement to the current behaviour, which doesn't send the first email at all. [1]: https://github.com/odoo-dev/odoo/commit/5a499ecf113f08c11d2b33b47680dd00ec1b297b opw-3183912 closes odoo/odoo#119612 Signed-off-by:
Romain Derie (rde) <rde@odoo.com>
-
Sébastien Theys authored
A raw query is not necessary to produce the desired result, found activities need to be kept only if the corresponding record can be found with standard search (which includes multi-company check). Part of task-3266643 closes odoo/odoo#122354 Signed-off-by:
Sébastien Theys (seb) <seb@odoo.com>
-
Csaba Tóth authored
closes odoo/odoo#122303 Signed-off-by:
Martin Trigaux (mat) <mat@odoo.com>
-
Julien Van Roy authored
Use case: the eco-taxes (recupel, auvibel, etc) are fixed taxes in Odoo, which apply before the "regular" (percentage) tax on an invoice line. We can have one or more fixed taxes and 1 regular tax. In EN16931, there can only be 1 tax per invoice line. Thus, the fixed taxes are encoded as charge on the invoice lines (with reason code `AEO`: "Collection and recycling"). The tags `AllowanceCharge` (in UBL) and `SpecifiedTradeAllowanceCharge` (in CII) are used. Then a serie of tax related infos need to be changed: the taxes in UBL/CII should not contain the fixed ones and the total untaxed amount needs to be adapted, as well as the total tax amount (since the fixed taxes were removed). To be able to import the fixed taxes back in Odoo, the charges on the invoice lines are read and their names and amounts are used to search on the existing taxes. task-3274208 closes odoo/odoo#121494 Signed-off-by:
Laurent Smet <las@odoo.com>
-
niyasraphy authored
The orginal PR and it's forward ports https://github.com/odoo/odoo/pull/121048 intorduced an unexpected AttributeError when using OAuth for incoming mail servers (fetchmail.server). Since `smtp_user` is not a defined field in fetchmail.server (it uses the field `user` instead), we had to change the approach. To prevent this error, we move the UserError call into the respective ir_mail_server models, which should check the contrains at that level. This means that before the form gets saved, trying to connect using an OAuth account, should prompt the user to first specify an smtp_user before proceeding. closes odoo/odoo#122222 Signed-off-by:
Stéphane Debauche (std) <std@odoo.com>
-
Michele authored
closes odoo/odoo#121868 Signed-off-by:
Vincent Schippefilt (vsc) <vsc@odoo.com>
-
- May 24, 2023
-
-
Benjamin Vray authored
Steps to reproduce the bug : - Add the same google font twice with the font family selector in the option tab of the editor panel. - The font will be displayed only once in the font selector menu but 2 trash icons will be added, one for the added font and one for the font that was already there. This commit fix this and allows now the user to add the same font twice, but only to replace a served font by a local font. The opposite does not make sense, but if the user really wants to replace a local font with a served, it is always possible by deleting the locale beforehand. In addition, this commit adds a cloud icon next to the default fonts of the theme. Since these fonts are served by Google, it is logical to have the cloud icon. This is consistent with the cloud icon that is present when the user adds a font served by Google. task-2998689 closes odoo/odoo#103402 Signed-off-by:
Romain Derie (rde) <rde@odoo.com>
-
Paul Morelle authored
The selection function get_selection_class for the field classname has obviously been thought to be overridable by subclasses in order to add new selection classes if need be. However, before this commit the method was passed directly to the Selection constructor, which used the callable object directly. If it was overridden by a subclass, the Selection object would still use the same non-overridden callable instance. With this commit, we give the name of the method instead of the callable, which makes that the method is resolved after all overrides, and therefore the resulting selection will be the overridden one. closes odoo/odoo#122299 Signed-off-by:
Romain Derie (rde) <rde@odoo.com>
-
Laurent Smet authored
When duplicating the reco model, we want to counterpart entry lines to be copied as well. closes odoo/odoo#122309 Signed-off-by:
William André (wan) <wan@odoo.com>
-
Dylan Kiss (dyki) authored
After commit 9bf54f09, we assumed that the date field of a move was never empty. On the form view, it can be (temporarily) empty though (before save), causing an error when trying to read it. We now don't try to recompute the name when the date is empty, thus preventing the date field to be read in that method. task-3326834 closes odoo/odoo#122260 Signed-off-by:
William André (wan) <wan@odoo.com>
-
divy-odoo authored
Before this commit, the widget value was updated (based on the current state) prior to updating the snippet UI. As a result, the widget value reflected used the non-updated UI labels. task-3112890 closes odoo/odoo#120569 Signed-off-by:
Quentin Smetz (qsm) <qsm@odoo.com>
-
paso-odoo authored
If applied, this commit will solve the min-max issues for efaktur. - invalid literal for int() with base 10: when we enter all characters string in the min or max it will raise an error like this. - Error is also raised when the min or max is blank and try to save the record. So, I have update the value as 0 if the min value or max value not generated. see - https://tinyurl.com/2lx9j2kr Sentry - 3936020226 closes odoo/odoo#112850 Signed-off-by:
William André (wan) <wan@odoo.com>
-
Thomas Lefebvre (thle) authored
Steps to reproduce: Without being logged in, complete the purchase flow on the ecommerce, taking care to have a different billing and shipping address. If you change the delivery address, you will get an access error. Cause: In some cases, we do not have access to the `name` field of the `partner` record. Solution: Add `sudo` to be able to read the fields. opw-3276877 closes odoo/odoo#122121 Signed-off-by:
Antoine Vandevenne (anv) <anv@odoo.com>
-
Touati Djamel (otd) authored
Steps to reproduce the bug: - Install mrp and purchase - Create a new user “U1” > give him only the “purchase” user access - Log in as “U1” - Go to purchase app > create a new PO - Try to select any product Problem: A user error is triggered because we check if the product has a BOM but since the user does not have access to MRP, an error is raised opw-2885982 closes odoo/odoo#94183 closes odoo/odoo#121371 Signed-off-by:
Adrien Widart <awt@odoo.com> Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
-
Hoang Tien Dung authored
closes odoo/odoo#122220 Signed-off-by:
Martin Trigaux (mat) <mat@odoo.com>
-
- May 23, 2023
-
-
Aurelien van Delft (avd) authored
Turn the call to filtered after the search on purchase.order.line into a call to _search. This allows to remove filtered by adding an additional leaf in the search domain. Add read calls to fetch fields from db and store them in cache on recordset batches. Example speedup: partner with 136555 POL 6.33s -> 3.42s opw-3277299 closes odoo/odoo#120658 Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
-
David (dafr) authored
qty_received_method is not recomputed if the product type change, and can lead to issues on existing purchases when trying to generate a Vendor Bill. # HOW TO REPRODUCE: - Create product P, type: Service, Control Policy: 'On Received Qty' - Create PO for 1 unit of P (do not confirm) - Update type of P to Storable - Confirm PO, Receive Products => Qty Received is 0, not able to generate Bill closes odoo/odoo#119622 Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
-
Stephane Mangin authored
Avoid unwanted update of product_tmpl_id on product.product Somehow, the field product_tmpl_id on product.product could be updated to an unrelated product template, if the context key `default_product_tmpl_id` is set when an inventory move is created through an update of stock.quant.inventory_quantity. Setting readonly to True on both stock.quant and stock.move product_tmpl_id field prevents this unwanted update. closes odoo/odoo#104602 Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
-
Romain Derie authored
The code was assuming there would be only one `<footer/>` element in the dom but it's not always true. Our `Blockquote` snippet also contains a `<footer/>` element. While this has no impact on Odoo 14 and Odoo 15, it will crash in Odoo 16 when trying to select "On all pages" on a popup option when there is a blockquote snippet on a page. The reason it breaks in 16 is because it uses javascript instead of jquery, finding only one element (the footer of the blockquote) and not all. The jQuery usage was then filtering out to only keep the correct footer due to some extra selector looked for in the elements (`.oe_structure:o_editable`). Still, the fix is made in Odoo 14 because it's likely that we will have another fix later in the snippet options, and it's also likely that someone will replace the jQuery usage by javascript while doing so, which would reveal the bug. opw-3283140 closes odoo/odoo#121848 Signed-off-by:
Quentin Smetz (qsm) <qsm@odoo.com>
-
Guillaume (guva) authored
Before this commit, the reversal of a passed exchange move was not created on the correct date: - If sequence is reset by month, the reversal should be created at the end of the month of the exchange move, and if sequence is reset by year, at the end of the year. Steps: - With a foreign currency X activated and two different rates few months in the past. - Create and confirm an invoice with currency X at the date of the first rate. - Register a payment at the date of the second rate (an exchange move is created). - Unreconcile the payment from the invoice. -> A reversal of the exchange move is created, but the date is wrong (set to today's date). opw-2856385 closes odoo/odoo#121279 Signed-off-by:
Brice Bartoletti (bib) <bib@odoo.com>
-
Ivan Yelizariev authored
1. Infinite loop may happen on using `parent_of`\`child_of` when there is a recursion in the tree (e.g. a record is marked as a parent of itself). Fix it by excluding seen records from the next iteration. 2. Another problem with `child_of` is `parent_id` that references to another model. For example, the `parent_id` may come from inherited model. It's the case with `res.users` and `res.partner` models. It may lead to a random search results. Avoid that by raising exception in case of wrong usage of the `child_of` operator. STEPS: In demo data, there is a partner called "Wood Corner" that is `res.partner(9,)` that has 3 sub-contacts. If we give Portal access to two of them, we end up with a database, where we have a `res.users(9,)` record that has a partner, which has a `parent_id` to "Wood corner". So this way, the user id is the same as the user's partner's parent contact id. After that open a shell and type: ``` env['res.partner'].search([["user_ids", "child_of", 9]]) ``` BEFORE: infinite loop (without change n.1) or random search results (when change n.1 is applied) AFTER: ValueError exception --- opw-2729740 closes odoo/odoo#89316 Related: odoo/enterprise#41330 Signed-off-by:
Raphael Collet <rco@odoo.com>
-
Mahamadasif Ansari authored
A float division by zero error is generated on the log, and nothing is imported from the file when the user uploads an XML file like https://drive.google.com/file/d/1_eZYfqMk2kLtPsEjv-13DRHnmoXkWYeE . This is because here in LineID 1, there is a value billed quantity is 0.0, a charge amount is 0.0, and a total amount is 100.0. This is wrong; the total amount is always 0.0 when the billed quantity is 0.0 (billed quantity * charge amount). This commit solves the above issue by dividing a price subtotal by one when the billed quantity is zero. sentry-4157357719 closes odoo/odoo#121027 Signed-off-by:
Quentin De Paoli <qdp@odoo.com>
-
Arnold Moyaux authored
It takes 70s to generate a receipt with 2000 serial numbers. It happens because during the first part of the loop (model `stock.move.line` in the `create` method). It will update the initial demand of the move based on the new stock.move.line and their qty_done. Writing the initial demand of the `stock.move` will try to reassign it (useless in our case) and rewrite the same value on its state's field. The consequence is the invalidatation of the field on the `stock.move.line` because it's a related to the `stock.move`. In the second part of the loop, it check the sml state. Since it was invalidate upper, it recompute it. That prevent a correct prefetch and cause a performance issue. We fix it by writing only once the information by move. And it prevent the recompute later since the state is not write during the loop. closes odoo/odoo#121966 Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
-
- May 22, 2023
-
-
Dylan Kiss (dyki) authored
With the name calculation change in 9bf54f09, we missed the case to recompute the name of a move on a journal change. It seems a test case for this was missing an assert. This commit fixes the behavior, so the move name is now correctly recomputed again when changing the journal. The test has also been amended. task-3326834 closes odoo/odoo#121920 Signed-off-by:
William André (wan) <wan@odoo.com>
-
Yolann Sabaux authored
Steps to reproduce: In an account move, if the partner_id is changed to one that does not have a value assigned in the property_purchase_currency_id field and with a value in the context for default_currency_id, when passing through the _onchange_partner_id function of the purchase module, Cause: the variable currency_id will take the value in the context as second option causing an error when trying to get the value in currency_id.id because currency_id will be an integer and not a record. issue-121232 closes odoo/odoo#121620 Signed-off-by:
Yolann Sabaux (yosa) <yosa@odoo.com>
-
- May 02, 2023
-
-
Arnaud Baes authored
For performance reasons, instead of extracting the whole zip, extract only the files which are actually used during in the `_import_module`, in case people put additional crap in the archive which are ignored during the import. That way, we avoid useless I/O. Also, adding the temporary directory in the addons path wasn't thread-safe. This revision changes this to make the module import feature thread-safe. closes odoo/odoo#80120 Signed-off-by:
Pierre Masereel <pim@odoo.com>
-
- May 21, 2023
-
-
Odoo Translation Bot authored
-
- May 19, 2023
-
-
Julien Van Roy authored
An UBL Bis 3 xml can only contain one tax per invoice line. However, there might be one or more ecotaxes on invoice lines in Belgium. Do not block the user from generating the attachment in this case. Note that PR https://github.com/odoo/odoo/pull/121494 will properly handle the fixed taxes upon generating UBL attachments. opw-3318969 closes odoo/odoo#121833 Signed-off-by:
William André (wan) <wan@odoo.com>
-
Joseph Caburnay authored
When performing the picking action in the context of savepoint, the env inside the action can randomly change causing an AccessError which is caught as UserError (in the current point_of_sale code). Flushing before calling a method in a savepoint will deterministically avoid this issue. Note that the weakset used to store environments was modified in #121604 to avoid this kind of issue. When using a cr.savepoint, the transaction must be flushed but in we don't have any reference to the env that should be used on the cursor, meaning that the env is chosen in the list of existing env. This choice is random because Transaction.envs is using a Weakset. In some case, the chosen env does not have the correct access right because the context allowed_company_ids is corresponding to a company coming from another test, leading to an access error, hidden by the try except. Flushing the environment before creating the savepoint will help to prevent this issue by flushing on a well defined environment. Note that the weakset used to store environments was modified in #121604 (master) closes odoo/odoo#121659 Signed-off-by:
Xavier Dollé (xdo) <xdo@odoo.com>
-
Dylan Kiss (dyki) authored
Currently, when we create a draft move in an empty period, a sequence number (name) gets generated and set on the move. This is fine. When subsequently we change the date of that move to a period that already has entries in it, the sequence number (name) for our draft move is recalculated according to the new period. When we post a new move in this same period afterwards, and then delete our previous draft move, we are left with a gap in the sequence. Example: We already have a move on 2023-01-01 with name `2023/01/0001`. We add two new moves `A` and `B` as follows. | Step | Move | Action | Date | Name | | ---- | ---- | ----------- | ---------- | -------------- | | 1 | `A` | Add | 2023-02-01 | `2023/02/0001` | | 2 | `A` | Change date | 2023-01-10 | `2023/01/0002` | | 3 | `B` | Add | 2023-01-15 | `/` | | 4 | `B` | Post | 2023-01-15 | `2023/01/0003` | | 5 | `A` | Delete | | | A gap is now created, since we have `2023/01/0001` and `2023/01/0003`, but `2023/01/0002` was deleted (possible since it was in draft). To solve this issue, we now make sure that when a draft entry is moved to a period that already has entries in it, we reset the name to `/`, to not consume a sequence number and prevent possible gaps in the sequence later on. task-3326834 closes odoo/odoo#121565 Signed-off-by:
William André (wan) <wan@odoo.com>
-
Paolo Gatti (pgi) authored
The visibility of the "Print" DDT button wasn't taking into consideration the dropshipping case. closes odoo/odoo#110398 Signed-off-by:
Josse Colpaert <jco@odoo.com>
-
Andrea Grazioso (agr-odoo) authored
Have an IT company configured Activate Dropship Create a Product P with dropship enabled and vendor configured Create a quotation to an IT customer, add P to a line, confirm. Purchase will be created automatically, confirm it. Go to dropship picking, confirm, print The DDT report does not show up correctly: - Warehouse address is the company address - Customer address is the vendor address opw-3128812 Part-of: odoo/odoo#110398
-
- May 17, 2023
-
-
Louis (loco) authored
Steps to reproduce the bug (before the commits of this PR): - Drop a Cover snippet on the website. - Change the parallax to "None". - Save and edit. - Modify an option (for example, add a filter) to add the `o_modified_image_to_save` class to the image. - Change the parallax to "Fixed". - Save. - Inspect the Cover snippet. => The `span` element has the attributes `data-snippet="s_cover"` and `data-name="Cover"`. Note that this could lead to problem during the migration process. Let's analyze the process in order to better understand the problem: - At the change of the parallax to "None", there is a change of the target thanks to the call to `setTarget()`. The new target is now the `section` element. - At the save and edit, there is a call to `_loadImageInfo()`. All the dataset (including `data-snippet` and `data-name`) of the new target is copied in `this.img`. - At the modify of an option, the `o_modified_image_to_save` class is added to `this.img`. - At the change of the parallax to "Fixed", there is a change of the target thanks to the call to `setTarget()`. The new target is now the `span` element. - At the save, `cleanForSave()` is called and because there is the `o_modified_image_to_save` on `this.img`, all the dataset of `this.img` (including `data-snippet` and `data-name`) is copied on the new target (the `span` element). Note that this problem is resolved by the second commit of this PR. Indeed, the dataset of the target is first filtered by `_whiteListAttributes` before being copied into `this.img`. However, databases that already have the problem will not be fixed by. The goal of this commit is to remove the `data-snippet="s_cover"` and the `data-name="Cover"` from the `span` elements in those existing databases. task-3287330 closes odoo/odoo#119596 Signed-off-by:
Benoit Socias (bso) <bso@odoo.com>
-
Louis (loco) authored
*: web_editor, website Steps to reproduce the bug: - Add a Cover snippet on the website. - Put a "Blur" filter on the background image. - Save. - Change the parallax from "Fixed" to "None". - Save and edit. => The "Filter" option displays "None" but should display "Blur". When changing the parallax, `setTarget()` is called. The goal of this function is to transfer the `background-image` from the old target to the new one. The commit modifies this function by adding the transfer of the dataset information relative to the background image from the old target to the new one. It also transfers the `o_modified_image_to_save` class from the old target to the new one if needed. task-3287330 Part-of: odoo/odoo#119596
-
Louis (loco) authored
For background images, modifying options such as "Filter" does not directly lead to the modification of their corresponding data attributes in the DOM as those modifications are done at the save request. This should not be the case. The goal of this commit is to, as for regular images, modify their corresponding DOM data attributes at the option update. Steps to reproduce the bug: - Add a Cover snippet on the website. - Replace the background image by one of your own. - Add a filter to the background image. - Inspect the Cover snippet. => The `data-gl-filter` attribute has not been added in the DOM and you have to click on "Save" for it to be actually added. task-3287330 Part-of: odoo/odoo#119596
-
Louis (loco) authored
Steps to reproduce the bug: - Add a cover snippet on the website. - Change the background image with one of your own. - Save and edit again. => Options such as "Filter", "Width" and "Quality" do not appear anymore. The problem is that the `src` attribute of the background image is not correctly updated when initializing the image. This is because the target used to recover the URL of the background image is the snippet and not the image itself. This problem is resolved by ensuring that the argument of the function `getBgImageURL` is the background image. Now that the `src` attribute is correctly updated, the `computeVisibility` function of the the `BackgroundOptimize` option works properly and the options "Filter", "Width" and "Quality" are displayed as wanted. Note that now, the dataset of the target is filtered with a "white list" (BACKGROUND_IMAGE_ATTRIBUTES) before being copied in the dataset of `this.img`. Indeed, if the parallax is set to "None" for example, we do not want data attributes such as `data-snippet` to be copied in the dataset of `this.img`. task-3287330 Part-of: odoo/odoo#119596
-
Alvaro Fuentes authored
On this situation: * P1 consumable product, kit, with components P2 and P3 in its BoM using 1 of each * P2 comsumable product, kit, with component P3 using 1 in the BoM * P3 storable product, 10 units in stock Before: The qyt_available for P1 is 10. That's incorrect: to assemble one P1 we need precisely two of P3s, one for P2 BoM then an extra for P1 BoM. After: The qyt_available for P1 is 5. closes odoo/odoo#120752 Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
-
Michele authored
[IMP] stock: unreserve only quantity required if available quantity is less than quantity required when action_done on stock move. Example: Now there is this behaviour Inventory quantity 4 Reserved quantity 3 Available quantity 1 If i do a stock move of 2 pieces, it will unreserve ALL the stock move of the product. With this PR it will unreserve only the pieces that are required minus the available quantity not reserved , in this case 2 (new stock move) - 1 (available quantity) = 1 closes odoo/odoo#119999 Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
-