From: Ludovic CHEVALIER Date: Mon, 21 Dec 2015 11:04:02 +0000 (+0100) Subject: Just remove filters in javascript code X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/%27http:/jquery.khurshid.com/ifixpng.php/%40%20%27info_desinstaller_plugin%27%20=%3E%20%27%20deactivates%20the%20plugin%20and%20deletes%20the%20data%27%2C%20%27info_discussion_cours%27%20=%3E%20%27Current%20discussions%27%2C%20%27info_ecrire_article%27%20=%3E%20%27Before%20writing%20any%20articles%2C%20you%20must%20create%20at%20least%20one%20section.%27%2C-%27info_email_envoi%27%20=%3E%20%27Sender/%27s%20email%20address%20%28optional%29%27%2C-%27info_email_envoi_txt%27%20=%3E%20%27Enter%20the%20sender/%27s%20email%20address%20used%20for%20sending%20emails%20%28by%20default%2C%20the%20recipient/%27s%20address%20is%20used%20as%20the%20sender/%27s%20address%29%C3%82%C2%A0:%27%2C-%27info_email_webmestre%27%20=%3E%20%27Webmaster/%27s%20email%20address%27%2C%20%27info_email_envoi%27%20=%3E%20%27Sender%C3%A2%C2%80%C2%99s%20email%20address%20%28optional%29%27%2C%20%27info_email_envoi_txt%27%20=%3E%20%27Enter%20the%20sender%C3%A2%C2%80%C2%99s%20email%20address%20used%20for%20sending%20emails%20%28by%20default%2C%20the%20recipient%C3%A2%C2%80%C2%99s%20address%20is%20used%20as%20the%20sender%C3%A2%C2%80%C2%99s%20address%29%C3%82%C2%A0:%27%2C%20%27info_email_webmestre%27%20=%3E%20%27Webmaster%C3%A2%C2%80%C2%99s%20email%20address%27%2C%20%27info_entrer_code_alphabet%27%20=%3E%20%27Enter%20the%20code%20of%20the%20character%20set%20to%20be%20used:%27%2C%20%27info_envoi_email_automatique%27%20=%3E%20%27Automated%20mailing%27%2C%20%27info_envoyer_maintenant%27%20=%3E%20%27Send%20now%27%2C%40%40%20-340%2C8%20%20340%2C8%20%40%40%20Do%20not%20submit%20this%20import%20request.%3Cp%3EFor%20more%20information%2C%20please%20see%20%3Ca%20href=?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({ + }); +};