[IMP] give a try to the sheet layout

also fix a problem in the contact form by assigning a proper value to the field 'name'

bzr revid: abo@openerp.com-20120702172748-j6bqm501gnlmrobj
This commit is contained in:
Antonin Bourguignon 2012-07-02 19:27:48 +02:00
parent 504c544d1c
commit 376af6f33f
3 changed files with 25 additions and 24 deletions

View File

@ -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;
}

View File

@ -41,10 +41,15 @@ class crm_contact_us(osv.TransientModel):
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 """

View File

@ -9,6 +9,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Contact wizard view" version="7.0">
<sheet>
<div class="oe_portal_crm_contact">
<div class="oe_portal_crm_callout">
<h1>Contact OpenERP</h1>
@ -101,6 +102,7 @@
</tr>
</table>
</div>
</sheet>
</form>
</field>
</record>