From 0d06dff0fb7371dd34175b160e88b8240168dfac Mon Sep 17 00:00:00 2001 From: Ludovic CHEVALIER Date: Mon, 21 Dec 2015 12:04:02 +0100 Subject: [PATCH] Just remove filters in javascript code --- __init__.py | 1 - __openerp__.py | 3 ++ account_move_line.py | 40 --------------------- static/src/js/account_move_line_quickadd.js | 11 ++++++ 4 files changed, 14 insertions(+), 41 deletions(-) delete mode 100644 account_move_line.py create mode 100644 static/src/js/account_move_line_quickadd.js diff --git a/__init__.py b/__init__.py index 909eaf0..8837115 100644 --- a/__init__.py +++ b/__init__.py @@ -25,6 +25,5 @@ # ############################################################################## -import account_move_line # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/__openerp__.py b/__openerp__.py index ef84af1..3dc7c76 100644 --- a/__openerp__.py +++ b/__openerp__.py @@ -50,6 +50,9 @@ default. ], 'update_xml': [ ], + 'js': [ + 'static/src/js/account_move_line_quickadd.js', + ], 'installable': True, 'auto_install': False, 'images': [], diff --git a/account_move_line.py b/account_move_line.py deleted file mode 100644 index af4f470..0000000 --- a/account_move_line.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Account Move Lines without filters module for OpenERP, Having no -# pre-selected period and journal when listing account move lines -# Copyright (C) 2015 L'Heureux Cyclage () -# Ludovic CHEVALIER -# -# This file is a part of Account Move Lines without filters -# -# Account Move Lines without filters is free software: you can redistribute -# it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Account Move Lines without filters is distributed in the hope that it will -# be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -############################################################################## -from openerp.osv import osv - - -class account_move_line(osv.osv): - _inherit = 'account.move.line' - - def _default_get(self, cr, uid, fields, context=None): - """Override this function to set period_id and journal_id to false.""" - data = super(account_move_line, self)._default_get(cr, uid, fields, context=None) - data['period_id'] = False - data['journal_id'] = False - return data - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/static/src/js/account_move_line_quickadd.js b/static/src/js/account_move_line_quickadd.js new file mode 100644 index 0000000..a40729f --- /dev/null +++ b/static/src/js/account_move_line_quickadd.js @@ -0,0 +1,11 @@ +openerp.account.quickadd = function (instance) { + var _t = instance.web._t, + _lt = instance.web._lt; + var QWeb = instance.web.qweb; + + instance.web.account = instance.web.account || {}; + + instance.web.views.add('tree_account_move_line_quickadd', 'instance.web.account.QuickAddListView'); + instance.web.account.QuickAddListView = instance.web.ListView.extend({ + }); +}; -- 2.20.1