Fixes in Test Cases
This commit is contained in:
parent
d7cc47e3ac
commit
93fdc670fe
@ -28,6 +28,11 @@ test_records = [
|
||||
"doctype": "Applicable Territory",
|
||||
"parentfield": "valid_for_territories",
|
||||
"territory": "All Territories"
|
||||
},
|
||||
{
|
||||
"doctype": "Applicable Territory",
|
||||
"parentfield": "valid_for_territories",
|
||||
"territory": "_Test Territory Rest Of The World"
|
||||
}
|
||||
],
|
||||
[
|
||||
@ -121,7 +126,7 @@ test_records = [
|
||||
[
|
||||
{
|
||||
"doctype": "Sales Taxes and Charges Master",
|
||||
"title": "_Test Sales Taxes and Charges Master 2",
|
||||
"title": "_Test Sales Taxes and Charges Master - Rest of the World",
|
||||
"company": "_Test Company"
|
||||
},
|
||||
{
|
||||
@ -143,7 +148,7 @@ test_records = [
|
||||
{
|
||||
"doctype": "Applicable Territory",
|
||||
"parentfield": "valid_for_territories",
|
||||
"territory": "All Territories"
|
||||
"territory": "_Test Territory Rest Of The World"
|
||||
}
|
||||
],
|
||||
]
|
@ -36,6 +36,7 @@ test_records = [
|
||||
{
|
||||
"doctype": "Shipping Rule",
|
||||
"label": "_Test Shipping Rule",
|
||||
"name": "_Test Shipping Rule",
|
||||
"calculate_based_on": "Net Total",
|
||||
"company": "_Test Company",
|
||||
"account": "_Test Account Shipping Charges - _TC",
|
||||
@ -66,5 +67,77 @@ test_records = [
|
||||
"parentfield": "valid_for_territories",
|
||||
"territory": "_Test Territory"
|
||||
}
|
||||
]
|
||||
],
|
||||
[
|
||||
{
|
||||
"doctype": "Shipping Rule",
|
||||
"name": "_Test Shipping Rule - India",
|
||||
"label": "_Test Shipping Rule - India",
|
||||
"calculate_based_on": "Net Total",
|
||||
"company": "_Test Company",
|
||||
"account": "_Test Account Shipping Charges - _TC",
|
||||
"cost_center": "_Test Cost Center - _TC"
|
||||
},
|
||||
{
|
||||
"doctype": "Shipping Rule Condition",
|
||||
"parentfield": "shipping_rule_conditions",
|
||||
"from_value": 0,
|
||||
"to_value": 100,
|
||||
"shipping_amount": 50.0
|
||||
},
|
||||
{
|
||||
"doctype": "Shipping Rule Condition",
|
||||
"parentfield": "shipping_rule_conditions",
|
||||
"from_value": 101,
|
||||
"to_value": 200,
|
||||
"shipping_amount": 100.0
|
||||
},
|
||||
{
|
||||
"doctype": "Shipping Rule Condition",
|
||||
"parentfield": "shipping_rule_conditions",
|
||||
"from_value": 201,
|
||||
"shipping_amount": 0.0
|
||||
},
|
||||
{
|
||||
"doctype": "Applicable Territory",
|
||||
"parentfield": "valid_for_territories",
|
||||
"territory": "_Test Territory India"
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"doctype": "Shipping Rule",
|
||||
"name": "_Test Shipping Rule - Rest of the World",
|
||||
"label": "_Test Shipping Rule - Rest of the World",
|
||||
"calculate_based_on": "Net Total",
|
||||
"company": "_Test Company",
|
||||
"account": "_Test Account Shipping Charges - _TC",
|
||||
"cost_center": "_Test Cost Center - _TC"
|
||||
},
|
||||
{
|
||||
"doctype": "Shipping Rule Condition",
|
||||
"parentfield": "shipping_rule_conditions",
|
||||
"from_value": 0,
|
||||
"to_value": 1000,
|
||||
"shipping_amount": 500.0
|
||||
},
|
||||
{
|
||||
"doctype": "Shipping Rule Condition",
|
||||
"parentfield": "shipping_rule_conditions",
|
||||
"from_value": 1001,
|
||||
"to_value": 2000,
|
||||
"shipping_amount": 1000.0
|
||||
},
|
||||
{
|
||||
"doctype": "Shipping Rule Condition",
|
||||
"parentfield": "shipping_rule_conditions",
|
||||
"from_value": 2001,
|
||||
"shipping_amount": 1500.0
|
||||
},
|
||||
{
|
||||
"doctype": "Applicable Territory",
|
||||
"parentfield": "valid_for_territories",
|
||||
"territory": "_Test Territory Rest Of The World"
|
||||
}
|
||||
],
|
||||
]
|
@ -370,7 +370,7 @@ def rename_account_for(dt, olddn, newdn, merge, company):
|
||||
webnotes.conn.set_value("Account", new_account or old_account, "master_name", newdn)
|
||||
|
||||
def add_abbr_if_missing(dn, company):
|
||||
from setup.doctype.company.company import get_name_with_abbr
|
||||
from ..setup.doctype.company.company import get_name_with_abbr
|
||||
return get_name_with_abbr(dn, company)
|
||||
|
||||
def get_account_for(account_for_doctype, account_for):
|
||||
|
@ -22,7 +22,7 @@ test_records = [
|
||||
}],
|
||||
[{
|
||||
"doctype": "Territory",
|
||||
"territory_name": "_Test Territory Rest of the World",
|
||||
"territory_name": "_Test Territory Rest Of The World",
|
||||
"parent_territory": "All Territories",
|
||||
"is_group": "No",
|
||||
}],
|
||||
|
@ -32,7 +32,7 @@ test_records = [
|
||||
{
|
||||
"doctype": "Applicable Territory",
|
||||
"parentfield": "valid_for_territories",
|
||||
"territory": "_Test Territory Rest of the World"
|
||||
"territory": "_Test Territory Rest Of The World"
|
||||
}
|
||||
],
|
||||
[
|
||||
@ -60,7 +60,7 @@ test_records = [
|
||||
{
|
||||
"doctype": "Applicable Territory",
|
||||
"parentfield": "valid_for_territories",
|
||||
"territory": "_Test Territory Rest of the World"
|
||||
"territory": "_Test Territory Rest Of The World"
|
||||
},
|
||||
{
|
||||
"doctype": "Applicable Territory",
|
||||
|
@ -44,6 +44,7 @@ class DocType():
|
||||
webnotes.conn.set(self.doc, "email_sent", 1)
|
||||
|
||||
def get_recipients(self):
|
||||
self.email_field = None
|
||||
if self.doc.send_to_type=="Contact":
|
||||
self.send_to_doctype = "Contact"
|
||||
if self.doc.contact_type == "Customer":
|
||||
|
Loading…
x
Reference in New Issue
Block a user