Skip to content

feat: filter company warehouse in stock transfer#11

Merged
siva-enfono merged 1 commit into
mainfrom
task_rmax_123
Apr 8, 2026
Merged

feat: filter company warehouse in stock transfer#11
siva-enfono merged 1 commit into
mainfrom
task_rmax_123

Conversation

@NehaFathimap
Copy link
Copy Markdown
Collaborator

No description provided.

@NehaFathimap NehaFathimap requested a review from siva-enfono April 8, 2026 11:35
@NehaFathimap NehaFathimap changed the title feat: filtere company warehouse in stock transfer feat: filter company warehouse in stock transfer Apr 8, 2026
@siva-enfono siva-enfono merged commit f5be177 into main Apr 8, 2026
1 of 3 checks passed
sayanthns added a commit that referenced this pull request May 1, 2026
… gaps

Audit findings #11 + #12.

#11: Stock Entry list view was unfiltered — Branch Users with read on
Stock Entry could see every company's stock entries (cross-branch
leakage). Add `stock_entry_permission_query` to branch_filters.py:
filters by header from_warehouse / to_warehouse OR per-row
s_warehouse / t_warehouse against branch warehouse list, with owner
fallback. Wired in hooks.permission_query_conditions.

#12: Branch Users hit "Not Permitted" when opening a Sales Invoice /
Purchase Invoice / Purchase Receipt whose set_warehouse defaults to a
global warehouse outside their branch (e.g. "Stores - <abbr>"). Same
failure mode that was already fixed for Quotation + Delivery Note.
Adding ten new Property Setters with ignore_user_permissions=1:

  - Sales Invoice.set_warehouse
  - Sales Invoice Item.warehouse / .cost_center
  - Purchase Invoice.set_warehouse
  - Purchase Invoice Item.warehouse / .cost_center
  - Purchase Receipt.set_warehouse
  - Purchase Receipt Item.warehouse / .cost_center / .rejected_warehouse

Each registered in hooks.fixtures filter list.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

2 participants