<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/odoo/exceptions.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: fix exception retro-compatibility-aid</title>
<updated>2020-10-07T16:14:40+00:00</updated>
<author>
<name>Julien Castiaux</name>
<email>juc@odoo.com</email>
</author>
<published>2020-10-07T16:14:40+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=29e844a86508b39031fa8c3f1a2ef3735f71e6f2'/>
<id>29e844a86508b39031fa8c3f1a2ef3735f71e6f2</id>
<content type='text'>
Restore the old signature of except_orm.

opw-2354525
opw-2355980

closes odoo/odoo#59443

Signed-off-by: Toufik Benjaa (tbe) &lt;tbe@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Restore the old signature of except_orm.

opw-2354525
opw-2355980

closes odoo/odoo#59443

Signed-off-by: Toufik Benjaa (tbe) &lt;tbe@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] base: fix crash when using RedirectWarning with an additonnal context</title>
<updated>2020-08-05T15:48:22+00:00</updated>
<author>
<name>Arnaud Joset</name>
<email>arj@odoo.com</email>
</author>
<published>2020-06-29T12:41:03+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=f9ddf1b110531cc443cc9d4aaffdf832c7a7189a'/>
<id>f9ddf1b110531cc443cc9d4aaffdf832c7a7189a</id>
<content type='text'>
The following commit https://github.com/odoo/odoo/commit/b3d9647695065ea582e4a6b0603f3ebf9fde6976  added the possibility to provide addtionnal context to RedirectWarningHandler.

Unfortunately the RedirectWarning python function does not handle the new argument and crashes.

This commit handle the addtionnal argument.

closes odoo/odoo#55487

Taskid: 2286999
X-original-commit: 60bbf47ad21abb1db7ebd2dc0a9379140007a93d
Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
Signed-off-by: Sébastien Theys (seb) &lt;seb@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following commit https://github.com/odoo/odoo/commit/b3d9647695065ea582e4a6b0603f3ebf9fde6976  added the possibility to provide addtionnal context to RedirectWarningHandler.

Unfortunately the RedirectWarning python function does not handle the new argument and crashes.

This commit handle the addtionnal argument.

closes odoo/odoo#55487

Taskid: 2286999
X-original-commit: 60bbf47ad21abb1db7ebd2dc0a9379140007a93d
Signed-off-by: Yannick Tivisse (yti) &lt;yti@odoo.com&gt;
Signed-off-by: Sébastien Theys (seb) &lt;seb@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[REV] base: restore removed deprecated osv and exceptions</title>
<updated>2020-05-14T14:00:41+00:00</updated>
<author>
<name>Julien Castiaux</name>
<email>juc@odoo.com</email>
</author>
<published>2020-04-15T14:52:08+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b6537c4335356ed660d2acbd914783d4ceea2521'/>
<id>b6537c4335356ed660d2acbd914783d4ceea2521</id>
<content type='text'>
To ensure backward compatibility, stuff removed by ab4000fb3 have
been restored.

closes odoo/odoo#49603

Task: 2234749
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To ensure backward compatibility, stuff removed by ab4000fb3 have
been restored.

closes odoo/odoo#49603

Task: 2234749
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[REF] base: Remove deprecated exceptions and osv</title>
<updated>2020-04-08T08:41:17+00:00</updated>
<author>
<name>Julien Castiaux</name>
<email>juc@odoo.com</email>
</author>
<published>2020-02-19T13:34:27+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ab4000fb3cf8fa54ba714ceceec391b78d73755e'/>
<id>ab4000fb3cf8fa54ba714ceceec391b78d73755e</id>
<content type='text'>
TL;DR: remember `osv` and `except_orm` ? You can forget about them.

* Deprecated `except_orm` dropped.
* `UserError` elevated as super type of all user-related
  errors.
* Unused `DeferredException` dropped.
* Unused `QWebException` dropped (real one is in `qweb.py`).
* `MailDeliveryException` made a python exception.
* `name` legacy exception attribute made an alias of the python standard
  `args[0]` attribute and deprecated.
* `value` legacy exception attribute dropped.
* `exception_type` RPC error response key dropped.
* Deprecated `osv` module dropped.
* `--osv-memory-age-limit` cli option made an alias of
  `--transient-age-limit` and deprecated.

The `odoo.exceptions.Warning` have long been a deprecated alias to
`UserError`. It is going to be removed in a future version but first we
explicitly deprecate it with a warning.

The `odoo.exceptions.DeferredException` was a very old internal
exception, it has been removed without deprecation notice as it is never
raised.

The `odoo.exceptions.except_orm` has been a deprecated exception type
with deprecation warning for 5 years, it has been removed in favor of
UserError which becomes the super class of all user-related errors.

The `odoo.base.models.ir_mail_server.MailDeliveryException` was
inheriting `except_orm`. As it is not related to a user error but is
more of a problem an admin much take care of, the exception has been
made a Python error.

