fix: add transaction_date in field_no_map when creating PO from SQ (backport #47257) (#47313)

* fix: add transaction_date in field_no_map when creating PO from SQ

(cherry picked from commit 3790c6c551)

* fix: test case

(cherry picked from commit acd1529780)

# Conflicts:
#	erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py

* fix: remove unused import

(cherry picked from commit 9e640341fd)

# Conflicts:
#	erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py

* chore: fix conflicts

* chore: remove unused imports

---------

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
This commit is contained in:
mergify[bot]
2025-04-29 12:40:10 +05:30
committed by GitHub
parent 7bc39349b0
commit afb67f1f0c
2 changed files with 3 additions and 1 deletions

View File

@@ -234,6 +234,7 @@ def make_purchase_order(source_name, target_doc=None):
{
"Supplier Quotation": {
"doctype": "Purchase Order",
"field_no_map": ["transaction_date"],
"validation": {
"docstatus": ["=", 1],
},

View File

@@ -4,6 +4,7 @@
import frappe
from frappe.tests.utils import FrappeTestCase
from frappe.utils import add_days, today
class TestPurchaseOrder(FrappeTestCase):
@@ -25,7 +26,7 @@ class TestPurchaseOrder(FrappeTestCase):
for doc in po.get("items"):
if doc.get("item_code"):
doc.set("schedule_date", "2013-04-12")
doc.set("schedule_date", add_days(today(), 1))
po.insert()