Commit 33e5c203 authored by Kevin Deldycke's avatar Kevin Deldycke

* Update z_catalog_stock_list ZSQL method to follow Seb's changes.

* Add Baobab_getPortalReferenceCurrencyID script to get the default currency.
* Change reference to getPortalReferenceCurrencyID portal method. Use Baobab_getPortalReferenceCurrencyID instead.
* Add a hack in Baobab_getUserAssignmentList to support old and new person module id.
* Add CashDelivery document.
* Clean portal_classes.
* Change the acquisition_portal_type_list attribute on base category 'site' from "'[]'" to "python: []".
* Delete deprecated ERP5Type_initLocalRoleMapping_* objects.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4771 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent abf81ec6
......@@ -277,10 +277,42 @@ WHERE\n
<dtml-if "isMovement[loop_item]">\n
<dtml-if "getResourceUid[loop_item]">\n
<dtml-if "getBaobabDestinationUid[loop_item]">\n
<dtml-call expr="row_list.append([uid[loop_item], getBaobabDestinationUid[loop_item], getBaobabDestinationSectionUid[loop_item], getDestinationPaymentUid[loop_item], getDestinationFunctionUid[loop_item], getDestinationProjectUid[loop_item], getBaobabSourceSectionUid[loop_item], getResourceUid[loop_item], getInventoriatedQuantity[loop_item], getStopDate[loop_item], getPrice[loop_item], isAccountable[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getVariationText[loop_item]])">\n
<dtml-call expr="row_list.append([ uid[loop_item]\n
, getBaobabDestinationUid[loop_item]\n
, getBaobabDestinationSectionUid[loop_item]\n
, getDestinationPaymentUid[loop_item]\n
, getDestinationFunctionUid[loop_item]\n
, getDestinationProjectUid[loop_item]\n
, getBaobabSourceSectionUid[loop_item]\n
, getBaobabSourceUid[loop_item]\n
, getResourceUid[loop_item]\n
, getInventoriatedQuantity[loop_item]\n
, getStopDate[loop_item]\n
, getPrice[loop_item]\n
, isAccountable[loop_item]\n
, getPortalType[loop_item]\n
, getSimulationState[loop_item]\n
, getVariationText[loop_item]\n
])">\n
</dtml-if>\n
<dtml-if "getBaobabSourceUid[loop_item]">\n
<dtml-call expr="row_list.append([uid[loop_item], getBaobabSourceUid[loop_item], getBaobabSourceSectionUid[loop_item], getSourcePaymentUid[loop_item], getSourceFunctionUid[loop_item], getSourceProjectUid[loop_item], getBaobabDestinationSectionUid[loop_item], getResourceUid[loop_item], -getInventoriatedQuantity[loop_item], getStartDate[loop_item], getPrice[loop_item], isAccountable[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getVariationText[loop_item]])">\n
<dtml-call expr="row_list.append([ uid[loop_item]\n
, getBaobabSourceUid[loop_item]\n
, getBaobabSourceSectionUid[loop_item]\n
, getSourcePaymentUid[loop_item]\n
, getSourceFunctionUid[loop_item]\n
, getSourceProjectUid[loop_item]\n
, getBaobabDestinationSectionUid[loop_item]\n
, getBaobabDestinationUid[loop_item]\n
, getResourceUid[loop_item]\n
, -(getInventoriatedQuantity[loop_item] or 0)\n
, getStartDate[loop_item]\n
, getPrice[loop_item]\n
, isAccountable[loop_item]\n
, getPortalType[loop_item]\n
, getSimulationState[loop_item]\n
, getVariationText[loop_item]\n
])">\n
</dtml-if>\n
</dtml-if>\n
</dtml-if>\n
......@@ -299,14 +331,15 @@ VALUES\n
<dtml-sqlvar expr="row_item[4]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[5]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[6]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[7]" type="int">, \n
<dtml-sqlvar expr="row_item[8]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[9]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[10]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[11]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[12]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[7]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[8]" type="int">,\n
<dtml-sqlvar expr="row_item[9]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[10]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[11]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[12]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[13]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[14]" type="string" optional>\n
<dtml-sqlvar expr="row_item[14]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[15]" type="string" optional>\n
)\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n
......@@ -365,10 +398,42 @@ WHERE\n
<dtml-if "isMovement[loop_item]">\n
<dtml-if "getResourceUid[loop_item]">\n
<dtml-if "getBaobabDestinationUid[loop_item]">\n
<dtml-call expr="row_list.append([uid[loop_item], getBaobabDestinationUid[loop_item], getBaobabDestinationSectionUid[loop_item], getDestinationPaymentUid[loop_item], getDestinationFunctionUid[loop_item], getDestinationProjectUid[loop_item], getBaobabSourceSectionUid[loop_item], getResourceUid[loop_item], getInventoriatedQuantity[loop_item], getStopDate[loop_item], getPrice[loop_item], isAccountable[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getVariationText[loop_item]])">\n
<dtml-call expr="row_list.append([ uid[loop_item]\n
, getBaobabDestinationUid[loop_item]\n
, getBaobabDestinationSectionUid[loop_item]\n
, getDestinationPaymentUid[loop_item]\n
, getDestinationFunctionUid[loop_item]\n
, getDestinationProjectUid[loop_item]\n
, getBaobabSourceSectionUid[loop_item]\n
, getBaobabSourceUid[loop_item]\n
, getResourceUid[loop_item]\n
, getInventoriatedQuantity[loop_item]\n
, getStopDate[loop_item]\n
, getPrice[loop_item]\n
, isAccountable[loop_item]\n
, getPortalType[loop_item]\n
, getSimulationState[loop_item]\n
, getVariationText[loop_item]\n
])">\n
</dtml-if>\n
<dtml-if "getBaobabSourceUid[loop_item]">\n
<dtml-call expr="row_list.append([uid[loop_item], getBaobabSourceUid[loop_item], getBaobabSourceSectionUid[loop_item], getSourcePaymentUid[loop_item], getSourceFunctionUid[loop_item], getSourceProjectUid[loop_item], getBaobabDestinationSectionUid[loop_item], getResourceUid[loop_item], -getInventoriatedQuantity[loop_item], getStartDate[loop_item], getPrice[loop_item], isAccountable[loop_item], getPortalType[loop_item], getSimulationState[loop_item], getVariationText[loop_item]])">\n
<dtml-call expr="row_list.append([ uid[loop_item]\n
, getBaobabSourceUid[loop_item]\n
, getBaobabSourceSectionUid[loop_item]\n
, getSourcePaymentUid[loop_item]\n
, getSourceFunctionUid[loop_item]\n
, getSourceProjectUid[loop_item]\n
, getBaobabDestinationSectionUid[loop_item]\n
, getBaobabDestinationUid[loop_item]\n
, getResourceUid[loop_item]\n
, -(getInventoriatedQuantity[loop_item] or 0)\n
, getStartDate[loop_item]\n
, getPrice[loop_item]\n
, isAccountable[loop_item]\n
, getPortalType[loop_item]\n
, getSimulationState[loop_item]\n
, getVariationText[loop_item]\n
])">\n
</dtml-if>\n
</dtml-if>\n
</dtml-if>\n
......@@ -387,14 +452,15 @@ VALUES\n
<dtml-sqlvar expr="row_item[4]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[5]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[6]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[7]" type="int">, \n
<dtml-sqlvar expr="row_item[8]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[9]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[10]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[11]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[12]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[7]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[8]" type="int">,\n
<dtml-sqlvar expr="row_item[9]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[10]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[11]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[12]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[13]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[14]" type="string" optional>\n
<dtml-sqlvar expr="row_item[14]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[15]" type="string" optional>\n
)\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n
......
......@@ -24,6 +24,12 @@
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
......@@ -36,14 +42,108 @@
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>acquisition_append_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>acquisition_copy_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>acquisition_mask_value</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>acquisition_object_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>acquisition_portal_type</string> </key>
<value> <string>python: []</string> </value>
</item>
<item>
<key> <string>acquisition_sync_value</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>category_type</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>criterion_property</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>fallback_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>site</string> </value>
</item>
<item>
<key> <string>id_group</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>last_id</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>membership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>membership_criterion_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>multimembership_criterion_base_category</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Category</string> </value>
</item>
<item>
<key> <string>read_permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>test_method_id</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Site</string> </value>
......@@ -54,6 +154,12 @@
<none/>
</value>
</item>
<item>
<key> <string>write_permission</string> </key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -34,163 +34,166 @@ from Products.ERP5.Document.Rule import Rule
from zLOG import LOG
class AccountingTransactionRule(Rule):
"""
Accounting Transaction Rule object make sure an Accounting Transaction Line in the simulation
is consistent with the real accounting transaction
"""
Accounting Transaction Rule object make sure an Accounting Transaction Line
in the simulation is consistent with the real accounting transaction.
WARNING: what to do with movement split ?
"""
WARNING: what to do with movement split ?
"""
# CMF Type Definition
meta_type = 'BAOBAB Accounting Transaction Rule'
portal_type = 'Accounting Transaction Rule'
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
# Default Properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
)
def test(self, movement):
"""
Tests if the rule (still) applies
"""
# An accounting transaction rule never applies since it is always explicitely instanciated
return 0
# CMF Type Definition
meta_type = 'BAOBAB Accounting Transaction Rule'
portal_type = 'Accounting Transaction Rule'
# Simulation workflow
security.declareProtected(Permissions.ModifyPortalContent, 'expand')
def expand(self, applied_rule, force=0, **kw):
"""
Expands the current movement downward.
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
# Default Properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
)
def test(self, movement):
"""
Tests if the rule (still) applies.
"""
# An accounting transaction rule never applies since it is always
# explicitely instanciated.
return 0
# Simulation workflow
security.declareProtected(Permissions.ModifyPortalContent, 'expand')
def expand(self, applied_rule, force=0, **kw):
"""
Expands the current movement downward:
-> new status -> expanded
An applied rule can be expanded only if its parent movement
An applied rule can be expanded only if its parent movement
is expanded.
"""
delivery_line_type = 'Simulation Movement'
# Get the accounting transaction when we come from
my_accounting_transaction = applied_rule.getDefaultCausalityValue()
# Only expand if my_accounting_transaction is not None and state is not 'confirmed'
if my_accounting_transaction is not None:
# Only expand accounting transaction rule if accounting transaction not yet confirmed (This is consistent
# with the fact that once simulation is launched, we stick to it)
if force or \
(applied_rule.getLastExpandSimulationState() not in \
applied_rule.getPortalReservedInventoryStateList() and \
applied_rule.getLastExpandSimulationState() not in \
applied_rule.getPortalCurrentInventoryStateList()):
# First, check each contained movement and delete previous simulation movements
for movement in applied_rule.contentValues(filter={'portal_type': \
applied_rule.getPortalMovementTypeList()}):
movement.flushActivity(invoke=0)
applied_rule._delObject(movement.getId())
# Copy each accounting movement (line or cell) from the accounting transaction
for accounting_transaction_line_object in my_accounting_transaction.contentValues(filter={ \
'portal_type':applied_rule.Baobab_getAccountingMovementTypeList()}):
LOG('AccountingTransactionRule.expand, examining:',0, \
accounting_transaction_line_object.getPhysicalPath())
try:
if accounting_transaction_line_object.hasCellContent():
for c in accounting_transaction_line_object.getCellValueList():
new_id = accounting_transaction_line_object.getId() + '_' + c.getId()
LOG('Create Cell', 0, str(new_id))
new_line = applied_rule.newContent(
type_name=delivery_line_type,
id=new_id,
order_value = c,
quantity = -c.getQuantity(),
deliverable = 1
)
LOG('AccountingTransactionRule.expand, object created:',0, \
new_line.getPhysicalPath())
"""
delivery_line_type = 'Simulation Movement'
# Get the accounting transaction when we come from.
my_accounting_transaction = applied_rule.getDefaultCausalityValue()
# Only expand if my_accounting_transaction is not None and state is
# not 'confirmed'.
if my_accounting_transaction is not None:
# Only expand accounting transaction rule if accounting transaction
# not yet confirmed (This is consistent with the fact that once
# simulation is launched, we stick to it).
if force or \
(applied_rule.getLastExpandSimulationState() not in \
applied_rule.getPortalReservedInventoryStateList() and \
applied_rule.getLastExpandSimulationState() not in \
applied_rule.getPortalCurrentInventoryStateList()):
# First, check each contained movement and delete previous simulation movements
for movement in applied_rule.contentValues(filter={'portal_type': \
applied_rule.getPortalMovementTypeList()}):
movement.flushActivity(invoke=0)
applied_rule._delObject(movement.getId())
# Copy each accounting movement (line or cell) from the accounting transaction
for accounting_transaction_line_object in my_accounting_transaction.contentValues(filter={ \
'portal_type':applied_rule.Baobab_getAccountingMovementTypeList()}):
LOG('AccountingTransactionRule.expand, examining:',0, \
accounting_transaction_line_object.getPhysicalPath())
try:
if accounting_transaction_line_object.hasCellContent():
for c in accounting_transaction_line_object.getCellValueList():
new_id = accounting_transaction_line_object.getId() + '_' + c.getId()
LOG('Create Cell', 0, str(new_id))
new_line = applied_rule.newContent(
type_name=delivery_line_type,
id=new_id,
order_value = c,
quantity = -c.getQuantity(),
deliverable = 1
)
LOG('AccountingTransactionRule.expand, object created:',0, \
new_line.getPhysicalPath())
else:
new_id = accounting_transaction_line_object.getId()
LOG('Line', 0, str(new_id))
if accounting_transaction_line_object.getVariationCategoryList() == []:
new_line = applied_rule.newContent(
type_name=delivery_line_type,
id=new_id,
order_value = accounting_transaction_line_object,
quantity = -accounting_transaction_line_object.getQuantity(),
deliverable = 1
)
LOG('AccountingTransactionRule.expand, object created:',0, \
new_line.getPhysicalPath())
else:
new_id = accounting_transaction_line_object.getId()
LOG('Line', 0, str(new_id))
if accounting_transaction_line_object.getVariationCategoryList() == []:
new_line = applied_rule.newContent(
type_name=delivery_line_type,
id=new_id,
order_value = accounting_transaction_line_object,
quantity = -accounting_transaction_line_object.getQuantity(),
deliverable = 1
)
LOG('AccountingTransactionRule.expand, object created:',0, \
new_line.getPhysicalPath())
else:
raise 'Error', 'VariationCategoryList is defined on\
AccountingTransactionLine %s and no cell exists.' %\
accounting_transaction_line_object.getRelativeUrl()
except AttributeError:
LOG('ERP5: WARNING', 0, \
'AttributeError during expand on accounting transaction line %s' \
% accounting_transaction_line_object.absolute_url())
# Now we can set the last expand simulation state
# to the current state
applied_rule.setLastExpandSimulationState( \
my_accounting_transaction.getSimulationState())
# Pass to base class
Rule.expand(self, applied_rule, force=force, **kw)
security.declareProtected(Permissions.ModifyPortalContent, 'solve')
def solve(self, applied_rule, solution_list):
"""
Solve inconsitency according to a certain number of solutions
templates. This updates the
-> new status -> solved
This applies a solution to an applied rule. Once
the solution is applied, the parent movement is checked.
If it does not diverge, the rule is reexpanded. If not,
diverge is called on the parent movement.
"""
security.declareProtected(Permissions.ModifyPortalContent, 'diverge')
def diverge(self, applied_rule):
"""
-> new status -> diverged
This basically sets the rule to "diverged"
and blocks expansion process
"""
# Solvers
security.declareProtected(Permissions.View, 'isDivergent')
def isDivergent(self, applied_rule):
"""
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):
"""
Returns a list Divergence solvers
"""
# Deliverability / orderability
def isOrderable(self, m):
return 0
raise 'Error', 'VariationCategoryList is defined on\
AccountingTransactionLine %s and no cell exists.' %\
accounting_transaction_line_object.getRelativeUrl()
except AttributeError:
LOG('ERP5: WARNING', 0, \
'AttributeError during expand on accounting transaction line %s' \
% accounting_transaction_line_object.absolute_url())
# Now we can set the last expand simulation state
# to the current state
applied_rule.setLastExpandSimulationState( \
my_accounting_transaction.getSimulationState())
# Pass to base class
Rule.expand(self, applied_rule, force=force, **kw)
security.declareProtected(Permissions.ModifyPortalContent, 'solve')
def solve(self, applied_rule, solution_list):
"""
Solve inconsitency according to a certain number of solutions
templates. This updates the
-> new status -> solved
This applies a solution to an applied rule. Once
the solution is applied, the parent movement is checked.
If it does not diverge, the rule is reexpanded. If not,
diverge is called on the parent movement.
"""
def isDeliverable(self, m):
if m.getSimulationState() in m.getPortalDraftOrderStateList():
return 0
return 1
\ No newline at end of file
security.declareProtected(Permissions.ModifyPortalContent, 'diverge')
def diverge(self, applied_rule):
"""
-> new status -> diverged
This basically sets the rule to "diverged"
and blocks expansion process
"""
# Solvers
security.declareProtected(Permissions.View, 'isDivergent')
def isDivergent(self, applied_rule):
"""
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):
"""
Returns a list Divergence solvers
"""
# Deliverability / orderability
def isOrderable(self, m):
return 0
def isDeliverable(self, m):
if m.getSimulationState() in m.getPortalDraftOrderStateList():
return 0
return 1
\ No newline at end of file
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
......@@ -34,61 +34,63 @@ from Products.ERP5Type.Document.DeliveryCell import DeliveryCell
from Products.ERP5.Document.Movement import Movement
from Products.ERP5.Document.AccountingTransaction import AccountingTransaction
class BankingOperation(Delivery,AccountingTransaction):
# CMF Type Definition
meta_type = 'BAOBAB Banking Operation'
portal_type = 'Banking Operation'
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
# Default Properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
, PropertySheet.Task
, PropertySheet.Arrow
, PropertySheet.BankingOperation
, PropertySheet.ItemAggregation
, PropertySheet.Amount
)
# Special index methods
security.declareProtected(Permissions.View, 'getBaobabSourceUid')
def getBaobabSourceUid(self):
"""
Returns a calculated source
"""
return self.getSourceUid()
security.declareProtected(Permissions.View, 'getBaobabDestinationUid')
def getBaobabDestinationUid(self):
"""
Returns a calculated destination
"""
return self.getDestinationUid()
security.declareProtected(Permissions.View, 'getBaobabSourceSectionUid')
def getBaobabSourceSectionUid(self):
"""
Returns a calculated source section
"""
return self.getSourceSectionUid()
security.declareProtected(Permissions.View, 'getBaobabDestinationSectionUid')
def getBaobabDestinationSectionUid(self):
"""
Returns a calculated destination section
"""
return self.getDestinationSectionUid()
# Dynamic patch
class BankingOperation(Delivery, AccountingTransaction):
# CMF Type Definition
meta_type = 'BAOBAB Banking Operation'
portal_type = 'Banking Operation'
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
# Default Properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
, PropertySheet.Task
, PropertySheet.Arrow
, PropertySheet.BankingOperation
, PropertySheet.ItemAggregation
, PropertySheet.Amount
)
# Special index methods
security.declareProtected(Permissions.View, 'getBaobabSourceUid')
def getBaobabSourceUid(self):
"""
Returns a calculated source.
"""
return self.getSourceUid()
security.declareProtected(Permissions.View, 'getBaobabDestinationUid')
def getBaobabDestinationUid(self):
"""
Returns a calculated destination.
"""
return self.getDestinationUid()
security.declareProtected(Permissions.View, 'getBaobabSourceSectionUid')
def getBaobabSourceSectionUid(self):
"""
Returns a calculated source section.
"""
return self.getSourceSectionUid()
security.declareProtected(Permissions.View, 'getBaobabDestinationSectionUid')
def getBaobabDestinationSectionUid(self):
"""
Returns a calculated destination section.
"""
return self.getDestinationSectionUid()
### Dynamic patch
Delivery.getBaobabSource = lambda x: x.getSource()
Delivery.security.declareProtected(Permissions.View, 'getBaobabSource')
Delivery.getBaobabSourceUid = lambda x: x.getSourceUid()
......@@ -100,8 +102,7 @@ Delivery.security.declareProtected(Permissions.View, 'getBaobabSourceSectionUid'
Delivery.getBaobabDestinationSectionUid = lambda x: x.getDestinationSectionUid()
Delivery.security.declareProtected(Permissions.View, 'getBaobabDestinationSectionUid')
# Overload Movement
### Overload Movement
Movement.getBaobabSource = lambda x: x.getSource()
Movement.security.declareProtected(Permissions.View, 'getBaobabSource')
Movement.getBaobabSourceUid = lambda x: x.getSourceUid()
......@@ -113,7 +114,7 @@ Movement.security.declareProtected(Permissions.View, 'getBaobabSourceSectionUid'
Movement.getBaobabDestinationSectionUid = lambda x: x.getDestinationSectionUid()
Movement.security.declareProtected(Permissions.View, 'getBaobabDestinationSectionUid')
# Acquire Baobab source / destination uids from parent line
### Acquire Baobab source / destination uids from parent line
DeliveryCell.getBaobabSource = lambda x: x.aq_parent.getBaobabSource()
DeliveryCell.security.declareProtected(Permissions.View, 'getBaobabSource')
DeliveryCell.getBaobabSourceUid = lambda x: x.aq_parent.getBaobabSourceUid()
......@@ -124,7 +125,3 @@ DeliveryCell.getBaobabSourceSectionUid = lambda x: x.aq_parent.getBaobabSourceSe
DeliveryCell.security.declareProtected(Permissions.View, 'getBaobabSourceSectionUid')
DeliveryCell.BaobabDestinationSectionUid = lambda x: x.aq_parent.getBaobabDestinationSectionUid()
DeliveryCell.security.declareProtected(Permissions.View, 'getBaobabDestinationSectionUid')
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
......@@ -31,35 +31,35 @@ from Products.CMFCore.WorkflowCore import WorkflowMethod
from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
from Products.ERP5.Document.AccountingTransactionLine import AccountingTransactionLine
class BankingOperationLine(AccountingTransactionLine):
# CMF Type Definition
meta_type = 'BAOBAB Banking Operation Line'
portal_type = 'Banking Operation Line'
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
class BankingOperationLine(AccountingTransactionLine):
# CMF Type Definition
meta_type = 'BAOBAB Banking Operation Line'
portal_type = 'Banking Operation Line'
isPortalContent = 1
isRADContent = 1
# Default Properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
)
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
security.declareProtected(Permissions.View, 'getBaobabSourceUid')
def getBaobabSourceUid(self):
"""
Returns a calculated source
"""
return self.getSourceUid()
# Default Properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
)
security.declareProtected(Permissions.View, 'getBaobabDestinationUid')
def getBaobabDestinationUid(self):
"""
Returns a calculated destination
"""
return self.getDestinationUid()
security.declareProtected(Permissions.View, 'getBaobabSourceUid')
def getBaobabSourceUid(self):
"""
Returns a calculated source.
"""
return self.getSourceUid()
security.declareProtected(Permissions.View, 'getBaobabDestinationUid')
def getBaobabDestinationUid(self):
"""
Returns a calculated destination.
"""
return self.getDestinationUid()
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
from Products.ERP5.Document.Container import Container
class CashContainer(Container):
"""
A Cash DeliveryLine object allows to implement lines in
Cash Deliveries (packing list, Check payment, Cash Movement, etc.)
It may include a price (for insurance, for customs, for invoices,
for orders)
"""
class CashContainer(Container):
"""
A Cash DeliveryLine object allows to implement lines
in Cash Deliveries (packing list, Check payment, Cash Movement, etc.).
meta_type = 'BAOBAB Cash Container'
portal_type = 'Cash Container'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
It may include a price (for insurance, for customs, for invoices,
for orders).
"""
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
meta_type = 'BAOBAB Cash Container'
portal_type = 'Cash Container'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative interfaces
# __implements__ = ( Interface.Ved, )
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.Amount
, PropertySheet.Task
, PropertySheet.Arrow
, PropertySheet.Movement
, PropertySheet.Price
, PropertySheet.VariationRange
, PropertySheet.ItemAggregation
, PropertySheet.Container
, PropertySheet.CashContainer
, PropertySheet.Reference
)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.Amount
, PropertySheet.Task
, PropertySheet.Arrow
, PropertySheet.Movement
, PropertySheet.Price
, PropertySheet.VariationRange
, PropertySheet.ItemAggregation
, PropertySheet.Container
, PropertySheet.CashContainer
, PropertySheet.Reference
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
......@@ -35,80 +35,80 @@ from zLOG import LOG
class CashCurrency(Resource):
"""
A Resource
"""
"""
A Resource
"""
meta_type = 'BAOBAB Cash Currency'
portal_type = 'Cash Currency'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
meta_type = 'BAOBAB Cash Currency'
portal_type = 'Cash Currency'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
# Declarative interfaces
__implements__ = ( Interface.Variated, )
# Declarative interfaces
__implements__ = ( Interface.Variated, )
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
, PropertySheet.Price
, PropertySheet.Resource
, PropertySheet.Reference
, PropertySheet.FlowCapacity
, PropertySheet.VariationRange
, PropertySheet.CashCurrency
)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.DublinCore
, PropertySheet.Price
, PropertySheet.Resource
, PropertySheet.Reference
, PropertySheet.FlowCapacity
, PropertySheet.VariationRange
, PropertySheet.CashCurrency
)
security.declareProtected(Permissions.View,'getTitle')
def getTitle(self,**kw):
"""
security.declareProtected(Permissions.View,'getTitle')
def getTitle(self,**kw):
"""
The title will depend on the Portal Type and the value, for example :
Piece de 500
"""
title = self.portal_types[self.getPortalType()].title
price = self.getBasePrice()
if price is None:
price = 'Not Defined'
else:
price = '%i' % int(price)
title = '%s de %s' % (title, price)
return title
Piece de 500
"""
title = self.portal_types[self.getPortalType()].title
price = self.getBasePrice()
if price is None:
price = 'Not Defined'
else:
price = '%i' % int(price)
title = '%s de %s' % (title, price)
return title
security.declareProtected(Permissions.ModifyPortalContent, '_setVariationList')
def _setVariationList(self,value):
"""
security.declareProtected(Permissions.ModifyPortalContent, '_setVariationList')
def _setVariationList(self,value):
"""
We will create cells by the same time
"""
LOG('_setVariationList, value',0,value)
self._categorySetVariationList(value)
self.setVariationBaseCategoryList(('cash_status','emission_letter','variation'))
#all_variation_list = self.OrderLine_getMatrixItemList()
#emission_letter_list = [x for x in all_variation_list if x.startswith('emission_letter')]
emission_letter_list = [x[1] for x in self.portal_categories.emission_letter.getCategoryChildTitleItemList()[1:]]
self._categorySetEmissionLetterList(emission_letter_list)
#cash_status_list = [x for x in all_variation_list if x.startswith('cash_status')]
cash_status_list = [x[1] for x in self.portal_categories.cash_status.getCategoryChildTitleItemList()[1:]]
self._categorySetCashStatusList(cash_status_list)
"""
LOG('_setVariationList, value',0,value)
self._categorySetVariationList(value)
self.setVariationBaseCategoryList(('cash_status','emission_letter','variation'))
#all_variation_list = self.OrderLine_getMatrixItemList()
#emission_letter_list = [x for x in all_variation_list if x.startswith('emission_letter')]
emission_letter_list = [x[1] for x in self.portal_categories.emission_letter.getCategoryChildTitleItemList()[1:]]
self._categorySetEmissionLetterList(emission_letter_list)
#cash_status_list = [x for x in all_variation_list if x.startswith('cash_status')]
cash_status_list = [x[1] for x in self.portal_categories.cash_status.getCategoryChildTitleItemList()[1:]]
self._categorySetCashStatusList(cash_status_list)
security.declareProtected(Permissions.ModifyPortalContent, 'setVariationList')
def setVariationList(self,value):
"""
security.declareProtected(Permissions.ModifyPortalContent, 'setVariationList')
def setVariationList(self,value):
"""
Call the private method
"""
self._setVariationList(value)
"""
self._setVariationList(value)
# Cell Related
security.declareProtected( Permissions.ModifyPortalContent, 'newCellContent' )
def newCellContent(self, id):
"""
This method can be overriden
"""
self.invokeFactory(type_name="Set Mapped Value",id=id)
return self.get(id)
# Cell Related
security.declareProtected( Permissions.ModifyPortalContent, 'newCellContent' )
def newCellContent(self, id):
"""
This method can be overriden
"""
self.invokeFactory(type_name="Set Mapped Value",id=id)
return self.get(id)
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Kevin Deldycke <kevin_AT_nexedi_DOT_com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
from Products.ERP5.Document.Delivery import Delivery
class CashDelivery(Delivery):
"""
"""
meta_type = 'BAOBAB Cash Delivery'
portal_type = 'Cash Delivery'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
# Declarative interfaces
__implements__ = ( Interface.Variated, )
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.Amount
, PropertySheet.Task
, PropertySheet.Arrow
, PropertySheet.Movement
, PropertySheet.Price
, PropertySheet.VariationRange
, PropertySheet.ItemAggregation
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
......@@ -35,85 +35,85 @@ out_portal_type_list = ('Cash Exchange Line Out', 'Cash To Currency Sale Line Ou
class CashDeliveryLine(DeliveryLine):
"""
A Cash DeliveryLine object allows to implement lines in
Cash Deliveries (packing list, Check payment, Cash Movement, etc.)
"""
A Cash DeliveryLine object allows to implement lines
in Cash Deliveries (packing list, Check payment, Cash Movement, etc.).
It may include a price (for insurance, for customs, for invoices,
for orders)
"""
It may include a price (for insurance, for customs, for invoices,
for orders).
"""
meta_type = 'BAOBAB Cash Delivery Line'
portal_type = 'Cash Delivery Line'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
meta_type = 'BAOBAB Cash Delivery Line'
portal_type = 'Cash Delivery Line'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.View)
# Declarative interfaces
__implements__ = ( Interface.Variated, )
# Declarative interfaces
__implements__ = ( Interface.Variated, )
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.Amount
, PropertySheet.Task
, PropertySheet.Arrow
, PropertySheet.Movement
, PropertySheet.Price
, PropertySheet.VariationRange
, PropertySheet.ItemAggregation
, PropertySheet.CashDeliveryLine
)
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.Amount
, PropertySheet.Task
, PropertySheet.Arrow
, PropertySheet.Movement
, PropertySheet.Price
, PropertySheet.VariationRange
, PropertySheet.ItemAggregation
, PropertySheet.CashDeliveryLine
)
security.declareProtected(Permissions.View, 'getBaobabSourceSectionUid')
def getBaobabSourceSectionUid(self):
"""
Returns a calculated source section
"""
return self.getSourceSectionUid()
security.declareProtected(Permissions.View, 'getBaobabSourceSectionUid')
def getBaobabSourceSectionUid(self):
"""
Returns a calculated source section
"""
return self.getSourceSectionUid()
security.declareProtected(Permissions.View, 'getBaobabDestinationSectionUid')
def getBaobabDestinationSectionUid(self):
"""
Returns a calculated destination section
"""
return self.getDestinationSectionUid()
security.declareProtected(Permissions.View, 'getBaobabDestinationSectionUid')
def getBaobabDestinationSectionUid(self):
"""
Returns a calculated destination section
"""
return self.getDestinationSectionUid()
security.declareProtected(Permissions.View, 'getBaobabSource')
def getBaobabSource(self):
"""
Returns a calculated source
"""
if self.portal_type in out_portal_type_list:
return self.portal_categories.resolveCategory(self.getSource()).unrestrictedTraverse('sortante').getRelativeUrl()
elif self.portal_type in in_portal_type_list:
return None
return self.getSource()
security.declareProtected(Permissions.View, 'getBaobabSource')
def getBaobabSource(self):
"""
Returns a calculated source
"""
if self.portal_type in out_portal_type_list:
return self.portal_categories.resolveCategory(self.getSource()).unrestrictedTraverse('sortante').getRelativeUrl()
elif self.portal_type in in_portal_type_list:
return None
return self.getSource()
security.declareProtected(Permissions.View, 'getBaobabSourceUid')
def getBaobabSourceUid(self):
"""
Returns a calculated source
"""
if self.portal_type in out_portal_type_list:
return self.portal_categories.resolveCategory(self.getSource()).unrestrictedTraverse('sortante').getUid()
elif self.portal_type in in_portal_type_list:
return None
return self.getSourceUid()
security.declareProtected(Permissions.View, 'getBaobabSourceUid')
def getBaobabSourceUid(self):
"""
Returns a calculated source
"""
if self.portal_type in out_portal_type_list:
return self.portal_categories.resolveCategory(self.getSource()).unrestrictedTraverse('sortante').getUid()
elif self.portal_type in in_portal_type_list:
return None
return self.getSourceUid()
security.declareProtected(Permissions.View, 'getBaobabDestinationUid')
def getBaobabDestinationUid(self):
"""
Returns a calculated destination
"""
if self.portal_type in in_portal_type_list:
return self.portal_categories.resolveCategory(self.getSource()).unrestrictedTraverse('entrante').getUid()
elif self.portal_type in out_portal_type_list :
return None
return self.getDestinationUid()
security.declareProtected(Permissions.View, 'getBaobabDestinationUid')
def getBaobabDestinationUid(self):
"""
Returns a calculated destination
"""
if self.portal_type in in_portal_type_list:
return self.portal_categories.resolveCategory(self.getSource()).unrestrictedTraverse('entrante').getUid()
elif self.portal_type in out_portal_type_list :
return None
return self.getDestinationUid()
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# K. Toure <ktoure@nexedi.com>
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# K. Toure <ktoure_AT_nexedi_DOT_com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
......@@ -28,20 +28,20 @@
class BankingOperation:
"""
Person properties and categories
"""
"""
Person properties and categories
"""
_properties = (
# Subordination properties
{ 'id' : 'movement',
'storage_id' : 'movement',
'description' : 'The current amount',
'type' : 'content',
'portal_type' : ('Accounting Transaction Line'),
'acquired_property_id' : ('source_debit', 'source_credit'),
'mode' : 'w' },
)
_properties = (
# Subordination properties
{ 'id' : 'movement',
'storage_id' : 'movement',
'description' : 'The current amount',
'type' : 'content',
'portal_type' : ('Accounting Transaction Line'),
'acquired_property_id' : ('source_debit', 'source_credit'),
'mode' : 'w' },
)
_categories = ()
_categories = ()
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
......@@ -24,22 +24,25 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class CashContainer:
"""
VariationRange which allows to define possible
variations for a Resource, a Transformation, etc.
"""
"""
VariationRange which allows to define possible
variations for a Resource, a Transformation, etc.
"""
_properties = (
{ 'id' : 'cash_number_range_start',
'description' : '',
'type' : 'string',
'mode' : 'w'
},
{ 'id' : 'cash_number_range_stop',
'description' : '',
'type' : 'string',
'mode' : 'w'
}
)
_categories = ( 'emission_letter','cash_status','variation')
_properties = (
{ 'id' : 'cash_number_range_start',
'description' : '',
'type' : 'string',
'mode' : 'w'
},
{ 'id' : 'cash_number_range_stop',
'description' : '',
'type' : 'string',
'mode' : 'w'
}
)
_categories = ( 'emission_letter','cash_status','variation')
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
......@@ -26,13 +26,15 @@
#
##############################################################################
class CashCurrency:
"""
Properties which allow to define a BankNote or a Coin
"""
_properties = ()
class CashCurrency:
"""
Properties which allow to define a BankNote or a Coin.
"""
_categories = ( 'emission_letter','cash_status','variation')
_properties = ()
_categories = ( 'emission_letter'
, 'cash_status'
, 'variation'
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
# Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
......@@ -27,12 +27,14 @@
##############################################################################
class CashDeliveryLine:
"""
VariationRange which allows to define possible
variations for a Resource, a Transformation, etc.
"""
"""
VariationRange which allows to define possible
variations for a Resource, a Transformation, etc.
"""
_properties = (
)
_properties = (
)
_categories = ('emission_letter','cash_status')
_categories = ( 'emission_letter'
, 'cash_status'
)
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
......@@ -24,28 +24,31 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
class Checkbook:
"""
VariationRange which allows to define possible
variations for a Resource, a Transformation, etc.
"""
"""
VariationRange which allows to define possible
variations for a Resource, a Transformation, etc.
"""
_properties = (
{ 'id' : 'check_number_range_start',
'description' : '',
'type' : 'string',
'mode' : 'w'
},
{ 'id' : 'check_number_range_stop',
'description' : '',
'type' : 'string',
'mode' : 'w'
},
{ 'id' : 'variation_base_category',
'description' : '',
'type' : 'lines',
'mode' : 'r',
'default' : ['checkbook_type']
}
)
_properties = (
{ 'id' : 'check_number_range_start',
'description' : '',
'type' : 'string',
'mode' : 'w'
},
{ 'id' : 'check_number_range_stop',
'description' : '',
'type' : 'string',
'mode' : 'w'
},
{ 'id' : 'variation_base_category',
'description' : '',
'type' : 'lines',
'mode' : 'r',
'default' : ['checkbook_type']
}
)
_categories = ('checkbook_type',)
_categories = ('checkbook_type',)
......@@ -281,7 +281,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:[(\'\',\'\')]+map(lambda x:(x.id,\'currency/%s\' %x.id),here.currency.objectValues())</string> </value>
<value> <string>python:[(\'\',\'\')]+map(lambda x:(x.id,\'currency_module/%s\' %x.id),here.currency_module.objectValues())</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string># Return the currency used as a reference for banking transaction.\n
return \'EUR\'\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAAAAAAAAAAACAAAAQwAA
AHMIAAAAZAEAU2QAAFMoAgAAAE5zAwAAAEVVUigAAAAAKAAAAAAoAAAAACgAAAAAcw8AAABTY3Jp
cHQgKFB5dGhvbilzIwAAAEJhb2JhYl9nZXRQb3J0YWxSZWZlcmVuY2VDdXJyZW5jeUlEAQAAAHMC
AAAAAAEoAQAAAHMjAAAAQmFvYmFiX2dldFBvcnRhbFJlZmVyZW5jZUN1cnJlbmN5SUQoAQAAAHMj
AAAAQmFvYmFiX2dldFBvcnRhbFJlZmVyZW5jZUN1cnJlbmN5SUQoAAAAACgAAAAAcw8AAABTY3Jp
cHQgKFB5dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_skins/erp5_banking_core/Baobab_getPortalReferenceCurrencyID</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Baobab_getPortalReferenceCurrencyID</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -70,7 +70,12 @@
# get the current logged user site\n
user_id = context.portal_membership.getAuthenticatedMember().getUserName()\n
person = context.person[user_id]\n
\n
### KEV HACK: support old and new person module id\n
try:\n
person = context.person[user_id]\n
except:\n
person = context.person_module[user_id]\n
\n
assignment_list = person.contentValues(filter={\'portal_type\': \'Assignment\'})\n
\n
......@@ -92,26 +97,27 @@ return valid_assignment_list\n
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAAAAAA4AAAANAAAAQwAA
AHMVAQAAdAAAdAAAdAAAdAEAZAEAgwIAZAIAgwIAgwAAZAMAgwIAgwAAfQIAdAMAdAAAdAEAZAQA
gwIAfAIAgwIAfQQAdAAAfAQAZAUAgwIAZAYAaAAABGQHAGQIAAM8gwABfQUAdAYAfAUAgwEA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X2dldGF0dHJfcwcAAABjb250ZXh0cwcAAAB1c2Vy
X2lkcwkAAABfZ2V0aXRlbV9zBgAAAHBlcnNvbnMPAAAAYXNzaWdubWVudF9saXN0cwMAAABsZW5z
FQAAAHZhbGlkX2Fzc2lnbm1lbnRfbGlzdHMJAAAAX2dldGl0ZXJfcwEAAABhcwQAAABzdG9wcwUA
AABzdGFydHMIAAAARGF0ZVRpbWVzBAAAAE5vbmUoDgAAAHMJAAAAX2dldGF0dHJfcwcAAABjb250
ZXh0cwcAAAB1c2VyX2lkcwkAAABfZ2V0aXRlbV9zBgAAAHBlcnNvbnMPAAAAYXNzaWdubWVudF9s
aXN0cwMAAABsZW5zFQAAAHZhbGlkX2Fzc2lnbm1lbnRfbGlzdHMJAAAAX2dldGl0ZXJfcwEAAABh
cwQAAABzdG9wcwUAAABzdGFydHMIAAAARGF0ZVRpbWVzBAAAAE5vbmUoAAAAACgAAAAAcw8AAABT
Y3JpcHQgKFB5dGhvbilzHAAAAEJhb2JhYl9nZXRVc2VyQXNzaWdubWVudExpc3QBAAAAcx4AAAAA
AScDAwEfAhwCIQITAQgCBgINAAYBEgESAT0BGAIoAQAAAHMcAAAAQmFvYmFiX2dldFVzZXJBc3Np
Z25tZW50TGlzdCgBAAAAcxwAAABCYW9iYWJfZ2V0VXNlckFzc2lnbm1lbnRMaXN0KAAAAAAoAAAA
AHMPAAAAU2NyaXB0IChQeXRob24pcwgAAAA8bW9kdWxlPgEAAABzAAAAAA==</string> </value>
</item>
<item>
<key> <string>_filepath</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>CashMovement_cashDetail_parameter = { \'line_portalType\' : \'Cash Movement Line\'\n
, \'operation_currency\' : \'EUR\'\n
, \'variation_list\' : None\n
, \'cashStatus_list\' : [\'not_defined\']\n
, \'emissionLetter_list\' : None\n
}\n
\n
CashMovement_cashDetail_parameter = { \'line_portalType\' : \'Cash Movement Line\' # The portal type that the fastinput will create\n
, \'operation_currency\' : context.Baobab_getPortalReferenceCurrencyID() # The operation currency\n
, \'cashStatus_list\' : None # List of possible cashStatus or None if all\n
, \'emissionLetter_list\' : None # List of possible emissionLetter or None if all\n
, \'variation_list\' : None # List of possible variation or None if all\n
, \'currencyCash_portalType\' : None # \'Coin\' or \'Banknote\' or None if both\n
, \'updatePossible\' : True # If true, the fastinput will not allow change\n
, \'columnBase\' : \'variation\' # possible values : \'variation\', \'cashStatus\', \'emissionLetter\'\n
#, \'columnBase\' : \'emissionLetter\' # possible values : \'variation\', \'cashStatus\', \'emissionLetter\'\n
#, \'columnBase\' : \'cashStatus\' # possible values : \'variation\', \'cashStatus\', \'emissionLetter\'\n
}\n
\n
\n
\n
\n
return context.CashDetail_fastInputUpdate( listbox = None\n
, cashDetail_parameter = CashMovement_cashDetail_parameter\n
, destination = context.getObject().absolute_url())\n
</string> </value>
</item>
<item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BQAAAHMEAAAATm9uZXMhAAAAQ2FzaE1vdmVtZW50X2Nhc2hEZXRhaWxfcGFyYW1ldGVy
cwkAAABfZ2V0YXR0cl9zBwAAAGNvbnRleHRzBAAAAFRydWUoAAAAACgAAAAAcw8AAABTY3JpcHQg
KFB5dGhvbilzHQAAAENhc2hEZXRhaWxfbG9hZFNjcmlwdF9leGFtcGxlAQAAAHMaAAAAGQIJAQwB
CAMTARIBCQEJAQkBCQERCRUBDAEoAQAAAHMdAAAAQ2FzaERldGFpbF9sb2FkU2NyaXB0X2V4YW1w
bGUoAQAAAHMdAAAAQ2FzaERldGFpbF9sb2FkU2NyaXB0X2V4YW1wbGUoAAAAACgAAAAAcw8AAABT
Y3JpcHQgKFB5dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_skins/erp5_banking_core/CashDetail_loadScript_example</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>None</string>
<string>CashMovement_cashDetail_parameter</string>
<string>_getattr_</string>
<string>context</string>
<string>True</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>CashDetail_loadScript_example</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -281,7 +281,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python:[(\'\',\'\')]+map(lambda x:(x.id,\'currency/%s\' %x.id),here.currency.objectValues())</string> </value>
<value> <string>python:[(\'\',\'\')]+map(lambda x:(x.id,\'currency_module/%s\' %x.id),here.currency_module.objectValues())</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>base_list=(\'variation\')\n
default_variation_category_list = [\'emission_letter/k\',\'cash_status/valid\']\n
\n
currency_list = [x.getObject() for x in context.portal_catalog(portal_type=(\'Banknote\',\'Coin\')) \\\n
if x.getObject().getPriceCurrencyId() == cashMovement_currency] \n
\n
currency_list = [x.getObject() for x in context.portal_catalog(portal_type=(\'Banknote\',\'Coin\'))] \n
\n
currency_list = context.sort_currency(currency_list)\n
\n
variation_list = context.portal_categories.variation.getCategoryChildTitleItemList()[1:]\n
\n
total_price = 0\n
if listbox is None:\n
listbox = []\n
for x in currency_list :\n
currency_dict = {\'resource\':x.getTitle(),\'Id_resource\':x.getId()}\n
total_quantity = 0\n
counter = 1\n
find_currencyLine = context.searchContainerLineByResource(x.getId()) # Search container line with resource X\n
for y in variation_list:\n
quantity = 0\n
if not find_currencyLine is None : # If Check Payment line is found\n
cell = find_currencyLine.getCell(\'variation/\'+y[1])\n
if not cell is None:\n
quantity = cell.getQuantity()\n
total_quantity += quantity\n
\n
currency_dict[\'variation\'+str(counter)]= quantity \n
counter += 1\n
resource_list = context.portal_catalog(portal_type = (\'Banknote\',\'Coin\') ,id= x.getId())\n
resource_price = resource_list[0].getObject().getPrice()\n
currency_dict[\'price\']= context.Integer_toString(int(total_quantity * resource_price))\n
total_price += int(total_quantity * resource_price)\n
listbox.append(currency_dict)\n
\n
else :\n
new_lineList = []\n
counter = 0\n
price_list = []\n
for x in listbox :\n
resource_list = context.portal_catalog(portal_type = (\'Banknote\',\'Coin\') ,id = x[\'Id_resource\'])\n
resource_price = resource_list[0].getObject().getPrice()\n
quantity = 0\n
counter = 1\n
for y in variation_list:\n
cell_quantity = int(x[\'variation\'+str(counter)] or 0)\n
quantity = quantity + cell_quantity\n
counter += 1\n
x[\'price\'] = context.Integer_toString(int(quantity * resource_price))\n
total_price += int(quantity * resource_price)\n
new_lineList.append(x) \n
price_list.append(resource_price)\n
price_list.append(x[\'resource\'])\n
listbox = new_lineList \n
total_price = context.Integer_toString(total_price)\n
context.Base_updateDialogForm(listbox=listbox,calculated_price=total_price, empty_line_number=0)\n
\n
return context.asContext(context=None,portal_type=context.getPortalType(),calculated_price=total_price, **kw).Container_fastInputForm(**kw)\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAwAAAEAAAABzEwAAAGUAAGUAAGQBAIQCAFoBAGQAAFMoAgAAAE5jAgAAACEAAAAh
AAAASwAAAHPgBAAAZAEAf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(Python):/baobab/portal_skins/erp5_banking_core/Container_fastInputUpdate</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>my=None, listbox=None, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>my</string>
<string>listbox</string>
<string>kw</string>
<string>base_list</string>
<string>default_variation_category_list</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>_getattr_</string>
<string>context</string>
<string>x</string>
<string>cashMovement_currency</string>
<string>currency_list</string>
<string>_getitem_</string>
<string>variation_list</string>
<string>total_price</string>
<string>None</string>
<string>currency_dict</string>
<string>total_quantity</string>
<string>counter</string>
<string>find_currencyLine</string>
<string>y</string>
<string>quantity</string>
<string>cell</string>
<string>_write_</string>
<string>str</string>
<string>resource_list</string>
<string>resource_price</string>
<string>int</string>
<string>new_lineList</string>
<string>price_list</string>
<string>cell_quantity</string>
<string>_apply_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Container_fastInputUpdate</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -66,102 +66,44 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>assigned_role_mapping = {}\n
\n
# Parse each role information\n
for role_id, role_information_list in role_mapping.items():\n
for role_information in role_information_list:\n
if not assigned_role_mapping.has_key(role_id):\n
assigned_role_mapping[role_id] = []\n
\n
base_category = role_information[\'base_category\']\n
category = list(role_information[\'category\']) # turn this into a list so that we can append more categories\n
\n
site = None\n
group = None\n
function = None\n
\n
for cat_item in category:\n
# Parse each category and extract site, group, function\n
cat_list = cat_item.split(\'/\')\n
if cat_list[0] == \'site\':\n
site = \'/\'.join(cat_list[1:])\n
elif cat_list[0] == \'group\':\n
group = \'/\'.join(cat_list[1:])\n
elif cat_list[0] == \'function\':\n
function = \'/\'.join(cat_list[1:])\n
\n
# Rebuild the mapping_item - None means that Baobab_assignLocalRole will\n
# get it from the user assignments. No value means we should not care\n
mapping_item = {}\n
if site is not None or \'site\' in base_category:\n
mapping_item[\'site\'] = site\n
if group is not None or \'group\' in base_category:\n
mapping_item[\'group\'] = group\n
if function is not None or \'function\' in base_category:\n
mapping_item[\'function\'] = function\n
\n
assigned_role_mapping[role_id].append(mapping_item)\n
\n
context.setDescription(str(assigned_role_mapping))\n
\n
context.Baobab_assignLocalRole(**assigned_role_mapping)\n
\n
#raise \'KHADIM\', repr(context.Baobab_assignLocalRole(**assigned_role_mapping))\n
<value> <string>lineTotalPrice_list = [x.getObject().getTotalPrice() for x in context.searchFolder(portal_type="Container Line")]\n
totalPrice = 0\n
for x in lineTotalPrice_list :\n
totalPrice += x\n
return totalPrice\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAQAAABYAAAAYAAAAQwAA
AHNzAgAAaAAAfQEAeDcCdAEAdAIAfAAAZAEAgwIAgwAAgwEARF0dAnQBAAKDAQBcAgB9BAB9BQB4
BwJ0AQB8BQCDAQBEXfkBfQYAdAIAfAEAZAIAgwIAfAQAgwEADG8UAAFnAAB0BwB8AQCDAQB8BAA8
bgEAAXQIAHwGAGQDAIMCAH0JAHQKAHQIAHwGAGQEAIMCAIMBAH0LAHQMAH0NAHQMAH0OAHQMAH0P
AHjjAHQBAHwLAIMBAERd1Q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script (Python):/baobab/portal_skins/erp5_banking_core/ERP5Type_initLocalRoleMapping_DEPRECATED</string> </value>
<value> <string>Script (Python):/baobab/portal_skins/erp5_banking_core/Container_getContaineeTotalPrice</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>role_mapping</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<key> <string>_owner</string> </key>
<value>
<tuple>
<string>Manager</string>
<string>Owner</string>
</tuple>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>listbox=None, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
......@@ -186,28 +128,16 @@ AAAA</string> </value>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>role_mapping</string>
<string>assigned_role_mapping</string>
<string>listbox</string>
<string>kw</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>_getattr_</string>
<string>role_id</string>
<string>role_information_list</string>
<string>role_information</string>
<string>_write_</string>
<string>_getitem_</string>
<string>base_category</string>
<string>list</string>
<string>category</string>
<string>None</string>
<string>site</string>
<string>group</string>
<string>function</string>
<string>cat_item</string>
<string>cat_list</string>
<string>mapping_item</string>
<string>context</string>
<string>str</string>
<string>_apply_</string>
<string>x</string>
<string>lineTotalPrice_list</string>
<string>totalPrice</string>
</tuple>
</value>
</item>
......@@ -219,12 +149,14 @@ AAAA</string> </value>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Type_initLocalRoleMapping_DEPRECATED</string> </value>
<value> <string>Container_getContaineeTotalPrice</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.Document import newTempBase\n
\n
def getTitleFromCategoryUrl(category):\n
return context.portal_categories.getCategoryValue(category).getTitle()\n
\n
def getVariationTitleList(variation_text):\n
return [getTitleFromCategoryUrl(x) for x in variation_text.split(\'\\n\')]\n
\n
resource_dict = {}\n
vault_dict = {}\n
vault_inventory_dict = {}\n
\n
for vault in context.objectValues():\n
vault_url = vault.getRelativeUrl()\n
vault_dict[vault_url] = 1\n
vault_inventory_dict[vault_url] = {}\n
for vault_inventory in context.portal_simulation.getInventoryStat( node_category=vault.getRelativeUrl()\n
, resource_category=\'currency/\' + context.Baobab_getPortalReferenceCurrencyID()\n
, ignore_variation=0\n
):\n
try:\n
resource = (vault_inventory[8], getVariationTitleList(vault_inventory[10])[2])\n
except:\n
raise \'not enough columns\', repr(([x for x in vault_inventory]))\n
\n
if not vault_inventory_dict[vault_url].has_key(resource):\n
vault_inventory_dict[vault_url][resource] = {\'quantity\':0, \'total_price\':0}\n
quantity = vault_inventory[1] or 0\n
total_price = vault_inventory[2] or 0\n
vault_inventory_dict[vault_url][resource][\'quantity\'] = vault_inventory_dict[vault_url][resource][\'quantity\'] + quantity\n
vault_inventory_dict[vault_url][resource][\'total_price\'] = vault_inventory_dict[vault_url][resource][\'total_price\'] + total_price\n
\n
resource_dict[resource] = 1\n
\n
#return repr(vault_inventory_dict)\n
\n
#for v in vault_inventory_dict.items():\n
# print v[0]\n
# for r in v[1].items():\n
# print repr(r)\n
\n
#return printed\n
\n
if column_names == 1:\n
column_list = [(\'resource\', \'Resource\'), (\'variation_text\', \'Year\')]\n
for vault in vault_dict.keys():\n
column_list.extend([\n
(vault + \'_quantity\', getTitleFromCategoryUrl(vault) + \' Quantity\'),\n
(vault + \'_total_price\', getTitleFromCategoryUrl(vault) + \' TotalPrice\')\n
])\n
column_list.append((\'general_total_price\', \'General TotalPrice\'))\n
return column_list\n
\n
total_inventory_list = []\n
\n
for resource in context.Baobab_sortResourceTitleList(resource_dict.keys()):\n
tmp_dict = {\'resource\':resource[0][:resource[0].find(\'Fran\')], \'variation_text\':resource[1]}\n
general_total_price = 0\n
for vault in vault_dict.keys():\n
try:\n
resource_in_vault = vault_inventory_dict[vault][resource]\n
except KeyError:\n
resource_in_vault = {\'quantity\' : 0,\'total_price\' : 0}\n
tmp_dict.update({vault + \'_quantity\' : resource_in_vault[\'quantity\'],\n
vault + \'_total_price\' : resource_in_vault[\'total_price\']})\n
general_total_price += resource_in_vault[\'total_price\']\n
tmp_dict[\'general_total_price\'] = general_total_price\n
total_inventory_list.append(newTempBase(context, resource, **tmp_dict))\n
return total_inventory_list\n
return repr([x for x in total_inventory_list])\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAgAAAEAAAABzEAAAAGQBAGQCAIQBAFoAAGQAAFMoAwAAAE5pAAAAAGMBAAAAHwAA
ACMAAAALAAAAc8QEAABkAQBrAABsAQB9AwABZAIAhAAAiQAAhwAAZAMAhgAAfQUAaAAAfQYAaAAA
fQcAaAAAfQgAeCoCdAcAdAgAdAkAZAQAgwIAgwAAgwEAR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V0aXRlcl9zCQAAAF9nZXRhdHRyX3MHAAAAY29udGV4dHMFAAAAdmF1bHRz
CQAAAHZhdWx0X3VybHMHAAAAX3dyaXRlX3MPAAAAdmF1bHRfaW52ZW50b3J5cwkAAABfZ2V0aXRl
bV9zCAAAAHJlc291cmNlcwQAAAByZXBycwYAAABhcHBlbmRzCAAAACRhcHBlbmQwcwEAAAB4cwgA
AABxdWFudGl0eXMLAAAAdG90YWxfcHJpY2VzCwAAAGNvbHVtbl9saXN0cxQAAAB0b3RhbF9pbnZl
bnRvcnlfbGlzdHMIAAAAdG1wX2RpY3RzEwAAAGdlbmVyYWxfdG90YWxfcHJpY2VzEQAAAHJlc291
cmNlX2luX3ZhdWx0cwgAAABLZXlFcnJvcnMHAAAAX2FwcGx5XygAAAAAKAEAAABzFwAAAGdldFRp
dGxlRnJvbUNhdGVnb3J5VXJscw8AAABTY3JpcHQgKFB5dGhvbilzJQAAAENvdW50ZXJNb2R1bGVf
Z2V0VmF1bHRUcmFuc2FjdGlvbkxpc3QBAAAAc2YAAAANAgkDDAMGAQYBBgIZAAYBEgEQARABNgEg
AwMBNAIaACACIAEvARYBFgFBAUECGAsNARgBGQAJAQkBFwElAhYBCAIGAigABgFRAQYBGQAGAQMB
HAEOASABIwEZARcBEwEjAQQBFwAoAQAAAHMlAAAAQ291bnRlck1vZHVsZV9nZXRWYXVsdFRyYW5z
YWN0aW9uTGlzdCgBAAAAcyUAAABDb3VudGVyTW9kdWxlX2dldFZhdWx0VHJhbnNhY3Rpb25MaXN0
KAAAAAAoAAAAAHMPAAAAU2NyaXB0IChQeXRob24pcwgAAAA8bW9kdWxlPgEAAABzAAAAAA==</string> </value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_skins/erp5_banking_core/CounterModule_getVaultTransactionList</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>column_names=0, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>column_names</string>
<string>kw</string>
<string>Products.ERP5Type.Document</string>
<string>newTempBase</string>
<string>getTitleFromCategoryUrl</string>
<string>getVariationTitleList</string>
<string>resource_dict</string>
<string>vault_dict</string>
<string>vault_inventory_dict</string>
<string>_getiter_</string>
<string>_getattr_</string>
<string>context</string>
<string>vault</string>
<string>vault_url</string>
<string>_write_</string>
<string>vault_inventory</string>
<string>_getitem_</string>
<string>resource</string>
<string>repr</string>
<string>append</string>
<string>$append0</string>
<string>x</string>
<string>quantity</string>
<string>total_price</string>
<string>column_list</string>
<string>total_inventory_list</string>
<string>tmp_dict</string>
<string>general_total_price</string>
<string>resource_in_vault</string>
<string>KeyError</string>
<string>_apply_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<int>0</int>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>CounterModule_getVaultTransactionList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -67,7 +67,7 @@
<item>
<key> <string>_body</string> </key>
<value> <string>currency_list = [(\'%s - %s\' % (x.getId(), x.getTitle()), x.getRelativeUrl())\n
for x in context.currency.objectValues()]\n
for x in context.currency_module.objectValues()]\n
\n
currency_list.insert(0, (\'\',\'\'))\n
\n
......@@ -79,16 +79,16 @@ return currency_list\n
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAAAAAAcAAAAMAAA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AACVzIC0gJXNzBQAAAGdldElkcwgA
AABnZXRUaXRsZXMOAAAAZ2V0UmVsYXRpdmVVcmxzBgAAAGluc2VydGkAAAAAcwAAAAAoBwAAAHMG
AAAAYXBwZW5kcwgAAAAkYXBwZW5kMHMJAAAAX2dldGl0ZXJfcwkAAABfZ2V0YXR0cl9zBwAAAGNv
bnRleHRzAQAAAHhzDQAAAGN1cnJlbmN5X2xpc3QoBwAAAHMGAAAAYXBwZW5kcwgAAAAkYXBwZW5k
MHMJAAAAX2dldGl0ZXJfcwkAAABfZ2V0YXR0cl9zBwAAAGNvbnRleHRzAQAAAHhzDQAAAGN1cnJl
bmN5X2xpc3QoAAAAACgAAAAAcw8AAABTY3JpcHQgKFB5dGhvbilzIAAAAEN1cnJlbmN5RXhjaGFu
Z2VfZ2V0Q3VycmVuY3lMaXN0AQAAAHMIAAAAEwEWAFACGQIoAQAAAHMgAAAAQ3VycmVuY3lFeGNo
YW5nZV9nZXRDdXJyZW5jeUxpc3QoAQAAAHMgAAAAQ3VycmVuY3lFeGNoYW5nZV9nZXRDdXJyZW5j
eUxpc3QoAAAAACgAAAAAcw8AAABTY3JpcHQgKFB5dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </value>
</item>
<item>
<key> <string>_filepath</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>reference_currency = context.Baobab_getPortalReferenceCurrencyID()\n
\n
currency_list = [(\'%s - %s\' % (x.getId(), x.getTitle()), x.getRelativeUrl())\n
for x in context.currency.objectValues()\n
if x.getId() != reference_currency]\n
\n
currency_list.insert(0, (\'\',\'\'))\n
\n
return currency_list\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAAAAAAgAAAAMAAAAQwAA
AHPJAAAAdAAAdAEAZAEAgwIAgwAAfQIAZwAABGkDAH0EAHQFAHQAAHQAAHQBAGQCAIMCAGQDAIMC
AIMAAIMBAERdYQB9BgB0AAB8BgBkBACDAgCDAAB8AgBqAwBvQgABfAQAZAUAdAAAfAYAZAQAgwIA
gwAAdAAAfAYAZAYAgwIAgwAAZgIAFnQAAHwGAGQHAIMCAIMAAGYCAIMBAAFxOwABcTsAfgQAfQcA
dAAAfAcAZAgAgwIAZAkAZAoAZAoAZgIAgwIAAXwHAFNkAABTKAsAAABOcyMAAABCYW9iYWJfZ2V0
UG9ydGFsUmVmZXJlbmNlQ3VycmVuY3lJRHMIAAAAY3VycmVuY3lzDAAAAG9iamVjdFZhbHVlc3MF
AAAAZ2V0SWRzBwAAACVzIC0gJXNzCAAAAGdldFRpdGxlcw4AAABnZXRSZWxhdGl2ZVVybHMGAAAA
aW5zZXJ0aQAAAABzAAAAACgIAAAAcwkAAABfZ2V0YXR0cl9zBwAAAGNvbnRleHRzEgAAAHJlZmVy
ZW5jZV9jdXJyZW5jeXMGAAAAYXBwZW5kcwgAAAAkYXBwZW5kMHMJAAAAX2dldGl0ZXJfcwEAAAB4
cw0AAABjdXJyZW5jeV9saXN0KAgAAABzCQAAAF9nZXRhdHRyX3MHAAAAY29udGV4dHMSAAAAcmVm
ZXJlbmNlX2N1cnJlbmN5cwYAAABhcHBlbmRzCAAAACRhcHBlbmQwcwkAAABfZ2V0aXRlcl9zAQAA
AHhzDQAAAGN1cnJlbmN5X2xpc3QoAAAAACgAAAAAcw8AAABTY3JpcHQgKFB5dGhvbilzJwAAAEN1
cnJlbmN5RXhjaGFuZ2VfZ2V0Rm9yZWlnbkN1cnJlbmN5TGlzdAEAAABzDAAAABICEwEWAAYBZwIZ
AigBAAAAcycAAABDdXJyZW5jeUV4Y2hhbmdlX2dldEZvcmVpZ25DdXJyZW5jeUxpc3QoAQAAAHMn
AAAAQ3VycmVuY3lFeGNoYW5nZV9nZXRGb3JlaWduQ3VycmVuY3lMaXN0KAAAAAAoAAAAAHMPAAAA
U2NyaXB0IChQeXRob24pcwgAAAA8bW9kdWxlPgEAAABzAAAAAA==</string> </value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_skins/erp5_banking_core/CurrencyExchange_getForeignCurrencyList</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>reference_currency</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>x</string>
<string>currency_list</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>CurrencyExchange_getForeignCurrencyList</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Move This to erp5_core ?</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ExternalMethod.ExternalMethod</string>
<string>ExternalMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_function</string> </key>
<value> <string>ERP5Type_initLocalRoleMapping</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>RolePolicy</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ERP5Type_initLocalRoleMapping_DEPRECATED_TOO</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value> <string encoding="base64">O/INCg==</string> </value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
def lowerCase(s):\n
return s.replace(\' \', \'_\').lower()\n
\n
def upperCase(s):\n
s = \' \'.join([x.capitalize() for x in lowerCase(s).split(\'_\') if len(x) > 0])\n
s = \'/\'.join([x[0].upper() + x[1:] for x in s.split(\'/\') if len(x) > 0])\n
item_list = s.split(\' \')\n
if len(item_list) > 1:\n
new_list = []\n
for item in item_list :\n
if item in (\'A\', \'Chez\', \'De\', \'Des\', \'En\', \'Et\', \'La\', \'Par\', \'Pour\') :\n
item = item.lower()\n
new_list.append(item)\n
item_list = new_list\n
return \' \'.join(item_list)\n
\n
def l_clean(line) :\n
if line.endswith(\'\\n\') :\n
line = line[:-1]\n
return line\n
\n
def l_split(line) :\n
e_list = line.split(\',\')\n
new_e_list = []\n
for e in e_list :\n
if len(e) > 0 :\n
if e[0] == \'"\' and e[-1] == \'"\' :\n
e = e[1:-1]\n
new_e_list.append(e)\n
return new_e_list\n
\n
def create_category(cat) :\n
\n
cat_list = lowerCase(cat).split(\'/\')\n
cat_len = len(cat_list)\n
\n
if cat_len == 1 :\n
# base_category\n
return context.portal_categories.newContent(portal_type = \'Base Category\',\n
id = lowerCase(cat_list[0]),\n
title = upperCase(cat_list[0]))\n
\n
elif cat_len > 1 :\n
# sub_category\n
relative_category = context.portal_categories.getCategoryValue(lowerCase(\'/\'.join(cat_list[:-1])))\n
\n
if relative_category is None :\n
relative_category = create_category(lowerCase(\'/\'.join(cat_list[:-1])))\n
\n
cat = relative_category.get(lowerCase(cat_list[-1]))\n
if cat is not None :\n
return cat\n
else :\n
return relative_category.newContent(portal_type = \'Category\',\n
id = lowerCase(cat_list[-1]),\n
title = upperCase(cat_list[-1]))\n
\n
def generate_vault_dict() :\n
c_list = context.portal_categories.vault_type.getCategoryChildValueList()\n
vault_dict = {}\n
for c in c_list :\n
code = c.getProperty(\'codification\')\n
if code is not None :\n
vault_dict[code]=c.getRelativeUrl()\n
return vault_dict\n
\n
##########################################\n
request = context.REQUEST\n
\n
import_type = getattr(request,\'my_import_type\',None) or getattr(request,\'field_my_import_type\',None)\n
line_list = import_file.readlines()\n
\n
line_list = [l_clean(line) for line in line_list]\n
line_list = [l_split(line) for line in line_list]\n
\n
#return \'\\n\'.join([l for l in line_list])\n
\n
\n
if import_type == \'create_category\' :\n
if context.portal_categories.get(lowerCase(line_list[0][0])) :\n
context.portal_categories.deleteContent(lowerCase(line_list[0][0]))\n
for e_list in line_list :\n
if len(e_list) > 0 :\n
e = e_list[0]\n
try :\n
print \'trying to create %s ...\' % lowerCase(e),\n
create_category(e)\n
print \'done\'\n
except :\n
print \'Failed\'\n
return printed\n
\n
\n
elif import_type == \'assign_codification\' :\n
for e_list in line_list :\n
if len(e_list) == 2 :\n
try :\n
print \'trying to assign to %s ...\' % lowerCase(e_list[0]) ,\n
category = context.portal_categories.getCategoryValue(lowerCase(e_list[0]))\n
category.setCodification(e_list[1])\n
print \'done %s\' % repr(e_list)\n
except :\n
print \'Failed\'\n
return printed\n
\n
\n
elif import_type == \'assign_vault_type\' :\n
vault_type_dict = generate_vault_dict()\n
vault_type_list = vault_type_dict.keys()\n
for e_list in line_list :\n
if len(e_list) == 2 and e_list[1] in vault_type_list :\n
category = context.portal_categories.getCategoryValue(lowerCase(e_list[0]))\n
category.setCategoryList([vault_type_dict[e_list[1]]])\n
print \'set %s to %s\' % ([vault_type_dict[e_list[1]]], category)\n
\n
elif import_type == \'create_subvaults\' :\n
#Encaisse des Billets Restitues par Tiers a Detruire# seulemnt sur sites disposant de tri tiers\n
#Encaisse des Billets Recus pour Ventilation# seulement sur sites principaux\n
subvault_dict = {}\n
for e_list in line_list :\n
if len(e_list) == 3 :\n
vault = lowerCase(e_list[0])\n
subvault = upperCase(e_list[1])\n
subvault_code = upperCase(e_list[2])\n
if not subvault_dict.has_key(vault) :\n
subvault_dict[vault] = []\n
subvault_dict[vault].append([subvault, subvault_code])\n
if subvault == \'Encaisse des Devises\' :\n
for c in context.currency.objectValues() :\n
if c.getId() != context.Baobab_getPortalReferenceCurrencyID():\n
subvault_dict[vault].append([\'%s/%s\' % (subvault, c.getTitle()), None])\n
if subvault == \'Encaisse des Billets Recus pour Ventilation\' :\n
for c in context.portal_categories.site.agence.principale.objectIds() :\n
subvault_dict[vault].append([\'%s/%s\' % (subvault, upperCase(c)), None])\n
\n
vault_type_list = subvault_dict.keys()\n
\n
for c in context.portal_categories.site.getCategoryChildValueList() :\n
for vault_type in vault_type_list :\n
if context.portal_categories.isMemberOf(c, vault_type, strict=1) :\n
print c.getRelativeUrl(), \'is\', vault_type\n
for subvault_data in subvault_dict[vault_type] :\n
subvault_path = subvault_data[0]\n
subvault_code = subvault_data[1]\n
if \'Encaisse des Billets Recus pour Ventilation\' in subvault_path or \'Encaisse des Billets Restitues par Tiers a Detruire\' in subvault_path :\n
if not context.portal_categories.isMemberOf(c, \'site/agence/principale\', strict=0) :\n
#print \'XXXXXXXX is not principale, not creating\', subvault_path\n
pass\n
elif subvault_path.find(\'/\') > 0 and lowerCase(subvault_path).split(\'/\')[1] in c.getRelativeUrl() :\n
#print \'XXXXXXXX is itself, not creating\', subvault_path\n
pass\n
else :\n
print \' creating\', subvault_path\n
new_category_obj = create_category(\'%s/%s\' % (c.getRelativeUrl(), subvault_path))\n
if subvault_code not in (None, \'\'):\n
new_category_obj.setCodification(subvault_code)\n
else :\n
print \' creating\', subvault_path\n
new_category_obj = create_category(\'%s/%s\' % (c.getRelativeUrl(), subvault_path))\n
if subvault_code not in (None, \'\'):\n
new_category_obj.setCodification(subvault_code)\n
print\n
break\n
else : print c.getRelativeUrl(), \'not here\'\n
\n
\n
\n
\n
\n
\n
\n
print \'ok\'\n
return printed\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value> <string encoding="base64">YwAAAAAAAAAAAQAAAEAAAABzDQAAAGQBAIQAAFoAAGQAAFMoAgAAAE5jAQAAACcAAABBAAAACwAA
AHM0CAAAdAAAgwAAfQMAZAEAhAAAiQIAhwIAZAIAhgAAiQEAZAMAhAAAfQYAZAQAhAAAfQcAhwAA
hwEAhwIAZAUAhgAAiQAAZAYAhAAAfQkAdAgAdAkAZAcAgwIAfQwAdAsAfAwAZAgAdAwAgwMAcBAA
AXQLAHwMAGQJAHQMAIMDAH0PAHQIAHwAAGQKAIMCAIMAAH0QAGcAAARpEAB9EgB0EgB8EACDAQBE
XRYAfRQAfBIAfAYAfBQAgwEAgwEAAXGlAH4SAH0QAGcAAARpEAB9EgB0EgB8EACDAQBEXRYAfRQA
fBIAfAcAfBQAgwEAgwEAAXHYAH4SAH0QAHwPAGQLAGoCAG/3AAF0CAB0CAB0CQBkDACDAgBkDQCD
AgCIAgB0FAB0FAB8EABkDgCDAgBkDgCDAgCDAQCDAQBvOAABdAgAdAgAdAkAZAwAgwIAZA8AgwIA
iAIAdBQAdBQAfBAAZA4AgwIAZA4AgwIAgwEAgwEAAW4BAAF4qQZ0EgB8EACDAQBEXXMAfRYAdBYA
fBYAgwEAZA4AagQAb1oAAXQUAHwWAGQOAIMCAH0YAHksAHwDAARkEACIAgB8GACDAQAWAkkBiAAA
fBgAgwEAAXwDAARkEQACSUpXcfMBAQEBfAMABGQSAAJJSnwDAIMAAFNx8wFYcYABAXGAAVduJQYB
fA8AZBMAagIAb8sAAXgUBnQSAHwQAIMBAERdtgB9FgB0FgB8FgCDAQBkFABqAgBvnQABeX4AfAMA
BGQVAIgCAHQUAHwWAGQOAIMCAIMBABYCSQF0CAB0CAB0CQBkDACDAgBkF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EAAAAG5ld19jYXRlZ29yeV9vYmooAAAAACgDAAAAcw8AAABjcmVhdGVfY2F0ZWdvcnlz
CQAAAHVwcGVyQ2FzZXMJAAAAbG93ZXJDYXNlcw8AAABTY3JpcHQgKFB5dGhvbilzFQAAAEltcG9y
dENzdlRvQ2F0ZWdvcmllcwEAAABzvAAAABIDDA0JBQkKEhoJCg8CJQESAhQAHwEUAB8FEwE3ATIB
DQAGARMBDwEDARQBCgERAgoBFwMNAQ0ABgETAQMBHQEwARkBGwIKARcDDQEJARIBDQAGASkBMAEl
ATUCDQMGAQ0ABgETARUBFQEVARcBGgEcAQ0BIgAGASsBPgENAT0ADAE8AhICKwAGAQ0ADAEiASIB
FgAGAQ8BEgEXASkCBwFQAgQCEAEiARYBGAIQASIBFgEYAQQBCQEkCAoBKAEAAABzFQAAAEltcG9y
dENzdlRvQ2F0ZWdvcmllcygBAAAAcxUAAABJbXBvcnRDc3ZUb0NhdGVnb3JpZXMoAAAAACgAAAAA
cw8AAABTY3JpcHQgKFB5dGhvbilzCAAAADxtb2R1bGU+AQAAAHMAAAAA</string> </value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/baobab/portal_skins/erp5_banking_core/ImportCsvToCategories</string> </value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>import_file, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>import_file</string>
<string>kw</string>
<string>_print_</string>
<string>_print</string>
<string>lowerCase</string>
<string>upperCase</string>
<string>l_clean</string>
<string>l_split</string>
<string>create_category</string>
<string>generate_vault_dict</string>
<string>_getattr_</string>
<string>context</string>
<string>request</string>
<string>getattr</string>
<string>None</string>
<string>import_type</string>
<string>line_list</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>line</string>
<string>_getitem_</string>
<string>e_list</string>
<string>len</string>
<string>e</string>
<string>category</string>
<string>repr</string>
<string>vault_type_dict</string>
<string>vault_type_list</string>
<string>subvault_dict</string>
<string>vault</string>
<string>subvault</string>
<string>subvault_code</string>
<string>_write_</string>
<string>c</string>
<string>vault_type</string>
<string>subvault_data</string>
<string>subvault_path</string>
<string>new_category_obj</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ImportCsvToCategories</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Move to erp5_core ?</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2005-12-19 Kevin
* Update z_catalog_stock_list ZSQL method to follow Seb's changes.
* Add Baobab_getPortalReferenceCurrencyID script to get the default currency.
* Change reference to getPortalReferenceCurrencyID portal method. Use Baobab_getPortalReferenceCurrencyID instead.
2005-12-14 Kevin
* Add a hack in Baobab_getUserAssignmentList to support old and new person module id.
2005-12-13 Kevin
* Add CashDelivery document.
* Clean portal_classes.
2005-12-12 Kevin
* Change the acquisition_portal_type_list attribute on base category 'site' from "'[]'" to "python: []".
* Delete deprecated ERP5Type_initLocalRoleMapping_* objects.
2005-12-08 Kevin
* Delete custom version of ERP5Type_getSecurityCategoryFromAssignment. Move it to erp5_core.
* Update z_catalog_stock_list to v1.10.
......
CashCurrency
CashDeliveryLine
BankingOperation
CashContainer
BankingOperationLine
AccountingTransactionRule
BankingOperation
\ No newline at end of file
CashDelivery
\ No newline at end of file
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