2
# -*- encoding: utf-8 -*-
3
###########################################################################
4
# Module Writen to OpenERP, Open Source Management Solution
5
# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
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.
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.
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
##############################################################################
29
from osv import fields, osv
31
from tools.translate import _
32
from tools import config
34
class res_users(osv.osv):
35
_inherit = 'res.users'
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)
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)