콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
4080 화면

I have product A set to real price and perpetual stock valuation. I made a purchase of A and the stock moves were recorded with the correct price. Now the cost price is still zero because nothing was consumed yet.

Product A is in the bill of materials of product B

After confirming a MO of product B and consuming some amount of the product A the cost price of A is not being updated.

The stock.move -> unit_price and stock.quant -> cost is not updated neither for none of the products (zero)

It seems like the MRP module is incomplete or I am doing smth wrong.

아바타
취소
작성자

If I sell product A directly the cost price is updated. But not if it's being consumed during production. Can someone explain please in which place (in the code) the real cost is being updated

작성자 베스트 답변

One thing I found is that in stock_account  in _store_average_cost_price it doesn't update the cost if there is any negative quant move. So I have my Product Category set to real price / perpetial valuation but some of the products there are consumable. So consumables always go in negative quantities (we don't control stock, incoming shipments etc. ).
That means if there is any consumable in the Bill of Materials there is no update of cost for any of the ingredients since it brakes the loop with return:

https://github.com/odoo/odoo/blob/10.0/addons/stock_account/models/stock.py#L224

Did I just found a bug in the code??? Shouldn't it consider if the product is stockable before making the check of negative quants?

아바타
취소
관련 게시물 답글 화면 활동
2
3월 15
4948
1
4월 24
12483
0
12월 19
2585
2
10월 16
5354
1
3월 15
4481