1 # -*- coding: utf-8 -*-
2 ##############################################################################
4 # Non-real time point of sale module for OpenERP, Permit user to record his
5 # sales in point of sale interface in non-real time.
6 # Copyright (C) 2016 L'Heureux Cyclage (<http://www.heureux-cyclage>)
9 # This file is a part of Non-real time point of sale
11 # Non-real time point of sale is free software: you can redistribute it
12 # and/or modify it under the terms of the GNU General Public License as
13 # published by the Free Software Foundation, either version 3 of the
14 # License, or (at your option) any later version.
16 # Non-real time point of sale is distributed in the hope that it will be
17 # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
19 # Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with this program. If not, see <http://www.gnu.org/licenses/>.
24 ##############################################################################
26 from openerp
.osv
import orm
28 class CashBoxIn(orm
.TransientModel
):
29 _inherit
= 'cash.box.in'
31 def _compute_values_for_statement_line(self
, cr
, uid
, box
, record
, context
=None):
32 """Add statement date as date for cash in move line"""
33 res
= super(CashBoxIn
, self
)._compute
_values
_for
_statement
_line
(cr
, uid
, box
, record
, context
=context
)
34 res
['date'] = record
.date
37 class CashBoxOut(orm
.TransientModel
):
38 _inherit
= 'cash.box.out'
40 def _compute_values_for_statement_line(self
, cr
, uid
, box
, record
, context
=None):
41 """Add statement date as date for cash out move line"""
42 res
= super(CashBoxOut
, self
)._compute
_values
_for
_statement
_line
(cr
, uid
, box
, record
, context
=context
)
43 res
['date'] = record
.date
48 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: