<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/base_import/models.py, branch 14.0</title>
<subtitle>The current checkout of upstream Odoo</subtitle>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/'/>
<entry>
<title>[MOV] base_import: module directory organization</title>
<updated>2016-07-07T12:44:10+00:00</updated>
<author>
<name>Hitesh Trivedi</name>
<email>htr@openerp.com</email>
</author>
<published>2015-09-24T13:28:58+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=cf3e8324f1f4119347ec685abc5cced3a1cf02a9'/>
<id>cf3e8324f1f4119347ec685abc5cced3a1cf02a9</id>
<content type='text'>
Note: move test models file in models to not import tests
directory, which breaks the mute_logger of test cases
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Note: move test models file in models to not import tests
directory, which breaks the mute_logger of test cases
</pre>
</div>
</content>
</entry>
<entry>
<title>[REM] models: remove deprecated method BaseModel.import_data()</title>
<updated>2016-06-16T14:50:46+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@openerp.com</email>
</author>
<published>2016-05-17T09:56:14+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=8da9116f5dcaab393b646f397d560408dc1f127c'/>
<id>8da9116f5dcaab393b646f397d560408dc1f127c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] base_import: currency symbol can be placed at the right of the value</title>
<updated>2016-05-25T11:53:33+00:00</updated>
<author>
<name>David Monjoie</name>
<email>dmo@odoo.com</email>
</author>
<published>2016-05-25T11:53:33+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=64aea2b515e9cb35890c1e674740b3f7d8df67f4'/>
<id>64aea2b515e9cb35890c1e674740b3f7d8df67f4</id>
<content type='text'>
The previous code went outside of the list bounds because the modulo
operator has a higher priority than the addition one.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous code went outside of the list bounds because the modulo
operator has a higher priority than the addition one.
</pre>
</div>
</content>
</entry>
<entry>
<title>[MERGE] forward port of branch saas-10 up to bb8f0f1</title>
<updated>2016-04-25T13:48:31+00:00</updated>
<author>
<name>Christophe Simonis</name>
<email>chs@odoo.com</email>
</author>
<published>2016-04-25T13:48:31+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=2dcbdd077881ea4efb32e029dcdf194529fe9a83'/>
<id>2dcbdd077881ea4efb32e029dcdf194529fe9a83</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] base_import: only feed utf-8 to csv reader</title>
<updated>2016-04-22T14:36:48+00:00</updated>
<author>
<name>Nicolas Lempereur</name>
<email>nle@odoo.com</email>
</author>
<published>2016-04-22T11:13:01+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6de2091d4d3a142b9c09846ed207387f58f7f027'/>
<id>6de2091d4d3a142b9c09846ed207387f58f7f027</id>
<content type='text'>
As noted in the csv module documentation*, up to python 2.7 it is best
to used UTF-8 as input (and worst to use UTF-16 csv).

closes #11792
opw-674756

* https://docs.python.org/2/library/csv.html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As noted in the csv module documentation*, up to python 2.7 it is best
to used UTF-8 as input (and worst to use UTF-16 csv).

closes #11792
opw-674756

* https://docs.python.org/2/library/csv.html
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] base_import: when trying to find date_format prefer format %m%d%Y before %d%m%Y</title>
<updated>2016-04-11T09:17:08+00:00</updated>
<author>
<name>Cedric Snauwaert</name>
<email>csn@openerp.com</email>
</author>
<published>2016-04-11T09:04:25+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6976fd15ae00ffa1e7cbe9462c07b506ce59fe09'/>
<id>6976fd15ae00ffa1e7cbe9462c07b506ce59fe09</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] base_import: simplify import by reducing choice for the columns based on heuristic</title>
<updated>2016-04-07T07:42:23+00:00</updated>
<author>
<name>Cedric Snauwaert</name>
<email>csn@openerp.com</email>
</author>
<published>2016-02-15T11:01:07+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=841f208b226587d9276b14c481378eeda52b6f30'/>
<id>841f208b226587d9276b14c481378eeda52b6f30</id>
<content type='text'>
automatically try to detect type of columns from the first 10 rows of file:
If column only contains integer, only show, int, float, monetary, m2o, o2m, m2m fields in wizard
If column only contains true/false values, only show boolean fields in wizard
etc