The `exception_type` JSON key in RPC error responses was holding an
hardcoded value derived from the exception type. Its usage has been
dropped in favor of the `name` JSON key that holds the precise exception
name. Again as it was hardly used in the source code (beside the crash
manager) it has been dropped without deprecation warning.

Since we are here trying to clean odoo custom exceptions, we are also
deprecating the `name` exception attribute in favor of the more standard
`args[0]` attribute.

The `name` (along with `value`) were two attributes used to raise
`except_orm` exceptions before the introduction of `UserError`,
`AccessError` and related exceptions. The `name` attribute, at the time,
was holding the exception type/title. Nowadays it contains the error
message. The `value` attribute, at the time, was holding the error
message. Nowadays it is no more used.

The `osv` module contains very old deprecated aliases. There is no
simple way to log a deprecation warning for osv, osv_memory and
osv_abstract but as they have not been in use for ages, they have been
removed too. To be consistent, the `--osv-memory-age-limit` cli option
has been made a deprecated alias to the `--transient-age-limit`.

closes odoo/odoo#45723

Task: 2187728
Related: odoo/enterprise#9162
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
TL;DR: remember `osv` and `except_orm` ? You can forget about them.

* Deprecated `except_orm` dropped.
* `UserError` elevated as super type of all user-related
  errors.
* Unused `DeferredException` dropped.
* Unused `QWebException` dropped (real one is in `qweb.py`).
* `MailDeliveryException` made a python exception.
* `name` legacy exception attribute made an alias of the python standard
  `args[0]` attribute and deprecated.
* `value` legacy exception attribute dropped.
* `exception_type` RPC error response key dropped.
* Deprecated `osv` module dropped.
* `--osv-memory-age-limit` cli option made an alias of
  `--transient-age-limit` and deprecated.

The `odoo.exceptions.Warning` have long been a deprecated alias to
`UserError`. It is going to be removed in a future version but first we
explicitly deprecate it with a warning.

The `odoo.exceptions.DeferredException` was a very old internal
exception, it has been removed without deprecation notice as it is never
raised.

The `odoo.exceptions.except_orm` has been a deprecated exception type
with deprecation warning for 5 years, it has been removed in favor of
UserError which becomes the super class of all user-related errors.

The `odoo.base.models.ir_mail_server.MailDeliveryException` was
inheriting `except_orm`. As it is not related to a user error but is
more of a problem an admin much take care of, the exception has been
made a Python error.

The `exception_type` JSON key in RPC error responses was holding an
hardcoded value derived from the exception type. Its usage has been
dropped in favor of the `name` JSON key that holds the precise exception
name. Again as it was hardly used in the source code (beside the crash
manager) it has been dropped without deprecation warning.

Since we are here trying to clean odoo custom exceptions, we are also
deprecating the `name` exception attribute in favor of the more standard
`args[0]` attribute.

The `name` (along with `value`) were two attributes used to raise
`except_orm` exceptions before the introduction of `UserError`,
`AccessError` and related exceptions. The `name` attribute, at the time,
was holding the exception type/title. Nowadays it contains the error
message. The `value` attribute, at the time, was holding the error
message. Nowadays it is no more used.

The `osv` module contains very old deprecated aliases. There is no
simple way to log a deprecation warning for osv, osv_memory and
osv_abstract but as they have not been in use for ages, they have been
removed too. To be consistent, the `--osv-memory-age-limit` cli option
has been made a deprecated alias to the `--transient-age-limit`.

closes odoo/odoo#45723

Task: 2187728
Related: odoo/enterprise#9162
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] core: make accessing fields from __str__ possible</title>
<updated>2020-03-23T10:53:34+00:00</updated>
<author>
<name>Xavier Morel</name>
<email>xmo@odoo.com</email>
</author>
<published>2020-01-08T14:42:49+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d418bff698f1601d7d3b2d1579d785e47f4f47d1'/>
<id>d418bff698f1601d7d3b2d1579d785e47f4f47d1</id>
<content type='text'>
Because CacheMiss calls str() on the record it's given, it's not
possible to override __str__ and get field values: on the first cache
miss (= the first field access) we're going to blow the stack:

* any random field is accessed
* and faults
* which creates a CacheMiss
* which stringifies the record
* which accesses a field
* which faults
* which creates a CacheMiss
* etc...

Fix:

* move the basic Model's stringification to repr(), which is
  implicitly called on str() if no __str__ is specified, for historical
  reasons we were doing the opposite
* use repr() when initialising CacheMiss

closes odoo/odoo#42966

Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because CacheMiss calls str() on the record it's given, it's not
possible to override __str__ and get field values: on the first cache
miss (= the first field access) we're going to blow the stack:

* any random field is accessed
* and faults
* which creates a CacheMiss
* which stringifies the record
* which accesses a field
* which faults
* which creates a CacheMiss
* etc...

Fix:

* move the basic Model's stringification to repr(), which is
  implicitly called on str() if no __str__ is specified, for historical
  reasons we were doing the opposite
