Commit a58cfc67 authored by Jérome Perrin's avatar Jérome Perrin

use service instead of tax, trade model line instead of tax model line and add

TODOs for features not yet covered with new model


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28518 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ad14d590
......@@ -58,8 +58,8 @@ class TestOpenOrder(ERP5TypeTestCase):
id='taxable',
portal_type='Category',
title='Taxable')
tax = self.portal.tax_module.newContent(
portal_type='Tax',
tax = self.portal.service_module.newContent(
portal_type='Service',
title='VAT',
base_contribution='base_amount/taxable')
client = self.portal.organisation_module.newContent(
......@@ -95,10 +95,10 @@ class TestOpenOrder(ERP5TypeTestCase):
destination=client.getRelativeUrl(),
destination_section=client.getRelativeUrl(),
)
main_trade_condition.newContent(portal_type='Tax Model Line',
main_trade_condition.newContent(portal_type='Trade Model Line',
title='VAT',
base_application='base_amount/taxable',
efficiency=0.05)
price=0.05)
main_trade_condition.newContent(portal_type='Sale Supply Line',
resource=internet_connection.getRelativeUrl(),
priced_quantity=1,
......@@ -249,7 +249,8 @@ class TestOpenOrder(ERP5TypeTestCase):
self.assertEqual(open_sale_order_line.getPrice(), 100)
self.assertEqual(open_sale_order.getTotalPrice(), 100)
self.assertEqual(open_sale_order.getTotalNetPrice(), 105)
# TODO: test equivalent feature with trade model line
# self.assertEqual(open_sale_order.getTotalNetPrice(), 105)
open_sale_order.setForecastingTermDayCount(5)
open_sale_order.order()
......@@ -426,7 +427,8 @@ class TestOpenOrder(ERP5TypeTestCase):
sale_order_list[0].objectValues(portal_type='Sale Order Line')[0].getTitle(),
'Bread Delivery Serivce')
self.assertEqual(sale_order_list[0].getTotalPrice(), 10)
self.assertEqual(sale_order_list[0].getTotalNetPrice(), 10.5)
# TODO: test equivalent feature with trade model line
# self.assertEqual(sale_order_list[0].getTotalNetPrice(), 10.5)
# The second order is piano lesson.
self.assertEqual(
......@@ -436,7 +438,8 @@ class TestOpenOrder(ERP5TypeTestCase):
sale_order_list[1].objectValues(portal_type='Sale Order Line')[0].getTitle(),
'Piano Lesson')
self.assertEqual(sale_order_list[1].getTotalPrice(), 100)
self.assertEqual(sale_order_list[1].getTotalNetPrice(), 105)
# TODO: test equivalent feature with trade model line
#self.assertEqual(sale_order_list[1].getTotalNetPrice(), 105)
def test_suite():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment