From 9080221d46b74e78238ec8a170a68949b0b81aef Mon Sep 17 00:00:00 2001 From: NahuelOperto Date: Mon, 14 Jan 2019 12:12:56 -0300 Subject: [PATCH] fix: added test cases --- .../doctype/quotation/test_quotation.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py index e79d46ae3f..909442af2f 100644 --- a/erpnext/selling/doctype/quotation/test_quotation.py +++ b/erpnext/selling/doctype/quotation/test_quotation.py @@ -31,6 +31,26 @@ class TestQuotation(unittest.TestCase): self.assertFalse(sales_order.get('payment_schedule')) + def test_make_sales_order_with_different_currency(self): + from erpnext.selling.doctype.quotation.quotation import make_sales_order + + quotation = frappe.copy_doc(test_records[0]) + quotation.transaction_date = nowdate() + quotation.valid_till = add_months(quotation.transaction_date, 1) + quotation.insert() + quotation.submit() + + sales_order = make_sales_order(quotation.name) + sales_order.currency = "USD" + sales_order.conversion_rate = 20.0 + sales_order.delivery_date = "2019-01-01" + sales_order.naming_series = "_T-Quotation-" + sales_order.transaction_date = nowdate() + sales_order.insert() + + self.assertEquals(sales_order.currency, "USD") + self.assertNotEqual(sales_order.currency, quotation.currency) + def test_make_sales_order(self): from erpnext.selling.doctype.quotation.quotation import make_sales_order