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
Léo-Paul Géneau
erp5
Commits
d6a1af81
Commit
d6a1af81
authored
Dec 07, 2011
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tolerate existing organisations.
parent
3dfa03c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
22 deletions
+27
-22
product/ERP5Banking/tests/TestERP5BankingMixin.py
product/ERP5Banking/tests/TestERP5BankingMixin.py
+27
-22
No files found.
product/ERP5Banking/tests/TestERP5BankingMixin.py
View file @
d6a1af81
...
@@ -587,30 +587,35 @@ class TestERP5BankingMixin(ERP5TypeTestCase):
...
@@ -587,30 +587,35 @@ class TestERP5BankingMixin(ERP5TypeTestCase):
created_site_list
.
append
(
site
)
created_site_list
.
append
(
site
)
# Create organisation + bank account for each site category.
# Create organisation + bank account for each site category.
newContent
=
self
.
organisation_module
.
newContent
organisation_module
=
self
.
organisation_module
newContent
=
organisation_module
.
newContent
for
site
in
created_site_list
:
for
site
in
created_site_list
:
codification
=
site
.
getCodification
()
codification
=
site
.
getCodification
()
organisation
=
newContent
(
organisation_id
=
'site_%s'
%
(
codification
,
)
portal_type
=
'Organisation'
,
try
:
id
=
'site_%s'
%
(
codification
,
),
organisation_module
[
organisation_id
]
site
=
site
.
getRelativeUrl
(),
except
KeyError
:
region
=
site_region_from_codification_dict
.
get
(
codification
),
organisation
=
newContent
(
group
=
'baobab'
,
portal_type
=
'Organisation'
,
role
=
'internal'
,
id
=
organisation_id
,
function
=
'banking'
)
site
=
site
.
getRelativeUrl
(),
site_reference
=
site_reference_from_codification_dict
.
get
(
codification
)
region
=
site_region_from_codification_dict
.
get
(
codification
),
if
site_reference
is
not
None
:
group
=
'baobab'
,
self
.
createBankAccount
(
role
=
'internal'
,
person
=
organisation
,
function
=
'banking'
)
account_id
=
'account_%s'
%
(
codification
,
),
site_reference
=
site_reference_from_codification_dict
.
get
(
codification
)
currency
=
self
.
currency_1
,
if
site_reference
is
not
None
:
amount
=
0
,
self
.
createBankAccount
(
bank_country_code
=
site_reference
[
0
],
person
=
organisation
,
bank_code
=
site_reference
[
1
],
account_id
=
'account_%s'
%
(
codification
,
),
branch
=
site_reference
[
2
],
currency
=
self
.
currency_1
,
bank_account_number
=
site_reference
[
3
],
amount
=
0
,
bank_account_key
=
site_reference
[
4
],
bank_country_code
=
site_reference
[
0
],
)
bank_code
=
site_reference
[
1
],
branch
=
site_reference
[
2
],
bank_account_number
=
site_reference
[
3
],
bank_account_key
=
site_reference
[
4
],
)
self
.
vault_type_base_category
=
getattr
(
self
.
category_tool
,
'vault_type'
)
self
.
vault_type_base_category
=
getattr
(
self
.
category_tool
,
'vault_type'
)
site_vault_type
=
self
.
_maybeNewContent
(
self
.
vault_type_base_category
,
id
=
'site'
)
site_vault_type
=
self
.
_maybeNewContent
(
self
.
vault_type_base_category
,
id
=
'site'
)
...
...
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