Bharat Devnani (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-customer_portal-atp-portal-customer-enhancements-bde
 into lp:~openerp-dev/openobject-addons/trunk-customer_portal-atp.

Requested reviews:
  OpenERP R&D Team (openerp-dev)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-customer_portal-atp-portal-customer-enhancements-bde/+merge/103217

Hello Sir, 

I have added access rights in order to fill survey, 
and also for creating the project issue and removed 
domain from Personal Events rule in order to view all the events.

And also improved the functionality in order to take
the customer's individual record in add portal access
in case when customer has no contacts.

Thanks & Regards,
Devnani Bharat R.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-customer_portal-atp-portal-customer-enhancements-bde/+merge/103217
Your team OpenERP R&D Team is requested to review the proposed merge of 
lp:~openerp-dev/openobject-addons/trunk-customer_portal-atp-portal-customer-enhancements-bde
 into lp:~openerp-dev/openobject-addons/trunk-customer_portal-atp.
=== modified file 'portal/wizard/portal_wizard.py'
--- portal/wizard/portal_wizard.py	2012-04-18 08:37:51 +0000
+++ portal/wizard/portal_wizard.py	2012-04-24 06:03:22 +0000
@@ -91,12 +91,25 @@
     def _default_user_ids(self, cr, uid, context):
         """ determine default user_ids from the active records """
         def create_user_from_address(address):
-            return {    # a user config based on a contact (address)
-                'name': address.name,
-                'user_email': extract_email(address.email),
-                'lang': address.parent_id and address.parent_id.lang or 'en_US',
-                'partner_id': address.parent_id and address.parent_id.id,
-            }
+            res = {}
+            if isinstance(address, int):
+                res_partner_obj = self.pool.get('res.partner')
+                address = res_partner_obj.browse(cr, uid, address, context=context)
+                lang = address.id and address.lang or 'en_US'
+                partner_id = address.id
+                
+            else:
+                lang = address.parent_id and address.parent_id.lang or 'en_US'
+                partner_id = address.parent_id and address.parent_id.id
+            
+            res = {
+                   'name': address.name,
+                   'user_email': extract_email(address.email),
+                   'lang': lang,
+                   'partner_id': partner_id,
+                   }
+            
+            return res
         
         user_ids = []
         if context.get('active_model') == 'res.partner':
@@ -107,6 +120,8 @@
                 # add one user per contact, or one user if no contact
                 if p.child_ids:
                     user_ids.extend(map(create_user_from_address, p.child_ids))
+                elif p.is_company == False and p.customer == True:
+                    user_ids.extend(map(create_user_from_address, [p.id]))
                 else:
                     user_ids.append({'lang': p.lang or 'en_US', 'parent_id': p.id})
         

=== modified file 'portal_customer_event/security/portal_customer_security.xml'
--- portal_customer_event/security/portal_customer_security.xml	2012-04-24 05:39:54 +0000
+++ portal_customer_event/security/portal_customer_security.xml	2012-04-24 06:03:22 +0000
@@ -5,6 +5,10 @@
         <record id="portal_event_rule" model="ir.rule">
             <field name="name">Personal Events</field>
             <field ref="event.model_event_event" name="model_id"/>
+<<<<<<< TREE
+=======
+            <field name="domain_force">[]</field>
+>>>>>>> MERGE-SOURCE
             <field name="groups" eval="[(4, ref('portal_customer.group_sales_portal'))]"/>
         </record>
         

=== modified file 'portal_customer_feedback/security/ir.model.access.csv'
--- portal_customer_feedback/security/ir.model.access.csv	2012-04-19 07:39:59 +0000
+++ portal_customer_feedback/security/ir.model.access.csv	2012-04-24 06:03:22 +0000
@@ -8,3 +8,5 @@
 access_survey_question_column_heading,survey_question_column_heading,survey.model_survey_question_column_heading,portal_customer.group_sales_portal,1,0,0,0
 access_survey_response_line,survey_response_line,survey.model_survey_response_line,portal_customer.group_sales_portal,1,1,1,0
 access_survey_response_answer,survey_response_answer,survey.model_survey_response_answer,portal_customer.group_sales_portal,1,1,1,0
+access_ir_attachment,ir.attachment,base.model_ir_attachment,portal_customer.group_sales_portal,1,0,1,0
+access_mail_message,mail.message,mail.model_mail_message,portal_customer.group_sales_portal,1,1,1,0

=== modified file 'portal_customer_issue/security/ir.model.access.csv'
--- portal_customer_issue/security/ir.model.access.csv	2012-04-20 06:48:33 +0000
+++ portal_customer_issue/security/ir.model.access.csv	2012-04-24 06:03:22 +0000
@@ -1,3 +1,7 @@
 id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_issues,project_issue,project_issue.model_project_issue,portal_customer.group_sales_portal,1,0,1,0
+access_issues,project_issue,project_issue.model_project_issue,portal_customer.group_sales_portal,1,1,1,0
 access_task,tasks,project.model_project_task,portal_customer.group_sales_portal,1,0,0,0
+access_project_task_work,project.task.work,project.model_project_task_work,portal_customer.group_sales_portal,1,0,0,0
+access_project_project,project.project,project.model_project_project,portal_customer.group_sales_portal,1,0,0,0
+access_account_analytic_account,account.analytic.account,analytic.model_account_analytic_account,portal_customer.group_sales_portal,1,0,0,0
+access_project_task_type,project.task.type,project.model_project_task_type,portal_customer.group_sales_portal,1,0,0,0

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to