Commit aa603a2c authored by Jérome Perrin's avatar Jérome Perrin

Merge !496 Replace \r\n by \n in ZSQL Methods' arguments

Since 76cc938e we have diffs each time we edit ZSQL Methods. This is a "big commit" to change all remaining ZSQL methods. I checked diffs one by one, but I would appreciate others check this as well and confirm that it's OK to do so.

From the root of repository, I did :

```
grep -rl Products.ZSQLMethods.SQL  . | grep '\.xml$' | xargs ~/bin/zsql_backslash_n.py
```

With a script containing
```python

from lxml import etree
import sys

for filename in sys.argv[1:]:
  with open(filename) as f:
    tree = etree.parse(f)
    root = tree.getroot()
    for el in tree.xpath('//item/key/string[text() = "arguments_src"]/../../value/string'):
      if el.text:
        el.text = el.text.replace(r'\r\n', r'\n')

    # force <string> element to have a text, so that they export as <string></string> and not <string/>
    for el in tree.xpath('//string[not(text())]'):
      el.text = ''

  with open(filename, 'w') as f:
    f.write(
        '<?xml version="1.0"?>\n'
        + etree.tostring(root, pretty_print=True, encoding="utf-8"))

  print filename
```
( script snippet: $277 )

/cc @jm @georgios.dagkakis @Nicolas

/reviewed-on !496

Conflicts:
	product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_getitem_by_path.xml
	product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_getitem_by_uid.xml
	product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_produce_reserved_uid_list.xml
