<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/odoo/tools/sql.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>[FIX] base: allow using another postgres schema than public</title>
<updated>2021-03-19T11:52:26+00:00</updated>
<author>
<name>Stéphane Bidoul</name>
<email>stephane.bidoul@acsone.eu</email>
</author>
<published>2021-03-14T15:40:57+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=0ee38f3bb0bc74271246f4653ec85c85b437980f'/>
<id>0ee38f3bb0bc74271246f4653ec85c85b437980f</id>
<content type='text'>
Before 1721ec1363 and fdc4ef97c9d09, Odoo did work fine when the
user had another default schema than 'public'.
This commit restores this behaviour by searching
for existing objects in the user's current schema,
which is the first in the schema search path and
the one used when no schema is specified when
creating objects.

closes odoo/odoo#68141

X-original-commit: 223781b34afacd1c0c5674d395cece6d472b048c
Signed-off-by: Olivier Dony (odo) &lt;odo@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before 1721ec1363 and fdc4ef97c9d09, Odoo did work fine when the
user had another default schema than 'public'.
This commit restores this behaviour by searching
for existing objects in the user's current schema,
which is the first in the schema search path and
the one used when no schema is specified when
creating objects.

closes odoo/odoo#68141

X-original-commit: 223781b34afacd1c0c5674d395cece6d472b048c
Signed-off-by: Olivier Dony (odo) &lt;odo@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] tools.sql, website_*: increment counter with skip lock</title>
<updated>2020-09-28T13:38:28+00:00</updated>
<author>
<name>Jeremy Kersten</name>
<email>jke@odoo.com</email>
</author>
<published>2020-09-25T15:06:36+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d92e61e89f468c2db2fbd68b2f0d6b36c77f1065'/>
<id>d92e61e89f468c2db2fbd68b2f0d6b36c77f1065</id>
<content type='text'>
*blog, forum, slides

Based on https://github.com/odoo/odoo/pull/48552#discussion_r440061218 suggestion

Add a new method 'increment_skip_lock' in tools.sql to allow to easily
increment a specific field of 1 if the record is not locked.

The method return boolean if at least 1 record has been incremented.

closes odoo/odoo#58534

Signed-off-by: Jérémy Kersten (jke) &lt;jke@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
*blog, forum, slides

Based on https://github.com/odoo/odoo/pull/48552#discussion_r440061218 suggestion

Add a new method 'increment_skip_lock' in tools.sql to allow to easily
increment a specific field of 1 if the record is not locked.

The method return boolean if at least 1 record has been incremented.

closes odoo/odoo#58534

Signed-off-by: Jérémy Kersten (jke) &lt;jke@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] core: optimize `model._auto_init()` on a new model</title>
<updated>2020-04-03T11:40:28+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2020-04-02T06:45:54+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=3ecb6fdcb0efcade41b9a6342718800b3293e4bf'/>
<id>3ecb6fdcb0efcade41b9a6342718800b3293e4bf</id>
<content type='text'>
Create the table with all the columns from scratch, with the NOT NULL
constraint when required.  Also do not call `_check_removed_columns()`
on a new table.

This saves 0.5% of the total installation time.

X-original-commit: 0727cacf5194a143b15ab4cb9893f3035a67be1f</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create the table with all the columns from scratch, with the NOT NULL
constraint when required.  Also do not call `_check_removed_columns()`
on a new table.

This saves 0.5% of the total installation time.

X-original-commit: 0727cacf5194a143b15ab4cb9893f3035a67be1f</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] core: delay constraint application in case of upgrade</title>
<updated>2020-02-06T18:28:29+00:00</updated>
<author>
<name>Adrian Torres</name>
<email>adt@odoo.com</email>
</author>
<published>2020-02-05T15:57:04+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=f61262eb08134ba5bdf9099445fe821769842bb3'/>
<id>f61262eb08134ba5bdf9099445fe821769842bb3</id>
<content type='text'>
closes odoo/odoo#44800

Co-authored-with: Xavier Dollé &lt;xdo@odoo.com&gt;
X-original-commit: bc2bb5e03c2b32d4ee1b0597ea5889c17d2b0e0e
Signed-off-by: Xavier Dollé (xdo) &lt;xdo@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes odoo/odoo#44800

Co-authored-with: Xavier Dollé &lt;xdo@odoo.com&gt;
X-original-commit: bc2bb5e03c2b32d4ee1b0597ea5889c17d2b0e0e
Signed-off-by: Xavier Dollé (xdo) &lt;xdo@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] sql_db: ignore PG views when verifying table type</title>
<updated>2019-12-24T19:08:11+00:00</updated>
<author>
<name>Denis Vermylen</name>
<email>dve@odoo.com</email>
</author>
<published>2019-12-09T15:30:50+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=cf0146934d5377ae4b65a46fe86fbb21ab6ec7cb'/>
<id>cf0146934d5377ae4b65a46fe86fbb21ab6ec7cb</id>
<content type='text'>
Collisions in table names of ORM models with built-in PG structures such
as "attributes", "domains", "routines", "parameters", ... could occur
and render the result of `table_kind` meaningless.

Based on what was done via https://github.com/odoo/odoo/pull/16651 more
than 2 years ago, it seems relying on our tables being in the 'public'
schema is safe, even though it's only a default from PG. We reuse that
same logic rather than the alternative of excluding
('information_schema', 'pg_catalog', ...), even though it looks safer at
first. If we did the latter we'd have to change the other comparison for
consistency, i.e. more risks.

