Frappe

Cloud

Marketplace

Company Global Filter

Frappe

Products

Insights

Company Global Filter
A comprehensive Frappe/ERPNext application that automatically applies company-level filters across all doctypes.

Supported versions

Version 15

Categories

Free
Utility

E-Commerce

About

A comprehensive Frappe/ERPNext application that automatically applies company-level filters across all doctypes to ensure users only see records relevant to their assigned company.

Overview

Company Global Filter automatically applies company-level security filters across your entire ERPNext instance. This ensures that users only see and interact with records that belong to their assigned company, simplifying multi-company management and improving data security.

Features

🔒 Global Company Filtering

  • Automatic Permission Filtering: Applies company filters to all doctypes with company fields

  • Session-based Company Selection: Users can switch between companies they have access to

  • Multi-company Support: Perfect for organizations managing multiple companies in one ERPNext instance

🎯 Smart Detection

  • Automatically detects doctypes with company or custom_company fields

  • Skips system doctypes to prevent performance issues

  • Fallback mechanisms to ensure system stability

👤 User-Friendly Interface

  • Company selector in navbar for quick switching

  • Visual indication of current company

  • Search functionality within company dropdown

🔧 Technical Features

  • Overrides core Frappe methods (search_link, getdoc) for seamless integration

  • Permission query conditions for database-level filtering

  • Robust error handling to prevent system crashes

Configuration

User Default Company

Set default company for users via:

  • User Document: Set default company in user master

  • Session Defaults: Users can switch companies via navbar dropdown

Doctype Requirements

The app automatically filters doctypes that have:

  • A standard company field (type: Link, options: Company)

  • A custom custom_company field (type: Link, options: Company)

Usage

For End Users

  • Company Selection: Use the company dropdown in the navbar to switch between companies

  • Automatic Filtering: All lists, reports, and searches will automatically filter by selected company

  • Visual Feedback: The navbar displays the currently active company

For Administrators

  • User Management: Ensure each user has appropriate company access

  • Doctype Setup: Verify company fields exist in relevant doctypes

  • Troubleshooting: Check error logs for any permission issues

API Methods

get_company_list()

Returns list of all companies accessible to the current user.

set_selected_company(company)

Sets the user's selected company in session.

get_selected_company()

Returns the user's currently selected company information.

clear_selected_company()

Clears the user's selected company from session.

get_permission_query_conditions(user, doctype)

Applies company filters to permission queries (automatically used by Frappe).

Technical Implementation

Overridden Methods

  • search_link: Applies company filters to link field searches

  • getdoc: Validates company permissions when loading documents

  • Permission System: Adds company conditions to all SQL queries

Security Features

  • Database-level filtering prevents unauthorized data access

  • Graceful error handling maintains system stability

  • Session-based company validation

Support

For issues and feature requests, contact:

License

MIT License

User Reviews

No reviews yet, be the first to review.

0.0

0 rating

Rate and share your experience

Text

Explore more apps