Skip to content

[FIX] stock_by_warehouse_sale: prevent singleton error in warehouse stock compute T#98915#1733

Open
rolandojduartem wants to merge 1 commit into
Vauxoo:17.0from
vauxoo-dev:17.0-stock_by_warehouse_sale-fix_lints-t98915-dev-rolando
Open

[FIX] stock_by_warehouse_sale: prevent singleton error in warehouse stock compute T#98915#1733
rolandojduartem wants to merge 1 commit into
Vauxoo:17.0from
vauxoo-dev:17.0-stock_by_warehouse_sale-fix_lints-t98915-dev-rolando

Conversation

@rolandojduartem
Copy link
Copy Markdown
Contributor

Problem

When processing multiple sale order lines at once (e.g., during bulk creation, updates, or imports), a singleton error is raised, preventing the user from completing the action.

Root Cause

In _compute_warehouse_stock of the sale.order.line model, the warehouse_id assignment incorrectly referenced the active recordset self (e.g., self.order_id.warehouse_id) inside the for record in self: loop instead of using the single loop variable record.

Fix

  • Corrected the reference to use the loop variable record (i.e., record.warehouse_id = record.order_id.warehouse_id).
  • Cleaned up redundant and deprecated keys (demo, test, installable, auto_install) from the module manifest.
  • Related Task: T#98915

…tock compute

Fix a multi-record issue in _compute_warehouse_stock where 'self' was
incorrectly referenced instead of the loop variable 'record' when
assigning warehouse_id. This prevented correct evaluation and raised
singleton errors on multi-line actions.

Additionally, remove redundant empty/default keys from the manifest.
@rolandojduartem
Copy link
Copy Markdown
Contributor Author

@luisg123v done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant