Commit cfd4b786 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

In Invoice Simulation Rule, source should be source_administration of the...

In Invoice Simulation Rule, source should be source_administration of the input movement or its order's source. Same for destination.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34722 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7098929f
...@@ -74,6 +74,19 @@ class InvoicingRule(Rule): ...@@ -74,6 +74,19 @@ class InvoicingRule(Rule):
def isDeliverable(self, movement): def isDeliverable(self, movement):
return movement.getResource() is not None return movement.getResource() is not None
def _getExpandablePropertyUpdateDict(self, applied_rule, movement,
business_path, current_property_dict):
"""
In Invoice Simulation Rule, source should be source_administration
of the input movement or its order's source. Same for destination.
"""
root_simulation_movement = movement.getRootSimulationMovement()
source = movement.getSourceAdministration() or \
root_simulation_movement.getSource()
destination = movement.getDestinationAdministration() or \
root_simulation_movement.getDestination()
return {'source':source, 'destination':destination}
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getExpandablePropertyList') 'getExpandablePropertyList')
def getExpandablePropertyList(self, default=None): def getExpandablePropertyList(self, default=None):
......
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