Commit 8d07e115 authored by Tatuya Kamada's avatar Tatuya Kamada

* Revert

  remove the DefaultValue feature because it did not consider localization


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26318 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a803fbbe
...@@ -529,9 +529,6 @@ class ODFStrategy(Implicit): ...@@ -529,9 +529,6 @@ class ODFStrategy(Implicit):
return row return row
def _set_column_value(self, column, value): def _set_column_value(self, column, value):
# if the value is a DefaultValue, uses the ODF template value
if isinstance(value, DefaultValue) or value == DefaultValue:
return
self._clear_column_value(column) self._clear_column_value(column)
if value is None: if value is None:
value = '' value = ''
...@@ -611,18 +608,3 @@ class ODTStrategy(ODFStrategy): ...@@ -611,18 +608,3 @@ class ODTStrategy(ODFStrategy):
"""ODTStrategy create a ODT Document from a form and a ODT template""" """ODTStrategy create a ODT Document from a form and a ODT template"""
pass pass
class DefaultValue:
"""The DefaultValue is the marker object which indicate that using template value
Python Script Example: 'number' column uses ODF table cell value
from Products.PythonScripts.standard import Object
from Products.ERP5OOo.FormPrintout import DefaultValue
return [ Object(number=DefaultValue(),
total_price=context.getTotalPrice())]
"""
pass
InitializeClass(DefaultValue)
allow_class(DefaultValue)
...@@ -42,8 +42,6 @@ document_classes = updateGlobals( this_module, globals(), permissions_module = P ...@@ -42,8 +42,6 @@ document_classes = updateGlobals( this_module, globals(), permissions_module = P
from AccessControl import ModuleSecurityInfo from AccessControl import ModuleSecurityInfo
ModuleSecurityInfo('Products.ERP5OOo.OOoUtils').declarePublic('OOoParser',) ModuleSecurityInfo('Products.ERP5OOo.OOoUtils').declarePublic('OOoParser',)
ModuleSecurityInfo('Products.ERP5OOo.OOoUtils').declarePublic('newOOoParser',) ModuleSecurityInfo('Products.ERP5OOo.OOoUtils').declarePublic('newOOoParser',)
# Allow access to DefaultValue from scripts
ModuleSecurityInfo('Products.ERP5OOo.FormPrintout').declarePublic('DefalutValue',)
# Define object classes and tools # Define object classes and tools
from OOoTemplate import OOoTemplate from OOoTemplate import OOoTemplate
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment