Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ophélie Gagnard
slapos.core
Commits
f4a53f1e
Commit
f4a53f1e
authored
Feb 28, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate Open Sale Orders separately.
Not all Open Sale Orders have lines, but all have to be migrated.
parent
db269087
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
184 additions
and
13 deletions
+184
-13
master/bt5/vifib_upgrader/ExtensionTemplateItem/VifibUpgrader.py
...bt5/vifib_upgrader/ExtensionTemplateItem/VifibUpgrader.py
+18
-12
master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_initiateOpenSaleOrderMigration.xml
...ifib_upgrader/ERP5Site_initiateOpenSaleOrderMigration.xml
+70
-0
master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ExtensionOpenSaleOrder_migrate.xml
...l_skins/vifib_upgrader/ExtensionOpenSaleOrder_migrate.xml
+28
-0
master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/OpenSaleOrder_migrate.xml
...tem/portal_skins/vifib_upgrader/OpenSaleOrder_migrate.xml
+67
-0
master/bt5/vifib_upgrader/bt/revision
master/bt5/vifib_upgrader/bt/revision
+1
-1
No files found.
master/bt5/vifib_upgrader/ExtensionTemplateItem/VifibUpgrader.py
View file @
f4a53f1e
from
DateTime
import
DateTime
from
Products.ERP5Type.Base
import
WorkflowMethod
from
Products.ERP5Type.Base
import
WorkflowMethod
@
WorkflowMethod
.
disable
@
WorkflowMethod
.
disable
...
@@ -22,20 +23,25 @@ def DeliveryLineSetZeroPriceAndOrUpdateAppliedRule(self):
...
@@ -22,20 +23,25 @@ def DeliveryLineSetZeroPriceAndOrUpdateAppliedRule(self):
self
.
setQuantity
(
1.0
)
self
.
setQuantity
(
1.0
)
self
.
Delivery_updateAppliedRule
()
self
.
Delivery_updateAppliedRule
()
from
DateTime
import
DateTime
@
WorkflowMethod
.
disable
def
OpenSaleOrder_migrate
(
self
):
if
self
.
getSpecialise
()
!=
'sale_trade_condition_module/vifib_simple_trade_condition'
:
self
.
setSpecialise
(
'sale_trade_condition_module/vifib_trade_simple_condition'
)
destination
=
self
.
getDestination
()
or
self
.
getDestinationDecision
()
or
self
.
getDestinationSection
()
assert
destination
is
not
None
if
self
.
getDestinationDecision
()
!=
destination
:
self
.
setDestinationDecision
(
destination
)
if
self
.
getDestinationSection
()
!=
destination
:
self
.
setDestinationSection
(
destination
)
if
self
.
getSource
()
!=
'organisation_module/vifib_internet'
:
self
.
setSource
(
'organisation_module/vifib_internet'
)
if
self
.
getSourceSection
()
!=
'organisation_module/vifib_internet'
:
self
.
setSourceSection
(
'organisation_module/vifib_internet'
)
if
self
.
getPriceCurrency
()
!=
'currency_module/EUR'
:
self
.
setPriceCurrency
(
'currency_module/EUR'
)
@
WorkflowMethod
.
disable
@
WorkflowMethod
.
disable
def
OpenSaleOrderLine_migrate
(
self
):
def
OpenSaleOrderLine_migrate
(
self
):
open_sale_order
=
self
.
getParentValue
()
if
open_sale_order
.
getSpecialise
()
!=
'sale_trade_condition_module/vifib_simple_trade_condition'
:
open_sale_order
.
setSpecialise
(
'sale_trade_condition_module/vifib_simple_trade_condition'
)
if
open_sale_order
.
getDestinationDecision
()
!=
open_sale_order
.
getDestination
():
open_sale_order
.
setDestinationDecision
(
open_sale_order
.
getDestination
())
if
open_sale_order
.
getSource
()
!=
'organisation_module/vifib_internet'
:
open_sale_order
.
setSource
(
'organisation_module/vifib_internet'
)
if
open_sale_order
.
getSourceSection
()
!=
'organisation_module/vifib_internet'
:
open_sale_order
.
setSourceSection
(
'organisation_module/vifib_internet'
)
if
open_sale_order
.
getPriceCurrency
()
!=
'currency_module/EUR'
:
open_sale_order
.
setPriceCurrency
(
'currency_module/EUR'
)
now
=
DateTime
().
earliestTime
()
now
=
DateTime
().
earliestTime
()
self
.
setStartDate
(
now
)
self
.
setStartDate
(
now
)
self
.
setStopDate
(
now
)
self
.
setStopDate
(
now
)
...
...
master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_initiateOpenSaleOrderMigration.xml
0 → 100644
View file @
f4a53f1e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</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>
context.getPortalObject().portal_catalog.searchAndActivate(\n
portal_type=\'Open Sale Order\',\n
method_id=\'OpenSaleOrder_migrate\'\n
)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ERP5Site_initiateOpenSaleOrderMigration
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ExtensionOpenSaleOrder_migrate.xml
0 → 100644
View file @
f4a53f1e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ExternalMethod"
module=
"Products.ExternalMethod.ExternalMethod"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_function
</string>
</key>
<value>
<string>
OpenSaleOrder_migrate
</string>
</value>
</item>
<item>
<key>
<string>
_module
</string>
</key>
<value>
<string>
VifibUpgrader
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ExtensionOpenSaleOrder_migrate
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/OpenSaleOrder_migrate.xml
0 → 100644
View file @
f4a53f1e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</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 context.ExtensionOpenSaleOrder_migrate(context)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
OpenSaleOrder_migrate
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_upgrader/bt/revision
View file @
f4a53f1e
71
72
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment