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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tomáš Peterka
erp5
Commits
5b245984
Commit
5b245984
authored
Jun 06, 2017
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trade: make line fast input dialog usable on containers
parent
bd822a07
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
106 additions
and
8 deletions
+106
-8
bt5/erp5_trade/ActionTemplateItem/portal_types/Container/fast_input.xml
.../ActionTemplateItem/portal_types/Container/fast_input.xml
+85
-0
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_checkConsistencyForDeliveryFastInputDialog.py
...de/Delivery_checkConsistencyForDeliveryFastInputDialog.py
+9
-4
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_updateFastInputLineList.py
...rtal_skins/erp5_trade/Delivery_updateFastInputLineList.py
+7
-3
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/SaleOrderLine_getQuantityUnitItemList.py
...skins/erp5_trade/SaleOrderLine_getQuantityUnitItemList.py
+4
-1
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/Container/fast_input.xml
0 → 100644
View file @
5b245984
<?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_fast_input
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_fast_input
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</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>
fast_input
</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>
1.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Add Lines
</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}/Delivery_checkConsistencyForDeliveryFastInputDialog
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_checkConsistencyForDeliveryFastInputDialog.py
View file @
5b245984
...
...
@@ -3,18 +3,23 @@ If validation succeeds, then form_dialog is returned.
Otherwise a message is displayed to the user.
"""
portal
=
context
.
getPortalObject
()
delivery
=
context
if
delivery
.
getPortalType
()
in
portal
.
getPortalContainerTypeList
():
delivery
=
context
.
getExplanationValue
()
# Retrieve lines portal type
line_portal_type_list
=
[
x
for
x
in
context
.
getTypeInfo
().
getTypeAllowedContentTypeList
()
\
line_portal_type_list
=
[
x
for
x
in
delivery
.
getTypeInfo
().
getTypeAllowedContentTypeList
()
\
if
x
in
portal
.
getPortalMovementTypeList
()]
line_portal_type
=
line_portal_type_list
[
0
]
use_list
=
[]
# Check if the section and use preference are defined
if
line_portal_type
in
context
.
getPortalSaleTypeList
():
section_uid
=
context
.
getSourceSectionUid
()
if
line_portal_type
in
portal
.
getPortalSaleTypeList
():
section_uid
=
delivery
.
getSourceSectionUid
()
use_list
=
portal
.
portal_preferences
.
getPreferredSaleUseList
()
elif
line_portal_type
in
portal
.
getPortalPurchaseTypeList
():
section_uid
=
context
.
getDestinationSectionUid
()
section_uid
=
delivery
.
getDestinationSectionUid
()
use_list
=
portal
.
portal_preferences
.
getPreferredPurchaseUseList
()
elif
line_portal_type
in
portal
.
getPortalInternalTypeList
()
+
portal
.
getPortalInventoryMovementTypeList
():
section_uid
=
""
...
...
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Delivery_updateFastInputLineList.py
View file @
5b245984
...
...
@@ -14,19 +14,23 @@ check_stock_availability = False
portal
=
context
.
getPortalObject
()
Base_translateString
=
portal
.
Base_translateString
delivery
=
context
if
delivery
.
getPortalType
()
in
portal
.
getPortalContainerTypeList
():
delivery
=
context
.
getExplanationValue
()
# Retrieve lines portal type
line_portal_type_list
=
[
x
for
x
in
context
.
getTypeInfo
().
getTypeAllowedContentTypeList
()
\
line_portal_type_list
=
[
x
for
x
in
delivery
.
getTypeInfo
().
getTypeAllowedContentTypeList
()
\
if
x
in
portal
.
getPortalMovementTypeList
()]
line_portal_type
=
line_portal_type_list
[
0
]
if
line_portal_type
in
portal
.
getPortalSaleTypeList
():
section_uid
=
context
.
getSourceSectionUid
()
section_uid
=
delivery
.
getSourceSectionUid
()
supply_cell_portal_type
=
"Sale Supply Cell"
supply_line_id
=
"default_ssl"
use_list
=
portal
.
portal_preferences
.
getPreferredSaleUseList
()
check_stock_availability
=
True
elif
line_portal_type
in
portal
.
getPortalPurchaseTypeList
():
section_uid
=
context
.
getDestinationSectionUid
()
section_uid
=
delivery
.
getDestinationSectionUid
()
supply_cell_portal_type
=
"Purchase Supply Cell"
supply_line_id
=
"default_psl"
use_list
=
portal
.
portal_preferences
.
getPreferredPurchaseUseList
()
...
...
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/SaleOrderLine_getQuantityUnitItemList.py
View file @
5b245984
...
...
@@ -27,7 +27,10 @@ if resource_value is None:
if
resource_value
is
None
and
(
resource_title
or
resource_reference
):
# Querying catalog to find a resource according title and reference parameters
# like Delivery_updateFastInputLineList does.
line_portal_type_list
=
[
x
for
x
in
context
.
getTypeInfo
().
getTypeAllowedContentTypeList
()
\
delivery
=
context
if
delivery
.
getPortalType
()
in
portal
.
getPortalContainerLineTypeList
():
delivery
=
context
.
getExplanationValue
()
line_portal_type_list
=
[
x
for
x
in
delivery
.
getTypeInfo
().
getTypeAllowedContentTypeList
()
\
if
x
in
portal
.
getPortalMovementTypeList
()]
line_portal_type
=
line_portal_type_list
[
0
]
...
...
bt5/erp5_trade/bt/template_action_path_list
View file @
5b245984
...
...
@@ -6,6 +6,7 @@ Business Process | view
Component Module | jump_to_related_sale_packing_list
Container Line | view
Container Line | view_quantity
Container | fast_input
Container | view
Delivery Cell | view
Delivery Node Module | view
...
...
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