Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Sep 13, 2025

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #226899

Currently the inventory value is based on the product global FIFO
stack. It's completely wrong for lot valuation since they have all
their own stack. In order to get the product total value we look at
all the value of their lot instead

X-original-commit: 9ea2f55
`_get_stock_valuation_account_vals` function needs the entries generated
for location with valuation account. It's used to correctly know the
already removed or added value in stock_valuation account. However in
the report it correctly does it for inventory loss but it forgets the
cost of production.

The fix just call the function to generate all the location entries
without domain.

X-original-commit: 6897b9d
Allow to update the effective date of a done move. It will have an
impact on valuation since it could completely break the FIFO stack
even for move that are already out. Thus it could invalidate the
COGS entries since they don't respect the new order.

However the closing always check the last valuation state and will
correct the inconsistent state. But the out `stock.move` will never
be recomputed. So it's a bad idea to use computation on move `value`
if you want to use breaking update like this.

Also fix the issue with the valuation report at date. It pass the
required date as parameter and add it in every domain to reflect
the past state

X-original-commit: e5453bc
Before the on_hand quantity filter was added to only show the quant
under a warehouse. Now there is only a filter on internal location
that display everything but the qty_available still filter on
warehouse's locations.

This commit add a warehouse_id set on location to have the same behavior
than before

X-original-commit: 034f13e
When the product is in realtime accounting and the production location
has a variation account. The labor expense will be created and posted
directly as in 18.0

X-original-commit: 7091949
On stock valuation account rename the expense account as expense.
It will be easier for customer to understand.

X-original-commit: 3ef982a
@robodoo
Copy link
Contributor

robodoo commented Sep 13, 2025

Pull request status dashboard

@fw-bot
Copy link
Contributor Author

fw-bot commented Sep 13, 2025

@amoyaux this PR targets master and is the last of the forward-port chain.

To merge the full chain, use

@robodoo r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Sep 13, 2025
@amoyaux
Copy link
Contributor

amoyaux commented Sep 15, 2025

robodoo r+

robodoo pushed a commit that referenced this pull request Sep 16, 2025
Currently the inventory value is based on the product global FIFO
stack. It's completely wrong for lot valuation since they have all
their own stack. In order to get the product total value we look at
all the value of their lot instead

X-original-commit: 9ea2f55
Part-of: #227073
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
robodoo pushed a commit that referenced this pull request Sep 16, 2025
`_get_stock_valuation_account_vals` function needs the entries generated
for location with valuation account. It's used to correctly know the
already removed or added value in stock_valuation account. However in
the report it correctly does it for inventory loss but it forgets the
cost of production.

The fix just call the function to generate all the location entries
without domain.

X-original-commit: 6897b9d
Part-of: #227073
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
robodoo pushed a commit that referenced this pull request Sep 16, 2025
Allow to update the effective date of a done move. It will have an
impact on valuation since it could completely break the FIFO stack
even for move that are already out. Thus it could invalidate the
COGS entries since they don't respect the new order.

However the closing always check the last valuation state and will
correct the inconsistent state. But the out `stock.move` will never
be recomputed. So it's a bad idea to use computation on move `value`
if you want to use breaking update like this.

Also fix the issue with the valuation report at date. It pass the
required date as parameter and add it in every domain to reflect
the past state

X-original-commit: e5453bc
Part-of: #227073
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
robodoo pushed a commit that referenced this pull request Sep 16, 2025
Before the on_hand quantity filter was added to only show the quant
under a warehouse. Now there is only a filter on internal location
that display everything but the qty_available still filter on
warehouse's locations.

This commit add a warehouse_id set on location to have the same behavior
than before

X-original-commit: 034f13e
Part-of: #227073
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
robodoo pushed a commit that referenced this pull request Sep 16, 2025
When the product is in realtime accounting and the production location
has a variation account. The labor expense will be created and posted
directly as in 18.0

X-original-commit: 7091949
Part-of: #227073
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
robodoo pushed a commit that referenced this pull request Sep 16, 2025
On stock valuation account rename the expense account as expense.
It will be easier for customer to understand.

closes #227073

X-original-commit: 3ef982a
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
robodoo pushed a commit that referenced this pull request Sep 16, 2025
Currently the inventory value is based on the product global FIFO
stack. It's completely wrong for lot valuation since they have all
their own stack. In order to get the product total value we look at
all the value of their lot instead

