Negative quant reconciliation accounting entries adjustments
Odoo v8.0.
I have a doubt regarding the accounting entries adjustment when negative quant reconciliation takes place.
In our environment the stock valuation does not match the accounting entries. Investigating I found that this is caused by negative quant reconciliation, where the cost is updated in quants linked to negative quants when they need to be reconciled. The problem is that the accounting entries are not modified to match this new cost for the quants.
The code where this should be done is located in file "stock_account.py":
@api.
def _price_update(self, cr, uid, quant_ids, newprice, context=None):
''' This function is called at the end of negative quant reconciliation and does the accounting entries adjustemnts and the update of the product cost price if needed
'''
if context is None:
context = {}
for quant in self.browse(cr, uid, quant_ids, context=context):
move = self._get_
# this is where we post accounting entries for adjustment, if needed
if not quant.company_
# adjustment journal entry needed, cost has been updated
# If neg quant period already closed (likely with manual valuation), skip update
if period.state != 'done':
#update the standard price of the product, only if we would have done it if we'd have had enough stock at first, which means
#1) the product cost's method is 'real'
#2) we just fixed a negative quant caused by an outgoing shipment
if quant.product_
The doubt is: the line "super(stock_quant, self)._
I would like to know if the code is correct as it is (if this is so, is it correct to have a missmatch against the stock valuation?) or if this is a bug and the update of the quant cost (super(stock_quant, self)._
Thank you in advance.
Best regards.
Question information
- Language:
- English Edit question
- Status:
- Expired
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: