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
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
Titouan Soulard
erp5
Commits
f6ad824d
Commit
f6ad824d
authored
Jul 02, 2013
by
Aurel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
take new syncml parameter into account
parent
161eae5e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
23 deletions
+24
-23
bt5/erp5_tiosafe_document/SkinTemplateItem/portal_skins/erp5_tiosafe_document/DocumentConnector_readDocument.xml
.../erp5_tiosafe_document/DocumentConnector_readDocument.xml
+23
-22
bt5/erp5_tiosafe_document/bt/revision
bt5/erp5_tiosafe_document/bt/revision
+1
-1
No files found.
bt5/erp5_tiosafe_document/SkinTemplateItem/portal_skins/erp5_tiosafe_document/DocumentConnector_readDocument.xml
View file @
f6ad824d
...
@@ -127,41 +127,42 @@ for table_name in spreadsheet_list.keys():\n
...
@@ -127,41 +127,42 @@ for table_name in spreadsheet_list.keys():\n
property_map[column_index] = column_id\n
property_map[column_index] = column_id\n
column_index += 1\n
column_index += 1\n
# This path_element_list help us to reconstruct the absolute path\n
# This path_element_list help us to reconstruct the absolute path\n
context.log("line_id = %r" %(line_id))\n
if line_id is not None:\n
if line_id is not None:\n
line_list = [sheet[int(line_id)-1],]\n
line_list = [sheet[int(line_id)-1],]\n
line_index = int(line_id)\n
line_index = int(line_id)\n
else:\n
else:\n
line_list = sheet[1:]\n
line_list = sheet[1:]\n
line_index = 2\n
line_index = 2\n
context.log(\'line_list = %s\' %(line_list))
\n
line_list = line_list[:limit]
\n
for line in line_list:\n
for line in line_list:\n
if id_list and str(line_index) not in id_list:\n
continue\n
# Exclude empty lines\n
# Exclude empty lines\n
context.log("\\tgot line", line)\n
if line.count(\'\') + line.count(None) == len(line):\n
if line.count(\'\') + line.count(None) == len(line):\n
continue\n
continue\n
\n
\n
# Prefetch line datas\n
# Prefetch line datas\n
line_data = {"id" : str(line_index)}\n
line_data = {"id" : str(line_index)}\n
path_defined = []\n
if not id_only:\n
for cell_index, cell in enumerate(line):\n
path_defined = []\n
# Get the property corresponding to the cell data\n
for cell_index, cell in enumerate(line):\n
property_id = property_map[cell_index]\n
# Get the property corresponding to the cell data\n
if cell is not None and cell.strip()==\'\':\n
property_id = property_map[cell_index]\n
# empty string is NOT a valid identifier\n
if cell is not None and cell.strip()==\'\':\n
cell=None\n
# empty string is NOT a valid identifier\n
if not cell:\n
cell=None\n
continue\n
if not cell:\n
if line_data.has_key(property_id):\n
continue\n
if isinstance(line_data[property_id], str):\n
if line_data.has_key(property_id):\n
cell_value_list = [line_data[property_id], cell]\n
if isinstance(line_data[property_id], str):\n
line_data[property_id] = cell_value_list\n
cell_value_list = [line_data[property_id], cell]\n
line_data[property_id] = cell_value_list\n
else:\n
line_data[property_id].append(cell)\n
else:\n
else:\n
line_data[property_id].append(cell)\n
line_data[property_id] = cell\n
else:\n
# Proceed to next cell\n
line_data[property_id] = cell\n
cell_index += 1\n
# Proceed to next cell\n
cell_index += 1\n
line_index += 1\n
line_index += 1\n
spreadsheet_line_list.append(line_data)\n
spreadsheet_line_list.append(line_data)\n
\n
\n
...
@@ -172,7 +173,7 @@ return spreadsheet_line_list\n
...
@@ -172,7 +173,7 @@ return spreadsheet_line_list\n
</item>
</item>
<item>
<item>
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
reference, table, li
ne_id
=None
</string>
</value>
<value>
<string>
reference, table, li
mit, id_only, line_id=None, id_list
=None
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_tiosafe_document/bt/revision
View file @
f6ad824d
1
2
\ No newline at end of file
\ No newline at end of file
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