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
16
Merge Requests
16
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
nexedi
slapos.core
Commits
f464c23a
Commit
f464c23a
authored
Feb 23, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build invoice per person.
parent
1ec99292
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
12 deletions
+33
-12
master/bt5/vifib_upgrader/ExtensionTemplateItem/VifibUpgrader.py
...bt5/vifib_upgrader/ExtensionTemplateItem/VifibUpgrader.py
+2
-2
master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_buildAndPlanInvoice.xml
...tal_skins/vifib_upgrader/ERP5Site_buildAndPlanInvoice.xml
+2
-3
master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/Person_buildAndPlanInvoice.xml
...ortal_skins/vifib_upgrader/Person_buildAndPlanInvoice.xml
+26
-4
master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/VifibSaleInvoiceBuilder_buildAndPlan.xml
...s/vifib_upgrader/VifibSaleInvoiceBuilder_buildAndPlan.xml
+2
-2
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 @
f464c23a
...
@@ -43,8 +43,8 @@ def OpenSaleOrderLine_migrate(self):
...
@@ -43,8 +43,8 @@ def OpenSaleOrderLine_migrate(self):
self
.
setPriceCurrency
(
'currency_module/EUR'
)
self
.
setPriceCurrency
(
'currency_module/EUR'
)
@
WorkflowMethod
.
disable
@
WorkflowMethod
.
disable
def
Vifib
InvoiceLineBuilder_buildAndPlan
(
self
,
explanation
):
def
Vifib
SaleInvoiceBuilder_buildAndPlan
(
self
,
movement_list
):
delivery_list
=
self
.
build
(
explanation
=
explanation
)
delivery_list
=
self
.
build
(
movement_list
=
movement_list
)
wf
=
self
.
getPortalObject
().
portal_workflow
.
accounting_workflow
wf
=
self
.
getPortalObject
().
portal_workflow
.
accounting_workflow
plan_tdef
=
wf
.
transitions
.
get
(
"plan"
)
plan_tdef
=
wf
.
transitions
.
get
(
"plan"
)
for
delivery
in
delivery_list
:
for
delivery
in
delivery_list
:
...
...
master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/ERP5Site_buildAndPlanInvoice.xml
View file @
f464c23a
...
@@ -52,9 +52,8 @@
...
@@ -52,9 +52,8 @@
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
portal = context.getPortalObject()\n
<value>
<string>
portal = context.getPortalObject()\n
portal.portal_catalog.searchAndActivate(\n
portal.portal_catalog.searchAndActivate(\n
portal_type=\'Applied Rule\',\n
portal_type=\'Person\',\n
parent_uid=portal.portal_simulation.getUid(),\n
method_id=\'Person_buildAndPlanInvoice\'\n
method_id=\'RootAppliedRule_buildAndPlanInvoice\'\n
)\n
)\n
</string>
</value>
</string>
</value>
</item>
</item>
...
...
master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/
RootAppliedRule
_buildAndPlanInvoice.xml
→
master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/
Person
_buildAndPlanInvoice.xml
View file @
f464c23a
...
@@ -50,16 +50,38 @@
...
@@ -50,16 +50,38 @@
</item>
</item>
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
context.VifibInvoiceLineBuilder_buildAndPlan(context.getPortalObject().portal_deliveries.vifib_sale_invoice_builder, explanation=context.getCausalityValue())\n
<value>
<string
encoding=
"cdata"
>
<![CDATA[
</string>
</value>
person_uid = context.getUid()\n
\n
kw = {}\n
select_dict= {\'delivery_uid\': None}\n
kw.update(\n
portal_type=\'Simulation Movement\',\n
sort_on=(\'uid\', \'desc\'),\n
uid=\'>
= %s\' % uid,\n
limit=69,\n
select_dict=select_dict,\n
left_join_list=select_dict.keys(),\n
delivery_uid=None,\n
**{\'movement.destination_uid\': person_uid}\n
)\n
movement_list = context.portal_catalog(**kw)\n
\n
if len(movement_list) > 0:\n
context.VifibSaleInvoiceBuilder_buildAndPlan(context.getPortalObject().portal_deliveries.vifib_sale_invoice_builder, movement_list=movement_list)\n
context.activate().Person_buildAndPlanInvoice(movement_list[-1].getUid())\n
]]>
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
<value>
<string>
uid=0
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
RootAppliedRule
_buildAndPlanInvoice
</string>
</value>
<value>
<string>
Person
_buildAndPlanInvoice
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/Vifib
InvoiceLin
eBuilder_buildAndPlan.xml
→
master/bt5/vifib_upgrader/SkinTemplateItem/portal_skins/vifib_upgrader/Vifib
SaleInvoic
eBuilder_buildAndPlan.xml
View file @
f464c23a
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_function
</string>
</key>
<key>
<string>
_function
</string>
</key>
<value>
<string>
Vifib
InvoiceLin
eBuilder_buildAndPlan
</string>
</value>
<value>
<string>
Vifib
SaleInvoic
eBuilder_buildAndPlan
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_module
</string>
</key>
<key>
<string>
_module
</string>
</key>
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
Vifib
InvoiceLin
eBuilder_buildAndPlan
</string>
</value>
<value>
<string>
Vifib
SaleInvoic
eBuilder_buildAndPlan
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
...
...
master/bt5/vifib_upgrader/bt/revision
View file @
f464c23a
53
54
\ 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