<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/odoo/cli, 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] *: update document links</title>
<updated>2020-10-19T05:24:27+00:00</updated>
<author>
<name>Swapnesh Shah</name>
<email>swapneshshah111@gmail.com</email>
</author>
<published>2020-10-15T18:37:53+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=7ac08486d91d0ff0151abeeda057ffa6beda72e8'/>
<id>7ac08486d91d0ff0151abeeda057ffa6beda72e8</id>
<content type='text'>
Before this commit, links to the documentation were referenced the
previous version, 13.0, instead of the current one, 14.0.

Eventhough there is a redirection done by NGINX of a "versionless" URL
to the latest one (e.g. /documentation/user/general/auth/google.html
-&gt; /documentation/user/14.0/general/auth/google.html as of today), the
goal is to keep links owrking for users that will still be using the
14.0 in three years (and should not endup on the 17.0 doc).

closes odoo/odoo#59554

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before this commit, links to the documentation were referenced the
previous version, 13.0, instead of the current one, 14.0.

Eventhough there is a redirection done by NGINX of a "versionless" URL
to the latest one (e.g. /documentation/user/general/auth/google.html
-&gt; /documentation/user/14.0/general/auth/google.html as of today), the
goal is to keep links owrking for users that will still be using the
14.0 in three years (and should not endup on the 17.0 doc).

closes odoo/odoo#59554

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] module.py: Remove useless path initialization</title>
<updated>2020-04-17T13:23:04+00:00</updated>
<author>
<name>Julien Castiaux</name>
<email>juc@odoo.com</email>
</author>
<published>2020-04-17T10:21:59+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e9859a097976613ff9cf8fd35854546794f6775a'/>
<id>e9859a097976613ff9cf8fd35854546794f6775a</id>
<content type='text'>
The `initialize_sys_path` is the function responsible of getting the
custom Odoo import hooks to work, i.e. addons import via
`import odoo.addons`. This function is called by some other module
related functions to ensure the paths are correctly setup. We are
confident it is useless to re-initialize the path in many places.

The `load_openerp_module` function is called during server bootup by
both `odoo-bin server` and `odoo-bin shell`, both command parse the
configuration before starting the server which initialize the paths
already.

Most call to `get_module`, `get_module_path` and `get_resource_path` are
done in models or controllers where a registry is setup already. There
is one notable exception which is the subcommand discovery done during
the bootup, for that specific case, we initialize the paths with a
partially loaded configuration.

closes odoo/odoo#49715

Task: 2200956
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `initialize_sys_path` is the function responsible of getting the
custom Odoo import hooks to work, i.e. addons import via
`import odoo.addons`. This function is called by some other module
related functions to ensure the paths are correctly setup. We are
confident it is useless to re-initialize the path in many places.

The `load_openerp_module` function is called during server bootup by
both `odoo-bin server` and `odoo-bin shell`, both command parse the
configuration before starting the server which initialize the paths
already.

Most call to `get_module`, `get_module_path` and `get_resource_path` are
done in models or controllers where a registry is setup already. There
is one notable exception which is the subcommand discovery done during
the bootup, for that specific case, we initialize the paths with a
partially loaded configuration.

closes odoo/odoo#49715

Task: 2200956
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ADD] odoo-bin cloc cli subcommand.</title>
<updated>2020-06-09T00:30:55+00:00</updated>
<author>
<name>Antony Lesuisse</name>
<email>al@openerp.com</email>
</author>
<published>2020-05-25T03:23:28+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1c522ee778b520a215963922f5b17d2790c31907'/>
<id>1c522ee778b520a215963922f5b17d2790c31907</id>
<content type='text'>
Odoo cloc is a tool to count the number of relevant lines written in Python,
Javascript or XML. This can be used as rough metric for pricing maintenance of
customizations.

It has two modes of operation, either by providing a path:

    odoo-bin cloc -p module_path

Or by providing the name of a database:

    odoo-bin cloc --addons-path=dirs -d database

In the latter mode, only the custom code is accounted for.
Both modes can be used simultaneously.

Files that cannot be parsed are shown at the end of the report.
Parsing can fail due to syntax errors or excessive file size.

closes odoo/odoo#52635

