Thursday, December 28, 2023
13 changes · 17.0
Resolved issues and error corrections
Fixes an issue where validating a vendor bill for subcontracted manufacturing could incorrectly reduce the product valuation, even making costs negative. This keeps inventory values accurate when subcontracted products include supplied components.
Original PR description
Steps to reproduce: - Create product FNS, storable, avco - Create product CMP, storable, avco, cost=$100, add 10 unit in stock - Set resply subcontractor route in inventory tab - Create BoM for FNS: subcontracted, cmp=1 unit of CMP, vendor=Azure Interior - Add "Azure Interior" to the vendor list of FNS (under Purchase tab) with a price of $20 - Create purchase for 1 unit of FNS to "Azure Interior" - Confirm: Receipt should show subcontracted - Validate Receipt: Valuation of FNS should be $120 - Create vendor Bill, Validate => Product Valuation is overwritten, cost become $-80.0 Bug: when checking price difference unit component price is subtracted but since they are out moves their valuation is already negative opw-3618767
The review text box on course pages now clearly shows its border when users add or edit a review. This small visual fix helps users understand where to enter their feedback and improves the review experience.
Original PR description
**Steps to Reproduce** 1. Go to website slides. 2. Open any Course. 3. Click on 'Add a review' or 'Edit your review'. -> Message box border is not visible. **After this PR** The message box border is visible now. Task-3623765
Website users can duplicate pages from the page list again, with a prompt to choose a page name first. This helps prevent duplicate pages from accidentally reusing the same URL, avoiding publishing conflicts and confusion.
Original PR description
Since [1] page duplication was disabled because it caused an issue when the same URL was used several times. This commit runs through the `DuplicatePageDialog` to obtain a page name when duplications are requested from the pages list. [1]: https://github.com/odoo/odoo/commit/f57b92a8de4e3546df8b93655cea002b70d496da task-3640878
Live chat guest connections now use Odoo’s standard channel subscription method instead of a special request context. This improves compatibility with Odoo.sh and helps cross-origin live chat sessions connect reliably.
Original PR description
In [1], a context object was added to websocket requests to subscribe to guests channels on cors live chats. However, the common mechanism to subscribe to record channels is to pass a string channel that will then be validated by the `_subscribe` method of `ir_websocket`. This approach works with OdooSH out of the box while the other one does not. This PR removes the mechanism introduce in [1] in favor of the string approach. [1]: https://github.com/odoo/odoo/pull/130052
Website editors can once again add helpful descriptions to form fields, so visitors see the intended guidance when completing forms. The fix also restores the default note for carbon copy email fields, reducing confusion and form setup issues.
Original PR description
[FIX] website: enable to add a description on form field Steps to reproduce: - Add a "Form" snippet on the website. - Select the first field. - Try to toggle the "description" option of the field. ->…
[FIX] website: enable to add a description on form field Steps to reproduce: - Add a "Form" snippet on the website. - Select the first field. - Try to toggle the "description" option of the field. -> Problem: there is no description added on the field. The problems appeared since [this PR] and comes more precisely from [this commit]. The problem is that one condition required to fill the `default_description` parameter is that `field.type === "description"`. This should not be the case. Indeed, here was the flow before [this commit]; When the user toggled the description option, `toggleDescription` assigned `field.description` to `true`. The field was then rendered trough `renderField()`. During this rendering, the system called the `website.form_field_description` template through `website.form_field` independently of the field type. Because `field.description` was set to `true`, a `div` with the description "Describe your field here." was added on the rendered field. To solve the problem, the `field.type === "description"` condition has been removed as a condition to set the `default_description` parameter. Now, as it was the case before [this commit], this parameter is filled either if `field.description` is set, either if the field name is `email_cc` or `email_to`. The error probably comes from the fact that the name of the template used to render the field is `"website.form_field_" + field.type`. As the name of the template in charge of rendering the description is `website.form_field_description`, the author probably thought that this template should only be called when `field.type === "description"`. This is not the case; the template `website.form_field_description` is always called when rendering a field (independently of the field type through the template `website.form_field`) but is only relevant if `default_description` is set. Note that this fix fixes also another bug: - Add a "Form" snippet on the website. - Add a field which is of type "Cc". -> Problem: there should be a description of type "Separate email addresses with a comma." on the field. This commit also adapts the `website_form_editor_tour` tour to verify that the description option works as wanted. [this PR]: https://github.com/odoo/odoo/pull/130467 [this commit]: https://github.com/odoo/odoo/commit/363251986dcd753796b4b037a2da2e118b3e8e35 opw-3630348 opw-3604548
Purchase orders created through product replenishment now correctly include vendor discounts instead of defaulting them to zero. This helps ensure purchasing costs reflect agreed supplier terms and avoids manual correction of replenishment orders.
Original PR description
Currently, when replenishing a product using a supplier that has a discount, the purchase order created didn't take the discount into account. It was set to zero. Fix in `purchase` module, test in…
Currently, when replenishing a product using a supplier that has a discount, the purchase order created didn't take the discount into account. It was set to zero. Fix in `purchase` module, test in `purchase_stock` module.
Steps to reproduce:
-------------------
* Go to ´Inventory´ > ´Products´
* Select any product
* Configure the product:
* - Product type: storable
* - Enable ´can be purchased´
* - Under the ´Purchase´ tab, add a vendor with a discount
* - Save
* Select ´Replenish´
* Select the vendor previously added
* Confirm
* Check the PO created
Why the fix:
------------
After debugging, I discovered that
```python
po_line_values.append(self.env['purchase.order.line']._prepare_purchase_order_line_from_procurement(
procurement.product_id, procurement.product_qty,
procurement.product_uom, procurement.company_id,
procurement.values, po))
```
in `/home/odoo/odoo/addons/purchase_stock/models/stock_rule.py` would loose the discount value.
Discount can be found in `procurement.values.supplier.discount`.
Further investigation revealed that function `_prepare_purchase_order_line(self, product_id, product_qty, product_uom, company_id, supplier, po)` in `/home/odoo/odoo/addons/purchase/models/purchase_order_line.py` would not make use of the discount value.
In this function, we use the discount value from the seller instead of the supplier as the seller is computed in order to use the smallest discounted_price.
opw-3640396The inventory valuation report now shows the Total Value column by default and keeps the Remaining Value column hidden unless users choose to display it. This corrects the report layout so business users see the most relevant valuation information immediately.
Original PR description
**Steps to reproduce the bug:** Go to inventory > reporting > valuation The total value is hidden and the remaining is shown **Solution:** displaying total value as optional show and remaining_value as optional hidden opw-3644799
When a time off request requires a second approval, the responsible approver now receives the expected activity notification. This helps ensure approval steps are not missed and also fixes an issue when subscribing multiple leave records at once.
Original PR description
Prior, if the time off type needed second approval, there was no activity generated for the responsible. This commit fixes that. Moreover we also organize the code by taking references out of the loop. task - 3584190
WhatsApp message batches now continue sending even if one recipient has an invalid phone number. This prevents a single bad contact from blocking messages to all other valid recipients, improving reliability for bulk communications.
Original PR description
Before this commit, on first error, all the batch is crashed. Now catch the exception, using `except Exception` since we are in a small scope, and that the import in tool is conditional on the presence of the lib phonenumbers.
Users can now drag and drop checkbox (boolean) fields when editing forms in Studio. Previously, checkboxes could not be moved to different positions in the form layout, which limited flexibility when designing forms. This fix restores the ability to reorganize checkbox fields just like other field types.
Original PR description
Steps to reproduce: - Install Studio - Go to Contacts (or any other app) - Select any contact and edit the contact form with studio. - Now search or add a `boolean` field, usually a checkbox will work. - Now try to move it with drag and drop from one position in the form to any other position. The fix adds an XPath expression specifically targeting boolean fields that adds the missing attributes to the boolean fields, like `labelRef`, in order to later get the draggable attribute. opw-3495765 Forward-Port-Of: odoo/enterprise#52735 Forward-Port-Of: odoo/enterprise#48992
Fixed the email headers that are sent to applicants and employees when sharing job offers. Previously, the system displayed technical backend names that weren't appropriate for external recipients. Now emails will show a clearer, more professional header format: "Company : Job Offer - Employee/Applicant".
Original PR description
Previously, when sending mails to applicants or employees, an automatic mail header would be constructed with the display name of offers, that name is useful on backend but should not be displayed to employees, from now we will display the following header : Company : Job Offer - Employee/Applicant task-3619099 Forward-Port-Of: odoo/enterprise#53318
Users can now successfully change campaign names in Social Marketing without encountering errors. Previously, when attempting to rename a campaign after posting, the system would display an error and fail to save the change. This fix ensures that campaign name changes are properly saved.
Original PR description
Steps to reproduce: - Make a campaign in Social Marketing - Make a post and post it - Change the name Issues: Traceback is shown and name change is not saved. Solution: Onchange creates NewId record, instead we want the original record. opw-3597653 Forward-Port-Of: odoo/enterprise#51071
This fix resolves a critical issue that was causing database upgrades to fail when the file storage system becomes temporarily unavailable. When processing Mexican EDI invoice payments, the system now gracefully handles missing file attachments instead of crashing, allowing upgrades to complete successfully.
Original PR description
In `_l10n_mx_edi_cfdi_invoice_get_payments_diff()`: If the filestore is not available (e.g. during upgrades or for any other reason), `ir_attachment.raw` computation returns an empty byte string. Passing that to `lxml.etree.fromstring()`, causes `lxml.etree.XMLSyntaxError: Document is empty, line 1, column 1`. The upgrade of serveral DBs fails because of this (tbg-978). Since in that situation it is unclear why the attachment is empty, it is best to leave the state as is and continue to the next payment. Forward-Port-Of: odoo/enterprise#53162