* use repr() when initialising CacheMiss

closes odoo/odoo#42966

Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] core,test_access_rights: improve exept_orm stringification</title>
<updated>2019-11-13T11:05:14+00:00</updated>
<author>
<name>Xavier-Do</name>
<email>xdo@odoo.com</email>
</author>
<published>2019-11-12T08:31:14+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c403aec2aa6d0a60dd1c10ab43becdbfa52fab22'/>
<id>c403aec2aa6d0a60dd1c10ab43becdbfa52fab22</id>
<content type='text'>
In most case, except_orm.value is empty, leading to a str
representation of the args, which is a repr of each element
of the tuple in the case of exept_orm:
(repr(name), repr(value)) -&gt; ('name', None)

In this case, the None value is just noise and the name will be repr
causing "'" to be escaped and replacing carriage return
by "\n" making it difficult to read and to compare.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In most case, except_orm.value is empty, leading to a str
representation of the args, which is a repr of each element
of the tuple in the case of exept_orm:
(repr(name), repr(value)) -&gt; ('name', None)

In this case, the None value is just noise and the name will be repr
causing "'" to be escaped and replacing carriage return
by "\n" making it difficult to read and to compare.</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] base, doc: orm page refactoring.</title>
<updated>2019-11-04T11:16:12+00:00</updated>
<author>
<name>Victor Feyens</name>
<email>vfe@odoo.com</email>
</author>
<published>2019-10-31T14:57:06+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ae4855fa1e0156cefdb1c31945252f2b7517a6f4'/>
<id>ae4855fa1e0156cefdb1c31945252f2b7517a6f4</id>
<content type='text'>
closes odoo/odoo#39725

X-original-commit: 7ce7c58592c7c7202a37c73767c477be5a835752
Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
closes odoo/odoo#39725

X-original-commit: 7ce7c58592c7c7202a37c73767c477be5a835752
Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] *: remove old deprecated modules/functions</title>
<updated>2019-09-17T11:36:42+00:00</updated>
<author>
<name>Julien Castiaux</name>
<email>juc@odoo.com</email>
</author>
<published>2019-09-11T09:45:31+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=4f03a5f136ab928ae74322bf1c34a1b6a6baf979'/>
<id>4f03a5f136ab928ae74322bf1c34a1b6a6baf979</id>
<content type='text'>
PEP-594 is deprecating a bunch of modules. As part of the cleanup, we
are also dealing with long deprecated modules, functions and aliases.

* `assert_` -&gt; `assertTrue`
* `assertEquals` -&gt; `assertEqual`
* `assertNotEquals` -&gt; `assertNotEqual`
* `assertAlmostEquals` -&gt; `assertAlmostEqual`
* `assertRaisesRegexp` -&gt; `assertRaisesRegex`
* `assertRegexpMatches` -&gt; `assertRegex`
* `base64.encodestring` -&gt; `base64.encodebytes`
* `base64.decodestring` -&gt; `base64.decodebytes`
* `inspect.getargspec` -&gt; `inspect.signature`
* `inspect.formatargspec` -&gt; `inspect.signature`
* `logging.warn` -&gt; `logging.warning`

closes odoo/odoo#36863

Task: 2003936
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PEP-594 is deprecating a bunch of modules. As part of the cleanup, we
are also dealing with long deprecated modules, functions and aliases.

* `assert_` -&gt; `assertTrue`
* `assertEquals` -&gt; `assertEqual`
* `assertNotEquals` -&gt; `assertNotEqual`
* `assertAlmostEquals` -&gt; `assertAlmostEqual`
* `assertRaisesRegexp` -&gt; `assertRaisesRegex`
* `assertRegexpMatches` -&gt; `assertRegex`
* `base64.encodestring` -&gt; `base64.encodebytes`
* `base64.decodestring` -&gt; `base64.decodebytes`
* `inspect.getargspec` -&gt; `inspect.signature`
* `inspect.formatargspec` -&gt; `inspect.signature`
* `logging.warn` -&gt; `logging.warning`

closes odoo/odoo#36863

Task: 2003936
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] *: fix typos in comments</title>
<updated>2019-08-07T10:28:33+00:00</updated>
<author>
<name>mreficent</name>
<email>miquel.raich@eficent.com</email>
</author>
<published>2019-08-02T11:26:58+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=355a5dfc365c419f3be2e1ccffe0cb38e1140d27'/>
<id>355a5dfc365c419f3be2e1ccffe0cb38e1140d27</id>
<content type='text'>
closes odoo/odoo#35404

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

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[MERGE] forward port branch saas-11.4 up to dabe59df9c8</title>
<updated>2018-08-14T18:16:03+00:00</updated>
<author>
<name>Christophe Simonis</name>
<email>chs@odoo.com</email>
</author>
<published>2018-08-14T18:16:03+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=0ac7f8fbe62cf52fe43d73561a0bbd205c48e810'/>
<id>0ac7f8fbe62cf52fe43d73561a0bbd205c48e810</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
