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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
3b239e0f
Commit
3b239e0f
authored
May 10, 2021
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_trade: show inventory calculation steps
parent
3b8c1195
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1261 additions
and
2 deletions
+1261
-2
bt5/erp5_trade/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
...eAllowedContentTypeTemplateItem/allowed_content_types.xml
+3
-0
bt5/erp5_trade/PortalTypeHiddenContentTypeTemplateItem/hidden_content_type_list.xml
...iddenContentTypeTemplateItem/hidden_content_type_list.xml
+3
-0
bt5/erp5_trade/PortalTypeTemplateItem/portal_types/Inventory%20Report%20Cell.xml
...peTemplateItem/portal_types/Inventory%20Report%20Cell.xml
+155
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportCell_getRelatedMovementUrl.py
...s/erp5_trade/InventoryReportCell_getRelatedMovementUrl.py
+10
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportCell_getRelatedMovementUrl.xml
.../erp5_trade/InventoryReportCell_getRelatedMovementUrl.xml
+62
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_createMovementHistoryCellList.py
...rade/InventoryReportLine_createMovementHistoryCellList.py
+46
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_createMovementHistoryCellList.xml
...ade/InventoryReportLine_createMovementHistoryCellList.xml
+62
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_getCellList.py
...ortal_skins/erp5_trade/InventoryReportLine_getCellList.py
+3
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_getCellList.xml
...rtal_skins/erp5_trade/InventoryReportLine_getCellList.xml
+62
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_view.xml
...Item/portal_skins/erp5_trade/InventoryReportLine_view.xml
+13
-1
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_view/listbox.xml
...tal_skins/erp5_trade/InventoryReportLine_view/listbox.xml
+570
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_view/listbox_date.xml
...kins/erp5_trade/InventoryReportLine_view/listbox_date.xml
+96
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_view/listbox_total_quantity.xml
...trade/InventoryReportLine_view/listbox_total_quantity.xml
+96
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_afterClone.py
...tem/portal_skins/erp5_trade/InventoryReport_afterClone.py
+3
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_afterClone.xml
...em/portal_skins/erp5_trade/InventoryReport_afterClone.xml
+62
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_calculateProductStock.py
...skins/erp5_trade/InventoryReport_calculateProductStock.py
+1
-1
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_recordProductStock.py
...al_skins/erp5_trade/InventoryReport_recordProductStock.py
+11
-0
bt5/erp5_trade/bt/template_portal_type_allowed_content_type_list
...5_trade/bt/template_portal_type_allowed_content_type_list
+1
-0
bt5/erp5_trade/bt/template_portal_type_hidden_content_type_list
...p5_trade/bt/template_portal_type_hidden_content_type_list
+1
-0
bt5/erp5_trade/bt/template_portal_type_id_list
bt5/erp5_trade/bt/template_portal_type_id_list
+1
-0
No files found.
bt5/erp5_trade/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
View file @
3b239e0f
...
...
@@ -84,6 +84,9 @@
<portal_type
id=
"Inventory Report"
>
<item>
Inventory Report Line
</item>
</portal_type>
<portal_type
id=
"Inventory Report Line"
>
<item>
Inventory Report Cell
</item>
</portal_type>
<portal_type
id=
"Inventory Report Module"
>
<item>
Inventory Report
</item>
</portal_type>
...
...
bt5/erp5_trade/PortalTypeHiddenContentTypeTemplateItem/hidden_content_type_list.xml
View file @
3b239e0f
...
...
@@ -11,6 +11,9 @@
<portal_type
id=
"Inventory Line"
>
<item>
Inventory Cell
</item>
</portal_type>
<portal_type
id=
"Inventory Report Line"
>
<item>
Inventory Report Cell
</item>
</portal_type>
<portal_type
id=
"Preference"
>
<item>
Purchase Order
</item>
<item>
Sale Order
</item>
...
...
bt5/erp5_trade/PortalTypeTemplateItem/portal_types/Inventory%20Report%20Cell.xml
0 → 100644
View file @
3b239e0f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Base Type"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_property_domain_dict
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
acquire_local_roles
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
allowed_action_list
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
content_icon
</string>
</key>
<value>
<string>
inventory_line_icon.gif
</string>
</value>
</item>
<item>
<key>
<string>
content_meta_type
</string>
</key>
<value>
<string>
ERP5 Inventory Line
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
An inventory line can be found in inventory documents, and bears the available stock of a certain product reference. There will be one inventory line for each product reference of the inventory.
</string>
</value>
</item>
<item>
<key>
<string>
factory
</string>
</key>
<value>
<string>
addInventoryLine
</string>
</value>
</item>
<item>
<key>
<string>
filter_actions
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
filter_content_types
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Inventory Report Cell
</string>
</value>
</item>
<item>
<key>
<string>
init_script
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
permission
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
searchable_text_property_id
</string>
</key>
<value>
<tuple>
<string>
title
</string>
<string>
description
</string>
<string>
short_title
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
type_class
</string>
</key>
<value>
<string>
Item
</string>
</value>
</item>
<item>
<key>
<string>
type_interface
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
type_mixin
</string>
</key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TranslationInformation"
module=
"Products.ERP5Type.TranslationProviderBase"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
domain_name
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
property_name
</string>
</key>
<value>
<string>
short_title
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"TranslationInformation"
module=
"Products.ERP5Type.TranslationProviderBase"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
domain_name
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
property_name
</string>
</key>
<value>
<string>
title
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportCell_getRelatedMovementUrl.py
0 → 100644
View file @
3b239e0f
if
url_dict
:
jio_key
=
'/'
.
join
(
context
.
movement_url
.
split
(
'/'
)[
-
2
:])
return
{
'command'
:
'push_history'
,
'options'
:
{
'jio_key'
:
jio_key
},
}
else
:
return
context
.
movement_url
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportCell_getRelatedMovementUrl.xml
0 → 100644
View file @
3b239e0f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<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>
url_dict=None, **kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
InventoryReportCell_getRelatedMovementUrl
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_createMovementHistoryCellList.py
0 → 100644
View file @
3b239e0f
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
,
NegatedQuery
from
collections
import
OrderedDict
newContent
=
context
.
newContent
portal
=
context
.
getPortalObject
()
getCurrentInventoryAssetPrice
=
portal
.
portal_simulation
.
getCurrentInventoryAssetPrice
getMovementHistoryList
=
portal
.
portal_simulation
.
getMovementHistoryList
current_date_kw
=
kw
.
copy
()
kw
.
pop
(
'valuation_method'
,
None
)
kw
[
'sort_on'
]
=
((
'date'
,
'ascending'
),)
movement_dict
=
OrderedDict
()
current_id
=
1
for
movement
in
getMovementHistoryList
(
**
kw
):
if
movement
.
date
not
in
movement_dict
:
movement_dict
[
movement
.
date
]
=
[]
movement_dict
[
movement
.
date
].
append
(
movement
)
for
date
,
value_list
in
movement_dict
.
iteritems
():
current_date_kw
[
'at_date'
]
=
date
same_date_length
=
len
(
value_list
)
for
index
in
range
(
same_date_length
):
if
index
<
same_date_length
-
1
:
current_date_kw
[
'uid'
]
=
NegatedQuery
(
SimpleQuery
(
uid
=
[
x
.
getUid
()
for
x
in
value_list
[
index
+
1
:]]))
else
:
current_date_kw
.
pop
(
'uid'
,
None
)
total_asset_price
=
getCurrentInventoryAssetPrice
(
**
current_date_kw
)
movement
=
value_list
[
index
]
if
not
getattr
(
movement
,
'isDelivery'
,
0
):
explanation
=
movement
.
getExplanationValue
()
else
:
explanation
=
movement
newContent
(
id
=
format
(
current_id
,
'07d'
),
portal_type
=
'Inventory Report Cell'
,
date
=
movement
.
date
,
movement_url
=
explanation
.
absolute_url
(),
explanation_text
=
movement
.
getExplanationText
(),
node_title
=
movement
.
node_title
,
section_title
=
movement
.
section_title
,
total_quantity
=
movement
.
total_quantity
,
running_total_quantity
=
movement
.
running_total_quantity
,
total_asset_price
=
total_asset_price
)
current_id
+=
1
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_createMovementHistoryCellList.xml
0 → 100644
View file @
3b239e0f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<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>
InventoryReportLine_createMovementHistoryCellList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_getCellList.py
0 → 100644
View file @
3b239e0f
cell_list
=
context
.
objectValues
(
portal_type
=
'Inventory Report Cell'
)
return
sorted
(
cell_list
,
key
=
lambda
x
:
x
.
date
)
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_getCellList.xml
0 → 100644
View file @
3b239e0f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<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>
InventoryReportLine_getCellList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_view.xml
View file @
3b239e0f
...
...
@@ -63,6 +63,7 @@
<string>
right
</string>
<string>
center
</string>
<string>
bottom
</string>
<string>
hidden
</string>
</list>
</value>
</item>
...
...
@@ -73,7 +74,9 @@
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list/>
<list>
<string>
listbox
</string>
</list>
</value>
</item>
<item>
...
...
@@ -84,6 +87,15 @@
</list>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list>
<string>
listbox_date
</string>
<string>
listbox_total_quantity
</string>
</list>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
...
...
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_view/listbox.xml
0 → 100644
View file @
3b239e0f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ListBox"
module=
"Products.ERP5Form.ListBox"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
listbox
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
all_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
all_editable_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
domain_root_list
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
domain_tree
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
global_attributes
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
lines
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
list_action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
list_method
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
meta_types
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
portal_types
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
report_root_list
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
report_tree
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
search
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
search_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
select
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
selection_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
sort
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
sort_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
stat_method
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
all_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
all_editable_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
domain_root_list
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
domain_tree
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
editable_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
global_attributes
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
lines
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
list_action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
list_method
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
meta_types
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
portal_types
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
report_root_list
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
report_tree
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
search
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
search_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
select
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
selection_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
sort
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
sort_columns
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
stat_method
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
all_columns
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
all_editable_columns
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
alternate_name
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
anchor
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
columns
</string>
</key>
<value>
<list>
<tuple>
<string>
date
</string>
<string>
Date
</string>
</tuple>
<tuple>
<string>
explanation_text
</string>
<string>
Explanation
</string>
</tuple>
<tuple>
<string>
node_title
</string>
<string>
Warehouse
</string>
</tuple>
<tuple>
<string>
section_title
</string>
<string>
Owner
</string>
</tuple>
<tuple>
<string>
total_quantity
</string>
<string>
Quantity
</string>
</tuple>
<tuple>
<string>
running_total_quantity
</string>
<string>
Total Quantity
</string>
</tuple>
<tuple>
<string>
total_asset_price
</string>
<string>
Total Asset Price
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
count_method
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
css_class
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
default_display_style
</string>
</key>
<value>
<string>
table
</string>
</value>
</item>
<item>
<key>
<string>
default_params
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
display_style_list
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
domain_root_list
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
domain_tree
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
editable_columns
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
enabled
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
external_validator
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
global_attributes
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
global_search_column
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
hide_rows_on_no_search_criterion
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
lines
</string>
</key>
<value>
<int>
20
</int>
</value>
</item>
<item>
<key>
<string>
list_action
</string>
</key>
<value>
<string>
InventoryReportLine_viewCalculationDetails
</string>
</value>
</item>
<item>
<key>
<string>
list_method
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
meta_types
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
page_navigation_template
</string>
</key>
<value>
<string>
ListBox_viewSliderPageNavigationRenderer
</string>
</value>
</item>
<item>
<key>
<string>
page_template
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
portal_types
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
report_root_list
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
report_tree
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
row_css_method
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
search
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
search_columns
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
select
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
selection_name
</string>
</key>
<value>
<string>
inventory_report_line_selection
</string>
</value>
</item>
<item>
<key>
<string>
sort
</string>
</key>
<value>
<list>
<tuple>
<string>
id
</string>
<string>
asending
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
sort_columns
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
stat_columns
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
stat_method
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
style_columns
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Calculation Steps
</string>
</value>
</item>
<item>
<key>
<string>
untranslatable_columns
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
url_columns
</string>
</key>
<value>
<list>
<tuple>
<string>
date
</string>
<string>
InventoryReportCell_getRelatedMovementUrl
</string>
</tuple>
<tuple>
<string>
explanation_text
</string>
<string>
InventoryReportCell_getRelatedMovementUrl
</string>
</tuple>
<tuple>
<string>
node_title
</string>
<string>
InventoryReportCell_getRelatedMovementUrl
</string>
</tuple>
<tuple>
<string>
section_title
</string>
<string>
InventoryReportCell_getRelatedMovementUrl
</string>
</tuple>
<tuple>
<string>
total_quantity
</string>
<string>
InventoryReportCell_getRelatedMovementUrl
</string>
</tuple>
<tuple>
<string>
running_total_quantity
</string>
<string>
InventoryReportCell_getRelatedMovementUrl
</string>
</tuple>
<tuple>
<string>
total_asset_price
</string>
<string>
InventoryReportCell_getRelatedMovementUrl
</string>
</tuple>
</list>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
searchFolder
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_view/listbox_date.xml
0 → 100644
View file @
3b239e0f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
editable
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
listbox_date
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_date
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_view/listbox_total_quantity.xml
0 → 100644
View file @
3b239e0f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
editable
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
listbox_total_quantity
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
editable
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_quantity
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_afterClone.py
0 → 100644
View file @
3b239e0f
for
content
in
context
.
contentValues
(
portal_type
=
'Inventory Report Line'
):
context
.
deleteContent
(
content
.
getId
())
context
.
setTotalAssetPrice
(
0
)
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_afterClone.xml
0 → 100644
View file @
3b239e0f
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<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>
InventoryReport_afterClone
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_calculateProductStock.py
View file @
3b239e0f
...
...
@@ -6,5 +6,5 @@ context.calculate()
context
.
activate
().
InventoryReport_recordProductStock
()
if
not
batch_mode
:
message
=
context
.
Base_translateString
(
"
Product Stock is creating
"
)
message
=
context
.
Base_translateString
(
"
Calculating Inventory Report
"
)
return
context
.
Base_redirect
(
'view'
,
keep_items
=
{
'portal_status_message'
:
message
})
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_recordProductStock.py
View file @
3b239e0f
...
...
@@ -37,6 +37,17 @@ for inventory in inventory_list:
at_date
=
at_date
,
is_accountable
=
1
)
inventory_report_line
.
activate
(
tag
=
line_tag
).
InventoryReportLine_createMovementHistoryCellList
(
section_uid
=
section_uid
,
node_uid
=
node_uid
,
valuation_method
=
valuation_method
,
variation_text
=
inventory
.
variation_text
,
resource_uid
=
inventory
.
resource_uid
,
at_date
=
at_date
,
is_accountable
=
1
)
tag
=
'%s:updateTotalAssetPrice'
%
relative_url
context
.
activate
(
after_tag
=
line_tag
,
tag
=
tag
).
InventoryReport_updateTotalAssetPrice
()
...
...
bt5/erp5_trade/bt/template_portal_type_allowed_content_type_list
View file @
3b239e0f
...
...
@@ -39,6 +39,7 @@ Internal Trade Condition | Payment Condition
Internal Trade Condition | Trade Model Line
Inventory Line | Inventory Cell
Inventory Module | Inventory
Inventory Report Line | Inventory Report Cell
Inventory Report Module | Inventory Report
Inventory Report | Inventory Report Line
Inventory | Inventory Line
...
...
bt5/erp5_trade/bt/template_portal_type_hidden_content_type_list
View file @
3b239e0f
...
...
@@ -2,6 +2,7 @@ Container Line | Container Cell
Internal Order Line | Internal Order Cell
Internal Packing List Line | Internal Packing List Cell
Inventory Line | Inventory Cell
Inventory Report Line | Inventory Report Cell
Preference | Purchase Order
Preference | Sale Order
Purchase Order Line | Purchase Order Cell
...
...
bt5/erp5_trade/bt/template_portal_type_id_list
View file @
3b239e0f
...
...
@@ -26,6 +26,7 @@ Inventory Cell
Inventory Line
Inventory Module
Inventory Report
Inventory Report Cell
Inventory Report Line
Inventory Report Module
Order
...
...
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