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
Sebastian
erp5
Commits
618b35a7
Commit
618b35a7
authored
Nov 30, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "pdm/trade: Support supply line for a product_line"
This reverts commit
4f0bdaab
.
parent
4f0bdaab
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
57 deletions
+0
-57
bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/SupplyCell_asPredicate.xml
...lateItem/portal_skins/erp5_pdm/SupplyCell_asPredicate.xml
+0
-3
bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/SupplyLine_asPredicate.xml
...lateItem/portal_skins/erp5_pdm/SupplyLine_asPredicate.xml
+0
-3
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Movement_getPriceCalculationOperandDict.xml
...ins/erp5_core/Movement_getPriceCalculationOperandDict.xml
+0
-4
product/ERP5/tests/testResource.py
product/ERP5/tests/testResource.py
+0
-47
No files found.
bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/SupplyCell_asPredicate.xml
View file @
618b35a7
...
...
@@ -66,9 +66,6 @@ if context.getSource():\n
if context.getDestination():\n
base_category_tuple += (\'destination\',)\n
\n
if context.hasProductLine():\n
base_category_tuple += (\'product_line\', )\n
\n
if context.getParentValue().getParentValue().getPortalType() in (\n
## XXX There is no portal type group for trade conditions.\n
\'Sale Trade Condition\',\n
...
...
bt5/erp5_pdm/SkinTemplateItem/portal_skins/erp5_pdm/SupplyLine_asPredicate.xml
View file @
618b35a7
...
...
@@ -68,9 +68,6 @@ if context.getSource():\n
if context.getDestination():\n
base_category_tuple += (\'destination\',)\n
\n
if context.hasProductLine():\n
base_category_tuple += (\'product_line\', )\n
\n
if context.getParentValue().getPortalType() in (\n
## XXX There is no portal type group for trade conditions.\n
\'Sale Trade Condition\',\n
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Movement_getPriceCalculationOperandDict.xml
View file @
618b35a7
...
...
@@ -178,10 +178,6 @@ if specialise_set:\n
kw[\'categories\'] = kw.get(\'categories\', []) + [\'specialise/%s\' % x for x in specialise_set]\n
\n
if resource is not None:\n
product_line = resource.getProductLine()\n
if product_line:\n
kw[\'categories\'] = kw.get(\'categories\', []) + [\'product_line/%s\' % product_line]\n
\n
if isPricingOptimise():\n
return getOptimisedPriceCalculationOperandDict(default=default, context=context, **kw)\n
else:\n
...
...
product/ERP5/tests/testResource.py
View file @
618b35a7
...
...
@@ -186,16 +186,6 @@ class TestResource(ERP5TypeTestCase):
quantity
=
0.001
)
gram_definition
.
validate
()
# create some product line categories
product_line
=
self
.
portal
.
portal_categories
.
product_line
if
product_line
.
_getOb
(
'a'
,
None
)
is
None
:
product_line
.
newContent
(
id
=
'a'
,
portal_type
=
'Category'
)
if
product_line
.
_getOb
(
'b'
,
None
)
is
None
:
product_line
.
newContent
(
id
=
'b'
,
portal_type
=
'Category'
)
def
stepCreateResource
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
"""
...
...
@@ -1077,43 +1067,6 @@ class TestResource(ERP5TypeTestCase):
self
.
assertEqual
(
1000
,
sale_order_line
.
getPrice
())
self
.
assertEqual
(
5000
,
sale_order_line
.
getTotalPrice
())
def
testGetPriceProductLine
(
self
):
"""Test supply line set for a product line.
"""
# This supply line defines a price applicable for all resources member
# of product line a
supply
=
self
.
portal
.
getDefaultModule
(
self
.
sale_supply_portal_type
).
newContent
(
portal_type
=
self
.
sale_supply_portal_type
)
supply_line
=
supply
.
newContent
(
portal_type
=
self
.
sale_supply_line_portal_type
)
supply_line
.
setProductLineValue
(
self
.
portal
.
portal_categories
.
product_line
.
a
)
supply_line
.
setBasePrice
(
1000
)
supply
.
validate
()
resource_a
=
self
.
portal
.
getDefaultModule
(
self
.
product_portal_type
)
\
.
newContent
(
portal_type
=
self
.
product_portal_type
)
resource_a
.
setProductLineValue
(
self
.
portal
.
portal_categories
.
product_line
.
a
)
resource_b
=
self
.
portal
.
getDefaultModule
(
self
.
product_portal_type
)
\
.
newContent
(
portal_type
=
self
.
product_portal_type
)
resource_b
.
setProductLineValue
(
self
.
portal
.
portal_categories
.
product_line
.
b
)
self
.
tic
()
sale_order_line
=
self
.
portal
.
getDefaultModule
(
"Sale Order"
).
newContent
(
portal_type
=
'Sale Order'
).
newContent
(
portal_type
=
self
.
sale_order_line_portal_type
,
resource_value
=
resource_a
,
quantity
=
1
)
# resource_a is member of product_line/a, so our supply line applies.
self
.
assertEqual
(
1000
,
sale_order_line
.
getPrice
())
sale_order_line
=
self
.
portal
.
getDefaultModule
(
"Sale Order"
).
newContent
(
portal_type
=
'Sale Order'
).
newContent
(
portal_type
=
self
.
sale_order_line_portal_type
,
resource_value
=
resource_b
,
quantity
=
1
)
# resource_b is member of product_line/b, so our supply line does not apply.
self
.
assertEqual
(
None
,
sale_order_line
.
getPrice
())
def
testQuantityPrecision
(
self
):
"""test how to define quantity precision on resources.
"""
...
...
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