[minor] removed test case for party multi-currency validation, since party multi-currency is now based on account
This commit is contained in:
		
							parent
							
								
									da98ab6f3c
								
							
						
					
					
						commit
						248c867a2c
					
				| @ -11,8 +11,7 @@ from frappe.utils import add_days, getdate, formatdate, get_first_day, date_diff | ||||
| from erpnext.utilities.doctype.address.address import get_address_display | ||||
| from erpnext.utilities.doctype.contact.contact import get_contact_details | ||||
| 
 | ||||
| class InvalidCurrency(frappe.ValidationError): pass | ||||
| class InvalidAccountCurrency(frappe.ValidationError): pass | ||||
| class DuplicatePartyAccountError(frappe.ValidationError): pass | ||||
| 
 | ||||
| @frappe.whitelist() | ||||
| def get_party_details(party=None, account=None, party_type="Customer", company=None, | ||||
| @ -197,7 +196,8 @@ def validate_party_accounts(doc): | ||||
| 
 | ||||
| 	for account in doc.get("accounts"): | ||||
| 		if account.company in companies: | ||||
| 			frappe.throw(_("There can only be 1 Account per Company in {0} {1}").format(doc.doctype, doc.name)) | ||||
| 			frappe.throw(_("There can only be 1 Account per Company in {0} {1}").format(doc.doctype, doc.name), | ||||
| 				DuplicatePartyAccountError) | ||||
| 		else: | ||||
| 			companies.append(account.company) | ||||
| 
 | ||||
|  | ||||
| @ -8,8 +8,6 @@ import unittest | ||||
| 
 | ||||
| from frappe.test_runner import make_test_records | ||||
| from erpnext.controllers.accounts_controller import CustomerFrozen | ||||
| from erpnext.accounts.party import InvalidCurrency | ||||
| from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice | ||||
| 
 | ||||
| test_ignore = ["Price List"] | ||||
| 
 | ||||
| @ -80,13 +78,3 @@ class TestCustomer(unittest.TestCase): | ||||
| 		frappe.db.set_value("Customer", "_Test Customer", "is_frozen", 0) | ||||
| 
 | ||||
| 		so.save() | ||||
| 		 | ||||
| 	def test_multi_currency(self): | ||||
| 		customer = frappe.get_doc("Customer", "_Test Customer USD") | ||||
| 		 | ||||
| 		create_sales_invoice(customer="_Test Customer USD", debit_to="_Test Receivable USD - _TC",  | ||||
| 			currency="USD", conversion_rate=50) | ||||
| 		 | ||||
| 		customer.party_account_currency = "EUR" | ||||
| 		self.assertRaises(InvalidCurrency, customer.save) | ||||
| 		 | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user