<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Odoo/addons/mrp/models/stock_move.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] mrp: use correct UoM for each component in MO</title>
<updated>2021-05-26T13:36:42+00:00</updated>
<author>
<name>Adrien Widart</name>
<email>awt@odoo.com</email>
</author>
<published>2021-05-21T13:11:52+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=aff3a2e06801dfb7a58df5180fb4ab5487b27f02'/>
<id>aff3a2e06801dfb7a58df5180fb4ab5487b27f02</id>
<content type='text'>
In a Manufacturing Order, the components' quantities are rounded using
the rounding precision of the produced product's UoM. This leads to
incorrect values.

To reproduce the error:
1. In Settings, enable "Units of Measure"
2. In UoM, edit Units:
    - Rounding Precision: 1
3. Create two products P_finished and P_compo
    - P_compo's Product Type: Consumable
    - P_compo's UoM: L
    - P_finished's UoM: Units
4. Create a Bill of Materials
    - Product: P_finished
    - 1 Component:
        - Product: P_compo
        - Quantity: 0.2
        - UoM: L
5. Create a Manufacturing Order:
    - Product: P_finished
6. Confirm, Mark as Done

Error: Qty to consumes became 0 and consumed qty is 0. Both values
should be 0.2L, but they have been rounded using the rounding precision
of Units

OPW-2529462

closes odoo/odoo#71146

Signed-off-by: Steve Van Essche &lt;svs-odoo@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In a Manufacturing Order, the components' quantities are rounded using
the rounding precision of the produced product's UoM. This leads to
incorrect values.

To reproduce the error:
1. In Settings, enable "Units of Measure"
2. In UoM, edit Units:
    - Rounding Precision: 1
3. Create two products P_finished and P_compo
    - P_compo's Product Type: Consumable
    - P_compo's UoM: L
    - P_finished's UoM: Units
4. Create a Bill of Materials
    - Product: P_finished
    - 1 Component:
        - Product: P_compo
        - Quantity: 0.2
        - UoM: L
5. Create a Manufacturing Order:
    - Product: P_finished
6. Confirm, Mark as Done

Error: Qty to consumes became 0 and consumed qty is 0. Both values
should be 0.2L, but they have been rounded using the rounding precision
of Units

OPW-2529462

closes odoo/odoo#71146

Signed-off-by: Steve Van Essche &lt;svs-odoo@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] mrp: no register number check after duplicate MO</title>
<updated>2021-03-25T13:35:29+00:00</updated>
<author>
<name>yhu-odoo</name>
<email>yhu@odoo.com</email>
</author>
<published>2021-03-25T09:40:29+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=6aaf337558e59474efcef937f0175ee531b4b477'/>
<id>6aaf337558e59474efcef937f0175ee531b4b477</id>
<content type='text'>
To reproduce:
1. create and confirm a MO with register number checks on operations
2. duplicate the MO
The register number checks won't show up in the new MO

We didn't set copy=False for workorder_id on stock.move, when copy a
confirmed MO, the new moves are linked to old WOs on old MO. New WO
didn't link to any moves.
When create quality checks, we only create "register ..." checks for WOs
with move_id. As a result, new WOs without move_id won't have those
checks.
To fix, set copy=False on workorder_id of stock.move

Task 2484939

closes odoo/odoo#68348

Signed-off-by: Arnold Moyaux &lt;amoyaux@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To reproduce:
1. create and confirm a MO with register number checks on operations
2. duplicate the MO
The register number checks won't show up in the new MO

We didn't set copy=False for workorder_id on stock.move, when copy a
confirmed MO, the new moves are linked to old WOs on old MO. New WO
didn't link to any moves.
When create quality checks, we only create "register ..." checks for WOs
with move_id. As a result, new WOs without move_id won't have those
checks.
To fix, set copy=False on workorder_id of stock.move

Task 2484939

closes odoo/odoo#68348

Signed-off-by: Arnold Moyaux &lt;amoyaux@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mrp: split call to write on stock move</title>
<updated>2021-05-10T14:39:39+00:00</updated>
<author>
<name>William Henrotin</name>
<email>whe@odoo.com</email>
</author>
<published>2021-04-16T09:30:23+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=d1e49723349cb5a44cf353f4dd12a1d55e076155'/>
<id>d1e49723349cb5a44cf353f4dd12a1d55e076155</id>
<content type='text'>
You can, in a production order, change the quantity done of a stock move
raw and change its initial demand ('To Consume' field) in the same
transaction. This can lead to some issue as changing the quantity done
will update the stock move line and changing the initial demand will
unreserve the stock move thus impacting the stock move lines too.

This commit will split the values to update of a stock in move in case
the two fields have to be updated. First the stock move lines, then the
initial demand.

This commit also remove the default_product_uom_qty in the move_raw_ids
fields. This ensure the onchanges do not create/edit any stock move lines
with some reserved quantity.

opw : 2451298

closes odoo/odoo#69377

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>
You can, in a production order, change the quantity done of a stock move
raw and change its initial demand ('To Consume' field) in the same
transaction. This can lead to some issue as changing the quantity done
will update the stock move line and changing the initial demand will
unreserve the stock move thus impacting the stock move lines too.

This commit will split the values to update of a stock in move in case
the two fields have to be updated. First the stock move lines, then the
initial demand.

This commit also remove the default_product_uom_qty in the move_raw_ids
fields. This ensure the onchanges do not create/edit any stock move lines
with some reserved quantity.

opw : 2451298

closes odoo/odoo#69377

Signed-off-by: agr-odoo &lt;agr-odoo@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mrp: deny deleting move related to MO</title>
<updated>2021-04-07T11:10:13+00:00</updated>
<author>
<name>Andrea Grazioso (agr-odoo)</name>
<email>agr@odoo.com</email>
</author>
<published>2021-04-02T12:46:07+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=43b77d47db090368eb9c241925dc6e9421208295'/>
<id>43b77d47db090368eb9c241925dc6e9421208295</id>
<content type='text'>
- Create a MO for a product and add a component. Save
- Look for the stock move of the MO, delete the move going from
Virtual Locations/Production to WH/Stock
- Back to the MO, Confirm it
- An error related to the producing quantity will be raised

opw-2478546

closes odoo/odoo#68698

Signed-off-by: Arnold Moyaux &lt;amoyaux@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Create a MO for a product and add a component. Save
- Look for the stock move of the MO, delete the move going from
Virtual Locations/Production to WH/Stock
- Back to the MO, Confirm it
- An error related to the producing quantity will be raised

opw-2478546

closes odoo/odoo#68698

Signed-off-by: Arnold Moyaux &lt;amoyaux@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] mrp: improve scalability of `action_explode`</title>
<updated>2021-01-21T13:44:58+00:00</updated>
<author>
<name>Rémy Voet (ryv)</name>
<email>ryv@odoo.com</email>
</author>
<published>2020-12-28T10:05:46+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=f3bc2637d1dce99531c4444bd558d1443c286300'/>
<id>f3bc2637d1dce99531c4444bd558d1443c286300</id>
<content type='text'>
Replace union of RecordSet by union of OrderedSet to reduce the
complexity and improve the scalability. It can be a bottleneck to
huge number of move to validate.

task-2390516</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace union of RecordSet by union of OrderedSet to reduce the
complexity and improve the scalability. It can be a bottleneck to
huge number of move to validate.

task-2390516</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] stock, mrp: make _split() return move values</title>
<updated>2020-09-25T11:45:31+00:00</updated>
<author>
<name>William Henrotin</name>
<email>whe@odoo.com</email>
</author>
<published>2020-09-25T10:22:35+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=20c02c105909c007ba2d994f977eb62d58069f43'/>
<id>20c02c105909c007ba2d994f977eb62d58069f43</id>
<content type='text'>
This commit change the _split method to return new move values instead
of create it and confirm it.

This allow multi creation and multi confirmation when every move of the
recordset are split

Task : 2076873

closes odoo/odoo#57154

Signed-off-by: William Henrotin &lt;Whenrow@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit change the _split method to return new move values instead
of create it and confirm it.

This allow multi creation and multi confirmation when every move of the
recordset are split

Task : 2076873

closes odoo/odoo#57154

Signed-off-by: William Henrotin &lt;Whenrow@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] uom: change default rounding to two</title>
<updated>2020-09-07T08:36:21+00:00</updated>
<author>
<name>yhu-odoo</name>
<email>yhu@odoo.com</email>
</author>
<published>2020-08-17T08:45:28+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=460ec0402a2352a5b179d81935f7230f6bc97cb7'/>
<id>460ec0402a2352a5b179d81935f7230f6bc97cb7</id>
<content type='text'>
Change the default rouning digits of all UoMs to be two, also change the
decimal.precision of UoM to be two. Adapt all the tests.
Also to avoid hardcoded digits in `should_consume_qty` widget.

