mergify[bot] 88a36a800a fix: block disabled/frozen party on Opportunity and Request for Quotation (backport #57983) (#58034)
* fix: block disabled/frozen customers on Opportunity

Opportunity inherits TransactionBase instead of AccountsController, so
it never ran validate_party_frozen_disabled like Quotation, Sales Order
and Sales Invoice do. A disabled Customer could be saved as an
Opportunity's party and only get caught later at Quotation stage.

Also fixes the party_name Link query on the client: it referenced
erpnext.queries.customer, which was never defined, so disabled
customers showed up in the picker.

(cherry picked from commit 90937ce6d9)

# Conflicts:
#	erpnext/crm/doctype/opportunity/test_opportunity.py

* fix: block disabled/frozen suppliers on Request for Quotation

Request for Quotation overrides validate() entirely and never calls
super().validate(), so it never goes through AccountsController's
party validation. Suppliers also sit in a child table, so the shared
PartyValidator wouldn't have caught it anyway (it only checks a single
top-level party field). A disabled or frozen Supplier could be added
to an RFQ and the RFQ submitted without any warning.

Also filters the suppliers grid's supplier Link field to disabled=0,
matching the same client-side fix applied to Opportunity's party_name.

(cherry picked from commit 4bf65ffc1d)

# Conflicts:
#	erpnext/buying/doctype/request_for_quotation/request_for_quotation.py
#	erpnext/buying/doctype/request_for_quotation/test_request_for_quotation.py

* fix: scope Opportunity party validation to Customer only

validate_party_frozen_disabled only enforces Customer/Supplier/Employee,
so passing opportunity_from straight through silently no-op'd for Lead
and Prospect. Made the Customer-only scope explicit instead of relying
on that implicit fallthrough.

Lead.disabled is not enforced anywhere else in the codebase (lead_query,
the picker used for this same field, only filters status/docstatus), so
deliberately not extending validation to Lead-sourced Opportunities.

(cherry picked from commit 8c0a945417)

* refactor: move RFQ supplier disabled filter to link_filters

Static filters with no doc-dependent values belong on the field
definition, not in JS. Matches the existing pattern used for
Warehouse/Item link_filters elsewhere (e.g. job_card_item.json,
product_bundle_item.json).

(cherry picked from commit 6b35c51ff1)

* fix: resolve backport conflicts for disabled/frozen party validation

The automated backport left unresolved merge conflict markers committed
in request_for_quotation.py, test_request_for_quotation.py and
test_opportunity.py. Also fixes validate_party_frozen_disabled being
called with 3 args here, this branch's version only takes
(party_type, party_name), unlike develop's (company, party_type, party_name).

Dropped test_duplicate_supplier_rejected, test_rfq_blocked_for_supplier_with_prevent_rfqs
and test_rfq_status_lifecycle from the conflict resolution, they don't exist on
this branch and aren't part of this backport.

---------

Co-authored-by: Jatin3128 <jatinsarna8@gmail.com>
2026-08-19 16:58:21 +05:30
2022-03-30 12:36:09 +05:30
2023-11-16 12:18:47 +05:30
2018-07-19 17:47:04 +05:30
2017-07-01 21:35:10 +05:30
2021-03-17 20:06:35 +05:30

ERPNext

ERP made simple

CI UI Open Source Helpers codecov docker pulls

https://erpnext.com

ERPNext as a monolith includes the following areas for managing businesses:

  1. Accounting
  2. Warehouse Management
  3. CRM
  4. Sales
  5. Purchase
  6. HRMS
  7. Project Management
  8. Support
  9. Asset Management
  10. Quality Management
  11. Manufacturing
  12. Website Management
  13. Customize ERPNext
  14. And More

ERPNext is built on the Frappe Framework, a full-stack web app framework built with Python & JavaScript.

Installation

Login for the PWD site: (username: Administrator, password: admin)

Containerized Installation

Use docker to deploy ERPNext in production or for development of Frappe apps. See https://github.com/frappe/frappe_docker for more details.

Manual Install

The Easy Way: our install script for bench will install all dependencies (e.g. MariaDB). See https://github.com/frappe/bench for more details.

New passwords will be created for the ERPNext "Administrator" user, the MariaDB root user, and the frappe user (the script displays the passwords and saves them to ~/frappe_passwords.txt).

Learning and community

  1. Frappe School - Learn Frappe Framework and ERPNext from the various courses by the maintainers or from the community.
  2. Official documentation - Extensive documentation for ERPNext.
  3. Discussion Forum - Engage with community of ERPNext users and service providers.
  4. Telegram Group - Get instant help from huge community of users.

Contributing

  1. Issue Guidelines
  2. Report Security Vulnerabilities
  3. Pull Request Requirements
  4. Translations

License

GNU/General Public License (see license.txt)

The ERPNext code is licensed as GNU General Public License (v3) and the Documentation is licensed as Creative Commons (CC-BY-SA-3.0) and the copyright is owned by Frappe Technologies Pvt Ltd (Frappe) and Contributors.

By contributing to ERPNext, you agree that your contributions will be licensed under its GNU General Public License (v3).

Logo and Trademark Policy

Please read our Logo and Trademark Policy.

Languages
Python 78.8%
JavaScript 14.2%
TypeScript 4.7%
HTML 1.8%
SCSS 0.3%
Other 0.2%