Commit fa3b5dec authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

remove orderable and deliverable on Simulation Movement, that are useless and not at all used.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31979 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c11acae4
......@@ -214,29 +214,6 @@ class SimulationMovement(Movement, PropertyRecordableMixin):
"""
return self.getParentValue().isAccountable(self)
# Ordering / Delivering
security.declareProtected( Permissions.AccessContentsInformation,
'requiresOrder')
def requiresOrder(self):
"""
Returns 1 if this needs to be ordered
"""
if self.isOrderable():
return len(self.getCategoryMembership('order')) is 0
else:
return 0
security.declareProtected( Permissions.AccessContentsInformation,
'requiresDelivery')
def requiresDelivery(self):
"""
Returns 1 if this needs to be accounted
"""
if self.isDeliverable():
return len(self.getCategoryMembership('delivery')) is 0
else:
return 0
#######################################################
# Causality Workflow Methods
......
......@@ -46,17 +46,6 @@ class Simulation:
'description' : 'If set to 1, the stop date can not be changed',
'type' : 'boolean',
'mode' : 'w' },
# Change of dates and quantities
{ 'id' : 'orderable',
'description' : 'If set to 1, self must be associated to an order',
'type' : 'boolean',
'mode' : 'w' },
{ 'id' : 'deliverable',
'description' : 'If set to 1, self must be associated to a delivery',
'type' : 'boolean',
'mode' : 'w' },
{ 'id' : 'delivery_ratio',
'description' : 'ratio to apply on the quantity property of the' \
'corresponding delivery to obtain the current quantity',
......
......@@ -83,12 +83,6 @@
<dictionary/>
</value>
</item>
<item>
<key> <string>isDeliverable</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>isDivergent</string> </key>
<value>
......@@ -101,12 +95,6 @@
<dictionary/>
</value>
</item>
<item>
<key> <string>isOrderable</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>uid</string> </key>
<value>
......@@ -131,8 +119,6 @@
<string>getStopDate</string>
<string>getPrice</string>
<string>isAccountable</string>
<string>isOrderable</string>
<string>isDeliverable</string>
<string>isDivergent</string>
<string>getVariationText</string>
</list>
......@@ -162,8 +148,6 @@ getStartDate\n
getStopDate\n
getPrice\n
isAccountable\n
isOrderable\n
isDeliverable\n
isDivergent\n
getVariationText</string> </value>
</item>
......@@ -235,8 +219,6 @@ VALUES\n
<dtml-sqlvar expr="getStopDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getPrice[loop_item]" type="float" optional>,\n
<dtml-sqlvar expr="isAccountable[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="isOrderable[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="isDeliverable[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="isDivergent[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getVariationText[loop_item]" type="string" optional>\n
)\n
......@@ -314,8 +296,6 @@ VALUES\n
<dtml-sqlvar expr="getStopDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getPrice[loop_item]" type="float" optional>,\n
<dtml-sqlvar expr="isAccountable[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="isOrderable[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="isDeliverable[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="isDivergent[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getVariationText[loop_item]" type="string" optional>\n
)\n
......
......@@ -97,8 +97,6 @@ CREATE TABLE `movement` (\n
`stop_date` datetime,\n
`price` real,\n
`is_accountable` bool,\n
`is_orderable` bool,\n
`is_deliverable` bool,\n
`is_divergent` bool,\n
`variation_text` VARCHAR(255),\n
PRIMARY KEY `uid` (`uid`),\n
......@@ -107,8 +105,6 @@ CREATE TABLE `movement` (\n
KEY `destination_uid` (`destination_uid`),\n
KEY `resource_uid` (`resource_uid`),\n
KEY `is_accountable` (`is_accountable`),\n
KEY `is_orderable` (`is_orderable`),\n
KEY `is_deliverable` (`is_deliverable`),\n
KEY `variation_text` (`variation_text`)\n
) TYPE=InnoDB;\n
</string> </value>
......@@ -162,8 +158,6 @@ CREATE TABLE `movement` (\n
`stop_date` datetime,\n
`price` real,\n
`is_accountable` bool,\n
`is_orderable` bool,\n
`is_deliverable` bool,\n
`is_divergent` bool,\n
`variation_text` VARCHAR(255),\n
PRIMARY KEY `uid` (`uid`),\n
......@@ -172,8 +166,6 @@ CREATE TABLE `movement` (\n
KEY `destination_uid` (`destination_uid`),\n
KEY `resource_uid` (`resource_uid`),\n
KEY `is_accountable` (`is_accountable`),\n
KEY `is_orderable` (`is_orderable`),\n
KEY `is_deliverable` (`is_deliverable`),\n
KEY `variation_text` (`variation_text`)\n
) TYPE=InnoDB;\n
</string> </value>
......
169
\ No newline at end of file
170
\ 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