fix sales order and pricing rule failing tests
This commit is contained in:
parent
99849f8eab
commit
951092eecd
@ -256,6 +256,7 @@ class TestPricingRule(unittest.TestCase):
|
||||
make_pricing_rule(selling=1, margin_type="Percentage", margin_rate_or_amount=10)
|
||||
si = create_sales_invoice(do_not_save=True)
|
||||
si.items[0].price_list_rate = 1000
|
||||
si.payment_schedule = []
|
||||
si.insert(ignore_permissions=True)
|
||||
|
||||
item = si.items[0]
|
||||
@ -264,6 +265,7 @@ class TestPricingRule(unittest.TestCase):
|
||||
|
||||
# With discount
|
||||
item.discount_percentage = 10
|
||||
si.payment_schedule = []
|
||||
si.save()
|
||||
item = si.items[0]
|
||||
self.assertEquals(item.rate, 990)
|
||||
|
@ -526,6 +526,8 @@ class TestSalesOrder(unittest.TestCase):
|
||||
|
||||
self.assertEquals(new_so.get("items")[0].rate, flt((price_list_rate*25)/100 + price_list_rate))
|
||||
new_so.items[0].margin_rate_or_amount = 25
|
||||
new_so.payment_schedule = []
|
||||
new_so.save()
|
||||
new_so.submit()
|
||||
|
||||
self.assertEquals(new_so.get("items")[0].rate, flt((price_list_rate*25)/100 + price_list_rate))
|
||||
@ -564,6 +566,10 @@ def make_sales_order(**args):
|
||||
so.insert()
|
||||
if not args.do_not_submit:
|
||||
so.submit()
|
||||
else:
|
||||
so.payment_schedule = []
|
||||
else:
|
||||
so.payment_schedule = []
|
||||
|
||||
return so
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user