From cc81c188f68a927d3f1a2d942c84b428021f1d9a Mon Sep 17 00:00:00 2001 From: AaronHForgeFlow Date: Tue, 9 Nov 2021 15:48:47 +0100 Subject: [PATCH] [FIX] stock_account_prepare_anglo_saxon_out_lines_hook --- .../models/account_move.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stock_account_prepare_anglo_saxon_out_lines_hook/models/account_move.py b/stock_account_prepare_anglo_saxon_out_lines_hook/models/account_move.py index a1635b3d0..a2338b45a 100644 --- a/stock_account_prepare_anglo_saxon_out_lines_hook/models/account_move.py +++ b/stock_account_prepare_anglo_saxon_out_lines_hook/models/account_move.py @@ -10,7 +10,7 @@ class AccountMove(models.Model): def _prepare_interim_account_line_vals(self, line, move, debit_interim_account): # Compute accounting fields. - sign = -1 if move.type == "out_refund" else 1 + sign = -1 if move.move_type == "out_refund" else 1 price_unit = line._stock_account_get_anglo_saxon_price_unit() balance = sign * line.quantity * price_unit return { @@ -29,7 +29,7 @@ class AccountMove(models.Model): def _prepare_expense_account_line_vals(self, line, move, credit_expense_account): # Compute accounting fields. - sign = -1 if move.type == "out_refund" else 1 + sign = -1 if move.move_type == "out_refund" else 1 price_unit = line._stock_account_get_anglo_saxon_price_unit() balance = sign * line.quantity * price_unit return {