diff --git a/bin/addons/base/__terp__.py b/bin/addons/base/__terp__.py index d0dc9b68dd3..6a5e8bf0261 100644 --- a/bin/addons/base/__terp__.py +++ b/bin/addons/base/__terp__.py @@ -56,6 +56,7 @@ 'res/bank_view.xml', 'res/country_view.xml', 'res/res_currency_view.xml', + 'res/partner/wizard/wizard_share_view.xml', 'res/partner/crm_view.xml', 'res/partner/partner_data.xml', 'res/ir_property_view.xml', diff --git a/bin/addons/base/res/partner/partner.py b/bin/addons/base/res/partner/partner.py index 3e890e6efed..0bcf90819d7 100644 --- a/bin/addons/base/res/partner/partner.py +++ b/bin/addons/base/res/partner/partner.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -149,12 +149,12 @@ class res_partner(osv.osv): 'active': fields.boolean('Active'), 'customer': fields.boolean('Customer', help="Check this box if the partner is a customer."), 'supplier': fields.boolean('Supplier', help="Check this box if the partner is a supplier. If it's not checked, purchase people will not see it when encoding a purchase order."), - 'city': fields.related('address', 'city', type='char', string='City'), - 'phone': fields.related('address', 'phone', type='char', string='Phone'), + 'city': fields.related('address', 'city', type='char', string='City'), + 'phone': fields.related('address', 'phone', type='char', string='Phone'), 'country': fields.related('address', 'country_id', type='many2one', relation='res.country', string='Country'), 'employee': fields.boolean('Employee', help="Check this box if the partner is an Employee."), 'email': fields.related('address', 'email', type='char', size=240, string='E-mail'), - 'company_id': fields.many2one('res.company', 'Company', select=1), + 'company_id': fields.many2one('res.company', 'Company', select=1), } def _default_category(self, cr, uid, context={}): @@ -173,6 +173,9 @@ class res_partner(osv.osv): default.update({'name': name+ _(' (copy)'), 'events':[]}) return super(res_partner, self).copy(cr, uid, id, default, context) + def do_share(self, cr, uid, ids, *args): + return True + def _check_ean_key(self, cr, uid, ids): for partner_o in pooler.get_pool(cr.dbname).get('res.partner').read(cr, uid, ids, ['ean13',]): thisean=partner_o['ean13'] @@ -469,7 +472,7 @@ class res_partner_category(osv.osv): _columns = { 'partner_ids': fields.many2many('res.partner', 'res_partner_category_rel', 'category_id', 'partner_id', 'Partners'), } - + res_partner_category() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/bin/addons/base/res/partner/wizard/__init__.py b/bin/addons/base/res/partner/wizard/__init__.py index b1f0addf5d4..d0e69b37924 100644 --- a/bin/addons/base/res/partner/wizard/__init__.py +++ b/bin/addons/base/res/partner/wizard/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## @@ -23,6 +23,7 @@ import wizard_sms import wizard_spam import wizard_clear_ids import wizard_ean_check +import wizard_share # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/bin/addons/base/res/partner/wizard/wizard_share.py b/bin/addons/base/res/partner/wizard/wizard_share.py new file mode 100644 index 00000000000..573a1faa287 --- /dev/null +++ b/bin/addons/base/res/partner/wizard/wizard_share.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved +# $Id$ +# +# This program 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. +# +# This program 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 osv import osv, fields + +class partner_share_create(osv.osv_memory): + _name = 'partner.share.create' + _description = 'Create parner share' + _columns = { + 'user_ids': fields.many2many('res.users', 'share_patner_rel', 'partner_id','user_id', 'Share Users'), + } +partner_share_create() \ No newline at end of file diff --git a/bin/addons/base/res/partner/wizard/wizard_share_view.xml b/bin/addons/base/res/partner/wizard/wizard_share_view.xml new file mode 100644 index 00000000000..6485d6307fb --- /dev/null +++ b/bin/addons/base/res/partner/wizard/wizard_share_view.xml @@ -0,0 +1,41 @@ + + + + + partner.share.create.form + partner.share.create + form + +
+ + + + +