Merge pull request #45692 from mihir-kandoi/st30672

fix: fetch rate from item price list when document is saved
This commit is contained in:
rohitwaghchaure
2025-02-05 15:52:37 +05:30
committed by GitHub
3 changed files with 75 additions and 1 deletions

View File

@@ -823,6 +823,9 @@ class AccountsController(TransactionBase):
and item.get("use_serial_batch_fields")
)
):
if fieldname == "batch_no" and not item.batch_no:
item.set("rate", ret.get("rate"))
item.set("price_list_rate", ret.get("price_list_rate"))
item.set(fieldname, value)
elif fieldname in ["cost_center", "conversion_factor"] and not item.get(