Skip to content
Snippets Groups Projects
Commit 05776d74 authored by Mahamadasif Ansari's avatar Mahamadasif Ansari
Browse files

[FIX] account_stock, purchase_stock: prevent AttributeError when confirm...

[FIX] account_stock, purchase_stock: prevent AttributeError when confirm vendor BILL/refund with FIFO/AVCO

AttributeError "account.move.line" object has no attribute "purchase_line_id"
occurs in `stock_account` when we confirm vendor BILL or REFUND with product
costing method "first in first out" or "average cost".

With the recent reflacted changes in commit[1], the `purchase_line_id`
field is used and it belongs to `purchase`, but it is not installed and does
not depend, so it causes an error.

The above issue is solved by removing some code in commit[1] from
`stock_account` and adding it to `purchase_stock`.

committ[1] - https://github.com/odoo/odoo/pull/99411/commits/e9ce88a9372843abef7cf8fc94c4dbe5f16c5fa3#diff-e6134a1a5a13058e35f86426a96db0acac44553fa3b0ca26716390f7b19fc96cR318



sentry-3975529425

closes odoo/odoo#117876

Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
parent 4dee34e5
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment