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
92b46479
Commit
92b46479
authored
Jan 04, 2019
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create internal supply from inventory report
parent
214ff439
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1185 additions
and
1 deletion
+1185
-1
bt5/erp5_trade/ActionTemplateItem/portal_types/Inventory%20Report/create_internal_supply.xml
...ortal_types/Inventory%20Report/create_internal_supply.xml
+100
-0
bt5/erp5_trade/PropertySheetTemplateItem/portal_property_sheets/InventoryReport/total_quantity_property.xml
...operty_sheets/InventoryReport/total_quantity_property.xml
+38
-0
bt5/erp5_trade/PropertySheetTemplateItem/portal_property_sheets/InventoryReport/unit_price_property.xml
...l_property_sheets/InventoryReport/unit_price_property.xml
+38
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_updateTotalAssetPrice.py
...s/erp5_trade/InventoryReportLine_updateTotalAssetPrice.py
+6
-1
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_createInternalSupply.py
..._skins/erp5_trade/InventoryReport_createInternalSupply.py
+47
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_createInternalSupply.xml
...skins/erp5_trade/InventoryReport_createInternalSupply.xml
+62
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_viewCreateInternalSupplyDialog.xml
..._trade/InventoryReport_viewCreateInternalSupplyDialog.xml
+135
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_viewCreateInternalSupplyDialog/your_destination_section_title.xml
...teInternalSupplyDialog/your_destination_section_title.xml
+287
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_viewCreateInternalSupplyDialog/your_source_section_title.xml
...wCreateInternalSupplyDialog/your_source_section_title.xml
+287
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_viewCreateInternalSupplyDialog/your_start_date_range_max.xml
...wCreateInternalSupplyDialog/your_start_date_range_max.xml
+92
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_viewCreateInternalSupplyDialog/your_start_date_range_min.xml
...wCreateInternalSupplyDialog/your_start_date_range_min.xml
+92
-0
bt5/erp5_trade/bt/template_action_path_list
bt5/erp5_trade/bt/template_action_path_list
+1
-0
No files found.
bt5/erp5_trade/ActionTemplateItem/portal_types/Inventory%20Report/create_internal_supply.xml
0 → 100644
View file @
92b46479
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_action
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_action
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
create_internal_supply
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
Add portal content
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Action Information
</string>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
2.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Create Internal Supply
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/InventoryReport_viewCreateInternalSupplyDialog
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
python: here.getSimulationState() == \'recorded\'
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/PropertySheetTemplateItem/portal_property_sheets/InventoryReport/total_quantity_property.xml
0 → 100644
View file @
92b46479
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/float
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
total_quantity_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<string>
python: 0
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/PropertySheetTemplateItem/portal_property_sheets/InventoryReport/unit_price_property.xml
0 → 100644
View file @
92b46479
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/float
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
unit_price_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<string>
python: 0
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReportLine_updateTotalAssetPrice.py
View file @
92b46479
total_asset_price
=
context
.
getPortalObject
().
portal_simulation
.
getCurrentInventoryAssetPrice
(
**
kw
)
or
0
context
.
edit
(
context
.
edit
(
total_asset_price
=
context
.
getPortalObject
().
portal_simulation
.
getCurrentInventoryAssetPrice
(
**
kw
)
or
0
total_asset_price
=
total_asset_price
,
)
if
context
.
getTotalQuantity
():
context
.
edit
(
unit_price
=
total_asset_price
/
context
.
getTotalQuantity
()
)
)
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_createInternalSupply.py
0 → 100644
View file @
92b46479
internal_supply
=
context
.
internal_supply_module
.
newContent
(
portal_type
=
'Internal Supply'
)
destination_section
=
context
.
getDestinationSection
()
internal_supply
.
edit
(
source_section
=
destination_section
,
destination_section
=
destination_section
,
price_currency
=
context
.
getDestinationSectionValue
().
getPriceCurrency
(),
start_date_range_min
=
start_date_range_min
,
start_date_range_max
=
start_date_range_max
)
resource_dict
=
{}
for
inventory_report_line
in
context
.
contentValues
(
portal_type
=
'Inventory Report Line'
):
if
resource_dict
.
get
(
inventory_report_line
.
getResource
(),
None
)
is
None
:
resource_dict
[
inventory_report_line
.
getResource
()]
=
{
'line_list'
:
[],
'variation'
:
[]
}
for
tmp
in
inventory_report_line
.
getVariationBaseCategoryList
():
if
tmp
not
in
resource_dict
[
inventory_report_line
.
getResource
()][
'variation'
]:
resource_dict
[
inventory_report_line
.
getResource
()][
'variation'
].
append
(
tmp
)
resource_dict
[
inventory_report_line
.
getResource
()][
'line_list'
].
append
(
inventory_report_line
)
for
key
in
resource_dict
:
internal_supply_line
=
internal_supply
.
newContent
(
portal_type
=
'Internal Supply Line'
)
internal_supply_line
.
edit
(
resource
=
key
)
if
resource_dict
[
key
][
'variation'
]
==
[]:
internal_supply_line
.
edit
(
base_price
=
resource_dict
[
key
][
'line_list'
][
0
].
getUnitPrice
())
else
:
#variation product
internal_supply_line
.
edit
(
p_variation_base_category_list
=
resource_dict
[
key
][
'variation'
]
)
range_list
=
internal_supply_line
.
SupplyLine_asCellRange
()
for
inventory_report_line
in
resource_dict
[
key
][
'line_list'
]:
tmp
=
inventory_report_line
.
getVariationCategoryList
()
base_id
=
'path'
for
index
in
range
(
len
(
tmp
)):
base_id
=
base_id
+
'_'
+
str
(
range_list
[
index
].
index
(
tmp
[
index
]))
cell
=
internal_supply_line
.
newContent
(
portal_type
=
'Internal Supply Cell'
,
base_price
=
inventory_report_line
.
getUnitPrice
(),
id
=
base_id
)
internal_supply_line
.
updateCellRange
(
base_id
=
'path'
)
return
internal_supply
.
Base_redirect
(
'view'
)
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_createInternalSupply.xml
0 → 100644
View file @
92b46479
<?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>
start_date_range_min, start_date_range_max,**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
InventoryReport_createInternalSupply
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_viewCreateInternalSupplyDialog.xml
0 → 100644
View file @
92b46479
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5 Form"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
InventoryReport_createInternalSupply
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
edit_order
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
left
</string>
<string>
right
</string>
<string>
center
</string>
<string>
bottom
</string>
<string>
hidden
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
center
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list>
<string>
your_source_section_title
</string>
<string>
your_start_date_range_min
</string>
</list>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list>
<string>
your_destination_section_title
</string>
<string>
your_start_date_range_max
</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
InventoryReport_viewCreateInternalSupplyDialog
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
InventoryReport_viewCreateInternalSupplyDialog
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_dialog
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Create Internal Supply
</string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
update_action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
update_action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_viewCreateInternalSupplyDialog/your_destination_section_title.xml
0 → 100644
View file @
92b46479
This diff is collapsed.
Click to expand it.
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_viewCreateInternalSupplyDialog/your_source_section_title.xml
0 → 100644
View file @
92b46479
This diff is collapsed.
Click to expand it.
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_viewCreateInternalSupplyDialog/your_start_date_range_max.xml
0 → 100644
View file @
92b46479
<?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/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_start_date_range_max
</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>
extra_context
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
extra_context
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
extra_context
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_start_date_range_max
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewPDMFieldLibrary
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_viewCreateInternalSupplyDialog/your_start_date_range_min.xml
0 → 100644
View file @
92b46479
<?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/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_start_date_range_min
</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>
extra_context
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
extra_context
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
extra_context
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_start_date_range_min
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewPDMFieldLibrary
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/bt/template_action_path_list
View file @
92b46479
...
@@ -60,6 +60,7 @@ Inventory Module | view_stock_report
...
@@ -60,6 +60,7 @@ Inventory Module | view_stock_report
Inventory Report Line | view
Inventory Report Line | view
Inventory Report Module | view
Inventory Report Module | view
Inventory Report | calculate_product_stock
Inventory Report | calculate_product_stock
Inventory Report | create_internal_supply
Inventory Report | view
Inventory Report | view
Inventory | fast_input
Inventory | fast_input
Inventory | fast_input_update
Inventory | fast_input_update
...
...
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