Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
205b9a0e
Commit
205b9a0e
authored
Jun 10, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inventory: fix indexation when erp5_stock_cache is not installed
parent
179c43bb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
product/ERP5/Document/Inventory.py
product/ERP5/Document/Inventory.py
+10
-9
No files found.
product/ERP5/Document/Inventory.py
View file @
205b9a0e
...
@@ -331,16 +331,17 @@ class Inventory(Delivery):
...
@@ -331,16 +331,17 @@ class Inventory(Delivery):
immediate_reindex_archive
=
immediate_reindex_archive
)
immediate_reindex_archive
=
immediate_reindex_archive
)
if
stock_object_list
:
if
stock_object_list
:
# Delete existing stock records and old inventory_cache first.
kw
=
dict
(
sql_catalog_id
=
sql_catalog_id
,
portal
.
portal_catalog
.
catalogObjectList
(
stock_object_list
[:],
method_id_list
=
(
'z0_uncatalog_stock'
,
'SQLCatalog_trimInventoryCacheOnCatalog'
,
),
sql_catalog_id
=
sql_catalog_id
,
disable_cache
=
1
,
check_uid
=
0
,
disable_archive
=
disable_archive
,
disable_cache
=
1
,
check_uid
=
0
,
disable_archive
=
disable_archive
,
immediate_reindex_archive
=
immediate_reindex_archive
)
immediate_reindex_archive
=
immediate_reindex_archive
)
method_id_list
=
[
'z0_uncatalog_stock'
]
script_id
=
'SQLCatalog_trimInventoryCacheOnCatalog'
if
getattr
(
portal
,
script_id
,
None
)
is
not
None
:
method_id_list
.
append
(
script_id
)
# Delete existing stock records and old inventory_cache first.
portal
.
portal_catalog
.
catalogObjectList
(
stock_object_list
[:],
method_id_list
=
method_id_list
,
**
kw
)
# Then insert new records without delete.
# Then insert new records without delete.
portal
.
portal_catalog
.
catalogObjectList
(
portal
.
portal_catalog
.
catalogObjectList
(
stock_object_list
[:],
method_id_list
=
(
'z_catalog_stock_list_without_delete_for_inventory_virtual_movement'
,
),
stock_object_list
,
method_id_list
=
(
'z_catalog_stock_list_without_delete_for_inventory_virtual_movement'
,
),
sql_catalog_id
=
sql_catalog_id
,
**
kw
)
disable_cache
=
1
,
check_uid
=
0
,
disable_archive
=
disable_archive
,
immediate_reindex_archive
=
immediate_reindex_archive
)
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