Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
3fd3859f
Commit
3fd3859f
authored
Dec 27, 2017
by
Tomáš Peterka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[accounting_test] Make sure right ledgets are on Accounting Transaction Type
parent
13b358cb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createReportOtherPartiesDataset.py
...i_test/AccountingZuite_createReportOtherPartiesDataset.py
+14
-9
No files found.
bt5/erp5_accounting_ui_test/SkinTemplateItem/portal_skins/erp5_accounting_ui_test/AccountingZuite_createReportOtherPartiesDataset.py
View file @
3fd3859f
...
@@ -24,19 +24,24 @@ if with_ledger:
...
@@ -24,19 +24,24 @@ if with_ledger:
extra_kwargs_general
=
{
'ledger'
:
'accounting/general'
}
extra_kwargs_general
=
{
'ledger'
:
'accounting/general'
}
extra_kwargs_detailed
=
{
'ledger'
:
'accounting/detailed'
}
extra_kwargs_detailed
=
{
'ledger'
:
'accounting/detailed'
}
accounting_ledger
=
ledger
.
get
(
'accounting'
,
None
)
\
accounting_ledger
=
ledger
.
get
(
'accounting'
,
None
)
or
ledger
.
newContent
(
portal_type
=
'Category'
,
id
=
'accounting'
)
if
accounting_ledger
is
None
:
accounting_ledger
=
ledger
.
newContent
(
portal_type
=
'Category'
,
id
=
'accounting'
)
if
accounting_ledger
.
get
(
'general'
,
None
)
is
None
:
for
sub_category_name
in
(
'general'
,
'detailed'
)
:
accounting_ledger
.
newContent
(
portal_type
=
'Category'
,
id
=
'general'
)
sub_category
=
accounting_ledger
.
get
(
sub_category_name
,
None
)
if
accounting_ledger
.
get
(
'detailed'
,
None
)
is
None
:
if
sub_category
is
None
:
accounting_ledger
.
newContent
(
portal_type
=
'Category'
,
id
=
'detailed'
)
sub_category
=
accounting_ledger
.
newContent
(
portal_type
=
'Category'
,
id
=
sub_category_name
)
# necessary for the "ledger" form field to appear and have correct options
# necessary for the "ledger" form field to appear and have correct options
accounting_transaction
=
portal
.
portal_types
.
get
(
'Accounting Transaction'
)
accounting_transaction
=
portal
.
portal_types
.
get
(
'Accounting Transaction'
)
if
not
accounting_transaction
.
getLedgerList
():
ledger_list
=
accounting_transaction
.
getLedgerList
()
accounting_transaction
.
setProperty
(
if
'accounting/general'
not
in
ledger_list
:
"ledger_list"
,
[
'accounting/general'
,
'accounting/detailed'
])
ledger_list
.
append
(
'accounting/general'
)
if
'accounting/detailed'
not
in
ledger_list
:
ledger_list
.
append
(
'accounting/detailed'
)
accounting_transaction
.
setLedgerList
(
ledger_list
)
else
:
else
:
extra_kwargs_general
=
{}
extra_kwargs_general
=
{}
extra_kwargs_detailed
=
{}
extra_kwargs_detailed
=
{}
...
...
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