PR #56000</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change the default rouning digits of all UoMs to be two, also change the
decimal.precision of UoM to be two. Adapt all the tests.
Also to avoid hardcoded digits in `should_consume_qty` widget.

PR #56000</pre>
</div>
</content>
</entry>
<entry>
<title>[REM] mrp: remove unused fields + Dead code</title>
<updated>2020-08-20T07:01:49+00:00</updated>
<author>
<name>Rémy Voet (ryv)</name>
<email>ryv@odoo.com</email>
</author>
<published>2020-06-23T06:21:09+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=c9c52818275d7154acc5f44effe685ae02acabe1'/>
<id>c9c52818275d7154acc5f44effe685ae02acabe1</id>
<content type='text'>
- Refactor `order_finished_lot_ids` compute, to be linked to the `lot_producing_id`
the the related production (less boiler plate). We can't remove it because
it is used in mrp_subcontracting, and keep the Many2Many, for the tag widget.
Remove the second field compute by this method, `finished_lots_exist` (never used).
- Remove unused field `needs_lots` (also it is a duplication
with `has_tracking` info) from `stock.move` (mrp)
- Remove unused field `done_move` from `stock.move.line` (mrp).
- Remove unused methods `_strict_consumption_check` and `_update_raw_move`.
- Remove unused variables.

odoo/upgrade#1594

closes odoo/odoo#54996

Signed-off-by: Arnold Moyaux &lt;amoyaux@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Refactor `order_finished_lot_ids` compute, to be linked to the `lot_producing_id`
the the related production (less boiler plate). We can't remove it because
it is used in mrp_subcontracting, and keep the Many2Many, for the tag widget.
Remove the second field compute by this method, `finished_lots_exist` (never used).
- Remove unused field `needs_lots` (also it is a duplication
with `has_tracking` info) from `stock.move` (mrp)
- Remove unused field `done_move` from `stock.move.line` (mrp).
- Remove unused methods `_strict_consumption_check` and `_update_raw_move`.
- Remove unused variables.

odoo/upgrade#1594

closes odoo/odoo#54996

Signed-off-by: Arnold Moyaux &lt;amoyaux@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[IMP] stock,mrp,purchase: refactor priority</title>
<updated>2020-08-18T07:48:27+00:00</updated>
<author>
<name>Rémy Voet (ryv)</name>
<email>ryv@odoo.com</email>
</author>
<published>2020-07-29T14:19:26+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=e40553723b893bcd2244e9b9fcc5c1a7e1bf27d3'/>
<id>e40553723b893bcd2244e9b9fcc5c1a7e1bf27d3</id>
<content type='text'>
- MO/picking/PO/stock.move have now the "same" `priority` fields
(Boolean logic: Normal or Urgent).
These models are now sort by priority first. Note that the priority field of
stock move is a technical one.
- For MO and picking, the set of `priority` field change priority of
the related stock move. The prioriry field on stock move is
used by the scheduler for reservation ('Urgent' before 'Normal')
- The Stock Replenishment Report also take in account the priority
to be consistent with the reservation.

task-2246665</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- MO/picking/PO/stock.move have now the "same" `priority` fields
(Boolean logic: Normal or Urgent).
These models are now sort by priority first. Note that the priority field of
stock move is a technical one.
- For MO and picking, the set of `priority` field change priority of
the related stock move. The prioriry field on stock move is
used by the scheduler for reservation ('Urgent' before 'Normal')
- The Stock Replenishment Report also take in account the priority
to be consistent with the reservation.

task-2246665</pre>
</div>
</content>
</entry>
<entry>
<title>[FIX] mrp: hide detail operations button on MO draft</title>
<updated>2020-08-03T09:18:34+00:00</updated>
<author>
<name>William Henrotin</name>
<email>whe@odoo.com</email>
</author>
<published>2020-08-03T09:18:34+00:00</published>
<link rel='alternate' type='text/html' href='http://erp.ceuconsult.com:9000/Odoo/commit/?id=eae0042e27642014ee5ea9b99f30daaebeb8a04b'/>
<id>eae0042e27642014ee5ea9b99f30daaebeb8a04b</id>
<content type='text'>
Since the user can't input quantity done on stock move without
tracking. He shouldn't be able to do it for tracked products.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since the user can't input quantity done on stock move without
tracking. He shouldn't be able to do it for tracked products.</pre>
</div>
</content>
</entry>
</feed>
