Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
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
Tatuya Kamada
wendelin
Commits
93fd9aaf
Commit
93fd9aaf
authored
Mar 28, 2016
by
Tatuya Kamada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_wendeln_inventory: Fix to call external method on ERP5Site.
parent
b6e6a310
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
15 deletions
+12
-15
bt5/erp5_wendelin_inventory/TestTemplateItem/portal_components/test.erp5.testPandasInventory.py
...teItem/portal_components/test.erp5.testPandasInventory.py
+11
-12
bt5/erp5_wendelin_inventory/TestTemplateItem/portal_components/test.erp5.testPandasInventory.xml
...eItem/portal_components/test.erp5.testPandasInventory.xml
+1
-3
No files found.
bt5/erp5_wendelin_inventory/TestTemplateItem/portal_components/test.erp5.testPandasInventory.py
View file @
93fd9aaf
...
...
@@ -26,7 +26,6 @@
##############################################################################
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
erp5.component.extension
import
PandasInventory
import
transaction
class
PandasInventoryTest
(
ERP5TypeTestCase
):
...
...
@@ -119,8 +118,8 @@ class PandasInventoryTest(ERP5TypeTestCase):
def
test_01_fillBigArrayTest
(
self
):
resource_uid
=
self
.
sale_order
[
'1'
].
getResourceUid
()
data
=
self
.
portal
.
portal_skins
.
erp5_wendelin_inventory
.
Base_zGetStockByResource
(
resource_uid
=
resource_uid
)
self
.
portal
.
portal_skins
.
erp5_wendelin_inventory
.
Base_convertResultsToBigArray
(
data
=
self
.
portal
.
Base_zGetStockByResource
(
resource_uid
=
resource_uid
)
self
.
portal
.
Base_convertResultsToBigArray
(
data
,
reference
=
'TestingFillBigArray'
)
...
...
@@ -132,8 +131,8 @@ class PandasInventoryTest(ERP5TypeTestCase):
def
test_02_extendBigArrayTest
(
self
):
resource_uid
=
self
.
sale_order
[
'1'
].
getResourceUid
()
data
=
self
.
portal
.
portal_skins
.
erp5_wendelin_inventory
.
Base_zGetStockByResource
(
resource_uid
=
resource_uid
)
self
.
portal
.
portal_skins
.
erp5_wendelin_inventory
.
Base_convertResultsToBigArray
(
data
=
self
.
portal
.
Base_zGetStockByResource
(
resource_uid
=
resource_uid
)
self
.
portal
.
Base_convertResultsToBigArray
(
data
,
reference
=
'TestingExtendBigArray'
)
...
...
@@ -143,7 +142,7 @@ class PandasInventoryTest(ERP5TypeTestCase):
data_array
=
self
.
portal
.
portal_catalog
(
portal_type
=
'Data Array'
,
reference
=
'TestingExtendBigArray'
)[
0
].
getObject
()
current_size
=
len
(
data_array
)
self
.
portal
.
portal_skins
.
erp5_wendelin_inventory
.
Base_extendBigArray
(
self
.
portal
.
Base_extendBigArray
(
data_array
.
getArray
(),
data_array
.
getArray
()
)
...
...
@@ -158,15 +157,15 @@ class PandasInventoryTest(ERP5TypeTestCase):
def
test_03_importCategoryInformationTest
(
self
):
resource_uid
=
self
.
sale_order
[
'1'
].
getResourceUid
()
data
=
self
.
portal
.
portal_skins
.
erp5_wendelin_inventory
.
Base_zGetStockByResource
(
resource_uid
=
resource_uid
)
self
.
portal
.
portal_skins
.
erp5_wendelin_inventory
.
Base_convertResultsToBigArray
(
data
=
self
.
portal
.
Base_zGetStockByResource
(
resource_uid
=
resource_uid
)
self
.
portal
.
Base_convertResultsToBigArray
(
data
,
reference
=
'TestingImportCategoryInformation'
)
transaction
.
commit
()
self
.
tic
()
array
=
self
.
portal
.
portal_skins
.
erp5_wendelin_inventory
.
Base_fillPandasInventoryCategoryList
(
array
=
self
.
portal
.
Base_fillPandasInventoryCategoryList
(
'TestingImportCategoryInformation'
,
verbose
=
False
,
duplicate_category
=
False
...
...
@@ -180,8 +179,8 @@ class PandasInventoryTest(ERP5TypeTestCase):
def
test_04_getMovementHistoryListTest
(
self
):
resource_uid
=
self
.
sale_order
[
'1'
].
getResourceUid
()
data
=
self
.
portal
.
portal_skins
.
erp5_wendelin_inventory
.
Base_zGetStockByResource
(
resource_uid
=
resource_uid
)
self
.
portal
.
portal_skins
.
erp5_wendelin_inventory
.
Base_convertResultsToBigArray
(
data
=
self
.
portal
.
Base_zGetStockByResource
(
resource_uid
=
resource_uid
)
self
.
portal
.
Base_convertResultsToBigArray
(
data
,
reference
=
'TestingGetMovementHistoryList'
)
...
...
@@ -191,7 +190,7 @@ class PandasInventoryTest(ERP5TypeTestCase):
result
=
self
.
portal
.
portal_catalog
(
portal_type
=
'Data Array'
,
reference
=
'TestingGetMovementHistoryList'
)
self
.
assertTrue
(
len
(
result
)
!=
0
)
df
=
self
.
portal
.
portal_skins
.
erp5_wendelin_inventory
.
Base_filterInventoryDataFrame
(
df
=
self
.
portal
.
Base_filterInventoryDataFrame
(
is_accountable
=
True
,
resource_uid
=
resource_uid
,
data_array_reference
=
'TestingGetMovementHistoryList'
...
...
bt5/erp5_wendelin_inventory/TestTemplateItem/portal_components/test.erp5.testPandasInventory.xml
View file @
93fd9aaf
...
...
@@ -45,9 +45,7 @@
<item>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<tuple>
<string>
W: 29, 0: Unused PandasInventory imported from erp5.component.extension (unused-import)
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
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