From: Ludovic CHEVALIER Date: Mon, 21 Dec 2015 11:04:02 +0000 (+0100) Subject: Just remove filters in javascript code X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%40%20%27icone_supprimer_signature%27%20=%3E%20%27Delete%20this%20signature%27%2C%20%27icone_valider_signature%27%20=%3E%20%27Validate%20this%20signature%27%2C%20%27image_administrer_rubrique%27%20=%3E%20%27You%20can%20manage%20this%20section%27%2C-%27impossible_modifier_login_auteur%27%20=%3E%20%27Login%20cannot%20be%20changed.%27%2C-%27impossible_modifier_pass_auteur%27%20=%3E%20%27Password%20cannot%20be%20changed.%27%2C%20%27info_1_article%27%20=%3E%20%271%20article%27%2C-%27info_1_article_syndique%27%20=%3E%20%271%20syndicated%20article%27%2C%20%27info_1_auteur%27%20=%3E%20%271%20author%27%2C%20%27info_1_message%27%20=%3E%20%271%20message%27%2C%20%27info_1_mot_cle%27%20=%3E%20%271%20keyword%27%2C%20%27info_1_rubrique%27%20=%3E%20%271%20section%27%2C-%27info_1_site%27%20=%3E%20%271%20site%27%2C%20%27info_1_visiteur%27%20=%3E%20%271%20visitor%27%2C%20%27info_activer_cookie%27%20=%3E%20%27You%20can%20activate%20an%20%3Cb%3Eadministration%20cookie%3C/b%3E%2C%20which%20allows%20you%20%20to%20switch%20easily%20between%20the%20public%20site%20and%20the%20private%20area.%27%2C%20%27info_activer_menu_developpement%27%20=%3E%20%27Show%20the%20Development%20menu%27%2C%20%27info_admin_etre_webmestre%27%20=%3E%20%27Give%20me%20web%20administrator%20rights%27%2C-%27info_admin_gere_rubriques%27%20=%3E%20%27This%20administrator%20manages%20the%20following%20sections:%27%2C-%27info_admin_gere_toutes_rubriques%27%20=%3E%20%27This%20administrator%20manages%20%3Cb%3Eall%20the%20sections%3C/b%3E.%27%2C-%27info_admin_gere_toutes_rubriques_2%27%20=%3E%20%27I%20manage%20%3Cb%3Eall%20the%20sections%3C/b%3E%27%2C%20%27info_admin_je_suis_webmestre%27%20=%3E%20%27I%20am%20a%20%3Cb%3Ewebmaster%3C/b%3E%27%2C%20%27info_admin_statuer_webmestre%27%20=%3E%20%27Give%20webmaster%20rights%20to%20this%20administrator%20%27%2C%20%27info_admin_webmestre%27%20=%3E%20%27This%20administrator%20is%20%3Cb%3Ewebmaster%3C/%7B%7B%20url_for%28%27show_vote%27%2C%20idvote=vote.id%29%20%7D%7D?a=commitdiff_plain;h=0d06dff0fb7371dd34175b160e88b8240168dfac;p=burette%2Faccount_move_line_nofilters.git Just remove filters in javascript code --- 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({ + }); +};