OCA/account-financial-tools

[14.0] account_asset_stock_move cannot create unbalanced journal entry

tv-openbig opened this issue · 3 comments

User error "cannot create unbalanced journal entry" on confirmation of a stock receipt if a asset profile has activated "Create an asset by product item" field and a purchase quantity / receipt quantity >1.

Module

account_asset_stock_move

Describe the bug

see above

To Reproduce

Version: 14.0
Create a asset profile with the filed "Create an asset by product item" : active
Create product category with Valuation "Automatic" and Valuation Method: FiFo / AVCo
Assign as a stock account the same account as in the assets profile field "asset account"
Create a product and assign the product category
Create a purchase order with a qty > 1
Confirm the stock receipt.

Expected behavior
Odoo should create >1 assets in the same way as it does on confirmation of a invoice line with a qty > 1.

Additional context
Bildschirmfoto 2023-09-19 um 08 27 43
Bildschirmfoto 2023-09-19 um 08 30 15

@kittiu Sorry that i didn't detected this issue earlier.

kittiu commented

@tv-openbig you mean, this happen when qty > 1 only. If qty is 1 it is ok, correct?
I am thinking may be it need to split, ie.., qty = 5 then splity to 5 stock move when receive...

@kittiu Exactly. The plan to split the stock moves would be perfect.