<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/sale_margin/models, 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] sale_margin: avoid purchase price reset on order confirm</title>
<updated>2021-04-27T14:50:48+00:00</updated>
<author>
<name>Andrea Grazioso (agr-odoo)</name>
<email>agr@odoo.com</email>
</author>
<published>2021-04-27T14:50:48+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=8a8ff03f6111f377bcd9c2b0f584c450b82a4182'/>
<id>8a8ff03f6111f377bcd9c2b0f584c450b82a4182</id>
<content type='text'>
- Create a service product with cost 0
- Create a sales quotation
- Add the service product, change the cost to a positive quantity
- Save and Confirm.

Purchase Price (cost) will be reset to 0

opw-2481564

closes odoo/odoo#69966

Signed-off-by: agr-odoo &lt;agr-odoo@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Create a service product with cost 0
- Create a sales quotation
- Add the service product, change the cost to a positive quantity
- Save and Confirm.

Purchase Price (cost) will be reset to 0

opw-2481564

closes odoo/odoo#69966

Signed-off-by: agr-odoo &lt;agr-odoo@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] sale_margin: purchase_price performance.</title>
<updated>2020-06-03T10:36:18+00:00</updated>
<author>
<name>Victor Feyens</name>
<email>vfe@odoo.com</email>
</author>
<published>2020-06-02T10:29:11+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=8a48aee8eb6ac6539dad8e6191273726cd179016'/>
<id>8a48aee8eb6ac6539dad8e6191273726cd179016</id>
<content type='text'>
When installing sale_margin, the computed fields will be computed on existing
sale.order and sale.order.line in database.  On huge databases, the computation
may take a lot of time, depending on the configuration (multi-company, multi-currency, ...)

The current commit improves the computation of the purchase_price
(recently changed to a computed field), by avoiding unnecessary currency
conversions when possible (one less query to get the conversion rates).

In a multi-currency database where the products have no cost defined
(standard_price field), the sale_margin installation takes up to 50% less time.

closes odoo/odoo#52338

X-original-commit: 3c9841d1aa4fc5b10012c8239a31d6e7f8676fc0
Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When installing sale_margin, the computed fields will be computed on existing
sale.order and sale.order.line in database.  On huge databases, the computation
may take a lot of time, depending on the configuration (multi-company, multi-currency, ...)

The current commit improves the computation of the purchase_price
(recently changed to a computed field), by avoiding unnecessary currency
conversions when possible (one less query to get the conversion rates).

In a multi-currency database where the products have no cost defined
(standard_price field), the sale_margin installation takes up to 50% less time.

closes odoo/odoo#52338

X-original-commit: 3c9841d1aa4fc5b10012c8239a31d6e7f8676fc0
Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] sale_margin: compute fields performance at install</title>
<updated>2020-06-03T10:36:17+00:00</updated>
<author>
<name>Thomas Dieuzeide</name>
<email>tdi@odoo.com</email>
</author>
<published>2020-05-22T12:52:25+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=72087777acf570b4ab8c7593c295d8f7f0a8832c'/>
<id>72087777acf570b4ab8c7593c295d8f7f0a8832c</id>
<content type='text'>
Installing sale_margin module on a db with a lot of sale.order was impossible.

This commit significantly improves performances.
Went from many hours (forecasted) to 15 minutes on a db with 300k orders

For sale.order:
  - Duplicating logic between edit mode and non edit mode
  - Edit mode logic stays the same as before
  - Non edit mode uses read_group to speed up the computation

X-original-commit: 9f1ea7427cdb6984f175f5111e4c9a4c5f013af2</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Installing sale_margin module on a db with a lot of sale.order was impossible.

This commit significantly improves performances.
Went from many hours (forecasted) to 15 minutes on a db with 300k orders

For sale.order:
  - Duplicating logic between edit mode and non edit mode
  - Edit mode logic stays the same as before
  - Non edit mode uses read_group to speed up the computation

X-original-commit: 9f1ea7427cdb6984f175f5111e4c9a4c5f013af2</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] sale_margin: keep old Margin label</title>
<updated>2020-01-14T13:29:10+00:00</updated>
<author>
<name>Victor Feyens</name>
<email>vfe@odoo.com</email>
</author>
<published>2020-01-10T14:38:20+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d585882e2f7da5450299ea5a564fd717694cbfdf'/>
<id>d585882e2f7da5450299ea5a564fd717694cbfdf</id>
<content type='text'>
And use "Margin (%)" for the recently added margin_percent field
computing the margin in % and not in money.

closes odoo/odoo#43130

Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And use "Margin (%)" for the recently added margin_percent field
computing the margin in % and not in money.

closes odoo/odoo#43130

Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] sale_margin: cost computation on empty line</title>
<updated>2020-01-03T12:55:07+00:00</updated>
<author>
<name>Victor Feyens</name>
<email>vfe@odoo.com</email>
</author>
<published>2020-01-03T10:09:58+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=aca2b7191936f0b72a3a24aea1568b7d32c27a16'/>
<id>aca2b7191936f0b72a3a24aea1568b7d32c27a16</id>
<content type='text'>
Onchanges can be triggered after computes and therefore, we could have a line with an uom
but without product, leading to a conversion from "no uom" to the order line uom, which isn't
accepted.

closes odoo/odoo#42691

