Jatin3128 228ab2d97e fix: keep source rate on re-fetch when maintain same rate is enabled (backport #57479) (#58332)
* fix: keep source rate on re-fetch when maintain same rate is enabled (backport #57479)

With "maintain same rate" on, re-fetching item details on a row mapped from a
source document (e.g. a Purchase Order) pulled the latest Item Price, giving a
rate the document can never be saved with. Skip the price list fetch for such
rows and keep the source rate, both for a single-row re-fetch and the bulk
apply_price_list path (price list / party / conversion rate change).

The rate is read from the linked source row in the database (not the mutable
target row) and permission-checked against the source document, so an unsaved
edit can't lock in a different rate and a crafted request can't disclose
another document's pricing.

Fixes frappe/erpnext#57436

* fix: resolve linter findings in get_item_details

Add missing type hints on the whitelisted get_item_details
signature and rename maintain_same_rate_enabled's sole "args"
parameter, both flagged by the semgrep security/code-quality
rules. Also drops an extra blank line that ruff-format rejected.

* fix: widen get_item_details doc type hint to include Document

accounts_controller.py calls get_item_details(args, self, ...)
during validate, passing the transaction Document itself, not
a dict/JSON string. The narrower hint tripped Frappe's runtime
argument type validation on every whitelisted call with a live
Document, failing test-record creation across the suite.
2026-08-26 13:14:25 +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%