closes odoo/odoo#42358

X-original-commit: d8e74eb14990c82f65a44ffe163aa84159d6ccc4
Signed-off-by: Denis Vermylen &lt;Icallhimtest@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Collisions in table names of ORM models with built-in PG structures such
as "attributes", "domains", "routines", "parameters", ... could occur
and render the result of `table_kind` meaningless.

Based on what was done via https://github.com/odoo/odoo/pull/16651 more
than 2 years ago, it seems relying on our tables being in the 'public'
schema is safe, even though it's only a default from PG. We reuse that
same logic rather than the alternative of excluding
('information_schema', 'pg_catalog', ...), even though it looks safer at
first. If we did the latter we'd have to change the other comparison for
consistency, i.e. more risks.

closes odoo/odoo#42358

X-original-commit: d8e74eb14990c82f65a44ffe163aa84159d6ccc4
Signed-off-by: Denis Vermylen &lt;Icallhimtest@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] base: allow custom model to use SQL (materialized) views instead of table</title>
<updated>2019-12-03T07:45:25+00:00</updated>
<author>
<name>Nicolas Vannieuwerburgh</name>
<email>nvn@odoo.com</email>
</author>
<published>2019-11-22T08:40:03+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=17c4f47b0ae7a0eec78b5555d52eeb0bb5e3cc5a'/>
<id>17c4f47b0ae7a0eec78b5555d52eeb0bb5e3cc5a</id>
<content type='text'>
closes odoo/odoo#41267

X-original-commit: f17d389c4625e95f52c299c13a3f2983127c70bc
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
Co-authored-by: Denis Ledoux &lt;dle@odoo.com&gt;
Co-authored-by: Raphael Collet &lt;rco@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes odoo/odoo#41267

X-original-commit: f17d389c4625e95f52c299c13a3f2983127c70bc
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
Co-authored-by: Denis Ledoux &lt;dle@odoo.com&gt;
Co-authored-by: Raphael Collet &lt;rco@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ADD] test_lint: Add sql-injection pylint check</title>
<updated>2019-10-02T14:16:38+00:00</updated>
<author>
<name>Moisés López</name>
<email>moylop260@vauxoo.com</email>
</author>
<published>2019-08-20T16:58:35+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a5251e1d40d9bd833993bf1618fc2760adb6567a'/>
<id>a5251e1d40d9bd833993bf1618fc2760adb6567a</id>
<content type='text'>
closes odoo/odoo#36583

Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes odoo/odoo#36583

Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] sql_db: add flush() in savepoint()</title>
<updated>2019-08-26T13:39:16+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2019-08-26T13:38:17+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c7f5c4afd2099f951dfe433ab18716062b2843db'/>
<id>c7f5c4afd2099f951dfe433ab18716062b2843db</id>
<content type='text'>
closes odoo/odoo#36060

Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes odoo/odoo#36060

Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] models: ORM speedup</title>
<updated>2019-08-20T12:43:59+00:00</updated>
<author>
<name>Raphael Collet</name>
<email>rco@odoo.com</email>
</author>
<published>2019-08-14T07:35:49+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9920f20e4c7753bc17bea71dea3a90f7de687196'/>
<id>9920f20e4c7753bc17bea71dea3a90f7de687196</id>
<content type='text'>
This branch is the combination of several optimizations in the ORM:

* store field values once in the cache: the cache reflects more
faithfully the database, only fields that explicitly depend on the
context have an extra indirection in the cache;

* delay recomputations by default: use method `recompute` to explicitly
flush out pending recomputations;

* delay updates in method `write`: updates are stored in a data
structure that can be flushed efficiently to the database with method
`flush` (which also flush out recomputations);

* make method `modified` take advantage of inverse fields to inverse
dependencies;

* filter records by evaluating a domain on records in Python;

* a computed field with `readonly=False` behaves like a normal field
with an onchange method;

* computed fields are computed in superuser mode by default.

Work done by Toufik Ben Jaa, Raphael Collet, Denis Ledoux and Fabien
Pinckaers.

closes odoo/odoo#35659

Signed-off-by: Denis Ledoux &lt;beledouxdenis@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This branch is the combination of several optimizations in the ORM:

* store field values once in the cache: the cache reflects more
faithfully the database, only fields that explicitly depend on the
context have an extra indirection in the cache;

* delay recomputations by default: use method `recompute` to explicitly
flush out pending recomputations;

* delay updates in method `write`: updates are stored in a data
structure that can be flushed efficiently to the database with method
`flush` (which also flush out recomputations);

* make method `modified` take advantage of inverse fields to inverse
dependencies;

* filter records by evaluating a domain on records in Python;

* a computed field with `readonly=False` behaves like a normal field
with an onchange method;

* computed fields are computed in superuser mode by default.

Work done by Toufik Ben Jaa, Raphael Collet, Denis Ledoux and Fabien
Pinckaers.

closes odoo/odoo#35659

Signed-off-by: Denis Ledoux &lt;beledouxdenis@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[RFR] Hide implementation of constraint definition storage, courtesy of Raphael Collet</title>
<updated>2018-08-16T08:33:06+00:00</updated>
<author>
<name>Stefan Rijnhart</name>
<email>stefan@opener.am</email>
</author>
<published>2018-06-12T07:44:26+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b3824aa6cbecc97fc0cd54773417045e69adc87a'/>
<id>b3824aa6cbecc97fc0cd54773417045e69adc87a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
