mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
fixup! [REF] Split valuation accounts on locations
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Copyright (C) 2018 by Camptocamp
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from odoo import fields, models
|
||||
from odoo import _, fields, models
|
||||
|
||||
|
||||
class StockLocation(models.Model):
|
||||
@@ -16,8 +16,8 @@ class StockLocation(models.Model):
|
||||
AND valuation_out_internal_account_id IS NOT NULL
|
||||
AND valuation_in_internal_account_id IS NOT NULL
|
||||
)""",
|
||||
'You must provide a valuation in/out accounts'
|
||||
' in order to force accounting entries.'),
|
||||
_('You must provide a valuation in/out accounts'
|
||||
' in order to force accounting entries.')),
|
||||
]
|
||||
|
||||
force_accounting_entries = fields.Boolean(
|
||||
|
||||
@@ -45,8 +45,8 @@ class StockMove(models.Model):
|
||||
|
||||
if location_to.force_accounting_entries:
|
||||
move._create_account_move_line(
|
||||
location_to.valuation_in_internal_account_id.id,
|
||||
product_valuation_accounts.get('stock_valuation').id,
|
||||
location_to.valuation_in_internal_account_id.id,
|
||||
stock_journal_id)
|
||||
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user