Thursday, June 18, 2020
5 changes · master
Enhancements to existing features
Odoo now handles placeholders in translated messages more safely, reducing the chance that a bad translation breaks a workflow. Many existing messages were updated to the clearer format, improving translation quality and flexibility across languages.
Original PR description
Support two new syntaxes with `_()` method:
```py
_("This is so %s") % 2019
_("Text with %s placeholders", 42)
_("Text with %(num)s placeholders %(symbol)s", num=42, symbol="🧀")
```
The main benefit is to have a fallback on the source string if formating the
translated string fails (e.g. `"Foo %s"` translated `"Foo s%"`).
This PR converted most (but not all) calls to _ using placeholders to use the
new syntax. Hopefully, the remaining ones will be converted in the future and
avoid technical debt.
Use named placeholders when needed. If more than one placeholder is present in a
string, using named placeholder can be beneficial to reorder the placehodler
position (for languages like Japanese that do not use the same phrase
construction). On some sentences, it also brings clarity on the meaning of the
placeholders.
Task-id: 1853119Planning users can now start or open a chat by clicking an employee's avatar in the Gantt schedule. This makes it faster for managers and teams to contact the right person directly from the planning view.
Products created from the Barcode app during operations or inventory adjustments now default to Storable Product instead of Consumable. This better matches inventory workflows, helping ensure newly scanned or added products are tracked in stock correctly from the start.
Original PR description
This commit makes it so the default "Product Type" = "Storable
Product" ('type'='product') when creating a new product in the
barcode app's Operations or Inventory Adjustments. Previously the
default was "Consumable".
Specification 1 of Inventory Onboarding task.
Task: 2220129
Community PR: odoo/odoo#51676Resolved issues and error corrections
Hardware device processes are now stopped when a device is disconnected, instead of continuing to run in the background. This helps avoid unnecessary resource usage and potential connection issues when devices are unplugged or reconnected.
Original PR description
The theads of devices were still running after 'disconnect' had been called. We add a '_run' variable that is set to True when the thread should be running. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change fixes an error that could occur when editing a product's unit of measure. Odoo now keeps the sales and purchase units aligned before validation, helping users save product updates reliably.
Original PR description
This commit removes the onchange on product.product that sync uom_id with uom_po_id. It was problematic because of the constraint _check_uom on product.template. Updating the uom_id on a…
This commit removes the onchange on product.product that sync uom_id with uom_po_id. It was problematic because of the constraint _check_uom on product.template. Updating the uom_id on a product_product will eventually change also the uom_po_id to have them belonging to the same category. Saving the update call write() on product with a dict of two values (uom_id and uom_po_id) As product.product is inherited from product.template, the write() on the corresponding product_template is called but in this case 2 times for each values. The first time, only uom_id is updated. The _check_uom constraint is triggered and obviously failed. The uom_po_id on the template is not yet updated. To replace the onchange behavior, this commit make the sync in the beginning of write() of product.template. Which means before calling the constraint. Task : 2197818 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr