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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.core
Commits
cd58d5d7
Commit
cd58d5d7
authored
Jan 30, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to pass and transmit parameters.
parent
19037c78
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
12 deletions
+17
-12
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/Alarm_updateOpenSaleOrderLine.xml
...portal_skins/vifib_slap/Alarm_updateOpenSaleOrderLine.xml
+14
-3
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/OpenSaleOrderLine_updateStopDate.xml
...tal_skins/vifib_slap/OpenSaleOrderLine_updateStopDate.xml
+2
-8
master/bt5/vifib_slap/bt/revision
master/bt5/vifib_slap/bt/revision
+1
-1
No files found.
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/Alarm_updateOpenSaleOrderLine.xml
View file @
cd58d5d7
...
...
@@ -50,15 +50,26 @@
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
context.portal_catalog.searchAndActivate(\n
method_id=\'OpenSaleOrderLine_setStopDateForward\',\n
<value>
<string>
stop_date = None\n
if params is not None:\n
stop_date = params.get(\'stop_date\')\n
from DateTime import DateTime\n
from Products.ERP5Type.DateUtils import getClosestDate, addToDate\n
\n
if stop_date is None:\n
# generate expected next month\n
stop_date = addToDate(getClosestDate(target_date=DateTime(), precision=\'month\', before=1), month=2)\n
\n
context.portal_catalog.searchAndActivate(\n
method_id=\'OpenSaleOrderLine_updateStopDate\',\n
activate_kw={\'tag\':tag},\n
method_kw={\'stop_date\': stop_date},\n
portal_type=\'Open Sale Order Line\')\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
tag, fixit
</string>
</value>
<value>
<string>
tag, fixit
, params
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/OpenSaleOrderLine_
setStopDateForward
.xml
→
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/OpenSaleOrderLine_
updateStopDate
.xml
View file @
cd58d5d7
...
...
@@ -52,12 +52,6 @@
<key>
<string>
_body
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
from DateTime import DateTime\n
from Products.ERP5Type.DateUtils import getClosestDate, addToDate\n
\n
# generate expected next month\n
stop_date = addToDate(getClosestDate(target_date=DateTime(), precision=\'month\', before=1), month=2)\n
\n
if context.getStopDate() < stop_date:\n
context.setStopDate(stop_date)\n
...
...
@@ -66,11 +60,11 @@ if context.getStopDate() < stop_date:\n
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
stop_date
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
OpenSaleOrderLine_
setStopDateForward
</string>
</value>
<value>
<string>
OpenSaleOrderLine_
updateStopDate
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/vifib_slap/bt/revision
View file @
cd58d5d7
511
\ No newline at end of file
512
\ 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