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
1
Merge Requests
1
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
Romain Courteaud
slapos.core
Commits
9e5fe11d
Commit
9e5fe11d
authored
Feb 08, 2024
by
Romain Courteaud
🐸
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_accounting: drop unused AccountingTransactionModule_getUnpaidInvoiceList
parent
ef0af36d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
209 deletions
+0
-209
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/AccountingTransactionModule_getUnpaidInvoiceList.py
...nting/AccountingTransactionModule_getUnpaidInvoiceList.py
+0
-12
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/AccountingTransactionModule_getUnpaidInvoiceList.xml
...ting/AccountingTransactionModule_getUnpaidInvoiceList.xml
+0
-62
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSAccountingSkins.py
.../portal_components/test.erp5.testSlapOSAccountingSkins.py
+0
-135
No files found.
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/AccountingTransactionModule_getUnpaidInvoiceList.py
deleted
100644 → 0
View file @
ef0af36d
portal
=
context
.
getPortalObject
()
portal_membership
=
portal
.
portal_membership
user
=
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
def
wrapWithShadow
(
user
):
return
user
.
Entity_getOutstandingAmountList
()
return
user
.
Person_restrictMethodAsShadowUser
(
shadow_document
=
user
,
callable_object
=
wrapWithShadow
,
argument_list
=
[
user
])
master/bt5/slapos_accounting/SkinTemplateItem/portal_skins/slapos_accounting/AccountingTransactionModule_getUnpaidInvoiceList.xml
deleted
100644 → 0
View file @
ef0af36d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</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>
_params
</string>
</key>
<value>
<string>
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
AccountingTransactionModule_getUnpaidInvoiceList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_accounting/TestTemplateItem/portal_components/test.erp5.testSlapOSAccountingSkins.py
View file @
9e5fe11d
...
@@ -152,141 +152,6 @@ class TestSlapOSAccounting(SlapOSTestCaseMixin):
...
@@ -152,141 +152,6 @@ class TestSlapOSAccounting(SlapOSTestCaseMixin):
sale_invoice_transaction
.
SaleInvoiceTransaction_resetPaymentMode
,
sale_invoice_transaction
.
SaleInvoiceTransaction_resetPaymentMode
,
REQUEST
=
{})
REQUEST
=
{})
#################################################################
# AccountingTransactionModule_getUnpaidInvoiceList
#################################################################
def
test_AccountingTransactionModule_getUnpaidInvoiceList
(
self
):
project
=
self
.
addProject
()
person
=
self
.
makePerson
(
project
,
user
=
1
)
organisation
=
self
.
portal
.
organisation_module
.
newContent
(
portal_type
=
"Organisation"
)
sale_trade_condition
=
self
.
portal
.
sale_trade_condition_module
.
newContent
(
portal_type
=
"Sale Trade Condition"
,
reference
=
self
.
generateNewId
(),
specialise
=
"business_process_module/slapos_ultimate_business_process"
)
sale_trade_condition
.
validate
()
current_invoice
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
"Sale Invoice Transaction"
,
created_by_builder
=
1
,
# to prevent init script to create lines
specialise_value
=
sale_trade_condition
,
source_section_value
=
organisation
,
destination_value
=
person
,
destination_section_value
=
person
,
destination_decision_value
=
person
,
start_date
=
DateTime
(
'2019/10/20'
),
stop_date
=
DateTime
(
'2019/10/20'
),
title
=
'Fake Invoice for Demo User Functional'
,
price_currency
=
"currency_module/EUR"
,
reference
=
'1'
,
ledger
=
'automated'
)
cell
=
current_invoice
.
newContent
(
portal_type
=
"Invoice Line"
,
resource
=
"service_module/slapos_reservation_fee_2"
,
use
=
"trade/sale"
,
quantity_unit
=
"unit/piece"
,
base_contribution_list
=
[
"base_amount/invoicing/discounted"
,
"base_amount/invoicing/taxable"
]
)
cell
.
edit
(
quantity
=
1
)
cell
.
setPrice
(
1
)
current_invoice
.
plan
()
current_invoice
.
confirm
()
current_invoice
.
startBuilding
()
current_invoice
.
reindexObject
()
current_invoice
.
stop
()
self
.
tic
()
applied_rule
=
current_invoice
.
getCausalityRelated
(
portal_type
=
"Applied Rule"
)
for
sm
in
self
.
portal
.
portal_catalog
(
portal_type
=
'Simulation Movement'
,
simulation_state
=
[
'draft'
,
'planned'
,
None
],
left_join_list
=
[
'delivery_uid'
],
delivery_uid
=
None
,
path
=
"%%%s%%"
%
applied_rule
):
if
sm
.
getDelivery
()
is
not
None
:
continue
root_applied_rule
=
sm
.
getRootAppliedRule
()
root_applied_rule_path
=
root_applied_rule
.
getPath
()
sm
.
getCausalityValue
(
portal_type
=
'Business Link'
).
build
(
path
=
'%s/%%'
%
root_applied_rule_path
)
self
.
tic
()
self
.
login
(
person
.
getUserId
())
unpaid_invoice_list
=
self
.
portal
.
accounting_module
.
AccountingTransactionModule_getUnpaidInvoiceList
()
self
.
assertEqual
(
[
i
.
getRelativeUrl
()
for
i
in
unpaid_invoice_list
],
[
current_invoice
.
getRelativeUrl
()])
self
.
login
()
payment
=
self
.
portal
.
accounting_module
.
newContent
(
portal_type
=
"Payment Transaction"
,
created_by_builder
=
1
,
# to prevent init script to create lines
source_section_value
=
organisation
,
destination_value
=
person
,
start_date
=
DateTime
(
'2019/10/20'
),
stop_date
=
DateTime
(
'2019/10/20'
),
title
=
'Fake Payment for Demo User Functional'
,
ressource
=
"currency_module/EUR"
,
price_currency
=
"currency_module/EUR"
,
ledger
=
'automated'
)
payment
.
newContent
(
portal_type
=
"Accounting Transaction Line"
,
destination
=
"account_module/payable"
,
source
=
"account_module/receivable"
)
payment
.
newContent
(
portal_type
=
"Accounting Transaction Line"
,
destination
=
"account_module/payment_to_encash"
,
source
=
"account_module/payment_to_encash"
)
for
line
in
payment
.
contentValues
():
if
line
.
getSource
()
==
"account_module/payment_to_encash"
:
line
.
setQuantity
(
-
1
)
elif
line
.
getSource
()
==
"account_module/receivable"
:
line
.
setQuantity
(
1
)
payment
.
confirm
()
payment
.
start
()
payment
.
setCausalityValue
(
current_invoice
)
payment
.
setDestinationSectionValue
(
person
)
payment
.
stop
()
self
.
tic
()
letter
=
None
for
line
in
current_invoice
.
contentValues
():
if
line
.
getSource
()
==
"account_module/receivable"
:
letter
=
line
.
getGroupingReference
()
self
.
assertTrue
(
current_invoice
.
SaleInvoiceTransaction_isLettered
())
# is it groupped?
is_lettered
=
False
for
line
in
payment
.
contentValues
():
if
line
.
getSource
()
==
"account_module/receivable"
:
is_lettered
=
True
self
.
assertEqual
(
letter
,
line
.
getGroupingReference
())
self
.
assertTrue
(
is_lettered
)
self
.
login
(
person
.
getUserId
())
unpaid_invoice_list
=
self
.
portal
.
accounting_module
.
AccountingTransactionModule_getUnpaidInvoiceList
()
self
.
assertEqual
(
[
i
.
getRelativeUrl
()
for
i
in
unpaid_invoice_list
],
[])
#################################################################
#################################################################
# SaleInvoiceTransaction_createReversalSaleInvoiceTransaction
# SaleInvoiceTransaction_createReversalSaleInvoiceTransaction
#################################################################
#################################################################
...
...
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