Commit 04fd9190 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use a Project not a Organisatino for source_project or destination_project values.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30181 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 62ed7bef
...@@ -426,6 +426,9 @@ class TestInvoice(TestInvoiceMixin): ...@@ -426,6 +426,9 @@ class TestInvoice(TestInvoiceMixin):
portal_type='Organisation', portal_type='Organisation',
title='Other Entity', title='Other Entity',
price_currency=currency.getRelativeUrl()) price_currency=currency.getRelativeUrl())
other_project = self.portal.project_module.newContent(
portal_type='Project',
title='Other Project')
order.plan() order.plan()
transaction.commit() transaction.commit()
self.tic() self.tic()
...@@ -497,18 +500,18 @@ class TestInvoice(TestInvoiceMixin): ...@@ -497,18 +500,18 @@ class TestInvoice(TestInvoiceMixin):
self.assertEquals(other_entity, self.assertEquals(other_entity,
invoice_movement.getDestinationDecisionValue()) invoice_movement.getDestinationDecisionValue())
order_line.setSourceProjectValue(other_entity) order_line.setSourceProjectValue(other_project)
transaction.commit() transaction.commit()
self.tic() self.tic()
invoice_movement = invoice_applied_rule.contentValues()[0] invoice_movement = invoice_applied_rule.contentValues()[0]
self.assertEquals(other_entity, self.assertEquals(other_project,
invoice_movement.getSourceProjectValue()) invoice_movement.getSourceProjectValue())
order_line.setDestinationProjectValue(other_entity) order_line.setDestinationProjectValue(other_project)
transaction.commit() transaction.commit()
self.tic() self.tic()
invoice_movement = invoice_applied_rule.contentValues()[0] invoice_movement = invoice_applied_rule.contentValues()[0]
self.assertEquals(other_entity, self.assertEquals(other_project,
invoice_movement.getDestinationProjectValue()) invoice_movement.getDestinationProjectValue())
order_line.setSourcePaymentValue(other_entity) order_line.setSourcePaymentValue(other_entity)
...@@ -620,6 +623,9 @@ class TestInvoice(TestInvoiceMixin): ...@@ -620,6 +623,9 @@ class TestInvoice(TestInvoiceMixin):
portal_type='Organisation', portal_type='Organisation',
title='Other Entity', title='Other Entity',
default_address_region=self.default_region) default_address_region=self.default_region)
other_project = self.portal.project_module.newContent(
portal_type='Project',
title='Other Project')
order.plan() order.plan()
transaction.commit() transaction.commit()
self.tic() self.tic()
...@@ -700,22 +706,22 @@ class TestInvoice(TestInvoiceMixin): ...@@ -700,22 +706,22 @@ class TestInvoice(TestInvoiceMixin):
self.assertEquals(other_entity, self.assertEquals(other_entity,
invoice_transaction_movement.getDestinationDecisionValue()) invoice_transaction_movement.getDestinationDecisionValue())
order_line.setSourceProjectValue(other_entity) order_line.setSourceProjectValue(other_project)
transaction.commit() transaction.commit()
self.tic() self.tic()
self.assertEquals(3, len(invoice_transaction_applied_rule)) self.assertEquals(3, len(invoice_transaction_applied_rule))
invoice_transaction_movement = getIncomeSimulationMovement( invoice_transaction_movement = getIncomeSimulationMovement(
invoice_transaction_applied_rule) invoice_transaction_applied_rule)
self.assertEquals(other_entity, self.assertEquals(other_project,
invoice_transaction_movement.getSourceProjectValue()) invoice_transaction_movement.getSourceProjectValue())
order_line.setDestinationProjectValue(other_entity) order_line.setDestinationProjectValue(other_project)
transaction.commit() transaction.commit()
self.tic() self.tic()
self.assertEquals(3, len(invoice_transaction_applied_rule)) self.assertEquals(3, len(invoice_transaction_applied_rule))
invoice_transaction_movement = getIncomeSimulationMovement( invoice_transaction_movement = getIncomeSimulationMovement(
invoice_transaction_applied_rule) invoice_transaction_applied_rule)
self.assertEquals(other_entity, self.assertEquals(other_project,
invoice_transaction_movement.getDestinationProjectValue()) invoice_transaction_movement.getDestinationProjectValue())
order_line.setSourceFunctionValue(other_entity) order_line.setSourceFunctionValue(other_entity)
......
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