Thursday, June 18, 2020
3 changes · master
Resolved 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
This fix ensures connected IoT payment devices stop their background activity when they are disconnected. It helps prevent lingering device processes that could affect reliability or resource usage after a disconnect.
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.