Commit 4aa72de6 authored by Aurel's avatar Aurel

fix way to pass kw parameter to method


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30890 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0239f919
...@@ -45,7 +45,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): ...@@ -45,7 +45,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix):
meta_type = 'ERP5 Invoice Transaction Rule' meta_type = 'ERP5 Invoice Transaction Rule'
portal_type = 'Invoice Transaction Rule' portal_type = 'Invoice Transaction Rule'
add_permission = Permissions.AddPortalContent add_permission = Permissions.AddPortalContent
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) security.declareObjectProtected(Permissions.AccessContentsInformation)
...@@ -152,7 +152,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): ...@@ -152,7 +152,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix):
These previsions are acrually returned as dictionaries. These previsions are acrually returned as dictionaries.
""" """
if self._isBPM(): if self._isBPM():
return self._generatePrevisionListBPM(applied_rule, *kw) return self._generatePrevisionListBPM(applied_rule, **kw)
prevision_list = [] prevision_list = []
context_movement = applied_rule.getParentValue() context_movement = applied_rule.getParentValue()
...@@ -267,7 +267,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): ...@@ -267,7 +267,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix):
for movement_id in delete_list: for movement_id in delete_list:
applied_rule._delObject(movement_id) applied_rule._delObject(movement_id)
for movement, prop_dict in modify_dict.items(): for movement, prop_dict in modify_dict.items():
applied_rule[movement].edit(**prop_dict) applied_rule[movement].edit(**prop_dict)
...@@ -315,10 +315,10 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): ...@@ -315,10 +315,10 @@ class InvoiceTransactionRule(Rule, PredicateMatrix):
new_mvmt.setSourceTotalAssetPrice(round( new_mvmt.setSourceTotalAssetPrice(round(
source_exchange_ratio*applied_rule.getParentValue().getTotalPrice(), source_exchange_ratio*applied_rule.getParentValue().getTotalPrice(),
precision)) precision))
# Pass to base class # Pass to base class
Rule.expand(self, applied_rule, force=force, **kw) Rule.expand(self, applied_rule, force=force, **kw)
# Matrix related # Matrix related
security.declareProtected( Permissions.ModifyPortalContent, security.declareProtected( Permissions.ModifyPortalContent,
'newCellContent' ) 'newCellContent' )
...@@ -329,7 +329,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): ...@@ -329,7 +329,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix):
self.invokeFactory(type_name=portal_type, id=id) self.invokeFactory(type_name=portal_type, id=id)
new_cell = self.get(id) new_cell = self.get(id)
return new_cell return new_cell
security.declareProtected(Permissions.ModifyPortalContent, 'solve') security.declareProtected(Permissions.ModifyPortalContent, 'solve')
def solve(self, applied_rule, solution_list): def solve(self, applied_rule, solution_list):
""" """
...@@ -359,13 +359,13 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): ...@@ -359,13 +359,13 @@ class InvoiceTransactionRule(Rule, PredicateMatrix):
# """ # """
# Returns 1 if divergent rule # Returns 1 if divergent rule
# """ # """
# #
# security.declareProtected(Permissions.View, 'getDivergenceList') # security.declareProtected(Permissions.View, 'getDivergenceList')
# def getDivergenceList(self, applied_rule): # def getDivergenceList(self, applied_rule):
# """ # """
# Returns a list Divergence descriptors # Returns a list Divergence descriptors
# """ # """
# #
# security.declareProtected(Permissions.View, 'getSolverList') # security.declareProtected(Permissions.View, 'getSolverList')
# def getSolverList(self, applied_rule): # def getSolverList(self, applied_rule):
# """ # """
......
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