add an advanced mode which is the same as previous import (show all fields)

Support different date format and float value with currency as well as float value with parenthesis to reprensent negative value.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
automatically try to detect type of columns from the first 10 rows of file:
If column only contains integer, only show, int, float, monetary, m2o, o2m, m2m fields in wizard
If column only contains true/false values, only show boolean fields in wizard
etc

add an advanced mode which is the same as previous import (show all fields)

Support different date format and float value with currency as well as float value with parenthesis to reprensent negative value.
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] base_import: CSV import error from windows</title>
<updated>2016-03-25T12:13:23+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2016-03-25T12:08:26+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4a31f85c5ab49b7965f089edba296114039ae645'/>
<id>4a31f85c5ab49b7965f089edba296114039ae645</id>
<content type='text'>
Missing bit from #10374: because the _read_xls function is a generator
it is *entirely* lazy and Python doesn't execute *any* code when it's
initially called, which means the file is actually (tentatively) parsed
when the first line is requested which happens outside of
_read_file (and thus of the fallback mechanism implemented by #10374).

Fix by splitting _read_xls between the opening of the workbook (eager)
and the actual iteration (which remains lazy).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Missing bit from #10374: because the _read_xls function is a generator
it is *entirely* lazy and Python doesn't execute *any* code when it's
initially called, which means the file is actually (tentatively) parsed
when the first line is requested which happens outside of
_read_file (and thus of the fallback mechanism implemented by #10374).

Fix by splitting _read_xls between the opening of the workbook (eager)
and the actual iteration (which remains lazy).
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] base_import: use mimetype guessing</title>
<updated>2016-02-17T14:45:11+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2016-02-17T14:14:01+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a4ee8e5723ca17760c86659b675738b3c6a485ae'/>
<id>a4ee8e5723ca17760c86659b675738b3c6a485ae</id>
<content type='text'>
Rather than trust the user-controlled mimetype or extension of imported
files which may be incorrect (because the user is lying, because the
system is misconfigured, because software is not installed, because
software is registering non-standard mimetypes, etc...), start by trying
to guess the mimetype *then* fallback on trying the type/ext.

Of note: CSV is becoming less and less great as it's nigh impossible to
guess for it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rather than trust the user-controlled mimetype or extension of imported
files which may be incorrect (because the user is lying, because the
system is misconfigured, because software is not installed, because
software is registering non-standard mimetypes, etc...), start by trying
to guess the mimetype *then* fallback on trying the type/ext.

Of note: CSV is becoming less and less great as it's nigh impossible to
guess for it.
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] catch exception on incorrect mime type</title>
<updated>2016-02-17T14:45:11+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2016-02-17T14:11:14+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=97d2b758fe23d15f83fcd804b54b4b2326166f10'/>
<id>97d2b758fe23d15f83fcd804b54b4b2326166f10</id>
<content type='text'>
If the user provides a known mimetype which doesn't actually match the
file as far as we're concerned, warn and fallback on extension rather
than blow up.

This comes up when a user installs Excel on Windows: it associates CSV
files with itself and sets their mime type to application/vnd.ms-excel,
which is not correct and leads to us trying to load a CSV with xlrd (an
excel-parsing library).

Fixes #9779
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the user provides a known mimetype which doesn't actually match the
file as far as we're concerned, warn and fallback on extension rather
than blow up.

This comes up when a user installs Excel on Windows: it associates CSV
files with itself and sets their mime type to application/vnd.ms-excel,
which is not correct and leads to us trying to load a CSV with xlrd (an
excel-parsing library).

Fixes #9779
</pre>
</div>
</content>
</entry>
</feed>
