From 4aa72de62b14cf9f3c484dd835636a66625ed194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Calonne?= <aurel@nexedi.com> Date: Fri, 27 Nov 2009 14:24:32 +0000 Subject: [PATCH] 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 --- product/ERP5/Document/InvoiceTransactionRule.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/product/ERP5/Document/InvoiceTransactionRule.py b/product/ERP5/Document/InvoiceTransactionRule.py index 29478a139e..2c379cdced 100644 --- a/product/ERP5/Document/InvoiceTransactionRule.py +++ b/product/ERP5/Document/InvoiceTransactionRule.py @@ -45,7 +45,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): meta_type = 'ERP5 Invoice Transaction Rule' portal_type = 'Invoice Transaction Rule' add_permission = Permissions.AddPortalContent - + # Declarative security security = ClassSecurityInfo() security.declareObjectProtected(Permissions.AccessContentsInformation) @@ -152,7 +152,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): These previsions are acrually returned as dictionaries. """ if self._isBPM(): - return self._generatePrevisionListBPM(applied_rule, *kw) + return self._generatePrevisionListBPM(applied_rule, **kw) prevision_list = [] context_movement = applied_rule.getParentValue() @@ -267,7 +267,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): for movement_id in delete_list: applied_rule._delObject(movement_id) - + for movement, prop_dict in modify_dict.items(): applied_rule[movement].edit(**prop_dict) @@ -315,10 +315,10 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): new_mvmt.setSourceTotalAssetPrice(round( source_exchange_ratio*applied_rule.getParentValue().getTotalPrice(), precision)) - + # Pass to base class Rule.expand(self, applied_rule, force=force, **kw) - + # Matrix related security.declareProtected( Permissions.ModifyPortalContent, 'newCellContent' ) @@ -329,7 +329,7 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): self.invokeFactory(type_name=portal_type, id=id) new_cell = self.get(id) return new_cell - + security.declareProtected(Permissions.ModifyPortalContent, 'solve') def solve(self, applied_rule, solution_list): """ @@ -359,13 +359,13 @@ class InvoiceTransactionRule(Rule, PredicateMatrix): # """ # Returns 1 if divergent rule # """ -# +# # security.declareProtected(Permissions.View, 'getDivergenceList') # def getDivergenceList(self, applied_rule): # """ # Returns a list Divergence descriptors # """ -# +# # security.declareProtected(Permissions.View, 'getSolverList') # def getSolverList(self, applied_rule): # """ -- 2.30.9