This question has been flagged

One of our customer found issue related to Angelo Sexon - realtime Fifo stock accounting. in same sales order there were two line items with same product. and unit were purchased at different prices. Both were shipped out at same time , but as per fifo , cost price on the product was updated as per the cost of last item shipped(may just based on the difference in seconds.)

But in journal items for cogs when customer invoice was confirmed, odoo has taken value for all units of that product based on the cost price from product ,which is not correct because units were purchased at different prices.I checked the code which fetch the cogs valuation for angelo saxon accounting ,and it takes it from product cost field.


def _stock_account_get_anglo_saxon_price_unit(self, uom=False):

price = self.standard_price

if not self or not uom or self.uom_id.id == uom.id:

return price or 0.0

return self.uom_id._compute_price(price, uom)


So isn't this wrong ? shouldn't it consider unit by unit cost price (in case of FIFO- if it's AVC , than i think this is fine.)


Or am i getting somthing wrong here?

Avatar
Discard
Author

one edit the method i mentioned above was a mistake, this is from v13. Here is from v12.

stock_account/models/product.py

def _get_anglo_saxon_price_unit(self, uom=False):

price = self.standard_price

if not self or not uom or self.uom_id.id == uom.id:

return price or 0.0

return self.uom_id._compute_price(price, uom)

Have you found a solution yet. We are facing the same issue

Author Best Answer

No not yet .  One of the community member said that , there should not be such scenario , ideally you would have two separate products in such cases.  On a side note: this has been fixed by odoo itself in v13.

you can follow it here:
https://github.com/odoo/odoo/issues/53936#issuecomment-660671199

Avatar
Discard