Merge branch 'develop' into project-refresh

This commit is contained in:
Shivam Mishra
2020-05-19 11:54:50 +05:30
committed by GitHub
116 changed files with 2513 additions and 1854 deletions

View File

@@ -47,9 +47,7 @@ class TestCompany(unittest.TestCase):
frappe.delete_doc("Company", "COA from Existing Company")
def test_coa_based_on_country_template(self):
countries = ["India", "Brazil", "United Arab Emirates", "Canada", "Germany", "France",
"Guatemala", "Indonesia", "Italy", "Mexico", "Nicaragua", "Netherlands", "Singapore",
"Brazil", "Argentina", "Hungary", "Taiwan"]
countries = ["Canada", "Germany", "France"]
for country in countries:
templates = get_charts_for_country(country)

View File

@@ -3,8 +3,6 @@
from __future__ import unicode_literals
import frappe
from frappe.utils import flt
from frappe import _
@@ -14,6 +12,7 @@ class Territory(NestedSet):
nsm_parent_field = 'parent_territory'
def validate(self):
for d in self.get('targets') or []:
if not flt(d.target_qty) and not flt(d.target_amount):
frappe.throw(_("Either target qty or target amount is mandatory"))