~julie-w/unifield-wm/UTP-925

« back to all changes in this revision

Viewing changes to account_hq_entries/wizard/hq_entries_import.py

  • Committer: Olivier DOSSMANN
  • Date: 2012-04-27 08:04:19 UTC
  • mto: This revision was merged to the branch mainline in revision 887.
  • Revision ID: olivier@tempo-laptop-20120427080419-yhq3rxzephzphnsh
UF-679 [ADD] Implement new elements in HQ Entries

  * Delete changes on account
  * Add an empty import wizard (to developed)
  * Change HQ Entries search and tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
# -*- coding: utf-8 -*-
 
3
##############################################################################
 
4
#
 
5
#    OpenERP, Open Source Management Solution
 
6
#    Copyright (C) 2012 TeMPO Consulting, MSF. All Rights Reserved
 
7
#    Developer: Olivier DOSSMANN
 
8
#
 
9
#    This program is free software: you can redistribute it and/or modify
 
10
#    it under the terms of the GNU Affero General Public License as
 
11
#    published by the Free Software Foundation, either version 3 of the
 
12
#    License, or (at your option) any later version.
 
13
#
 
14
#    This program is distributed in the hope that it will be useful,
 
15
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
#    GNU Affero General Public License for more details.
 
18
#
 
19
#    You should have received a copy of the GNU Affero General Public License
 
20
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
21
#
 
22
##############################################################################
 
23
 
 
24
from osv import osv
 
25
from osv import fields
 
26
import os.path
 
27
from base64 import decodestring
 
28
from tempfile import NamedTemporaryFile
 
29
import csv
 
30
from tools.misc import ustr
 
31
from tools.translate import _
 
32
import time
 
33
 
 
34
class hq_entries_import_wizard(osv.osv_memory):
 
35
    _name = 'hq.entries.import'
 
36
    _description = 'HQ Entries Import Wizard'
 
37
 
 
38
    _columns = {
 
39
        'file': fields.binary(string="File", filters="*.csv", required=True),
 
40
    }
 
41
 
 
42
    def button_validate(self, cr, uid, ids, context=None):
 
43
        pass
 
44
        return True
 
45
 
 
46
hq_entries_import_wizard()
 
47
 
 
48
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: