diff --git a/addons/portal_customer/__init__.py b/addons/portal_customer/__init__.py index 55ddb5dd2bf..cb65ea0b3dc 100644 --- a/addons/portal_customer/__init__.py +++ b/addons/portal_customer/__init__.py @@ -18,6 +18,6 @@ # along with this program. If not, see . # ############################################################################## -import portal_customer + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/portal_customer/__openerp__.py b/addons/portal_customer/__openerp__.py index 167c97f6574..fcecb007808 100644 --- a/addons/portal_customer/__openerp__.py +++ b/addons/portal_customer/__openerp__.py @@ -37,10 +37,9 @@ "demo_xml" : [ ], "update_xml" : [ +# "security/ir.model.access.csv", "portal_customer_view.xml", -# "email_template.xml", - "portal_demo.xml", - "security/ir.model.access.csv", + "portal_demo.xml" ], 'installable': True, } diff --git a/addons/portal_customer/email_template.xml b/addons/portal_customer/email_template.xml deleted file mode 100644 index 7093a78afdd..00000000000 --- a/addons/portal_customer/email_template.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Customer Portal User Confirmation - - ${object.user_id.user_email or object.company_id.email or 'noreply@' + object.company_id.name + '.com'} - ${object.email} - You are registered as a Customer Portal User - - Hello ${object.name}, - - Welcome to our customer portal, now you are a member of our customer portal. - You can access our portal system through following Username and Password: - Your Username : ${object.email} - Your Password : ${object.email} - - For now, your password is same as Username, kindly change as per your convenience. - - Thanks and Warm Regards, - ${object.user_id.name} - - - - - default_email_customer_portal_user - default - - - res.partner - - - - \ No newline at end of file diff --git a/addons/portal_customer/portal_customer.py b/addons/portal_customer/portal_customer.py deleted file mode 100644 index 87a55a21268..00000000000 --- a/addons/portal_customer/portal_customer.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2011 OpenERP S.A (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero 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 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 . -# -############################################################################## - -from osv import fields, osv -from tools.translate import _ -import time - -class res_partner(osv.osv): - - _inherit = 'res.partner' - _columns = { - 'customer_portal_access': fields.boolean('Portal'), - } - - def mail_user_confirm(self, cr, uid, ids, context=None): - """ - Send email to user when the event is confirmed - """ - email_template_obj = self.pool.get('email.template') - portal_user_id = self.browse(cr, uid, ids, context=context)[0].id - template_id = email_template_obj.search(cr, uid, [('name','=','Customer Portal User Confirmation')], context=context)[0] - if template_id: - mail_message = email_template_obj.send_mail(cr,uid,template_id,portal_user_id) - return True - - def onchange_portal_create_user(self, cr, uid, ids, customer_portal_access, context=None): - res_users_obj = self.pool.get('res.users') - self.mail_user_confirm(cr, uid, ids) - if customer_portal_access: - name = self.browse(cr, uid, ids, context=context)[0].name - login = self.browse(cr, uid, ids, context=context)[0].email - res_users_obj.create(cr, uid, {'name':name, 'login':login, 'new_password':login}, context=context) - return {} - -res_partner() \ No newline at end of file diff --git a/addons/portal_customer/portal_customer_view.xml b/addons/portal_customer/portal_customer_view.xml index af64cdd8052..7ebfc9ac843 100644 --- a/addons/portal_customer/portal_customer_view.xml +++ b/addons/portal_customer/portal_customer_view.xml @@ -2,44 +2,34 @@ - - + + + + + + + + + + + + + - - res.partner.form - res.partner - - form - - - - - - - - - Contacts - res.partner - form - tree,form - - - - - - - - - - - - - - - - + + + + + + + + + + + + - \ No newline at end of file + diff --git a/addons/portal_customer/portal_demo.xml b/addons/portal_customer/portal_demo.xml index 6cdc8d76586..3bc08fe9e76 100644 --- a/addons/portal_customer/portal_demo.xml +++ b/addons/portal_customer/portal_demo.xml @@ -32,12 +32,18 @@ Account Invoice True + Account Invoice Line True + @@ -62,16 +68,14 @@ - + Sales Portal - - + - - + - + \ No newline at end of file diff --git a/addons/portal_customer/security/ir.model.access.csv b/addons/portal_customer/security/ir.model.access.csv deleted file mode 100755 index 2c29e0159ad..00000000000 --- a/addons/portal_customer/security/ir.model.access.csv +++ /dev/null @@ -1,2 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_sale_order_portal,sale.order,sale.model_sale_order,portal_customer.group_sale_access_portal,1,0,0,0