From d6ba13a3945b5829972031c49a6ab623742e040d Mon Sep 17 00:00:00 2001 From: "vta vta@openerp.com" <> Date: Fri, 16 Nov 2012 08:53:05 +0100 Subject: [PATCH] [IMP] Minor improvements in portal views, such as contact and employees. Improved menus and string on empty views. Send the password when a partner is invited to portal via sidebar menu. bzr revid: vta@openerp.com-20121116075305-4d0olu5zlvwsxeq8 --- addons/portal/portal_view.xml | 29 +++++--- addons/portal/wizard/portal_wizard.py | 5 +- addons/portal_crm/wizard/contact.py | 9 ++- addons/portal_crm/wizard/contact_view.xml | 60 +++++++--------- addons/portal_event/portal_event_view.xml | 4 +- .../portal_hr_employees/hr_employee_view.xml | 69 +++++++++++-------- .../portal_project_issue_view.xml | 4 +- addons/portal_sale/portal_sale_view.xml | 31 +++------ 8 files changed, 105 insertions(+), 106 deletions(-) diff --git a/addons/portal/portal_view.xml b/addons/portal/portal_view.xml index 5b39ea89525..45fa2a4dacb 100644 --- a/addons/portal/portal_view.xml +++ b/addons/portal/portal_view.xml @@ -8,18 +8,18 @@ groups="base.group_no_one,portal.group_portal" sequence="20"/> - - - + + + + - - - - - + + + + @@ -47,5 +47,12 @@ + + + + diff --git a/addons/portal/wizard/portal_wizard.py b/addons/portal/wizard/portal_wizard.py index bf8353c92c1..545b771e762 100644 --- a/addons/portal/wizard/portal_wizard.py +++ b/addons/portal/wizard/portal_wizard.py @@ -39,6 +39,7 @@ You have been given access to %(portal)s. Your login account data is: Database: %(db)s Username: %(login)s +Password: %(password)s In order to complete the signin process, click on the following url: %(url)s @@ -210,6 +211,7 @@ class wizard_user(osv.osv_memory): 'name': user.name, 'login': user.login, 'url': user.signup_url, + 'password': user.password, } mail_mail = self.pool.get('mail.mail') mail_values = { @@ -219,6 +221,7 @@ class wizard_user(osv.osv_memory): 'body_html': '
%s
' % (_(WELCOME_EMAIL_BODY) % data), 'state': 'outgoing', } - return mail_mail.create(cr, uid, mail_values, context=this_context) + mail_id = mail_mail.create(cr, uid, mail_values, context=this_context) + return mail_mail.send(cr, uid, [mail_id], context=this_context) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/portal_crm/wizard/contact.py b/addons/portal_crm/wizard/contact.py index a0f0d952a66..65de0c96226 100644 --- a/addons/portal_crm/wizard/contact.py +++ b/addons/portal_crm/wizard/contact.py @@ -28,6 +28,8 @@ class crm_contact_us(osv.TransientModel): _description = 'Contact form for the portal' _inherit = 'crm.lead' _columns = { + 'subject' : fields.char('Subject', required=True), + 'body' : fields.text('Content', required=True), 'company_ids' : fields.many2many('res.company', string='Companies', readonly=True), } @@ -95,7 +97,10 @@ class crm_contact_us(osv.TransientModel): it is quite complicated to set proper rights for this object. Therefore, user SUPERUSER_ID will perform the creation. """ - values['contact_name'] = values['name'] + print values + values['name'] = values['subject'] + values['contact_name'] = values['partner_name'] + values['description'] = values['body'] crm_lead.create(cr, SUPERUSER_ID, dict(values,user_id=False), context) """ @@ -114,7 +119,7 @@ class crm_contact_us(osv.TransientModel): 'res_model': self._name, 'res_id': ids[0], 'view_id': self.pool.get('ir.model.data').get_object_reference(cr, uid, 'portal_crm', 'wizard_contact_form_view_thanks')[1], - 'target': 'inline', + 'target': 'new', } def _needaction_domain_get(self, cr, uid, context=None): diff --git a/addons/portal_crm/wizard/contact_view.xml b/addons/portal_crm/wizard/contact_view.xml index 778e7f9562e..70f87fe1ff8 100644 --- a/addons/portal_crm/wizard/contact_view.xml +++ b/addons/portal_crm/wizard/contact_view.xml @@ -2,31 +2,25 @@ - - + Wizard form view portal_crm.crm_contact_us
-
+

Contact us

- - - - - - - - -
-
- - - - - - + + + + + + + +
-
-
- + + + @@ -59,18 +53,13 @@ -
-
-
- -
-
-
+ + + + +
@@ -88,15 +77,14 @@ otherwise the orm will try to select all the model's records and this will result in a permission denied error --> - +
- - - Contact + + Contact Us portal_crm.crm_contact_us form inline @@ -104,7 +92,7 @@ + parent="portal.portal_company" action="action_contact_us" sequence="40"/>
diff --git a/addons/portal_event/portal_event_view.xml b/addons/portal_event/portal_event_view.xml index 5d2397f6148..0a0f59d7857 100755 --- a/addons/portal_event/portal_event_view.xml +++ b/addons/portal_event/portal_event_view.xml @@ -10,14 +10,14 @@ Events ir.actions.act_window event.event - kanban,calendar,tree,form,graph + kanban,calendar,tree,form {"search_default_upcoming":1} There are no public events. + action="action_event_view" sequence="30"/> diff --git a/addons/portal_hr_employees/hr_employee_view.xml b/addons/portal_hr_employees/hr_employee_view.xml index 4e133061da6..6af4abb7b7f 100644 --- a/addons/portal_hr_employees/hr_employee_view.xml +++ b/addons/portal_hr_employees/hr_employee_view.xml @@ -1,6 +1,6 @@ - + @@ -15,42 +15,51 @@ - - portal_hr_employees.employees_list + + portal_hr_employees_view portal_crm.crm_contact_us - - -

Meet the team

+
- - - - - -
-
- -
-
-

- () -

-
    -
  • -
  • Tel:
  • -
  • Mobile:
  • -
  • -
-
+ + + + +
+
+
- - - +
+

+ () +

+
    +
  • +
  • Tel:
  • +
  • Mobile:
  • +
  • +
+
+
+
+
+
- + + + Meet the team + portal_crm.crm_contact_us + + form + form + Here you can see our employees' public profile, if any + + + + diff --git a/addons/portal_project_issue/portal_project_issue_view.xml b/addons/portal_project_issue/portal_project_issue_view.xml index 6502d92b4dc..5a88e54a00b 100644 --- a/addons/portal_project_issue/portal_project_issue_view.xml +++ b/addons/portal_project_issue/portal_project_issue_view.xml @@ -75,8 +75,8 @@

Click to create an issue.

- OpenERP's kanban view will help you track easily your current - pipeline of issues to fix. + You can track your claims from this menu and the action we + will take.

diff --git a/addons/portal_sale/portal_sale_view.xml b/addons/portal_sale/portal_sale_view.xml index b46175f7feb..216cc828835 100644 --- a/addons/portal_sale/portal_sale_view.xml +++ b/addons/portal_sale/portal_sale_view.xml @@ -13,7 +13,7 @@ tree,form,calendar,graph {"search_default_draft":1} - You don't have any quotation. + We haven't sent you any quotation. @@ -23,7 +23,7 @@ tree,form,calendar,graph {"search_default_sales":1} - You don't have any sale order. + We haven't sent you any sale order. @@ -34,18 +34,7 @@ [('type','=','out')] {'default_type': 'out', 'contact_display': 'partner_address'} - You don't have any delivery order. - - - - Products - ir.actions.act_window - product.product - form - kanban,tree,form - - - There are no public products. + We haven't sent you any delivery order. @@ -55,7 +44,7 @@ [('type','=','out_invoice')] {'default_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale'} - You don't have any invoice. + We haven't sent you any invoice. @@ -65,7 +54,7 @@ {'type':'receipt'} current - You don't have any refunds or payments. + We haven't sent you any credit note. - - - + +