Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arnaud Fontaine
erp5
Commits
e3e31c6f
Commit
e3e31c6f
authored
Dec 20, 2012
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no need to set date on trade conditions
parent
f523bb61
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
12 deletions
+9
-12
bt5/erp5_configurator_standard/TestTemplateItem/testStandardConfigurationWorkflow.py
...ard/TestTemplateItem/testStandardConfigurationWorkflow.py
+7
-6
product/ERP5Configurator/Document/PurchaseTradeConditionConfiguratorItem.py
...urator/Document/PurchaseTradeConditionConfiguratorItem.py
+1
-3
product/ERP5Configurator/Document/SaleTradeConditionConfiguratorItem.py
...nfigurator/Document/SaleTradeConditionConfiguratorItem.py
+1
-3
No files found.
bt5/erp5_configurator_standard/TestTemplateItem/testStandardConfigurationWorkflow.py
View file @
e3e31c6f
...
@@ -755,8 +755,9 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
...
@@ -755,8 +755,9 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
sale_trade_condition
.
getTitle
())
sale_trade_condition
.
getTitle
())
self
.
assertEquals
(
"STC-General"
,
sale_trade_condition
.
getReference
())
self
.
assertEquals
(
"STC-General"
,
sale_trade_condition
.
getReference
())
self
.
assertNotEquals
(
None
,
sale_trade_condition
.
getEffectiveDate
())
# Trade condition does not need dates
self
.
assertNotEquals
(
None
,
sale_trade_condition
.
getExpirationDate
())
self
.
assertEquals
(
None
,
sale_trade_condition
.
getEffectiveDate
())
self
.
assertEquals
(
None
,
sale_trade_condition
.
getExpirationDate
())
# Check relation with Business Process
# Check relation with Business Process
business_process_list
=
\
business_process_list
=
\
...
@@ -801,8 +802,9 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
...
@@ -801,8 +802,9 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
purchase_trade_condition
.
getTitle
())
purchase_trade_condition
.
getTitle
())
self
.
assertEquals
(
"PTC-General"
,
purchase_trade_condition
.
getReference
())
self
.
assertEquals
(
"PTC-General"
,
purchase_trade_condition
.
getReference
())
self
.
assertNotEquals
(
None
,
purchase_trade_condition
.
getEffectiveDate
())
# Trade condition does not need dates
self
.
assertNotEquals
(
None
,
purchase_trade_condition
.
getExpirationDate
())
self
.
assertEquals
(
None
,
purchase_trade_condition
.
getEffectiveDate
())
self
.
assertEquals
(
None
,
purchase_trade_condition
.
getExpirationDate
())
# Check relation with Business Process
# Check relation with Business Process
business_process_list
=
\
business_process_list
=
\
...
@@ -932,8 +934,7 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
...
@@ -932,8 +934,7 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
resource
.
validate
()
resource
.
validate
()
self
.
tic
()
self
.
tic
()
start_date
=
sale_trade_condition
.
getEffectiveDate
()
+
1
start_date
=
stop_date
=
DateTime
()
stop_date
=
sale_trade_condition
.
getExpirationDate
()
-
1
order
=
module
.
newContent
(
order
=
module
.
newContent
(
portal_type
=
'Sale Order'
,
portal_type
=
'Sale Order'
,
specialise
=
(
sale_trade_condition
.
getRelativeUrl
(),),
specialise
=
(
sale_trade_condition
.
getRelativeUrl
(),),
...
...
product/ERP5Configurator/Document/PurchaseTradeConditionConfiguratorItem.py
View file @
e3e31c6f
...
@@ -72,9 +72,7 @@ class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
...
@@ -72,9 +72,7 @@ class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
trade_condition
=
portal
.
purchase_trade_condition_module
.
newContent
(
trade_condition
=
portal
.
purchase_trade_condition_module
.
newContent
(
portal_type
=
"Purchase Trade Condition"
,
portal_type
=
"Purchase Trade Condition"
,
reference
=
self
.
getReference
(),
reference
=
self
.
getReference
(),
title
=
self
.
getTitle
(),
title
=
self
.
getTitle
(),
)
effective_date
=
DateTime
()
-
1
,
expiration_date
=
DateTime
()
+
10
*
365
)
trade_condition
.
setSpecialise
(
"business_process_module/%s"
%
\
trade_condition
.
setSpecialise
(
"business_process_module/%s"
%
\
business_process_id
)
business_process_id
)
...
...
product/ERP5Configurator/Document/SaleTradeConditionConfiguratorItem.py
View file @
e3e31c6f
...
@@ -72,9 +72,7 @@ class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
...
@@ -72,9 +72,7 @@ class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
trade_condition
=
portal
.
sale_trade_condition_module
.
newContent
(
trade_condition
=
portal
.
sale_trade_condition_module
.
newContent
(
portal_type
=
"Sale Trade Condition"
,
portal_type
=
"Sale Trade Condition"
,
reference
=
self
.
getReference
(),
reference
=
self
.
getReference
(),
title
=
self
.
getTitle
(),
title
=
self
.
getTitle
())
effective_date
=
DateTime
()
-
1
,
expiration_date
=
DateTime
()
+
10
*
365
)
trade_condition
.
setSpecialise
(
"business_process_module/%s"
%
\
trade_condition
.
setSpecialise
(
"business_process_module/%s"
%
\
business_process_id
)
business_process_id
)
...
...
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