[Minor]Change to maintain args ordering convention

This commit is contained in:
shreyas
2016-01-26 14:56:52 +05:30
committed by Anand Doshi
parent 79872bf62c
commit eba9ca4d66
3 changed files with 5 additions and 5 deletions

View File

@@ -417,15 +417,15 @@ class AccountsController(TransactionBase):
def validate_party(self):
party_type, party = self.get_party()
validate_party_frozen_disabled(party, party_type)
validate_party_frozen_disabled(party_type, party)
def get_party(self):
party_type = None
if self.doctype in ("Opportunity", "Quotation", "Sales Order", "Delivery Note", "Sales Invoice"):
party_type = 'Customer'
party_type = 'Customer'
elif self.doctype in ("Supplier Quotation", "Purchase Order", "Purchase Receipt", "Purchase Invoice"):
party_type = 'Supplier'
party_type = 'Supplier'
elif self.meta.get_field("customer"):
party_type = "Customer"