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): ...@@ -214,29 +214,6 @@ class SimulationMovement(Movement, PropertyRecordableMixin):
""" """
return self.getParentValue().isAccountable(self) 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 # Causality Workflow Methods
......
...@@ -46,17 +46,6 @@ class Simulation: ...@@ -46,17 +46,6 @@ class Simulation:
'description' : 'If set to 1, the stop date can not be changed', 'description' : 'If set to 1, the stop date can not be changed',
'type' : 'boolean', 'type' : 'boolean',
'mode' : 'w' }, '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', { 'id' : 'delivery_ratio',
'description' : 'ratio to apply on the quantity property of the' \ 'description' : 'ratio to apply on the quantity property of the' \
'corresponding delivery to obtain the current quantity', 'corresponding delivery to obtain the current quantity',
......
...@@ -83,12 +83,6 @@ ...@@ -83,12 +83,6 @@
<dictionary/> <dictionary/>
</value> </value>
</item> </item>
<item>
<key> <string>isDeliverable</string> </key>
<value>
<dictionary/>
</value>
</item>
<item> <item>
<key> <string>isDivergent</string> </key> <key> <string>isDivergent</string> </key>
<value> <value>
...@@ -101,12 +95,6 @@ ...@@ -101,12 +95,6 @@
<dictionary/> <dictionary/>
</value> </value>
</item> </item>
<item>
<key> <string>isOrderable</string> </key>
<value>
<dictionary/>
</value>
</item>
<item> <item>
<key> <string>uid</string> </key> <key> <string>uid</string> </key>
<value> <value>
...@@ -131,8 +119,6 @@ ...@@ -131,8 +119,6 @@
<string>getStopDate</string> <string>getStopDate</string>
<string>getPrice</string> <string>getPrice</string>
<string>isAccountable</string> <string>isAccountable</string>
<string>isOrderable</string>
<string>isDeliverable</string>
<string>isDivergent</string> <string>isDivergent</string>
<string>getVariationText</string> <string>getVariationText</string>
</list> </list>
...@@ -162,8 +148,6 @@ getStartDate\n ...@@ -162,8 +148,6 @@ getStartDate\n
getStopDate\n getStopDate\n
getPrice\n getPrice\n
isAccountable\n isAccountable\n
isOrderable\n
isDeliverable\n
isDivergent\n isDivergent\n
getVariationText</string> </value> getVariationText</string> </value>
</item> </item>
...@@ -235,8 +219,6 @@ VALUES\n ...@@ -235,8 +219,6 @@ VALUES\n
<dtml-sqlvar expr="getStopDate[loop_item]" type="datetime" optional>,\n <dtml-sqlvar expr="getStopDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getPrice[loop_item]" type="float" 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="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="isDivergent[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getVariationText[loop_item]" type="string" optional>\n <dtml-sqlvar expr="getVariationText[loop_item]" type="string" optional>\n
)\n )\n
...@@ -314,8 +296,6 @@ VALUES\n ...@@ -314,8 +296,6 @@ VALUES\n
<dtml-sqlvar expr="getStopDate[loop_item]" type="datetime" optional>,\n <dtml-sqlvar expr="getStopDate[loop_item]" type="datetime" optional>,\n
<dtml-sqlvar expr="getPrice[loop_item]" type="float" 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="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="isDivergent[loop_item]" type="int" optional>,\n
<dtml-sqlvar expr="getVariationText[loop_item]" type="string" optional>\n <dtml-sqlvar expr="getVariationText[loop_item]" type="string" optional>\n
)\n )\n
......
...@@ -97,8 +97,6 @@ CREATE TABLE `movement` (\n ...@@ -97,8 +97,6 @@ CREATE TABLE `movement` (\n
`stop_date` datetime,\n `stop_date` datetime,\n
`price` real,\n `price` real,\n
`is_accountable` bool,\n `is_accountable` bool,\n
`is_orderable` bool,\n
`is_deliverable` bool,\n
`is_divergent` bool,\n `is_divergent` bool,\n
`variation_text` VARCHAR(255),\n `variation_text` VARCHAR(255),\n
PRIMARY KEY `uid` (`uid`),\n PRIMARY KEY `uid` (`uid`),\n
...@@ -107,8 +105,6 @@ CREATE TABLE `movement` (\n ...@@ -107,8 +105,6 @@ CREATE TABLE `movement` (\n
KEY `destination_uid` (`destination_uid`),\n KEY `destination_uid` (`destination_uid`),\n
KEY `resource_uid` (`resource_uid`),\n KEY `resource_uid` (`resource_uid`),\n
KEY `is_accountable` (`is_accountable`),\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 KEY `variation_text` (`variation_text`)\n
) TYPE=InnoDB;\n ) TYPE=InnoDB;\n
</string> </value> </string> </value>
...@@ -162,8 +158,6 @@ CREATE TABLE `movement` (\n ...@@ -162,8 +158,6 @@ CREATE TABLE `movement` (\n
`stop_date` datetime,\n `stop_date` datetime,\n
`price` real,\n `price` real,\n
`is_accountable` bool,\n `is_accountable` bool,\n
`is_orderable` bool,\n
`is_deliverable` bool,\n
`is_divergent` bool,\n `is_divergent` bool,\n
`variation_text` VARCHAR(255),\n `variation_text` VARCHAR(255),\n
PRIMARY KEY `uid` (`uid`),\n PRIMARY KEY `uid` (`uid`),\n
...@@ -172,8 +166,6 @@ CREATE TABLE `movement` (\n ...@@ -172,8 +166,6 @@ CREATE TABLE `movement` (\n
KEY `destination_uid` (`destination_uid`),\n KEY `destination_uid` (`destination_uid`),\n
KEY `resource_uid` (`resource_uid`),\n KEY `resource_uid` (`resource_uid`),\n
KEY `is_accountable` (`is_accountable`),\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 KEY `variation_text` (`variation_text`)\n
) TYPE=InnoDB;\n ) TYPE=InnoDB;\n
</string> </value> </string> </value>
......
169 170
\ No newline at end of file \ 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