fixup! [REF] Split valuation accounts on locations

This commit is contained in:
Artem Kostyuk
2018-07-23 12:26:39 +03:00
committed by Kitti U
parent cae7e74a27
commit ad4e1356d4
2 changed files with 4 additions and 4 deletions

View File

@@ -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(

View File

@@ -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