X-original-commit: 9ea2f55
Part-of: #227073
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
robodoo pushed a commit that referenced this pull request Sep 16, 2025
`_get_stock_valuation_account_vals` function needs the entries generated
for location with valuation account. It's used to correctly know the
already removed or added value in stock_valuation account. However in
the report it correctly does it for inventory loss but it forgets the
cost of production.

The fix just call the function to generate all the location entries
without domain.

X-original-commit: 6897b9d
Part-of: #227073
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
robodoo pushed a commit that referenced this pull request Sep 16, 2025
Allow to update the effective date of a done move. It will have an
impact on valuation since it could completely break the FIFO stack
even for move that are already out. Thus it could invalidate the
COGS entries since they don't respect the new order.

However the closing always check the last valuation state and will
correct the inconsistent state. But the out `stock.move` will never
be recomputed. So it's a bad idea to use computation on move `value`
if you want to use breaking update like this.

Also fix the issue with the valuation report at date. It pass the
required date as parameter and add it in every domain to reflect
the past state

X-original-commit: e5453bc
Part-of: #227073
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
robodoo pushed a commit that referenced this pull request Sep 16, 2025
Before the on_hand quantity filter was added to only show the quant
under a warehouse. Now there is only a filter on internal location
that display everything but the qty_available still filter on
warehouse's locations.

This commit add a warehouse_id set on location to have the same behavior
than before

X-original-commit: 034f13e
Part-of: #227073
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
robodoo pushed a commit that referenced this pull request Sep 16, 2025
When the product is in realtime accounting and the production location
has a variation account. The labor expense will be created and posted
directly as in 18.0

X-original-commit: 7091949
Part-of: #227073
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
robodoo pushed a commit that referenced this pull request Sep 16, 2025
On stock valuation account rename the expense account as expense.
It will be easier for customer to understand.

closes #227073

X-original-commit: 3ef982a
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
@robodoo robodoo closed this Sep 16, 2025
@robodoo robodoo added the 19.1 label Sep 16, 2025
phenix-factory pushed a commit to odoo-dev/odoo that referenced this pull request Sep 16, 2025
Currently the inventory value is based on the product global FIFO
stack. It's completely wrong for lot valuation since they have all
their own stack. In order to get the product total value we look at
all the value of their lot instead

X-original-commit: 9ea2f55
Part-of: odoo#227073
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
phenix-factory pushed a commit to odoo-dev/odoo that referenced this pull request Sep 16, 2025
`_get_stock_valuation_account_vals` function needs the entries generated
for location with valuation account. It's used to correctly know the
already removed or added value in stock_valuation account. However in
the report it correctly does it for inventory loss but it forgets the
cost of production.

The fix just call the function to generate all the location entries
without domain.

X-original-commit: 6897b9d
Part-of: odoo#227073
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
phenix-factory pushed a commit to odoo-dev/odoo that referenced this pull request Sep 16, 2025
Allow to update the effective date of a done move. It will have an
impact on valuation since it could completely break the FIFO stack
even for move that are already out. Thus it could invalidate the
COGS entries since they don't respect the new order.

However the closing always check the last valuation state and will
correct the inconsistent state. But the out `stock.move` will never
be recomputed. So it's a bad idea to use computation on move `value`
if you want to use breaking update like this.

Also fix the issue with the valuation report at date. It pass the
required date as parameter and add it in every domain to reflect
the past state

X-original-commit: e5453bc
Part-of: odoo#227073
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
phenix-factory pushed a commit to odoo-dev/odoo that referenced this pull request Sep 16, 2025
Before the on_hand quantity filter was added to only show the quant
under a warehouse. Now there is only a filter on internal location
that display everything but the qty_available still filter on
warehouse's locations.

This commit add a warehouse_id set on location to have the same behavior
than before

X-original-commit: 034f13e
Part-of: odoo#227073
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
phenix-factory pushed a commit to odoo-dev/odoo that referenced this pull request Sep 16, 2025
When the product is in realtime accounting and the production location
has a variation account. The labor expense will be created and posted
directly as in 18.0

X-original-commit: 7091949
Part-of: odoo#227073
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
phenix-factory pushed a commit to odoo-dev/odoo that referenced this pull request Sep 16, 2025
On stock valuation account rename the expense account as expense.
It will be easier for customer to understand.

closes odoo#227073

X-original-commit: 3ef982a
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
19.1 forwardport This PR was created by @fw-bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants