[FIX] point_of_sale: apply extended cash box behavior properly

Normally when you manually add or remove money from the cashbox the
reference on the bank statement line should be set to the name of the
session. But because the wrong function names where used this didn't
happen. Introduced by f5ad251686.

Fixes #12224
This commit is contained in:
Joren Van Onder
2016-06-01 10:34:40 +02:00
parent 8706ab4f13
commit b698caf42e
+4 -4
View File
@@ -29,12 +29,12 @@ class PosBox(CashBox):
class PosBoxIn(PosBox):
_inherit = 'cash.box.in'
def _compute_values_for_statement_line(self, cr, uid, box, record, context=None):
def _calculate_values_for_statement_line(self, cr, uid, id, record, context=None):
if context is None:
context = {}
values = super(PosBoxIn, self)._compute_values_for_statement_line(cr, uid, box, record, context=context)
values = super(PosBoxIn, self)._calculate_values_for_statement_line(cr, uid, id, record, context=context)[0]
active_model = context.get('active_model', False) or False
active_ids = context.get('active_ids', []) or []
@@ -49,8 +49,8 @@ class PosBoxIn(PosBox):
class PosBoxOut(PosBox):
_inherit = 'cash.box.out'
def _compute_values_for_statement_line(self, cr, uid, box, record, context=None):
values = super(PosBoxOut, self)._compute_values_for_statement_line(cr, uid, box, record, context=context)
def _calculate_values_for_statement_line(self, cr, uid, id, record, context=None):
values = super(PosBoxOut, self)._calculate_values_for_statement_line(cr, uid, id, record, context=context)[0]
active_model = context.get('active_model', False) or False
active_ids = context.get('active_ids', []) or []