Skip to content

Commit 841c258

Browse files
hugho-adJose Antonio Morales Ponce [Vauxoo]
authored and
Jose Antonio Morales Ponce [Vauxoo]
committed
[FIX] account_anglo_saxon_stock_move: rewrite _create_account_move_line method in old_api because is failling (#1242)
1 parent 80a50b4 commit 841c258

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# coding: utf-8
22

3-
from openerp import models, api
3+
from openerp import models
44

55

66
class StockQuant(models.Model):
77
_inherit = "stock.quant"
88

9-
@api.multi
109
def _create_account_move_line(
11-
self, move, credit_account_id, debit_account_id, journal_id):
10+
self, cr, uid, move, src_account_id, dest_account_id,
11+
reference_amount, reference_currency_id, context=None):
1212
""" This super will add a new key into the context sending
1313
`novalidate=True` in order to avoid validation at Entry Lines creation.
1414
after all lines are created and glued their Journal Entry if ever
@@ -19,7 +19,7 @@ def _create_account_move_line(
1919
enough to do one validate when posting the Journal Entry and skip the
2020
other validations at creation time
2121
"""
22-
ctx = dict(self._context, novalidate=True)
23-
return super(
24-
StockQuant, self.with_context(ctx))._create_account_move_line(
25-
move, credit_account_id, debit_account_id, journal_id)
22+
ctx = dict(context, novalidate=True)
23+
return super(StockQuant, self)._create_account_move_line(
24+
cr, uid, move, src_account_id, dest_account_id, reference_amount,
25+
reference_currency_id, context=ctx)

0 commit comments

Comments
 (0)