parents 16de28d5 2adf9084
......@@ -14,21 +14,21 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>uid\r\n
getSourceSectionUid\r\n
getDestinationSectionUid\r\n
getResourceUid\r\n
getSourceProjectUid\r\n
getDestinationProjectUid\r\n
getSourcePaymentUid\r\n
getDestinationPaymentUid\r\n
getTitle\r\n
getReference\r\n
getSourceReference\r\n
getDestinationReference\r\n
getStartDate\r\n
getStopDate\r\n
InternalInvoiceTransaction_statInternalTransactionLineList\r\n
<value> <string>uid\n
getSourceSectionUid\n
getDestinationSectionUid\n
getResourceUid\n
getSourceProjectUid\n
getDestinationProjectUid\n
getSourcePaymentUid\n
getDestinationPaymentUid\n
getTitle\n
getReference\n
getSourceReference\n
getDestinationReference\n
getStartDate\n
getStopDate\n
InternalInvoiceTransaction_statInternalTransactionLineList\n
</string> </value>
</item>
<item>
......
......@@ -8,9 +8,9 @@
<dictionary>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
table_1\r\n
RELATED_QUERY_SEPARATOR=" AND "\r\n
<value> <string>table_0\n
table_1\n
RELATED_QUERY_SEPARATOR=" AND "\n
query_table="catalog"</string> </value>
</item>
<item>
......
......@@ -8,9 +8,9 @@
<dictionary>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
table_1\r\n
RELATED_QUERY_SEPARATOR=" AND "\r\n
<value> <string>table_0\n
table_1\n
RELATED_QUERY_SEPARATOR=" AND "\n
query_table="catalog"</string> </value>
</item>
<item>
......
......@@ -65,9 +65,9 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>node_uid\r\n
at_date\r\n
section_uid:list\r\n
<value> <string>node_uid\n
at_date\n
section_uid:list\n
simulation_state:list</string> </value>
</item>
<item>
......
......@@ -22,10 +22,10 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>node_uid:list\r\n
section_uid:list\r\n
simulation_state:list\r\n
portal_type:list\r\n
<value> <string>node_uid:list\n
section_uid:list\n
simulation_state:list\n
portal_type:list\n
at_date</string> </value>
</item>
<item>
......
......@@ -39,7 +39,7 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>account_uid_list\r\n
<value> <string>account_uid_list\n
account_node_uid</string> </value>
</item>
<item>
......
......@@ -8,10 +8,10 @@
<dictionary>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
table_1\r\n
table_2\r\n
query_table\r\n
<value> <string>table_0\n
table_1\n
table_2\n
query_table\n
RELATED_QUERY_SEPARATOR=" AND "</string> </value>
</item>
<item>
......
......@@ -14,18 +14,18 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>isDelivery\r\n
uid\r\n
getSourceUid\r\n
getDestinationUid\r\n
getSourceSectionUid\r\n
getDestinationSectionUid\r\n
getResourceUid\r\n
getRecoupDate\r\n
getSourcePaymentReference\r\n
getDestinationPaymentReference\r\n
getSourcePaymentInternalBankAccountNumber\r\n
getDestinationPaymentInternalBankAccountNumber\r\n
<value> <string>isDelivery\n
uid\n
getSourceUid\n
getDestinationUid\n
getSourceSectionUid\n
getDestinationSectionUid\n
getResourceUid\n
getRecoupDate\n
getSourcePaymentReference\n
getDestinationPaymentReference\n
getSourcePaymentInternalBankAccountNumber\n
getDestinationPaymentInternalBankAccountNumber\n
getSourceTotalAssetPrice</string> </value>
</item>
<item>
......
......@@ -14,15 +14,15 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>isMovement\r\n
isAccountable\r\n
uid\r\n
getStopDate\r\n
getBaobabDestinationUid\r\n
getBaobabDestinationSectionUid\r\n
getResourceUid\r\n
getVariationText\r\n
getSimulationState\r\n
<value> <string>isMovement\n
isAccountable\n
uid\n
getStopDate\n
getBaobabDestinationUid\n
getBaobabDestinationSectionUid\n
getResourceUid\n
getVariationText\n
getSimulationState\n
getAggregateUidList</string> </value>
</item>
<item>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>uid\r\n
<value> <string>uid\n
getMeasureRowList</string> </value>
</item>
<item>
......
......@@ -14,18 +14,18 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>isMovement\r\n
uid\r\n
getExplanationUid\r\n
getSourceUid\r\n
getDestinationUid\r\n
getResourceUid\r\n
getQuantity\r\n
getStartDate\r\n
getStopDate\r\n
getPrice\r\n
isAccountable\r\n
isDivergent\r\n
<value> <string>isMovement\n
uid\n
getExplanationUid\n
getSourceUid\n
getDestinationUid\n
getResourceUid\n
getQuantity\n
getStartDate\n
getStopDate\n
getPrice\n
isAccountable\n
isDivergent\n
getVariationText</string> </value>
</item>
<item>
......
......@@ -14,26 +14,26 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>uid\r\n
security_uid\r\n
getViewPermissionOwner\r\n
getPath\r\n
getRelativeUrl\r\n
getParentUid\r\n
id\r\n
getDescription\r\n
getTitle\r\n
getPortalType\r\n
getSimulationState\r\n
getValidationState\r\n
getReference\r\n
getSourceReference\r\n
getStringIndex\r\n
getIntIndex\r\n
hasCellContent\r\n
getCreationDate\r\n
getModificationDate\r\n
getStartDate\r\n
<value> <string>uid\n
security_uid\n
getViewPermissionOwner\n
getPath\n
getRelativeUrl\n
getParentUid\n
id\n
getDescription\n
getTitle\n
getPortalType\n
getSimulationState\n
getValidationState\n
getReference\n
getSourceReference\n
getStringIndex\n
getIntIndex\n
hasCellContent\n
getCreationDate\n
getModificationDate\n
getStartDate\n
getStopDate</string> </value>
</item>
<item>
......
......@@ -8,8 +8,8 @@
<dictionary>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>uid\r\n
getQuantityUnitConversionDefinitionRowList\r\n
<value> <string>uid\n
getQuantityUnitConversionDefinitionRowList\n
</string> </value>
</item>
<item>
......
......@@ -14,28 +14,28 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>uid\r\n
getResourceUid\r\n
getInventoriatedQuantity\r\n
getBaobabSourceUid\r\n
getBaobabDestinationUid\r\n
getBaobabSourceSectionUid\r\n
getBaobabDestinationSectionUid\r\n
isMovement\r\n
isCancellationAmount\r\n
isInventoryMovement\r\n
getBaobabSourcePaymentUid\r\n
getBaobabDestinationPaymentUid\r\n
getExplanationUid\r\n
getSimulationState\r\n
getSourceInventoriatedTotalAssetPrice\r\n
getDestinationInventoriatedTotalAssetPrice\r\n
getStartDate\r\n
getStopDate\r\n
isAccountable\r\n
getPortalType\r\n
getBaobabDestinationVariationText\r\n
getBaobabSourceVariationText\r\n
<value> <string>uid\n
getResourceUid\n
getInventoriatedQuantity\n
getBaobabSourceUid\n
getBaobabDestinationUid\n
getBaobabSourceSectionUid\n
getBaobabDestinationSectionUid\n
isMovement\n
isCancellationAmount\n
isInventoryMovement\n
getBaobabSourcePaymentUid\n
getBaobabDestinationPaymentUid\n
getExplanationUid\n
getSimulationState\n
getSourceInventoriatedTotalAssetPrice\n
getDestinationInventoriatedTotalAssetPrice\n
getStartDate\n
getStopDate\n
isAccountable\n
getPortalType\n
getBaobabDestinationVariationText\n
getBaobabSourceVariationText\n
getSubVariationText</string> </value>
</item>
<item>
......
......@@ -14,28 +14,28 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>uid\r\n
getResourceUid\r\n
getInventoriatedQuantity\r\n
getBaobabSourceUid\r\n
getBaobabDestinationUid\r\n
getBaobabSourceSectionUid\r\n
getBaobabDestinationSectionUid\r\n
isMovement\r\n
isCancellationAmount\r\n
isInventoryMovement\r\n
getBaobabSourcePaymentUid\r\n
getBaobabDestinationPaymentUid\r\n
getExplanationUid\r\n
getSimulationState\r\n
getSourceInventoriatedTotalAssetPrice\r\n
getDestinationInventoriatedTotalAssetPrice\r\n
getStartDate\r\n
getStopDate\r\n
isAccountable\r\n
getPortalType\r\n
getBaobabDestinationVariationText\r\n
getBaobabSourceVariationText\r\n
<value> <string>uid\n
getResourceUid\n
getInventoriatedQuantity\n
getBaobabSourceUid\n
getBaobabDestinationUid\n
getBaobabSourceSectionUid\n
getBaobabDestinationSectionUid\n
isMovement\n
isCancellationAmount\n
isInventoryMovement\n
getBaobabSourcePaymentUid\n
getBaobabDestinationPaymentUid\n
getExplanationUid\n
getSimulationState\n
getSourceInventoriatedTotalAssetPrice\n
getDestinationInventoriatedTotalAssetPrice\n
getStartDate\n
getStopDate\n
isAccountable\n
getPortalType\n
getBaobabDestinationVariationText\n
getBaobabSourceVariationText\n
getSubVariationText</string> </value>
</item>
<item>
......
......@@ -20,15 +20,15 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>uid\r\n
getLanguage\r\n
getVersion\r\n
getRevision\r\n
subject_set_uid\r\n
getEffectiveDate\r\n
getExpirationDate\r\n
getCreationDateIndex\r\n
getFrequencyIndex\r\n
<value> <string>uid\n
getLanguage\n
getVersion\n
getRevision\n
subject_set_uid\n
getEffectiveDate\n
getExpirationDate\n
getCreationDateIndex\n
getFrequencyIndex\n
</string> </value>
</item>
<item>
......
......@@ -22,28 +22,28 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>from_table_list:list\r\n
where_expression\r\n
order_by_expression\r\n
group_by_expression\r\n
selection_domain_from_expression\r\n
selection_domain_where_expression\r\n
select_expression\r\n
ignore_variation\r\n
standardize\r\n
omit_simulation\r\n
section_filtered\r\n
omit_input\r\n
omit_output\r\n
input_simulation_state:list\r\n
output_simulation_state:list\r\n
precision\r\n
inventory_list\r\n
statistic\r\n
convert_quantity_result\r\n
quantity_unit_uid\r\n
stock_table_id=stock\r\n
transformed_uid\r\n
<value> <string>from_table_list:list\n
where_expression\n
order_by_expression\n
group_by_expression\n
selection_domain_from_expression\n
selection_domain_where_expression\n
select_expression\n
ignore_variation\n
standardize\n
omit_simulation\n
section_filtered\n
omit_input\n
omit_output\n
input_simulation_state:list\n
output_simulation_state:list\n
precision\n
inventory_list\n
statistic\n
convert_quantity_result\n
quantity_unit_uid\n
stock_table_id=stock\n
transformed_uid\n
transformed_variation_text</string> </value>
</item>
<item>
......
......@@ -8,9 +8,9 @@
<dictionary>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
table_1\r\n
query_table="catalog"\r\n
<value> <string>table_0\n
table_1\n
query_table="catalog"\n
RELATED_QUERY_SEPARATOR=" AND "</string> </value>
</item>
<item>
......
......@@ -8,9 +8,9 @@
<dictionary>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
table_1\r\n
query_table="catalog"\r\n
<value> <string>table_0\n
table_1\n
query_table="catalog"\n
RELATED_QUERY_SEPARATOR=" AND "</string> </value>
</item>
<item>
......
......@@ -8,9 +8,9 @@
<dictionary>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
table_1\r\n
query_table="catalog"\r\n
<value> <string>table_0\n
table_1\n
query_table="catalog"\n
RELATED_QUERY_SEPARATOR=" AND "</string> </value>
</item>
<item>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
<value> <string>table_0\n
table_1</string> </value>
</item>
<item>
......
......@@ -14,8 +14,8 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
table_1\r\n
<value> <string>table_0\n
table_1\n
table_2</string> </value>
</item>
<item>
......
......@@ -8,9 +8,9 @@
<dictionary>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
table_1\r\n
table_2\r\n
<value> <string>table_0\n
table_1\n
table_2\n
table_3</string> </value>
</item>
<item>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
<value> <string>table_0\n
table_1</string> </value>
</item>
<item>
......
......@@ -14,8 +14,8 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
table_1\r\n
<value> <string>table_0\n
table_1\n
table_2</string> </value>
</item>
<item>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
<value> <string>table_0\n
table_1</string> </value>
</item>
<item>
......
......@@ -14,8 +14,8 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
table_1\r\n
<value> <string>table_0\n
table_1\n
table_2</string> </value>
</item>
<item>
......
......@@ -22,11 +22,11 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>from_date\r\n
to_date\r\n
node:list\r\n
resource:list\r\n
portal_type:list\r\n
<value> <string>from_date\n
to_date\n
node:list\n
resource:list\n
portal_type:list\n
simulation_state:list</string> </value>
</item>
<item>
......
......@@ -22,10 +22,10 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>from_date\r\n
to_date\r\n
node:list\r\n
resource:list\r\n
<value> <string>from_date\n
to_date\n
node:list\n
resource:list\n
portal_type:list</string> </value>
</item>
<item>
......
......@@ -14,9 +14,9 @@
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>period_list:list\r\n
node:list\r\n
portal_type:list\r\n
<value> <string>period_list:list\n
node:list\n
portal_type:list\n