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
Klaus Wölfel
erp5
Commits
f806a36a
Commit
f806a36a
authored
Mar 27, 2019
by
Xiaowu Zhang
Committed by
Cédric Le Ninivin
Mar 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_trade: use product line to select resource in inventory report
parent
c70c8f05
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
104 additions
and
10 deletions
+104
-10
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_recordProductStock.py
...al_skins/erp5_trade/InventoryReport_recordProductStock.py
+13
-9
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_view.xml
...lateItem/portal_skins/erp5_trade/InventoryReport_view.xml
+1
-1
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_view/my_product_line.xml
...skins/erp5_trade/InventoryReport_view/my_product_line.xml
+90
-0
No files found.
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_recordProductStock.py
View file @
f806a36a
...
...
@@ -6,16 +6,20 @@ node_uid = context.getDestinationUid()
valuation_method
=
context
.
getValuationMethod
()
relative_url
=
context
.
getRelativeUrl
()
at_date
=
context
.
getAtDate
()
kw
=
{
'section_uid'
:
section_uid
,
'node_uid'
:
node_uid
,
'group_by_resource'
:
1
,
'group_by_variation'
:
1
,
'resourceType'
:
portal
.
getPortalProductTypeList
(),
'at_date'
:
at_date
}
inventory_list
=
getCurrentInventoryList
(
section_uid
=
section_uid
,
node_uid
=
node_uid
,
group_by_resource
=
1
,
group_by_variation
=
1
,
resourceType
=
portal
.
getPortalProductTypeList
(),
resource_uid
=
context
.
getResourceUidList
(),
at_date
=
at_date
)
product_line
=
context
.
getProductLine
()
if
product_line
:
kw
[
'resource_category'
]
=
'product_line/%s'
%
product_line
inventory_list
=
getCurrentInventoryList
(
**
kw
)
line_tag
=
'%s:lineUpdateTotalAssetPrice'
%
relative_url
#only after all calculation are finished then change report state
...
...
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_view.xml
View file @
f806a36a
...
...
@@ -106,7 +106,7 @@
<string>
my_destination_title
</string>
<string>
my_destination_section_title
</string>
<string>
my_valuation_method
</string>
<string>
my_
resource_title_list
</string>
<string>
my_
product_line
</string>
</list>
</value>
</item>
...
...
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_view/my_
resource_title_list
.xml
→
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/InventoryReport_view/my_
product_line
.xml
View file @
f806a36a
...
...
@@ -9,18 +9,12 @@
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
allow_creation
</string>
<string>
height
</string>
<string>
portal_type
</string>
<string>
title
</string>
<string>
view_separator
</string>
</list>
<list/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_
resource_title_list
</string>
</value>
<value>
<string>
my_
product_line
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
...
...
@@ -45,6 +39,10 @@
<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>
...
...
@@ -61,21 +59,7 @@
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
view_separator
</string>
</key>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
...
...
@@ -85,44 +69,17 @@
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
allow_creation
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_
view_mode_source_trade_title_list
</string>
</value>
<value>
<string>
my_
product_line
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewTradeFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
height
</string>
</key>
<value>
<int>
5
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<list>
<tuple>
<string>
Resource
</string>
<string>
Resource
</string>
</tuple>
</list>
</value>
<value>
<string>
Base_viewPDMFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Product or Service
</string>
</value>
</item>
<item>
<key>
<string>
view_separator
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<br />
]]>
</string>
</value>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
</dictionary>
</value>
...
...
@@ -130,17 +87,4 @@
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: [(x, x) for x in (list(here.getPortalProductTypeList()) + list(here.getPortalServiceTypeList()))]
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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