This question has been flagged
2 Replies
4940 Views

found this below code which restricts to create account.move entries

Ref: stock_account-->stock_account.py-->_account_entry_move

    def _account_entry_move(self, cr, uid, quants, move, context=None):

"""
Accounting Valuation Entries
quants: browse record list of Quants to create accounting valuation entries for. Unempty and all quants are supposed to have the same location id (thay already moved in)
move: Move to use. browse record
"""
if context is None:
context = {}
location_obj = self.pool.get('stock.location')
location_from = move.location_id
location_to = quants[0].location_id
company_from = location_obj._location_owner(cr, uid, location_from, context=context)
company_to = location_obj._location_owner(cr, uid, location_to, context=context)
if move.product_id.valuation != 'real_time':
return False
for q in quants:
if q.owner_id:
#if the quant isn't owned by the company, we don't make any valuation entry
                return False


Can someone please suggest how is a account.move generated for outgoing shipment.

Avatar
Discard
Best Answer

I tried testing it with the inventory valuation set to real time valuation but the code says it will only create an account move if the quant.owner is blank, which never is. So it never creates an account.move

Am I missing something 

Avatar
Discard
Best Answer

 Just set "Inventory Valuation" in Products form, in Accounting Tab as a "Real Time" . Once you confirm the SO with this product and deliver it to the customer, Odoo will create a quant as well as Accounting entries for that move. 

Avatar
Discard
Author

thanks priyesh for your reply, but for stock movement no journal entry is generated, means no entries is created in stock journal as product is move from stock.