diff --git a/addons/portal_crm/static/src/css/portal_crm.css b/addons/portal_crm/static/src/css/portal_crm.css
index 2af2e7fab79..6cad34bc963 100644
--- a/addons/portal_crm/static/src/css/portal_crm.css
+++ b/addons/portal_crm/static/src/css/portal_crm.css
@@ -4,9 +4,7 @@
/* Root container */
.openerp .oe_portal_crm_contact {
- width: 800px;
- margin: 0 auto;
- padding: 20px 0 0 0;
+ width: 100%;
}
/* Sections containers */
@@ -50,7 +48,7 @@
/* background is defined directly in the view itself */
}
.openerp .oe_portal_crm_contact .oe_portal_crm_callout .oe_portal_crm_background_wrapper {
- height: 180px;
+ height: 120px;
border-bottom: 1px solid #4C4C4C;
border-top: 1px solid #4C4C4C;
padding: 5px 0;
@@ -78,9 +76,5 @@
/* Employees list section */
.openerp .oe_portal_crm_contact .oe_portal_crm_team .oe_fold_column.oe_kanban_record {
- width: 250px;
- border: 1px solid #D8D8D8;
- border-bottom-color: #B9B9B9;
- margin: 0 5px 5px 0;
- padding: 5px;
-}
+
+}
\ No newline at end of file
diff --git a/addons/portal_crm/wizard/contact.py b/addons/portal_crm/wizard/contact.py
index 7ea4d094ac3..2a8378c6bc8 100644
--- a/addons/portal_crm/wizard/contact.py
+++ b/addons/portal_crm/wizard/contact.py
@@ -24,27 +24,32 @@ class crm_contact_us(osv.TransientModel):
}
def create(self, cr, uid, values, context=None):
- """
- Since they potentially sensitive, we don't want any user to be able to
- read datas generated through this module. That's why we'll write those
- information in the crm.lead table and leave blank entries in the
- portal_crm.crm_contact_us table. This is why the create() method is
+ """
+ Since they potentially sensitive, we don't want any user to be able to
+ read datas generated through this module. That's why we'll write those
+ information in the crm.lead table and leave blank entries in the
+ portal_crm.crm_contact_us table. This is why the create() method is
overridden.
"""
crm_lead = self.pool.get('crm.lead')
-
- """
- Because of the complex inheritance of the crm.lead model and the other
- models implied (like mail.thread, among others, that performs a read
- when its create() method is called (in method message_get_subscribers()),
- it is quite complicated to set proper rights for this object.
- Therefore, user #1 will perform the creation until a better workaround
+
+ """
+ Because of the complex inheritance of the crm.lead model and the other
+ models implied (like mail.thread, among others, that performs a read
+ when its create() method is called (in method message_get_subscribers()),
+ it is quite complicated to set proper rights for this object.
+ Therefore, user #1 will perform the creation until a better workaround
is figured out.
"""
+ values['name'] = values['contact_name']
+ print values
crm_lead.create(cr, 1, dict(values,user_id=False), context)
- """ Create an empty record in the portal_crm.crm_contact_us table """
- return super(crm_contact_us, self).create(cr, uid, {})
+ """
+ Create an empty record in the portal_crm.crm_contact_us table.
+ Since the 'name' field is mandatory, give an empty string to avoid an integrity error.
+ """
+ return super(crm_contact_us, self).create(cr, uid, {'name': ' '})
def submit(self, cr, uid, ids, context=None):
""" When the form is submitted, redirect the user to a "Thanks" message """
diff --git a/addons/portal_crm/wizard/contact_view.xml b/addons/portal_crm/wizard/contact_view.xml
index 08b62d06a98..0a64e7a79f2 100644
--- a/addons/portal_crm/wizard/contact_view.xml
+++ b/addons/portal_crm/wizard/contact_view.xml
@@ -9,6 +9,7 @@
form