[impact] Limit available functions in jinja environment

This commit is contained in:
Anand Doshi
2014-07-25 12:50:00 +05:30
parent a5437cdac1
commit 62b1cbf003
8 changed files with 22 additions and 19 deletions

View File

@@ -4,7 +4,7 @@
from __future__ import unicode_literals
import frappe
from frappe import _, msgprint
from frappe.utils import flt, _round
from frappe.utils import flt, rounded
from erpnext.setup.utils import get_company_currency
from erpnext.accounts.party import get_party_details
@@ -118,10 +118,10 @@ class BuyingController(StockController):
self.precision("total_tax"))
if self.meta.get_field("rounded_total"):
self.rounded_total = _round(self.grand_total)
self.rounded_total = rounded(self.grand_total)
if self.meta.get_field("rounded_total_import"):
self.rounded_total_import = _round(self.grand_total_import)
self.rounded_total_import = rounded(self.grand_total_import)
if self.meta.get_field("other_charges_added"):
self.other_charges_added = flt(sum([flt(d.tax_amount) for d in self.tax_doclist