Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Paul Graydon
erp5
Commits
c85f4778
Commit
c85f4778
authored
Jan 10, 2020
by
Xiaowu Zhang
Committed by
Xiaowu Zhang
Apr 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_invoicing: import from production
parent
fe06ea7a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_postTransactionLineGeneration.py
...icing/InvoiceTransaction_postTransactionLineGeneration.py
+15
-0
No files found.
bt5/erp5_invoicing/SkinTemplateItem/portal_skins/erp5_invoicing/InvoiceTransaction_postTransactionLineGeneration.py
View file @
c85f4778
...
@@ -26,5 +26,20 @@ for line in line_list:
...
@@ -26,5 +26,20 @@ for line in line_list:
line
.
setResource
(
None
)
line
.
setResource
(
None
)
assert
line
.
getResource
()
==
resource
assert
line
.
getResource
()
==
resource
# XXX Jérome: this is not backported yet.
# If payments transactions were already built, we update these
# payment transactions causalities to add this new invoice.
payment_transaction_set
=
set
([])
for
delivery
in
context
.
getCausalityValueList
():
payment_transaction_set
.
update
(
delivery
.
getCausalityRelatedValueList
(
portal_type
=
'Payment Transaction'
))
for
order
in
delivery
.
getCausalityValueList
():
payment_transaction_set
.
update
(
order
.
getCausalityRelatedValueList
(
portal_type
=
'Payment Transaction'
))
for
payment_transaction
in
payment_transaction_set
:
if
context
not
in
payment_transaction
.
getCausalityValueList
():
payment_transaction
.
setCausalityValueList
(
payment_transaction
.
getCausalityValueList
()
+
[
context
])
# round debit / credit on created transaction.
# round debit / credit on created transaction.
context
.
AccountingTransaction_roundDebitCredit
()
context
.
AccountingTransaction_roundDebitCredit
()
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