[fix] [minor] is_pos zero when mapping

This commit is contained in:
Nabin Hait 2013-09-05 17:38:24 +05:30
parent 272410bb87
commit 63b5ef7ecf
2 changed files with 7 additions and 1 deletions

View File

@ -357,7 +357,12 @@ def make_delivery_note(source_name, target_doclist=None):
return [d.fields for d in doclist]
@webnotes.whitelist()
def make_sales_invoice(source_name, target_doclist=None):
def make_sales_invoice(source_name, target_doclist=None):
def set_missing_values(source, target):
bean = webnotes.bean(target)
bean.doc.is_pos = 0
bean.run_method("onload_post_render")
def update_item(obj, target, source_parent):
target.export_amount = flt(obj.export_amount) - flt(obj.billed_amt)
target.amount = target.export_amount * flt(source_parent.conversion_rate)

View File

@ -387,6 +387,7 @@ def make_sales_invoice(source_name, target_doclist=None):
def update_accounts(source, target):
si = webnotes.bean(target)
si.doc.is_pos = 0
si.run_method("onload_post_render")
si.set_doclist(si.doclist.get({"parentfield": ["!=", "entries"]}) +