From ad4e1356d40dcd03801b9f8a6f3a38673dabfe23 Mon Sep 17 00:00:00 2001 From: Artem Kostyuk Date: Mon, 23 Jul 2018 12:26:39 +0300 Subject: [PATCH] fixup! [REF] Split valuation accounts on locations --- stock_account_internal_move/models/stock_location.py | 6 +++--- stock_account_internal_move/models/stock_move.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stock_account_internal_move/models/stock_location.py b/stock_account_internal_move/models/stock_location.py index 7174b5289..2e61b40a1 100644 --- a/stock_account_internal_move/models/stock_location.py +++ b/stock_account_internal_move/models/stock_location.py @@ -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( diff --git a/stock_account_internal_move/models/stock_move.py b/stock_account_internal_move/models/stock_move.py index 94802299a..af2d8b688 100644 --- a/stock_account_internal_move/models/stock_move.py +++ b/stock_account_internal_move/models/stock_move.py @@ -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