Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
cfa39bdb
Commit
cfa39bdb
authored
Dec 19, 2012
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the way we store comment in wf history
parent
3159a007
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
10 deletions
+18
-10
product/ERP5Configurator/Document/AccountConfiguratorItem.py
product/ERP5Configurator/Document/AccountConfiguratorItem.py
+3
-2
product/ERP5Configurator/Document/CurrencyConfiguratorItem.py
...uct/ERP5Configurator/Document/CurrencyConfiguratorItem.py
+2
-1
product/ERP5Configurator/Document/OrganisationConfiguratorItem.py
...ERP5Configurator/Document/OrganisationConfiguratorItem.py
+2
-1
product/ERP5Configurator/Document/PersonConfiguratorItem.py
product/ERP5Configurator/Document/PersonConfiguratorItem.py
+3
-2
product/ERP5Configurator/Document/PurchaseTradeConditionConfiguratorItem.py
...urator/Document/PurchaseTradeConditionConfiguratorItem.py
+2
-1
product/ERP5Configurator/Document/SaleTradeConditionConfiguratorItem.py
...nfigurator/Document/SaleTradeConditionConfiguratorItem.py
+2
-1
product/ERP5Configurator/Document/ServiceConfiguratorItem.py
product/ERP5Configurator/Document/ServiceConfiguratorItem.py
+4
-2
No files found.
product/ERP5Configurator/Document/AccountConfiguratorItem.py
View file @
cfa39bdb
...
...
@@ -30,6 +30,7 @@ import zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Configurator.mixin.configurator_item
import
ConfiguratorItemMixin
class
AccountConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
...
...
@@ -79,7 +80,7 @@ class AccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
# Update existing account
if
(
self
.
getAccountType
()
!=
account
.
getAccountType
())
and
\
(
self
.
getFinancialSection
()
!=
account
.
getFinancialSection
()):
raise
ValueError
(
"The Configurator is trying to overwrit
t
e previous configuration information (%s)"
%
account
.
getRelativeUrl
())
raise
ValueError
(
"The Configurator is trying to overwrite previous configuration information (%s)"
%
account
.
getRelativeUrl
())
account
.
edit
(
title
=
self
.
getTitle
(),
description
=
self
.
getDescription
())
gap_list
=
account
.
getGapList
()
...
...
@@ -90,7 +91,7 @@ class AccountConfiguratorItem(ConfiguratorItemMixin, XMLObject):
account
.
setCreditAccount
(
self
.
isCreditAccount
())
if
self
.
portal_workflow
.
isTransitionPossible
(
account
,
'validate'
):
account
.
validate
(
comment
=
"Validated by Configurator"
)
account
.
validate
(
comment
=
translateString
(
"Validated by Configurator"
)
)
## add to customer template
self
.
install
(
account
,
business_configuration
)
product/ERP5Configurator/Document/CurrencyConfiguratorItem.py
View file @
cfa39bdb
...
...
@@ -30,6 +30,7 @@ import zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Configurator.mixin.configurator_item
import
ConfiguratorItemMixin
class
CurrencyConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
...
...
@@ -72,7 +73,7 @@ class CurrencyConfiguratorItem(ConfiguratorItemMixin, XMLObject):
title
=
title
,
reference
=
reference
,
base_unit_quantity
=
base_unit_quantity
)
currency
.
validate
()
currency
.
validate
(
comment
=
translateString
(
"Validated by Configurator"
)
)
business_configuration
.
setGlobalConfigurationAttr
(
currency_id
=
currency
.
getId
())
## add to customer template
self
.
install
(
currency
,
business_configuration
)
product/ERP5Configurator/Document/OrganisationConfiguratorItem.py
View file @
cfa39bdb
...
...
@@ -30,6 +30,7 @@ import zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Configurator.mixin.configurator_item
import
ConfiguratorItemMixin
class
OrganisationConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
...
...
@@ -78,7 +79,7 @@ class OrganisationConfiguratorItem(ConfiguratorItemMixin, XMLObject):
business_configuration
.
setGlobalConfigurationAttr
(
organisation_id
=
organisation
.
getId
())
if
self
.
portal_workflow
.
isTransitionPossible
(
organisation
,
'validate'
):
organisation
.
validate
(
comment
=
"Validated by Configurator"
)
organisation
.
validate
(
comment
=
translateString
(
"Validated by Configurator"
)
)
## add to customer template
self
.
install
(
organisation
,
business_configuration
)
product/ERP5Configurator/Document/PersonConfiguratorItem.py
View file @
cfa39bdb
...
...
@@ -31,6 +31,7 @@ from Acquisition import aq_base
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
DateTime
import
DateTime
from
Products.ERP5Configurator.mixin.configurator_item
import
ConfiguratorItemMixin
...
...
@@ -92,8 +93,8 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
assignment
.
setStopDate
(
now
+
(
365
*
10
))
# Validate the Person and Assigment
person
.
validate
(
comment
=
"Validated by Configurator"
)
assignment
.
open
(
comment
=
"Open by Configuration"
)
person
.
validate
(
comment
=
translateString
(
"Validated by Configurator"
)
)
assignment
.
open
(
comment
=
translateString
(
"Open by Configuration"
)
)
## add to customer template
self
.
install
(
person
,
business_configuration
)
product/ERP5Configurator/Document/PurchaseTradeConditionConfiguratorItem.py
View file @
cfa39bdb
...
...
@@ -31,6 +31,7 @@ from AccessControl import ClassSecurityInfo
from
DateTime
import
DateTime
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Configurator.mixin.configurator_item
import
ConfiguratorItemMixin
class
PurchaseTradeConditionConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
...
...
@@ -82,6 +83,6 @@ class PurchaseTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
trade_condition
.
setDestinationSection
(
"organisation_module/%s"
%
organisation_id
)
trade_condition
.
setPriceCurrency
(
"currency_module/%s"
%
currency_id
)
trade_condition
.
validate
(
comment
=
"Validated by Configurator"
)
trade_condition
.
validate
(
comment
=
translateString
(
"Validated by Configurator"
)
)
self
.
install
(
trade_condition
,
business_configuration
)
product/ERP5Configurator/Document/SaleTradeConditionConfiguratorItem.py
View file @
cfa39bdb
...
...
@@ -31,6 +31,7 @@ from DateTime import DateTime
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Configurator.mixin.configurator_item
import
ConfiguratorItemMixin
class
SaleTradeConditionConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
...
...
@@ -82,6 +83,6 @@ class SaleTradeConditionConfiguratorItem(ConfiguratorItemMixin, XMLObject):
trade_condition
.
setSourceSection
(
"organisation_module/%s"
%
organisation_id
)
trade_condition
.
setPriceCurrency
(
"currency_module/%s"
%
currency_id
)
trade_condition
.
validate
(
comment
=
"Validated by Configurator"
)
trade_condition
.
validate
(
comment
=
translateString
(
"Validated by Configurator"
)
)
self
.
install
(
trade_condition
,
business_configuration
)
product/ERP5Configurator/Document/ServiceConfiguratorItem.py
View file @
cfa39bdb
...
...
@@ -26,10 +26,12 @@
#
##############################################################################
from
warnings
import
warn
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Configurator.mixin.configurator_item
import
ConfiguratorItemMixin
class
ServiceConfiguratorItem
(
ConfiguratorItemMixin
,
XMLObject
):
...
...
@@ -61,8 +63,8 @@ class ServiceConfiguratorItem(ConfiguratorItemMixin, XMLObject):
document
=
getattr
(
portal
.
service_module
,
service_id
,
None
)
if
document
is
None
:
document
=
portal
.
service_module
.
newContent
(
portal_type
=
'Service'
,
id
=
service_id
,
title
=
service_title
)
document
.
validate
(
"Validated by Configurator"
)
id
=
service_id
,
**
service_dict
)
document
.
validate
(
comment
=
translateString
(
"Validated by Configurator"
)
)
## add to customer template
self
.
install
(
document
,
business_configuration
)
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