Skip to content

feat: stock transfer implementation#12

Merged
Ramees-k merged 2 commits into
mainfrom
new_task_stock_1
Apr 12, 2026
Merged

feat: stock transfer implementation#12
Ramees-k merged 2 commits into
mainfrom
new_task_stock_1

Conversation

@NehaFathimap
Copy link
Copy Markdown
Collaborator

No description provided.

@Ramees-k Ramees-k merged commit 3f56383 into main Apr 12, 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