summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/base_import/tests/test_cases.py28
-rw-r--r--addons/l10n_ca/account_tax.xml12
-rw-r--r--addons/l10n_fr/fr_tax.xml4
-rw-r--r--addons/point_of_sale/static/src/js/models.js2
-rw-r--r--addons/web/controllers/main.py3
-rw-r--r--doc/cla/corporate/eezee-it.md10
-rw-r--r--doc/cla/corporate/onestein.md20
-rw-r--r--doc/cla/individual/JGarcia-Panach.md9
-rw-r--r--openerp/models.py4
9 files changed, 75 insertions, 17 deletions
diff --git a/addons/base_import/tests/test_cases.py b/addons/base_import/tests/test_cases.py
index 5a8ad70402b..6ed1b3e8ace 100644
--- a/addons/base_import/tests/test_cases.py
+++ b/addons/base_import/tests/test_cases.py
@@ -1,4 +1,7 @@
# -*- encoding: utf-8 -*-
+
+import csv
+import io
import unittest
from openerp.tests.common import TransactionCase, can_import
@@ -486,6 +489,31 @@ class test_convert_import_data(TransactionCase):
record, [False, False, False],
{'quoting': '"', 'separator': ',', 'headers': True,})
+ def test_newline_import(self):
+ """
+ Ensure importing keep newlines
+ """
+ Import = self.registry('base_import.import')
+ output = io.BytesIO()
+ writer = csv.writer(output, quoting=csv.QUOTE_ALL)
+
+ data_row = ("\tfoo\n\tbar", " \"hello\" \n\n 'world' ")
+
+ writer.writerow(["name", "Some Value"])
+ writer.writerow(data_row)
+
+
+ id = Import.create(self.cr, self.uid, {
+ 'res_model': 'base_import.tests.models.preview',
+ 'file': output.getvalue()
+ })
+ record = Import.browse(self.cr, self.uid, id)
+ data, _ = Import._convert_import_data(
+ record, ['name', 'somevalue'],
+ {'quoting': '"', 'separator': ',', 'headers': True,})
+
+ self.assertItemsEqual(data, [data_row])
+
class test_failures(TransactionCase):
def test_big_attachments(self):
"""
diff --git a/addons/l10n_ca/account_tax.xml b/addons/l10n_ca/account_tax.xml
index 760248c89dc..864f8402fb1 100644
--- a/addons/l10n_ca/account_tax.xml
+++ b/addons/l10n_ca/account_tax.xml
@@ -85,7 +85,7 @@
<field name="amount">5</field>
<field name="amount_type">percent</field>
<field name="sequence">1</field>
- <field name="include_base_amount" eval="True"/>
+ <field name="include_base_amount" eval="False"/>
<field name="account_id" ref="chart2131_en"/>
<field name="refund_account_id" ref="chart2131_en"/>
<field name="tag_ids" eval="[(6,0,[ref('tag_gst')])]"/>
@@ -124,7 +124,7 @@
<field name="amount">5</field>
<field name="amount_type">percent</field>
<field name="sequence">1</field>
- <field name="include_base_amount" eval="True"/>
+ <field name="include_base_amount" eval="False"/>
<field name="account_id" ref="chart2131_en"/>
<field name="refund_account_id" ref="chart2131_en"/>
</record>
@@ -199,7 +199,7 @@
<field name="amount">5</field>
<field name="amount_type">percent</field>
<field name="sequence">1</field>
- <field name="include_base_amount" eval="True"/>
+ <field name="include_base_amount" eval="False"/>
<field name="account_id" ref="chart2131_en"/>
<field name="refund_account_id" ref="chart2131_en"/>
</record>
@@ -291,7 +291,7 @@
<field name="amount">5</field>
<field name="amount_type">percent</field>
<field name="sequence">1</field>
- <field name="include_base_amount" eval="True"/>
+ <field name="include_base_amount" eval="False"/>
<field name="account_id" ref="chart1181_en"/>
<field name="refund_account_id" ref="chart1181_en"/>
</record>
@@ -329,7 +329,7 @@
<field name="amount">5</field>
<field name="amount_type">percent</field>
<field name="sequence">1</field>
- <field name="include_base_amount" eval="True"/>
+ <field name="include_base_amount" eval="False"/>
<field name="account_id" ref="chart1181_en"/>
<field name="refund_account_id" ref="chart1181_en"/>
</record>
@@ -404,7 +404,7 @@
<field name="amount">5</field>
<field name="amount_type">percent</field>
<field name="sequence">1</field>
- <field name="include_base_amount" eval="True"/>
+ <field name="include_base_amount" eval="False"/>
<field name="account_id" ref="chart1181_en"/>
<field name="refund_account_id" ref="chart1181_en"/>
</record>
diff --git a/addons/l10n_fr/fr_tax.xml b/addons/l10n_fr/fr_tax.xml
index 27ed4ba7e2d..8a1afd9de8d 100644
--- a/addons/l10n_fr/fr_tax.xml
+++ b/addons/l10n_fr/fr_tax.xml
@@ -189,7 +189,7 @@
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="pcg_445711"/>
<field name="account_id" ref="pcg_445711"/>
- <field name="sequence" eval="1"/>
+ <field name="sequence" eval="10"/>
<field name="type_tax_use">sale</field>
<field name="tag_ids" eval="[(6,0,[ref('l10n_fr.tax_20_0')])]"/>
</record>
@@ -256,7 +256,7 @@
<field name="amount_type">percent</field>
<field name="refund_account_id" ref="pcg_44566"/>
<field name="account_id" ref="pcg_44566"/>
- <field name="sequence" eval="1"/>
+ <field name="sequence" eval="10"/>
<field name="type_tax_use">purchase</field>
<field name="tag_ids" eval="[(6,0,[ref('l10n_fr.tax_ACH-20_0')])]"/>
</record>
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index e3a217c93cc..7860f2c7ee6 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -1242,7 +1242,7 @@ exports.Orderline = Backbone.Model.extend({
this.trigger('change',this);
},
get_unit_price: function(){
- return this.price;
+ return round_di(this.price || 0, this.pos.dp['Product Price'])
},
get_unit_display_price: function(){
if (this.pos.config.iface_tax_included) {
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py
index 96a4ab40dd8..208d5de5c4d 100644
--- a/addons/web/controllers/main.py
+++ b/addons/web/controllers/main.py
@@ -1365,8 +1365,7 @@ class CSVExport(ExportFormat, http.Controller):
for data in rows:
row = []
for d in data:
- if isinstance(d, basestring):
- d = d.replace('\n',' ').replace('\t',' ')
+ if isinstance(d, unicode):
try:
d = d.encode('utf-8')
except UnicodeError:
diff --git a/doc/cla/corporate/eezee-it.md b/doc/cla/corporate/eezee-it.md
index 12cedecec59..ec575bce7b3 100644
--- a/doc/cla/corporate/eezee-it.md
+++ b/doc/cla/corporate/eezee-it.md
@@ -1,4 +1,4 @@
-Belgium, 2015-03-02
+Belgium, 2016-02-19
EEZEE-IT agrees to the terms of the Odoo Corporate Contributor License
Agreement v1.0.
@@ -12,11 +12,13 @@ Antony Brugger antony.brugger@eezee-it.com https://github.com/antonybrugger
List of contributors:
-Julien Laloux julien.laloux@eezee-it.com https://github.com/jlaloux
-Sylvain Van Hoof sylvain.vanhoof@eezee-it.com https://github.com/sylvainvanhoof
Aristóbulo Meneses aristobulo.meneses@eezee-it.com https://github.com/aristobulo-eezee
Janik De Goÿ janik.de.goy@eezee-it.com https://github.com/jdegoy
François Lawarrée francois.lawarre@eezee-it.com https://github.com/francoislawarree
José Moreno jose.moreno@eezee-it.com https://github.com/jose-eezee
Javier Carrasco javier.carrasco@eezee-it.com https://github.com/jose-eezee
-David Cajot david.cajot@eezee-it.com https://github.com/dcajot \ No newline at end of file
+David Cajot david.cajot@eezee-it.com https://github.com/dcajot
+François Honoré francois.honore@eezee-it.com https://github.com/eezeefho
+Bénédicte Hanet benedicte.hanet@eezee-it.com https://github.com/bene1505
+Analisa Carbone analisa.carbone@eezee-it.com https://github.com/analisaodoo
+Nicolas De Moreau nicolas.demoreau@eezee-it.com https://github.com/ndemoreau \ No newline at end of file
diff --git a/doc/cla/corporate/onestein.md b/doc/cla/corporate/onestein.md
new file mode 100644
index 00000000000..aabab253352
--- /dev/null
+++ b/doc/cla/corporate/onestein.md
@@ -0,0 +1,20 @@
+Netherlands, 2016-02-18
+
+Onestein BV agrees to the terms of the Odoo Corporate
+Contributor License Agreement v1.0.
+
+We declare that we are authorized and able to make this agreement and sign
+this declaration.
+
+Signed,
+
+* Samer Nefawa <s.nefawa@onestein.nl> https://github.com/samernefawa
+
+List of contributors:
+
+* Samer Nefawa <s.nefawa@onestein.nl> https://github.com/samernefawa
+* Niels Middeldorp <n.middeldorp@onestein.nl> https://github.com/nielsmiddeldorp
+* Kevin Graveman <k.graveman@onestein.nl> https://github.com/pankk
+* Dennis Sluijk <d.sluijk@onestein.nl> https://github.com/tarteo
+* Richard Dijkstra <r.dijkstra@onestein.nl> https://github.com/RichDijk
+* Andrea Stirpe <a.stirpe@onestein.nl> https://github.com/astirpe
diff --git a/doc/cla/individual/JGarcia-Panach.md b/doc/cla/individual/JGarcia-Panach.md
new file mode 100644
index 00000000000..8566cf43640
--- /dev/null
+++ b/doc/cla/individual/JGarcia-Panach.md
@@ -0,0 +1,9 @@
+Spain, 2016-02-17
+
+I hereby agree to the terms of the Odoo Individual Contributor License Agreement v1.0.
+
+I declare that I am authorized and able to make this agreement and sign this declaration.
+
+Signed,
+
+Javier García-Panach panaka7@gmail.com https://github.com/JGarcia-Panach
diff --git a/openerp/models.py b/openerp/models.py
index e30f6f3dcf2..51b0c51d292 100644
--- a/openerp/models.py
+++ b/openerp/models.py
@@ -909,10 +909,10 @@ class BaseModel(object):
if lines2:
# merge first line with record's main line
for j, val in enumerate(lines2[0]):
- if val:
+ if val or isinstance(val, bool):
current[j] = val
# check value of current field
- if not current[i]:
+ if not current[i] and not isinstance(current[i], bool):
# assign xml_ids, and forget about remaining lines
xml_ids = [item[1] for item in value.name_get()]
current[i] = ','.join(xml_ids)