[IMP] better form views, new guidelines

bzr revid: fp@tinyerp.com-20120609141849-kq5ng1r4n1cieafo
This commit is contained in:
Fabien Pinckaers 2012-06-09 16:18:49 +02:00
parent 4f4a0e54bf
commit 08e986653c
7 changed files with 64 additions and 70 deletions

View File

@ -9,15 +9,13 @@
<field name="model">crm.add.note</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Add Note">
<separator string="Add Note" colspan="4" />
<field name="body" nolabel="1" colspan="4" default_focus="1"/>
<separator string="" colspan="6"/>
<group colspan="6" col="4" >
<field name="state" />
<button string="_Cancel" icon="gtk-close" special="cancel" />
<form string="Add Note" version="7.0">
<header>
<button name="action_add" type="object" string="_Add" icon="gtk-ok" />
</group>
<button string="_Cancel" icon="gtk-close" special="cancel" />
<header>
<separator string="Add Note"/>
<field name="body"/>
</form>
</field>
</record>

View File

@ -8,16 +8,15 @@
<field name="model">crm.lead2partner</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Create a Partner">
<separator string="Create a Partner" colspan="4" />
<field name="action"/>
<group attrs="{'invisible':[('action','!=','exist')]}">
<field name="partner_id" attrs="{'required': [('action', '=', 'exist')]}"/>
</group>
<separator string="" colspan="4" />
<group col="4" colspan="4">
<form string="Create a Partner" version="7.0">
<header>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="make_partner" string="Continue" type="object" icon="gtk-ok"/>
<header>
<separator string="Create a Partner"/>
<group col="4">
<field name="action"/>
<field name="partner_id" attrs="{'required': [('action', '=', 'exist')], 'invisible':[('action','!=','exist')]}"/>
</group>
</form>
</field>

View File

@ -9,9 +9,13 @@
<field name="model">crm.merge.opportunity</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Merge Opportunities">
<separator string="Select Opportunities" colspan="4"/>
<field name="opportunity_ids" nolabel="1" colspan="4" width="550" height="300" >
<form string="Merge Opportunities" version="7.0">
<header>
<button name="action_merge" type="object" string="_Merge" icon="gtk-ok" />
<button string="_Cancel" icon="gtk-cancel" special="cancel" />
<header>
<separator string="Select Opportunities"/>
<field name="opportunity_ids">
<tree>
<field name="name" />
<field name="partner_id" />
@ -19,12 +23,6 @@
<field name="section_id" />
</tree>
</field>
<separator colspan="4"/>
<group col="4" colspan="4">
<button string="_Cancel" icon="gtk-cancel" special="cancel" />
<button name="action_merge" type="object"
string="_Merge" icon="gtk-ok" />
</group>
</form>
</field>
</record>

View File

@ -9,30 +9,30 @@
<field name="model">crm.opportunity2phonecall</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Schedule/Log a Call" layout="manual">
<form string="Schedule/Log a Call" layout="manual" version="7.0">
<header>
<button name="action_schedule" type="object" string="Log call" icon="gtk-ok" attrs="{'invisible' : [('action', '!=', 'log')]}" />
<button name="action_schedule" type="object" string="Schedule Call" icon="gtk-ok" attrs="{'invisible' : [('action', '!=', 'schedule')]}" />
<button name="action_cancel" string="_Cancel" icon="gtk-cancel" special="cancel" />
</header>
<group>
<group>
<field name="action"/>
<field name="name"/>
<field name="date" string="Planned Date" attrs="{'invisible': [('action','=','log')]}"/>
</group>
<group>
<field name="partner_id" readonly="True"/>
<field name="categ_id" string="Type"
widget="selection"
domain="[('object_id.model', '=', 'crm.phonecall')]"
groups="base.group_no_one"/>
<field name="phone"/>
<field name="user_id" attrs="{'invisible': [('action','=','log')]}"/>
<field name="section_id" widget="selection" attrs="{'invisible': [('action','=','log')]}"/>
</group>
<group>
<field name="action"/>
<field name="name"/>
<field name="date" string="Planned Date" attrs="{'invisible': [('action','=','log')]}"/>
</group>
<group>
<field name="partner_id" readonly="True"/>
<field name="categ_id" string="Type"
widget="selection"
domain="[('object_id.model', '=', 'crm.phonecall')]"
groups="base.group_no_one"/>
<field name="phone"/>
<field name="user_id" attrs="{'invisible': [('action','=','log')]}"/>
<field name="section_id" widget="selection" attrs="{'invisible': [('action','=','log')]}"/>
</group>
</group>
<field name="note"/>
<field name="note"/>
</form>
</field>
</record>

View File

@ -8,16 +8,16 @@
<field name="model">crm.partner2opportunity</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Create Opportunity">
<field name="name"/>
<field name="partner_id"/>
<newline/>
<field name="planned_revenue"/>
<field name="probability"/>
<separator string="" colspan="4" />
<group col="4" colspan="4">
<form string="Create Opportunity" version="7.0">
<header>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="make_opportunity" string="Create Opportunity" type="object" icon="gtk-ok"/>
<header>
<group col="4">
<field name="name"/>
<field name="partner_id"/>
<field name="planned_revenue"/>
<field name="probability"/>
</group>
</form>
</field>

View File

@ -3,7 +3,7 @@
<data>
<!-- Phonecall to meeting view -->
<!-- Phonecall to meeting view -->
<record model="ir.ui.view" id="phonecall2phonecall2meeting_view">
<field name="name">crm.phonecall2meeting.form</field>
@ -11,18 +11,18 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Convert To Meeting">
<label string="Are you sure to schedule a Meeting for this Phonecall?" colspan="4"/>
<newline/>
<separator colspan="4" string=""/>
<button name="action_cancel" string="_Cancel"
icon="gtk-cancel" special="cancel" />
<button name="action_make_meeting" type="object"
string="_Schedule" icon="gtk-go-forward" />
<header>
<button name="action_cancel" string="_Cancel"
icon="gtk-cancel" special="cancel" />
<button name="action_make_meeting" type="object"
string="_Schedule" icon="gtk-go-forward" />
</header>
<label string="Are you sure to schedule a Meeting for this Phonecall?"/>
</form>
</field>
</record>
<!-- Phonecall to meeting action -->
<!-- Phonecall to meeting action -->
<record model="ir.actions.act_window" id="phonecall2meeting_act">
<field name="name">Convert To Meeting</field>
@ -34,4 +34,4 @@
</record>
</data>
</openerp>
</openerp>

View File

@ -9,17 +9,16 @@
<field name="model">crm.phonecall2opportunity</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Convert To Opportunity ">
<field name="name"/>
<field name="partner_id" />
<newline/>
<field name="planned_revenue"/>
<field name="probability"/>
<separator string=" " colspan="4"/>
<group colspan="4" col="3" >
<label string=" " />
<form string="Convert To Opportunity " version="7.0">
<header>
<button name="action_cancel" string="_Cancel" icon="gtk-cancel" special="cancel" />
<button name="make_opportunity" type="object" string="_Convert" icon="gtk-convert" />
<header>
<group col="4">
<field name="name"/>
<field name="partner_id" />
<field name="planned_revenue"/>
<field name="probability"/>
</group>
</form>
</field>
@ -37,4 +36,4 @@
</record>
</data>
</openerp>
</openerp>