X-original-commit: ae858c3ac66267b4726db459032b91a6be1cc1d6
Related: odoo/enterprise#11018
Signed-off-by: Olivier Dony (odo) &lt;odo@openerp.com&gt;
Co-authored-by: Thibault Francois &lt;tfr@odoo.com&gt;
Co-authored-by: Antoine Vandevenne (anv) &lt;anv@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Odoo cloc is a tool to count the number of relevant lines written in Python,
Javascript or XML. This can be used as rough metric for pricing maintenance of
customizations.

It has two modes of operation, either by providing a path:

    odoo-bin cloc -p module_path

Or by providing the name of a database:

    odoo-bin cloc --addons-path=dirs -d database

In the latter mode, only the custom code is accounted for.
Both modes can be used simultaneously.

Files that cannot be parsed are shown at the end of the report.
Parsing can fail due to syntax errors or excessive file size.

closes odoo/odoo#52635

X-original-commit: ae858c3ac66267b4726db459032b91a6be1cc1d6
Related: odoo/enterprise#11018
Signed-off-by: Olivier Dony (odo) &lt;odo@openerp.com&gt;
Co-authored-by: Thibault Francois &lt;tfr@odoo.com&gt;
Co-authored-by: Antoine Vandevenne (anv) &lt;anv@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] core, base: add tooling to populate database</title>
<updated>2020-03-30T21:30:13+00:00</updated>
<author>
<name>Xavier-Do</name>
<email>xdo@odoo.com</email>
</author>
<published>2020-03-27T10:22:37+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=f545fd274d7692a7d206aae50d5a68546bafe2bb'/>
<id>f545fd274d7692a7d206aae50d5a68546bafe2bb</id>
<content type='text'>
Some use case like testing performance or upgrade scripts required a database
with prefilled data, covering basic corner cases. A solution can be to
create data a procedural way.

This commit proposes an API to easily populate a model, usually by giving a
list of possible values for each field or by giving a compute method that will
be based on raw values of other fields.

The basic way to define how to populate a new field is to override `_populate_factories`,
a method that returns a sequence of pairs `(field_name, factory)`.

The definition of a field is a "factory", a function that returns a neverending iterator
combining its value(s) with the values of the iterator given in parameter.
Some factory helpers are given in `tools.populate.py`:
- `iterate(vals, weighs)` ensures that one record is created for each value
by iterating on them, then resumes as `random.choice` on those vals following weights
once the first iteration is finished.
- `cartesian(vals, weights)` makes a cartesian product of its own values with the values
of its input iterator, then resumes as a randomized generator.
- `compute(function)` calls the given function with the current values dict and a random object,
and assigns the current field to the returned value.
- ...

Each iterator yields dictionaries of field values, and the factory should add a
value for the current field(s).  The yielded dictionaries also contain a pseudo_field
`"__complete"`, that indicates whether this step is some randomized data
to reach the expected count of records.  A falsy value indicates that the iterator
is still covering mandatory cases.  This indicates whether a cartesian product is
finished, or an `iterate` has consumed all its values.

The order of the factories is quite important, since some computed fields may need
other fields to be defined, and `cartesian` factories should always be at the beginning
to avoid having too many combination.  That is why the factories are given as a list of
pairs instead of a dictionary; this makes it easier to insert elements at any place.

Example:
field A: cartesian([T, F])
field B: cartesian([0, 1])
field C: iterate([a, b, c, d, e])
field D: compute(1-B)

_c is shortcut for __complete
_ is a random value, or result of a random value

```
iter | root  | field A  | field B | field C     | field D   | result
0     {_c:F}  {... A:T}  {... B:0} {...C:a}      {...D:1}    T,0,a,1 complete:False
                         {... B:1} {...C:b}      {...D:0}    T,1,b,0 complete:False
              {... A:F}  {... B:0} {...C:c}      {...D:1}    F,0,c,1 complete:False
                         {... B:1} {...C:d}      {...D:0}    F,1,d,0 complete:False
1     {_c:T}  {... A:_}  {... B:_} {...C:e,_c:F} {...D:_}    _,_,e,_ complete:False
2     {_c:T}  {... A:_}  {... B:_} {...C:_}      {...D:_}    _,_,_,_ complete:True
```

X-original-commit: 4c0182dafa584853ed83a166096f45c33c06a245</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some use case like testing performance or upgrade scripts required a database
with prefilled data, covering basic corner cases. A solution can be to
create data a procedural way.

This commit proposes an API to easily populate a model, usually by giving a
list of possible values for each field or by giving a compute method that will
be based on raw values of other fields.

The basic way to define how to populate a new field is to override `_populate_factories`,
a method that returns a sequence of pairs `(field_name, factory)`.

The definition of a field is a "factory", a function that returns a neverending iterator
combining its value(s) with the values of the iterator given in parameter.
Some factory helpers are given in `tools.populate.py`:
- `iterate(vals, weighs)` ensures that one record is created for each value
by iterating on them, then resumes as `random.choice` on those vals following weights
once the first iteration is finished.
- `cartesian(vals, weights)` makes a cartesian product of its own values with the values
of its input iterator, then resumes as a randomized generator.
- `compute(function)` calls the given function with the current values dict and a random object,
and assigns the current field to the returned value.
- ...

Each iterator yields dictionaries of field values, and the factory should add a
value for the current field(s).  The yielded dictionaries also contain a pseudo_field
`"__complete"`, that indicates whether this step is some randomized data
to reach the expected count of records.  A falsy value indicates that the iterator
is still covering mandatory cases.  This indicates whether a cartesian product is
finished, or an `iterate` has consumed all its values.

The order of the factories is quite important, since some computed fields may need
other fields to be defined, and `cartesian` factories should always be at the beginning
to avoid having too many combination.  That is why the factories are given as a list of
pairs instead of a dictionary; this makes it easier to insert elements at any place.

Example:
field A: cartesian([T, F])
field B: cartesian([0, 1])
field C: iterate([a, b, c, d, e])
field D: compute(1-B)

_c is shortcut for __complete
_ is a random value, or result of a random value

```
iter | root  | field A  | field B | field C     | field D   | result
0     {_c:F}  {... A:T}  {... B:0} {...C:a}      {...D:1}    T,0,a,1 complete:False
                         {... B:1} {...C:b}      {...D:0}    T,1,b,0 complete:False
              {... A:F}  {... B:0} {...C:c}      {...D:1}    F,0,c,1 complete:False
                         {... B:1} {...C:d}      {...D:0}    F,1,d,0 complete:False
1     {_c:T}  {... A:_}  {... B:_} {...C:e,_c:F} {...D:_}    _,_,e,_ complete:False
2     {_c:T}  {... A:_}  {... B:_} {...C:_}      {...D:_}    _,_,_,_ complete:True
```

X-original-commit: 4c0182dafa584853ed83a166096f45c33c06a245</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] core: rename upgrades-paths to upgrade-path</title>
<updated>2020-02-04T13:19:02+00:00</updated>
<author>
<name>Xavier-Do</name>
<email>xdo@odoo.com</email>
</author>
<published>2020-02-03T14:19:56+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=9c26d4d8707f3ccad4284c597b52bd2bd18f72dc'/>
<id>9c26d4d8707f3ccad4284c597b52bd2bd18f72dc</id>
<content type='text'>
Since this option is soon to be used, this rename is a last tweek
to make it more logical to use since it will point to a single
upgrade dir most of the time.

closes odoo/odoo#44593

X-original-commit: 1c8e2809fb296abce6114b7da906d48a240df418
Signed-off-by: Xavier Dollé (xdo) &lt;xdo@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since this option is soon to be used, this rename is a last tweek
to make it more logical to use since it will point to a single
upgrade dir most of the time.

closes odoo/odoo#44593

X-original-commit: 1c8e2809fb296abce6114b7da906d48a240df418
Signed-off-by: Xavier Dollé (xdo) &lt;xdo@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] scaffold: clean the templates:</title>
<updated>2019-11-21T18:21:40+00:00</updated>
<author>
<name>Denis Ledoux</name>
<email>dle@odoo.com</email>
</author>
<published>2019-10-11T14:59:39+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=a1fc9c04276de20691cea82b55717704f05b49b2'/>
<id>a1fc9c04276de20691cea82b55717704f05b49b2</id>
<content type='text'>
 - Add blank lines at end of python files (pep8)
 - Easier uncomment (entire blocks, and no remaining whitespaces in empty lines)
 - Add `_description` to model to avoid the warning telling it's missing
 - Correct compute field, `self.value` raised an `ensure_one` issue
 - Change access so the user can add/edit/delete records in the web interface
   by default
 - Correct the server action, `self` is not in the server action context.

closes odoo/odoo#40659

X-original-commit: 622615771d0a6f8544f6810f30df46aea0e0fb9c
Signed-off-by: Denis Ledoux (dle) &lt;dle@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 - Add blank lines at end of python files (pep8)
 - Easier uncomment (entire blocks, and no remaining whitespaces in empty lines)
 - Add `_description` to model to avoid the warning telling it's missing
 - Correct compute field, `self.value` raised an `ensure_one` issue
 - Change access so the user can add/edit/delete records in the web interface
   by default
 - Correct the server action, `self` is not in the server action context.

closes odoo/odoo#40659

X-original-commit: 622615771d0a6f8544f6810f30df46aea0e0fb9c
Signed-off-by: Denis Ledoux (dle) &lt;dle@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] base: explicitly pass parameters for translation methods</title>
<updated>2019-11-19T09:37:07+00:00</updated>
<author>
<name>Martin Trigaux</name>
<email>mat@odoo.com</email>
</author>
<published>2019-10-16T12:41:46+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=ac63556e239ab03c42384477385f003c7477287b'/>
<id>ac63556e239ab03c42384477385f003c7477287b</id>
<content type='text'>
Instead of relying on the context content, pass explicit values for
overwrite and create_empty_translations
applu this to trans_load and trans_load_data
Adapt the test that was trying to create empty translations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of relying on the context content, pass explicit values for
overwrite and create_empty_translations
applu this to trans_load and trans_load_data
Adapt the test that was trying to create empty translations.
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] command: typo in unknown command exit message</title>
<updated>2019-10-24T08:16:39+00:00</updated>
<author>
<name>Adrien Horgnies</name>
<email>aho@odoo.com</email>
</author>
<published>2019-10-24T08:13:37+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=745f5f951f078fdfca33b16468daa01919d09b55'/>
<id>745f5f951f078fdfca33b16468daa01919d09b55</id>
<content type='text'>
closes odoo/odoo#39260

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#39260

Signed-off-by: Xavier Morel (xmo) &lt;xmo@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] v13 urls</title>
<updated>2019-10-03T12:48:09+00:00</updated>
<author>
<name>mreficent</name>
<email>miquel.raich@eficent.com</email>
</author>
<published>2019-10-03T09:03:43+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=41c434cd5d05561c725bfc0f9df99271fe2e49d7'/>
<id>41c434cd5d05561c725bfc0f9df99271fe2e49d7</id>
<content type='text'>
Was still pointing to old links

closes odoo/odoo#37859

Signed-off-by: Adrian Torres (adt) &lt;adt@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Was still pointing to old links

closes odoo/odoo#37859

Signed-off-by: Adrian Torres (adt) &lt;adt@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] module.py: deprecate openerp</title>
<updated>2019-09-16T09:31:38+00:00</updated>
<author>
<name>Julien Castiaux</name>
<email>juc@odoo.com</email>
</author>
<published>2019-09-09T16:10:13+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=7c47eb185443af08a55b0045c6a78f74151dc083'/>
<id>7c47eb185443af08a55b0045c6a78f74151dc083</id>
<content type='text'>
[PEP-594] is deprecating the `imp` module, that module is used in
`module.py` in order to dynamically import addons using any of the
`odoo.addons` or `openerp.addons` import anchor.

We are deprecating `openerp` module/addons imports in v13 in order to
remove the support in v14 and greatly simplify how modules/addons are
loaded. If you are still using the old `import openerp` or `import
openerp.addons`, `import odoo` and `import odoo.addons` are drop-in
replacements.

The `odoo.modules.module.ad_paths` addon paths list has been deprecated
too. The list is now accessible on `odoo.addons.__path__` where they
are now directly loaded [2].

See also:

[PEP-594]: https://python.org/dev/peps/pep-0594/
[2]: https://packaging.python.org/guides/packaging-namespace-packages/

closes odoo/odoo#36597

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 the `imp` module, that module is used in
`module.py` in order to dynamically import addons using any of the
`odoo.addons` or `openerp.addons` import anchor.

We are deprecating `openerp` module/addons imports in v13 in order to
remove the support in v14 and greatly simplify how modules/addons are
loaded. If you are still using the old `import openerp` or `import
openerp.addons`, `import odoo` and `import odoo.addons` are drop-in
replacements.

The `odoo.modules.module.ad_paths` addon paths list has been deprecated
too. The list is now accessible on `odoo.addons.__path__` where they
are now directly loaded [2].

See also:

[PEP-594]: https://python.org/dev/peps/pep-0594/
[2]: https://packaging.python.org/guides/packaging-namespace-packages/

closes odoo/odoo#36597

Task: 2003936
Signed-off-by: Raphael Collet (rco) &lt;rco@openerp.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
