eb20d21134be417926d06fff8320f7724c43298e
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
29 class CashBoxIn(orm
.TransientModel
):
30 _inherit
= 'cash.box.in'
32 def _compute_values_for_statement_line(self
, cr
, uid
, box
, record
, context
=None):
33 """Add statement date as date for cash in move line"""
34 res
= super(CashBoxIn
, self
)._compute
_values
_for
_statement
_line
(cr
, uid
, box
, record
, context
=context
)
35 res
['date'] = record
.date
38 class CashBoxOut(orm
.TransientModel
):
39 _inherit
= 'cash.box.out'
41 def _compute_values_for_statement_line(self
, cr
, uid
, box
, record
, context
=None):
42 """Add statement date as date for cash out move line"""
43 res
= super(CashBoxOut
, self
)._compute
_values
_for
_statement
_line
(cr
, uid
, box
, record
, context
=context
)
44 res
['date'] = record
.date
49 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: