Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Mukul
erp5
Commits
5e375564
Commit
5e375564
authored
Dec 06, 2011
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate method with plural in name.
Update all known callers to use the new method.
parent
9ebccc8b
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
39 additions
and
41 deletions
+39
-41
bt5/erp5_archive/SkinTemplateItem/portal_skins/erp5_archive/Archive_createInventory.xml
...tem/portal_skins/erp5_archive/Archive_createInventory.xml
+13
-12
bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/counter_date_workflow/scripts/openAllCounter.xml
...workflow/counter_date_workflow/scripts/openAllCounter.xml
+1
-1
bt5/erp5_payment_mean/SkinTemplateItem/portal_skins/erp5_payment_mean/PaymentTransactionGroup_cancel.xml
...kins/erp5_payment_mean/PaymentTransactionGroup_cancel.xml
+1
-1
bt5/erp5_payment_mean/SkinTemplateItem/portal_skins/erp5_payment_mean/PaymentTransactionLine_setAggregate.xml
...erp5_payment_mean/PaymentTransactionLine_setAggregate.xml
+1
-1
product/CMFActivity/ActiveObject.py
product/CMFActivity/ActiveObject.py
+7
-2
product/CMFActivity/ActiveProcess.py
product/CMFActivity/ActiveProcess.py
+1
-1
product/CMFActivity/tests/testCMFActivity.py
product/CMFActivity/tests/testCMFActivity.py
+1
-1
product/ERP5/Document/AcceptSolver.py
product/ERP5/Document/AcceptSolver.py
+1
-2
product/ERP5/Document/AdoptSolver.py
product/ERP5/Document/AdoptSolver.py
+1
-2
product/ERP5/Document/ItemListSplitSolver.py
product/ERP5/Document/ItemListSplitSolver.py
+1
-2
product/ERP5/Document/QuantitySplitSolver.py
product/ERP5/Document/QuantitySplitSolver.py
+1
-2
product/ERP5/Document/TradeModelSolver.py
product/ERP5/Document/TradeModelSolver.py
+2
-4
product/ERP5/Document/UnifySolver.py
product/ERP5/Document/UnifySolver.py
+2
-4
product/ERP5/TargetSolver/SplitAndDefer.py
product/ERP5/TargetSolver/SplitAndDefer.py
+1
-1
product/ERP5/TargetSolver/SplitQuantity.py
product/ERP5/TargetSolver/SplitQuantity.py
+1
-1
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_setNewIdPerBundle.xml
...tem/portal_skins/erp5_core/ERP5Site_setNewIdPerBundle.xml
+1
-1
product/ERP5Type/CopySupport.py
product/ERP5Type/CopySupport.py
+1
-1
product/ERP5Type/ERP5Type.py
product/ERP5Type/ERP5Type.py
+2
-2
No files found.
bt5/erp5_archive/SkinTemplateItem/portal_skins/erp5_archive/Archive_createInventory.xml
View file @
5e375564
...
...
@@ -77,6 +77,7 @@ if len(payment_uid_list):\n
\n
inventory_module = context.getPortalObject().archive_inventory_module\n
node_inventory_dict = {}\n
activate_kw = {"tag": tag}\n
for inventory in node_inventory_list:\n
# Do only one inventory per node\n
if not node_inventory_dict.has_key(inventory.node_relative_url):\n
...
...
@@ -84,21 +85,21 @@ for inventory in node_inventory_list:\n
inv = inventory_module.newContent(portal_type="Archive Inventory",\n
destination=inventory.node_relative_url,\n
start_date = date,\n
activate_kw =
{"tag" : tag}
,\n
activate_kw =
activate_kw
,\n
reindex_kw = {"sql_catalog_id" : destination_sql_catalog_id})\n
node_inventory_dict[inventory.node_relative_url] = inv\n
else:\n
inv = node_inventory_dict[inventory.node_relative_url]\n
\n
inv.setDefaultActivateParameter
s(tag=tag
)\n
inv.setDefaultActivateParameter
Dict(activate_kw
)\n
inv.setDefaultReindexParameters(sql_catalog_id=destination_sql_catalog_id)\n
# Create one line per resource\n
inv_line = inv.newContent(portal_type = "Archive Inventory Line",\n
resource=inventory.resource_relative_url,\n
destination_section=inventory.section_relative_url,\n
activate_kw =
{"tag" : tag}
,\n
activate_kw =
activate_kw
,\n
reindex_kw = {"sql_catalog_id" : destination_sql_catalog_id})\n
inv_line.setDefaultActivateParameter
s(tag=tag
)\n
inv_line.setDefaultActivateParameter
Dict(activate_kw
)\n
inv_line.setDefaultReindexParameters(sql_catalog_id=destination_sql_catalog_id)\n
# This is a hack so that price is now and not at reindexing part\n
inv_line.getPrice()\n
...
...
@@ -118,7 +119,7 @@ for inventory in node_inventory_list:\n
inv_line.setVariationCategoryList(variation_category_list)\n
context.log("construct cell", "base %s, %s" %(base_category_list,variation_category_list))\n
base_id = "movement"\n
line_kwd = {\'base_id\':base_id, "activate_kw":
{"tag":tag}
}\n
line_kwd = {\'base_id\':base_id, "activate_kw":
activate_kw
}\n
inv_line.updateCellRange(script_id=\'CashDetail_asCellRange\', base_id=base_id)\n
# create cell\n
cell_range_key_list = inv_line.getCellRangeKeyList(base_id=base_id)\n
...
...
@@ -126,7 +127,7 @@ for inventory in node_inventory_list:\n
for k in cell_range_key_list:\n
category_list = filter(lambda k_item: k_item is not None, k)\n
cell = inv_line.newCell(*k, **line_kwd)\n
cell.setDefaultActivateParameter
s(tag=tag
)\n
cell.setDefaultActivateParameter
Dict(activate_kw
)\n
cell.setDefaultReindexParameters(sql_catalog_id=destination_sql_catalog_id)\n
\n
mapped_value_list = [\'price\', \'quantity\']\n
...
...
@@ -141,7 +142,7 @@ for inventory in node_inventory_list:\n
\n
# deliver all inventory\n
for inv in node_inventory_dict.values(): \n
inv.setDefaultActivateParameter
s(tag=tag
)\n
inv.setDefaultActivateParameter
Dict(activate_kw
)\n
inv.setDefaultReindexParameters(sql_catalog_id=destination_sql_catalog_id)\n
inv.deliver()\n
\n
...
...
@@ -158,21 +159,21 @@ for inventory in payment_inventory_list:\n
destination=inventory.node_relative_url,\n
destination_payment_uid=inventory.payment_uid,\n
start_date = date,\n
activate_kw =
{"tag" : tag}
,\n
activate_kw =
activate_kw
,\n
reindex_kw = {"sql_catalog_id" : destination_sql_catalog_id})\n
payment_inventory_dict[inventory.payment_uid] = inv\n
else:\n
inv = payment_inventory_dict[inventory.payment_uid]\n
\n
inv.setDefaultActivateParameter
s(tag=tag
)\n
inv.setDefaultActivateParameter
Dict(activate_kw
)\n
inv.setDefaultReindexParameters(sql_catalog_id=destination_sql_catalog_id)\n
# Create one line per resource\n
inv_line = inv.newContent(portal_type = "Archive Inventory Line",\n
resource=inventory.resource_relative_url,\n
destination_section=inventory.section_relative_url,\n
activate_kw =
{"tag" : tag}
,\n
activate_kw =
activate_kw
,\n
reindex_kw = {"sql_catalog_id" : destination_sql_catalog_id})\n
inv_line.setDefaultActivateParameter
s(tag=tag
)\n
inv_line.setDefaultActivateParameter
Dict(activate_kw
)\n
inv_line.setDefaultReindexParameters(sql_catalog_id=destination_sql_catalog_id)\n
inv_line.edit(quantity=inventory.total_quantity)\n
# This is a hack so that price is now and not at reindexing part\n
...
...
@@ -181,7 +182,7 @@ for inventory in payment_inventory_list:\n
\n
# deliver all inventory\n
for inv in payment_inventory_dict.values(): \n
inv.setDefaultActivateParameter
s(tag=tag
)\n
inv.setDefaultActivateParameter
Dict(activate_kw
)\n
inv.setDefaultReindexParameters(sql_catalog_id=destination_sql_catalog_id)\n
inv.deliver()\n
...
...
bt5/erp5_banking_core/WorkflowTemplateItem/portal_workflow/counter_date_workflow/scripts/openAllCounter.xml
View file @
5e375564
...
...
@@ -69,7 +69,7 @@ activity_tag = \'%s_CounterDay\' % (site_uid, )\n
if context.getPortalObject().portal_activities.countMessageWithTag(activity_tag) != 0:\n
msg = Message(domain=\'ui\',message="Sorry, there is a pending counter date opening, please retry later")\n
raise ValidationFailed (msg,)\n
counter_date.setDefaultActivateParameter
s(tag=activity_tag
)\n
counter_date.setDefaultActivateParameter
Dict({'tag': activity_tag}
)\n
counter_date_list = [x.getObject() for x in counter_date.portal_catalog(portal_type=\'Counter Date\',site_uid=site_uid,simulation_state=\'open\')]\n
for other_counter in counter_date_list:\n
if other_counter.getUid()!=counter_date.getUid():\n
...
...
bt5/erp5_payment_mean/SkinTemplateItem/portal_skins/erp5_payment_mean/PaymentTransactionGroup_cancel.xml
View file @
5e375564
...
...
@@ -54,7 +54,7 @@
return\n
\n
for payment_transaction_line in context.getAggregateRelatedValueList():\n
payment_transaction_line.setDefaultActivateParameter
s(tag=tag
)\n
payment_transaction_line.setDefaultActivateParameter
Dict({"tag": tag}
)\n
payment_transaction_line.setAggregate(None)\n
</string>
</value>
</item>
...
...
bt5/erp5_payment_mean/SkinTemplateItem/portal_skins/erp5_payment_mean/PaymentTransactionLine_setAggregate.xml
View file @
5e375564
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
context.setDefaultActivateParameter
s(activate_kw=activate_kw
)\n
<value>
<string>
context.setDefaultActivateParameter
Dict({"activate_kw": activate_kw}
)\n
context.setAggregate(aggregate)\n
</string>
</value>
</item>
...
...
product/CMFActivity/ActiveObject.py
View file @
5e375564
...
...
@@ -154,7 +154,7 @@ class ActiveObject(ExtensionClass.Base):
if
path
:
return
self
.
unrestrictedTraverse
(
path
)
def
setDefaultActivateParamete
rs
(
self
,
placeless
=
False
,
**
kw
):
def
setDefaultActivateParamete
Dict
(
self
,
parameter_dict
,
placeless
=
False
):
# This method sets the default keyword parameters to activate. This is
# useful when you need to specify special parameters implicitly (e.g. to
# reindexObject).
...
...
@@ -163,7 +163,12 @@ class ActiveObject(ExtensionClass.Base):
key
=
(
_DEFAULT_ACTIVATE_PARAMETER_KEY
,
)
else
:
key
=
(
_DEFAULT_ACTIVATE_PARAMETER_KEY
,
id
(
aq_base
(
self
)))
tv
[
key
]
=
kw
tv
[
key
]
=
parameter_dict
.
copy
()
def
setDefaultActivateParameters
(
self
,
placeless
=
False
,
**
kw
):
warnings
.
warn
(
'setDefaultActivateParameters is deprecated in favour of '
'setDefaultActivateParameteDict.'
,
DeprecationWarning
)
self
.
setDefaultActivateParameteDict
(
kw
,
placeless
=
placeless
)
def
getDefaultActivateParameterDict
(
self
,
inherit_placeless
=
True
):
# This method returns default activate parameters to self.
...
...
product/CMFActivity/ActiveProcess.py
View file @
5e375564
...
...
@@ -44,7 +44,7 @@ def addActiveProcess(self, id, title='', REQUEST=None, activate_kw=None, **kw):
"""
o
=
ActiveProcess
(
id
)
if
activate_kw
is
not
None
:
o
.
__of__
(
self
).
setDefaultActivateParameter
s
(
**
activate_kw
)
o
.
__of__
(
self
).
setDefaultActivateParameter
Dict
(
activate_kw
)
o
.
uid
=
self
.
portal_catalog
.
newUid
()
self
.
_setObject
(
id
,
o
)
o
=
self
.
_getOb
(
id
)
...
...
product/CMFActivity/tests/testCMFActivity.py
View file @
5e375564
...
...
@@ -526,7 +526,7 @@ class TestCMFActivity(ERP5TypeTestCase, LogInterceptor):
self
.
tic
()
self
.
assertEquals
(
o
.
getTitle
(),
'b'
)
o
.
setDefaultActivateParameter
s
(
tag
=
'toto'
)
o
.
setDefaultActivateParameter
Dict
({
'tag'
:
'toto'
}
)
def
titi
(
self
):
self
.
setCorporateName
(
self
.
getTitle
()
+
'd'
)
o
.
__class__
.
titi
=
titi
...
...
product/ERP5/Document/AcceptSolver.py
View file @
5e375564
...
...
@@ -70,8 +70,7 @@ class AcceptSolver(SolverMixin, ConfigurableMixin, XMLObject):
solved_property_list
=
portal_type
.
getTestedPropertyList
()
for
simulation_movement
in
self
.
getDeliveryValueList
():
if
activate_kw
is
not
None
:
simulation_movement
.
setDefaultActivateParameters
(
activate_kw
=
activate_kw
,
**
activate_kw
)
simulation_movement
.
setDefaultActivateParameterDict
(
activate_kw
)
movement
=
simulation_movement
.
getDeliveryValue
()
value_dict
=
{}
base_category_set
=
set
(
movement
.
getBaseCategoryList
())
...
...
product/ERP5/Document/AdoptSolver.py
View file @
5e375564
...
...
@@ -74,8 +74,7 @@ class AdoptSolver(SolverMixin, ConfigurableMixin, XMLObject):
[]).
append
(
simulation_movement
)
for
movement
,
simulation_movement_list
in
delivery_dict
.
iteritems
():
if
activate_kw
is
not
None
:
movement
.
setDefaultActivateParameters
(
activate_kw
=
activate_kw
,
**
activate_kw
)
movement
.
setDefaultActivateParameterDict
(
activate_kw
)
for
solved_property
in
solved_property_list
:
# XXX hardcoded
if
solved_property
==
'quantity'
:
...
...
product/ERP5/Document/ItemListSplitSolver.py
View file @
5e375564
...
...
@@ -139,8 +139,7 @@ class ItemListSplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
new_movement
.
setQuantity
(
total_quantity
)
if
activate_kw
is
not
None
:
new_movement
.
setDefaultActivateParameters
(
activate_kw
=
activate_kw
,
**
activate_kw
)
new_movement
.
setDefaultActivateParameterDict
(
activate_kw
)
start_date
=
configuration_dict
.
get
(
'start_date'
,
None
)
if
start_date
is
not
None
:
new_movement
.
recordProperty
(
'start_date'
)
...
...
product/ERP5/Document/QuantitySplitSolver.py
View file @
5e375564
...
...
@@ -98,8 +98,7 @@ class QuantitySplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
'quantity'
:
split_quantity
})
new_movement
=
applied_rule
.
newContent
(
activate_kw
=
activate_kw
,
**
kw
)
if
activate_kw
is
not
None
:
new_movement
.
setDefaultActivateParameters
(
activate_kw
=
activate_kw
,
**
activate_kw
)
new_movement
.
setDefaultActivateParameterDict
(
activate_kw
)
start_date
=
configuration_dict
.
get
(
'start_date'
,
None
)
if
start_date
is
not
None
:
new_movement
.
recordProperty
(
'start_date'
)
...
...
product/ERP5/Document/TradeModelSolver.py
View file @
5e375564
...
...
@@ -99,8 +99,7 @@ class TradeModelSolver(AcceptSolver):
continue
for
simulation_movement
in
simulation_movement_list
:
if
activate_kw
is
not
None
:
simulation_movement
.
setDefaultActivateParameters
(
activate_kw
=
activate_kw
,
**
activate_kw
)
simulation_movement
.
setDefaultActivateParameterDict
(
activate_kw
)
value_dict
=
{}
for
solved_property
in
solved_property_list
:
new_value
=
movement
.
getProperty
(
solved_property
)
...
...
@@ -119,8 +118,7 @@ class TradeModelSolver(AcceptSolver):
# XXX non-linear case is not yet supported.
for
movement
in
trade_model_related_movement_list
:
if
activate_kw
is
not
None
:
movement
.
setDefaultActivateParameters
(
activate_kw
=
activate_kw
,
**
activate_kw
)
movement
.
setDefaultActivateParameterDict
(
activate_kw
)
for
solved_property
in
solved_property_list
:
if
solved_property
==
'quantity'
:
simulation_movement_list
=
movement
.
getDeliveryRelatedValueList
()
...
...
product/ERP5/Document/UnifySolver.py
View file @
5e375564
...
...
@@ -114,14 +114,12 @@ class UnifySolver(AcceptSolver):
solved_property
,
))
if
activate_kw
is
not
None
:
movement
.
setDefaultActivateParameters
(
activate_kw
=
activate_kw
,
**
activate_kw
)
movement
.
setDefaultActivateParameterDict
(
activate_kw
)
new_value
=
configuration_dict
.
get
(
'value'
)
movement
.
setProperty
(
solved_property
,
new_value
)
for
simulation_movement
in
simulation_movement_set
:
if
activate_kw
is
not
None
:
simulation_movement
.
setDefaultActivateParameters
(
activate_kw
=
activate_kw
,
**
activate_kw
)
simulation_movement
.
setDefaultActivateParameterDict
(
activate_kw
)
value_dict
=
{
solved_property
:
new_value
}
for
property_id
,
value
in
value_dict
.
iteritems
():
if
not
simulation_movement
.
isPropertyRecorded
(
property_id
):
...
...
product/ERP5/TargetSolver/SplitAndDefer.py
View file @
5e375564
...
...
@@ -92,7 +92,7 @@ class SplitAndDefer(CopyToTarget):
new_movement
.
activate
(
**
self
.
additional_parameters
).
expand
()
# adopt new quantity on original simulation movement
simulation_movement
.
edit
(
quantity
=
new_movement_quantity
)
simulation_movement
.
setDefaultActivateParameter
s
(
**
self
.
activate_kw
)
simulation_movement
.
setDefaultActivateParameter
Dict
(
self
.
activate_kw
)
simulation_movement
.
activate
(
**
self
.
additional_parameters
).
expand
()
# SplitAndDefer solves the divergence at the current level, no need to
...
...
product/ERP5/TargetSolver/SplitQuantity.py
View file @
5e375564
...
...
@@ -71,7 +71,7 @@ class SplitQuantity(CopyToTarget):
new_movement
.
recordProperty
(
'stop_date'
)
new_movement
.
edit
(
start_date
=
self
.
start_date
,
stop_date
=
self
.
stop_date
)
simulation_movement
.
setDefaultActivateParameter
s
(
**
self
.
activate_kw
)
simulation_movement
.
setDefaultActivateParameter
Dict
(
self
.
activate_kw
)
simulation_movement
.
edit
(
quantity
=
(
simulation_movement
.
getQuantity
()
-
self
.
quantity
)
*
simulation_movement
.
getDeliveryRatio
()
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_setNewIdPerBundle.xml
View file @
5e375564
...
...
@@ -56,7 +56,7 @@ method = getattr(context, method)\n
for id in id_list:\n
ob = folder.get(id)\n
new_id = method(ob)\n
ob.setDefaultActivateParameter
s(**
activate_kw)\n
ob.setDefaultActivateParameter
Dict(
activate_kw)\n
ob.setId(new_id)\n
</string>
</value>
</item>
...
...
product/ERP5Type/CopySupport.py
View file @
5e375564
...
...
@@ -143,7 +143,7 @@ class CopyContainer:
activate_kw
[
"after_tag"
]
=
str
(
uid
)
except
TypeError
:
activate_kw
=
{
"after_tag"
:
str
(
uid
),}
obj
.
setDefaultActivateParameter
s
(
**
activate_kw
)
obj
.
setDefaultActivateParameter
Dict
(
activate_kw
)
for
sub_obj
in
obj
.
objectValues
():
self
.
_recursiveSetActivityAfterTag
(
sub_obj
,
activate_kw
)
...
...
product/ERP5Type/ERP5Type.py
View file @
5e375564
...
...
@@ -381,9 +381,9 @@ class ERP5TypeInformation(XMLObject,
ob
.
manage_setLocalRoles
(
user_id
,
[
'Owner'
])
else
:
if
activate_kw
is
not
None
:
ob
.
setDefaultActivateParameter
s
(
**
activate_kw
)
ob
.
setDefaultActivateParameter
Dict
(
activate_kw
)
if
reindex_kw
is
not
None
:
ob
.
setDefaultReindexParameter
s
(
**
reindex_kw
)
ob
.
setDefaultReindexParameter
Dict
(
reindex_kw
)
if
is_indexable
is
not
None
:
base_ob
.
isIndexable
=
is_indexable
container
.
_setObject
(
id
,
base_ob
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment