[Erp5-report] r18470 - /erp5/trunk/products/ERP5/Document/InvoicingRule.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Dec 21 12:00:22 CET 2007
Author: alex
Date: Fri Dec 21 12:00:21 2007
New Revision: 18470
URL: http://svn.erp5.org?rev=18470&view=rev
Log:
Moved source_section and source_destination verification to the rule test
method.
Modified:
erp5/trunk/products/ERP5/Document/InvoicingRule.py
Modified: erp5/trunk/products/ERP5/Document/InvoicingRule.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/InvoicingRule.py?rev=18470&r1=18469&r2=18470&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/InvoicingRule.py (original)
+++ erp5/trunk/products/ERP5/Document/InvoicingRule.py Fri Dec 21 12:00:21 2007
@@ -86,23 +86,12 @@
# XXX Isn't it better to share the code with expand method
context_movement = applied_rule.getParentValue()
- # Do not invoice within the same entity or whenever entities are not all
- # defined.
- # It could be OK to invoice within different entities of the same
- # company if we wish to get some internal analytical accounting but that
- # requires some processing to produce a balance sheet.
- source_section = context_movement.getSourceSection()
- destination_section = context_movement.getDestinationSection()
- if source_section == destination_section or source_section is None \
- or destination_section is None:
- return []
-
# XXX Harcoded list
invoice_line = {
'source': context_movement.getSource(),
- 'source_section': source_section,
+ 'source_section': context_movement.getSourceSection(),
'destination': context_movement.getDestination(),
- 'destination_section': destination_section,
+ 'destination_section': context_movement.getDestinationSection(),
'start_date': context_movement.getStartDate(),
'stop_date': context_movement.getStopDate(),
'resource': context_movement.getResource(),
More information about the Erp5-report
mailing list