[Erp5-report] r20614 - /erp5/trunk/products/ERP5/tests/testInvoice.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Apr 17 15:40:18 CEST 2008
Author: jerome
Date: Thu Apr 17 15:40:17 2008
New Revision: 20614
URL: http://svn.erp5.org?rev=20614&view=rev
Log:
update test, now that Tax Rule is always applied
Modified:
erp5/trunk/products/ERP5/tests/testInvoice.py
Modified: erp5/trunk/products/ERP5/tests/testInvoice.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testInvoice.py?rev=20614&r1=20613&r2=20614&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testInvoice.py (original)
+++ erp5/trunk/products/ERP5/tests/testInvoice.py Thu Apr 17 15:40:17 2008
@@ -268,7 +268,6 @@
packing_list = sequence.get('packing_list')
self.assertEquals(packing_list.getSimulationState(), 'cancelled')
-
def modifyInvoiceState(self, transition_name,
sequence,invoice=None):
""" calls the workflow for the invoice """
@@ -448,9 +447,10 @@
invoice_transaction_rule_list = []
for order_rule in order_rule_list :
for order_simulation_movement in order_rule.objectValues() :
- temp_invoicing_rule_list = order_simulation_movement.objectValues()
+ temp_invoicing_rule_list = [ar for ar in order_simulation_movement.objectValues()
+ if ar.getSpecialiseValue().getPortalType() == 'Invoicing Rule']
self.assertEquals(len(temp_invoicing_rule_list), 1)
- invoicing_rule_list.extend(order_simulation_movement.objectValues())
+ invoicing_rule_list.extend(temp_invoicing_rule_list)
sequence.edit(invoicing_rule_list=invoicing_rule_list)
invoicing_rule = invoicing_rule_list[0]
sequence.edit(invoicing_rule = invoicing_rule)
@@ -960,7 +960,7 @@
rule_dict = {
'Order Rule': {
'movement_type_list': ['Sale Packing List Line', 'Sale Packing List Cell'],
- 'next_rule_list': ['Invoicing Rule'],
+ 'next_rule_list': ['Invoicing Rule', 'Tax Rule'],
},
'Invoicing Rule': {
'movement_type_list': invoice.getPortalInvoiceMovementTypeList(),
More information about the Erp5-report
mailing list