Daily updates from Odoo
Thursday, January 9, 2025
6 changes
3 changes
Enhancements to existing features
Odoo now detects when Instagram posts or YouTube videos have comments disabled on the platform and shows that status in the comments dialog. This prevents users from trying to comment where it is not allowed and hides misleading Instagram comment counts when comments are disabled.
Original PR description
- In case the comments for a post on INSTAGRAM, or the comments for a video on YOUTUBE are disabled (not PAUSED), we show it as disabled in the `StreamPostComments` dialog box (the dialog box opened…
- In case the comments for a post on INSTAGRAM, or the comments for a video on YOUTUBE are disabled (not PAUSED), we show it as disabled in the `StreamPostComments` dialog box (the dialog box opened by clicking on the comments icon) - we also hide the `instagram_comments_count` in case we have disabled on the instagram platform. IMPLEMENTATION DIFFERENCES =========================== INSTAGRAM --------- - while fetching all the posts during the execution of the function `_fetch_instagram_posts`, we request an additional field (is_comment_enabled) which gives us if commenting is enabled. - this field is only available to us on the `/media` endpoint. - this field is not available to us when we are requesting comments using the `/comments` endpoint on a specific post. - we create a new field to store it to simply use it to check if comments are enabled. YOUTUBE ------- - unlike instagram, the YOUTUBE DATA API does not provide us with any field while we are fetching the videos in the function `_fetch_channel_videos`. - but what it does provide is an errorneous response when we are requesting comments on a video that has comments disabled. (in case of instagram, it does not throw any error, it just gives an empty object) - we use that response to then derive the conclusion that comments on that video is disabled. - we have intentionally left a TODO, to check for a direct field which would give us the information about commenting on a video. Task-4070000
The signing request view was simplified by removing an unnecessary layout container. This minor cleanup helps keep the Sign interface easier to maintain without changing business workflows.
Users can now delete draft invoices that were imported with Mexican CFDI data. This removes an unnecessary restriction for imported documents while still preserving controls for invoices sent to SAT through Odoo.
Original PR description
If we import an invoice with CFDI, our fields are populated (and CFDI related fields) with the invoice state set to Draft. The current behaviour is to prevent invoice deletion when we have the CFDI. It makes sense to prevent the deletion of sent invoices when we send them to SAT via Odoo but when we import them, it'll be useful to be able to delete them. This commit enables the deletion of an imported invoice, even when the CFDI fields are populated. task-4306416
3 changes
Enhancements to existing features
The mass production wizard now creates follow-up manufacturing orders in a clearer confirmed state with serial numbers already assigned. This improves traceability for partially produced items and helps avoid unintended component consumption.
Original PR description
In this commit: ==================== - The changes ensure better traceability by generating back-orders in a 'confirmed" state with serial numbers assigned, preventing unintended consumption of components. This approach enhances clarity and aligns with user expectations for managing partial production. task-4280758
Manufacturing users can now prepare back-orders from the Produce All action for final products tracked by serial number. This reduces workflow interruptions by avoiding unnecessary blocking from quality instructions tied to work orders.
Original PR description
In this commit: ==================== - Adjusted the workflow to enable users to prepare manufacturing orders (MOs) for back-orders when clicking 'Produce All' for final products linked with serial numbers (SN), without blocking for quality checks when instructions are associated with any work order. task-4280758
Subscription invoice payment processing now uses a lighter database lock to avoid blocking related updates unnecessarily. This reduces the risk of deadlocks during automated subscription billing, improving reliability without changing user-facing workflows.
Original PR description
Before this commit, the transaction row was locked when payment was performed in the subscription invoice cron. Using `SELECT FOR UPDATE` locks the entire row, primary key included (id in our case). As a result, it could prevent insertion or update or other table refering to the id too. As it is not necessary and could trigger unnecessary deadlock, it is better to rely on `SELECT FOR NO KEY UPDATE` which allow the update of foreign keys. https://www.postgresql.org/docs/16/explicit-locking.html#LOCKING-ROWS See https://github.com/odoo/enterprise/pull/74078#discussion_r1873729342 taskid: 4391755