Does someone help me understand how to achieve this? I want to create a valuation for the internal inventory transfer between 2 warehouses?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
In Odoo, internal transfers typically don't create journal entries with value unless you've set up your system to track stock valuation. Here's how to do it:
Go to the Inventory app, then Configuration > Settings.
Under Valuation, choose Real Time or Manual.
Link your Stock Input and Stock Output accounts in the Product Categories under Accounting. Once set up, Odoo will automatically create journal entries during internal transfers.
Hi,
By default, Odoo does not create accounting entries for internal transfers, because it assumes all internal locations are part of the same company and valuation only changes when stock enters or leaves the company (purchase/sale, production, scrap).
If both warehouses are in the same company, but you still want a valuation for transfers, please refer to the following code:
from odoo import models, api
class StockPicking(models.Model):
_inherit = 'stock.picking'
@api.model
def _create_internal_transfer_journal_entry(self, picking):
# Make sure it's internal transfer
if picking.picking_type_id.code != 'internal':
return
# Use your desired journal
journal = self.env['account.journal'].search([('type', '=', 'general')], limit=1)
# Loop through moves to get valuation
for move in picking.move_ids_without_package:
debit_account = move.location_dest_id.valuation_in_account_id.id
credit_account = move.location_id.valuation_out_account_id.id
amount = move.product_id.standard_price * move.product_uom_qty
if not (debit_account and credit_account and amount):
continue
move_vals = {
'journal_id': journal.id,
'date': picking.scheduled_date or fields.Date.today(),
'ref': picking.name,
'line_ids': [
(0, 0, {
'name': f'Transfer {move.product_id.display_name}',
'account_id': debit_account,
'debit': amount,
'credit': 0.0,
}),
(0, 0, {
'name': f'Transfer {move.product_id.display_name}',
'account_id': credit_account,
'debit': 0.0,
'credit': amount,
}),
]
}
self.env['account.move'].create(move_vals).action_post()
def button_validate(self):
res = super(StockPicking, self).button_validate()
self._create_internal_transfer_journal_entry(self)
return res
Hope it helps.
Why No Journal Entry Is Created:
- Internal transfers are purely logistical operations — they move stock between internal locations like warehouses or shelves.
- No cost impact or ownership change occurs, so Odoo’s accounting system doesn’t record it as a financial transaction.
When Journal Entries Are Created in Inventory:
-
Customer Delivery (Outgoing Shipment)
→ Debit: Cost of Goods Sold (COGS)
→ Credit: Inventory Valuation -
Vendor Receipt (Incoming Shipment)
→ Debit: Inventory Valuation
→ Credit: GRNI or Account Payable (based on configuration) -
Manufacturing or Scrap
→ Also generates entries depending on the valuation setup.
If You Need Journal Entries for Internal Transfers:
You can achieve this using one of the following:
Option 1: Enable Automated Valuation with Custom Locations
- Use automated inventory valuation (real-time) with separate accounts per location.
- Set up stock valuation accounts per location in Inventory > Locations > Accounting.
Option 2: Create a Custom Module
- Use stock.picking and account.move models to auto-generate accounting entries during internal transfer.
- Trigger on done state of the transfer.
Internal Inventory transfers don't generate Journal Entries.
You need to deliver and receive the product, then use the Landed Cost feature to add the transporation costs of the movement.
- Internal Transfers are meant when the movement is near instant and/or done by one person and/or there is no chance of loss or damage of goods and/or incurs no fee.
- Deliveries and Receipts are meant when the movement takes time and/or is done by more than one person and/or there is a chance of loss or damage of goods and/or incurs a fee.
agreed to disagree, many operations are done inside the same company, for which an internal transfer is needed, with value transfer.
I agree that not all businesses need this, but there should be a way to check or uncheck this choice.
Thanks anyways.
Deliveries and Receipts can still be done inside the same Company (if the warehouses are for the same company).
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
2
7月 25
|
1642 | ||
|
4
6月 25
|
5780 | ||
|
1
5月 25
|
1314 | ||
|
1
2月 25
|
1882 | ||
|
1
9月 24
|
1568 |