frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
21.02k stars 7.21k forks source link

Maintain Same Rate in Selling not working #43059

Open casesolved-co-uk opened 1 month ago

casesolved-co-uk commented 1 month ago

Information about bug

There have been several bugs raised and fixes implemented to try to fix "Maintain Same Rate" Settings but none of them actually address the issue, which is major.

The problem is that validation of a transaction triggers set_missing_values in the Accounts Controller.

https://github.com/frappe/erpnext/blob/5442487b6c6b88cbc9364d7304a97ab8afdb13be/erpnext/controllers/accounts_controller.py#L180

This effectively triggers recalculation of the whole document including running pricing rules. So if, for example, you have imported lines from various Sales Orders to a Delivery Note, the whole Delivery Note will be recalculated. This includes manually modified lines. So if there are pricing rules or price lists, the document changes. Then your Sales Invoice is also wrong.

So what needs to happen is this:

To reproduce:

@deepeshgarg007 @tundebabzy @rohitwaghchaure @rtdany10 @Nihantra-Patel

Related:

40159

https://github.com/frappe/erpnext/pull/32923 https://github.com/frappe/erpnext/issues/35528 https://github.com/frappe/erpnext/issues/35485

Module

accounts, buying, selling

Version

ERPNext v13 onwards

Installation method

None

Relevant log output / Stack trace / Full Error Message.

No response

garyhyam commented 3 days ago

This is having a huge impact for us too. It would be helpful to have some idea of a timeframe for when this is likely to be fixed?