1
1
# coding: utf-8
2
2
3
- from openerp import models , api
3
+ from openerp import models
4
4
5
5
6
6
class StockQuant (models .Model ):
7
7
_inherit = "stock.quant"
8
8
9
- @api .multi
10
9
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 ):
12
12
""" This super will add a new key into the context sending
13
13
`novalidate=True` in order to avoid validation at Entry Lines creation.
14
14
after all lines are created and glued their Journal Entry if ever
@@ -19,7 +19,7 @@ def _create_account_move_line(
19
19
enough to do one validate when posting the Journal Entry and skip the
20
20
other validations at creation time
21
21
"""
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