~vauxoo/openerp-venezuela-localization/ovl70-wh-rev-hbto

« back to all changes in this revision

Viewing changes to l10n_ve_fiscal_requirements/model/res_users.py

  • Committer: Humberto Arocha
  • Date: 2013-01-14 15:05:07 UTC
  • mfrom: (764.3.8 ovl70)
  • Revision ID: humbertoarocha@gmail.com-20130114150507-o2smjt7wh3eqxmb5
  
[MERGE] Merge from main trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
 
2
# -*- encoding: utf-8 -*-
 
3
###########################################################################
 
4
#    Module Writen to OpenERP, Open Source Management Solution
 
5
#    Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
 
6
#    All Rights Reserved
 
7
###############Credits######################################################
 
8
#    Coded by: Humberto Arocha           <humberto@vauxoo.com>
 
9
#              María Gabriela Quilarque  <gabriela@vauxoo.com>
 
10
#              Nhomar Hernandez          <nhomar@vauxoo.com>
 
11
#    Planified by: Humberto Arocha
 
12
#    Finance by: Helados Gilda, C.A. http://heladosgilda.com.ve
 
13
#    Audited by: Humberto Arocha humberto@openerp.com.ve
 
14
#############################################################################
 
15
#    This program is free software: you can redistribute it and/or modify
 
16
#    it under the terms of the GNU Affero General Public License as published by
 
17
#    the Free Software Foundation, either version 3 of the License, or
 
18
#    (at your option) any later version.
 
19
#
 
20
#    This program is distributed in the hope that it will be useful,
 
21
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
22
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
23
#    GNU Affero General Public License for more details.
 
24
#
 
25
#    You should have received a copy of the GNU Affero General Public License
 
26
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
27
##############################################################################
 
28
 
 
29
from osv import fields, osv
 
30
import tools
 
31
from tools.translate import _
 
32
from tools import config
 
33
 
 
34
class res_users(osv.osv):
 
35
    _inherit = 'res.users'
 
36
        
 
37
    def create(self, cr, uid, vals, context=None):
 
38
        if context is None: context = {}
 
39
        context.update({'create_company':True})
 
40
        return super(res_users, self).create(cr, uid, vals, context=context)
 
41
        
 
42
    def write(self, cr, uid, ids, values, context=None):
 
43
        context = context or {}
 
44
        context.update({'create_company':True})
 
45
        return super(res_users, self).write(cr, uid, ids, values, context=context)
 
46
 
 
47
res_users()