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
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
82160e3e
Commit
82160e3e
authored
Nov 19, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Confirm invoice immediately after building.
parent
fe0f6f9f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
5 additions
and
267 deletions
+5
-267
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_simulation/SlapOSSaleInvoiceTransaction_postGeneration.xml
...imulation/SlapOSSaleInvoiceTransaction_postGeneration.xml
+3
-1
master/bt5/slapos_accounting/bt/revision
master/bt5/slapos_accounting/bt/revision
+1
-1
master/bt5/vifib_slap/PathTemplateItem/portal_alarms/confirm_planned_sale_invoice_transaction.xml
...ortal_alarms/confirm_planned_sale_invoice_transaction.xml
+0
-97
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/Alarm_confirmPlannedSaleInvoiceTransaction.xml
...vifib_slap/Alarm_confirmPlannedSaleInvoiceTransaction.xml
+0
-85
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/SaleInvoiceTransaction_confirmPlanned.xml
...kins/vifib_slap/SaleInvoiceTransaction_confirmPlanned.xml
+0
-81
master/bt5/vifib_slap/bt/revision
master/bt5/vifib_slap/bt/revision
+1
-1
master/bt5/vifib_slap/bt/template_path_list
master/bt5/vifib_slap/bt/template_path_list
+0
-1
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_simulation/SlapOSSaleInvoiceTransaction_postGeneration.xml
View file @
82160e3e
...
...
@@ -66,7 +66,9 @@ if 1:\n
if not invoice.getResource():\n
invoice.setResource(invoice.getPriceCurrency())\n
\n
invoice.plan(comment=translateString(\'Initialised by Delivery Builder.\'))\n
comment = translateString(\'Initialised by Delivery Builder.\')\n
invoice.plan(comment=comment)\n
invoice.confirm(comment=comment)\n
invoice.startBuilding()\n
</string>
</value>
</item>
...
...
master/bt5/slapos_accounting/bt/revision
View file @
82160e3e
80
\ No newline at end of file
81
\ No newline at end of file
master/bt5/vifib_slap/PathTemplateItem/portal_alarms/confirm_planned_sale_invoice_transaction.xml
deleted
100644 → 0
View file @
fe0f6f9f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Alarm"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
active_sense_method_id
</string>
</key>
<value>
<string>
Alarm_confirmPlannedSaleInvoiceTransaction
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
confirm_planned_sale_invoice_transaction
</string>
</value>
</item>
<item>
<key>
<string>
periodicity_day_frequency
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
periodicity_hour
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_minute
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_minute_frequency
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
periodicity_month
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_month_day
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
periodicity_start_date
</string>
</key>
<value>
<object>
<klass>
<global
name=
"DateTime"
module=
"DateTime.DateTime"
/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>
3660.0
</float>
<string>
GMT
</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
periodicity_week
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Alarm
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Confirm planned Sale Invoices before current month
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/Alarm_confirmPlannedSaleInvoiceTransaction.xml
deleted
100644 → 0
View file @
fe0f6f9f
<?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
encoding=
"cdata"
>
<![CDATA[
from DateTime import DateTime\n
from Products.ERP5Type.DateUtils import getClosestDate\n
\n
portal = context.getPortalObject()\n
this_month = getClosestDate(target_date=DateTime())\n
portal.portal_catalog.searchAndActivate(\n
portal_type=\'Sale Invoice Transaction\',\n
simulation_state=\'planned\',\n
method_id=\'SaleInvoiceTransaction_confirmPlanned\',\n
method_kw={\'this_month\': this_month},\n
activate_kw={\'tag\': tag},\n
**{"delivery.start_date": \'< %s\' % this_month}\n
)\n
\n
context.activate(after_tag=tag).getId()\n
]]>
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
tag, fixit, params
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Alarm_confirmPlannedSaleInvoiceTransaction
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slap/SkinTemplateItem/portal_skins/vifib_slap/SaleInvoiceTransaction_confirmPlanned.xml
deleted
100644 → 0
View file @
fe0f6f9f
<?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
encoding=
"cdata"
>
<![CDATA[
isTransitionPossible = context.getPortalObject().portal_workflow.isTransitionPossible\n
if context.getSimulationState() == \'planned\' and context.getStartDate() < this_month:\n
if len(context.getMovementList()) >
0:\n
if isTransitionPossible(context, \'confirm\'):\n
context.confirm(comment=\'Confirmed as ready to be accounted.\')\n
# as user will not have any invoice in planned state create new one, a bit later, in order to have current state reindexed\n
context.getDestinationValue().activate(after_path_and_method_id=(context.getPath(), (\'recursiveImmediateReindexObject\', \'immediateReindexObject\'))).fixConsistency()\n
else:\n
old_date = context.getStartDate()\n
context.setStartDate(this_month)\n
context.portal_workflow.doActionFor(context, \'edit_action\', comment=\'Moved date from %s to %s in order to move to new month.\' % (old_date, context.getStartDate()))\n
]]>
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
this_month
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SaleInvoiceTransaction_confirmPlanned
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/vifib_slap/bt/revision
View file @
82160e3e
878
\ No newline at end of file
879
\ No newline at end of file
master/bt5/vifib_slap/bt/template_path_list
View file @
82160e3e
portal_alarms/cleanup_active_process
portal_alarms/confirm_planned_sale_invoice_transaction
portal_alarms/stop_confirmed_sale_invoice_transaction
portal_alarms/vifib_bang_selenium_tester_instance
portal_alarms/vifib_check_consistency
...
...
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