X-original-commit: 1bc9963cfc19a4bc5896a647423f81274936db00
Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Onchanges can be triggered after computes and therefore, we could have a line with an uom
but without product, leading to a conversion from "no uom" to the order line uom, which isn't
accepted.

closes odoo/odoo#42691

X-original-commit: 1bc9963cfc19a4bc5896a647423f81274936db00
Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ADD] sale_margin: margin percentage</title>
<updated>2019-12-23T14:15:56+00:00</updated>
<author>
<name>Jinal Patel</name>
<email>jip@odoo.com</email>
</author>
<published>2019-11-05T12:10:29+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6ae2ba8d84750d855e0246c3c42983726b39db50'/>
<id>6ae2ba8d84750d855e0246c3c42983726b39db50</id>
<content type='text'>
New field to express the profitability percentage of a Sales Order (/SO line).

task-2033253

closes odoo/odoo#39926

Signed-off-by: Damien Bouvy (dbo) &lt;dbo@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
New field to express the profitability percentage of a Sales Order (/SO line).

task-2033253

closes odoo/odoo#39926

Signed-off-by: Damien Bouvy (dbo) &lt;dbo@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] sale_margin: no uom on line.</title>
<updated>2019-12-12T13:57:08+00:00</updated>
<author>
<name>Victor Feyens</name>
<email>vfe@odoo.com</email>
</author>
<published>2019-12-12T13:57:08+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=1bcc175e37d333f2a1ae5e307c9c072e08e11d75'/>
<id>1bcc175e37d333f2a1ae5e307c9c072e08e11d75</id>
<content type='text'>
Since the purchase_price is now computed, it may be triggered before an
uom is set on the product line (onchanges may happen after computes).

closes odoo/odoo#41808

X-original-commit: 9ebbdd24752a0ff1c1057fc533074555810ffa39
Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the purchase_price is now computed, it may be triggered before an
uom is set on the product line (onchanges may happen after computes).

closes odoo/odoo#41808

X-original-commit: 9ebbdd24752a0ff1c1057fc533074555810ffa39
Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] sale_margin: make the cost a computed field.</title>
<updated>2019-11-29T12:09:40+00:00</updated>
<author>
<name>Victor Feyens</name>
<email>vfe@odoo.com</email>
</author>
<published>2019-11-12T11:25:46+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=b9fabffe4eda43ba7fb0fef341ecb0a74b292116'/>
<id>b9fabffe4eda43ba7fb0fef341ecb0a74b292116</id>
<content type='text'>
And clean the code mess.

closes odoo/odoo#40953

Signed-off-by: Damien Bouvy (dbo) &lt;dbo@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And clean the code mess.

closes odoo/odoo#40953

Signed-off-by: Damien Bouvy (dbo) &lt;dbo@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] sale_margin: recompute purchase_price on product_id_change.</title>
<updated>2019-11-14T09:55:14+00:00</updated>
<author>
<name>Victor Feyens</name>
<email>vfe@odoo.com</email>
</author>
<published>2019-11-14T09:49:26+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=0b8eb71d7143af6fd3bfee19dcf6cb668329d250'/>
<id>0b8eb71d7143af6fd3bfee19dcf6cb668329d250</id>
<content type='text'>
When creating sale order lines from the matrix (sale_product_matrix),
the purchase_price weren't computed

No cleaner change has been found to ensure the cost is computed.

Triggering all onchanges from the server side is quite tricky and dirty
to do...

closes odoo/odoo#40986

X-original-commit: 5c15b1310729129e390b455b0d1e0ac367f8dd69
Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When creating sale order lines from the matrix (sale_product_matrix),
the purchase_price weren't computed

No cleaner change has been found to ensure the cost is computed.

Triggering all onchanges from the server side is quite tricky and dirty
to do...

closes odoo/odoo#40986

X-original-commit: 5c15b1310729129e390b455b0d1e0ac367f8dd69
Signed-off-by: Victor Feyens (vfe) &lt;vfe@odoo.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] *: remove `digits` attribute from Monetary fields</title>
<updated>2019-08-02T11:17:12+00:00</updated>
<author>
<name>Naglis Jonaitis</name>
<email>naglis@mailbox.org</email>
</author>
<published>2019-07-31T12:11:56+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=0fe2b4530f97de35a7aa78beb6265f4a5dcef55d'/>
<id>0fe2b4530f97de35a7aa78beb6265f4a5dcef55d</id>
<content type='text'>
* account, hr_contract, hr_expense, point_of_sale, sale_margin,
website_sale_delivery, website_sale_wishlist

digits only works on Float fields, on Monetary fields it has no
effect:

- The column_type of a monetary field is always numeric
- It is not applied in `convert_to_column()` or `convert_to_cache()`
- It is not part of `description_attrs`, so it will not be included in
the output of `fields_get()`

closes odoo/odoo#35336

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* account, hr_contract, hr_expense, point_of_sale, sale_margin,
website_sale_delivery, website_sale_wishlist

digits only works on Float fields, on Monetary fields it has no
effect:

- The column_type of a monetary field is always numeric
- It is not applied in `convert_to_column()` or `convert_to_cache()`
- It is not part of `description_attrs`, so it will not be included in
the output of `fields_get()`

closes odoo/odoo#35336

Signed-off-by: Martin Trigaux (mat) &lt;mat@odoo.com&gt;</pre>
</div>
</content>
</entry>
</feed>
