[fix] apply Tax Rule for lead

This commit is contained in:
Anand Doshi
2016-04-08 17:36:10 +05:30
parent 79a415e3b8
commit 2f957f27b0
5 changed files with 73 additions and 34 deletions

View File

@@ -299,8 +299,12 @@ def set_taxes(party, party_type, posting_date, company, customer_group=None, sup
else:
args.update(get_party_details(party, party_type))
if party_type=="Customer":
if party_type in ("Customer", "Lead"):
args.update({"tax_type": "Sales"})
if party_type=='Lead':
args['customer'] = None
del args['lead']
else:
args.update({"tax_type": "Purchase"})