af4f4703cfb1fdd4d98178999e892a21fa4c0c2d
1 # -*- coding: utf-8 -*-
2 ##############################################################################
4 # Account Move Lines without filters module for OpenERP, Having no
5 # pre-selected period and journal when listing account move lines
6 # Copyright (C) 2015 L'Heureux Cyclage (<http://www.heureux-cyclage.org>)
9 # This file is a part of Account Move Lines without filters
11 # Account Move Lines without filters is free software: you can redistribute
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation, either version 3 of the License, or
15 # (at your option) any later version.
17 # Account Move Lines without filters is distributed in the hope that it will
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
23 # You should have received a copy of the GNU General Public License
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
26 ##############################################################################
27 from openerp
.osv
import osv
30 class account_move_line(osv
.osv
):
31 _inherit
= 'account.move.line'
33 def _default_get(self
, cr
, uid
, fields
, context
=None):
34 """Override this function to set period_id and journal_id to false."""
35 data
= super(account_move_line
, self
)._default
_get
(cr
, uid
, fields
, context
=None)
36 data
['period_id'] = False
37 data
['journal_id'] = False
40 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: