Browse Source

Update views to take advantage of the new styles provided by OpenERP 7.0.

pull/7/head
Alexis de Lattre 12 years ago
parent
commit
c6a7271def
  1. 28
      asterisk_click2dial/wizard/open_calling_partner_view.xml
  2. 11
      asterisk_click2dial_crm/wizard/create_crm_phonecall_view.xml
  3. 10
      asterisk_click2dial_crm/wizard/open_calling_partner_view.xml

28
asterisk_click2dial/wizard/open_calling_partner_view.xml

@ -14,20 +14,19 @@
<field name="model">wizard.open.calling.partner</field> <field name="model">wizard.open.calling.partner</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Open calling partner">
<field name="calling_number" colspan="4"/>
<form string="Open calling partner" version="7.0">
<group name="display_result">
<field name="calling_number"/>
<field name="partner_id" attrs="{'invisible':[('partner_id','=',False)]}"/> <field name="partner_id" attrs="{'invisible':[('partner_id','=',False)]}"/>
<field name="parent_partner_id" attrs="{'invisible':[('partner_id','=',False)]}" /> <!-- I want it visible when partner_id != False and partner_id = False, so that the user can see that this partner doesn't have a parent partner --> <field name="parent_partner_id" attrs="{'invisible':[('partner_id','=',False)]}" /> <!-- I want it visible when partner_id != False and partner_id = False, so that the user can see that this partner doesn't have a parent partner -->
<newline />
<group colspan="4" col="5" attrs="{'invisible':[('partner_id','=',False)]}">
<button name="open_partner" icon="gtk-go-forward" string="Partner form" type="object" />
<button name="open_parent_partner" icon="gtk-go-forward" string="Parent Partner form" type="object" attrs="{'invisible':[('parent_partner_id','=',False)]}"/>
<button name="open_sale_orders" icon="gtk-go-forward" string="Related sale orders" type="object" />
<button name="open_invoices" icon="gtk-go-forward" string="Related invoices" type="object" />
<button special="cancel" icon="gtk-cancel" string="Cancel" />
</group> </group>
<group attrs="{'invisible':[('partner_id','!=',False)]}" colspan="4" col="8">
<group attrs="{'invisible':[('partner_id','=',False)]}" name="partner_found">
<button name="open_partner" icon="gtk-go-forward" string="Open Partner form" type="object" />
<button name="open_parent_partner" icon="gtk-go-forward" string="Open Parent Partner form" type="object" attrs="{'invisible':[('parent_partner_id','=',False)]}"/>
<button name="open_sale_orders" icon="gtk-go-forward" string="Open Related Sale Orders" type="object" />
<button name="open_invoices" icon="gtk-go-forward" string="Open Related Invoices" type="object" />
</group>
<group attrs="{'invisible':[('partner_id','!=',False)]}" name="no_partner_found" colspan="4" col="8">
<label string="No partner found in OpenERP with this number" colspan="8" /> <label string="No partner found in OpenERP with this number" colspan="8" />
<separator string="Create a new partner" colspan="8" /> <separator string="Create a new partner" colspan="8" />
<button name="create_partner_phone" icon="gtk-new" string="with calling number as phone" type="object" colspan="4"/> <button name="create_partner_phone" icon="gtk-new" string="with calling number as phone" type="object" colspan="4"/>
@ -40,11 +39,10 @@
<button name="update_partner_phone" icon="gtk-convert" string="Update phone" type="object" colspan="2"/> <button name="update_partner_phone" icon="gtk-convert" string="Update phone" type="object" colspan="2"/>
<field name="current_mobile" colspan="6"/> <field name="current_mobile" colspan="6"/>
<button name="update_partner_mobile" icon="gtk-convert" string="Update mobile" type="object" colspan="2"/> <button name="update_partner_mobile" icon="gtk-convert" string="Update mobile" type="object" colspan="2"/>
<newline />
<button special="cancel" icon="gtk-cancel" string="Cancel" colspan="8" />
</group> </group>
<!-- I repeat the cancel button for layout reasons -->
<footer>
<button special="cancel" string="Cancel" class="oe_link"/>
</footer>
</form> </form>
</field> </field>
</record> </record>

11
asterisk_click2dial_crm/wizard/create_crm_phonecall_view.xml

@ -14,11 +14,12 @@
<field name="model">wizard.create.crm.phonecall</field> <field name="model">wizard.create.crm.phonecall</field>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="CRM phone call">
<label string="Create a phone call in the CRM ?" colspan="2"/>
<newline />
<button name="button_create_outgoing_phonecall" icon="gtk-new" string="Yes" type="object"/>
<button special="cancel" icon="gtk-cancel" string="No" />
<form string="CRM phone call" version="7.0">
<label string="Create a phone call in the CRM ?"/>
<footer>
<button name="button_create_outgoing_phonecall" string="Yes" type="object" class="oe_highlight"/>
<button special="cancel" string="No" class="oe_link"/>
</footer>
</form> </form>
</field> </field>
</record> </record>

10
asterisk_click2dial_crm/wizard/open_calling_partner_view.xml

@ -15,13 +15,9 @@
<field name="inherit_id" ref="asterisk_click2dial.view_open_calling_partner"/> <field name="inherit_id" ref="asterisk_click2dial.view_open_calling_partner"/>
<field name="type">form</field> <field name="type">form</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<button name="open_invoices" position="after">
<button name="create_incoming_phonecall" icon="gtk-new" string="Create call in CRM" type="object" />
</button>
<!-- We enlarge the small original 'Cancel' button -->
<xpath expr="/form/group/button[@name='open_partner']/../button[@special='cancel']" position="attributes">
<attribute name="colspan">4</attribute>
</xpath>
<group name="partner_found" position="inside">
<button name="create_incoming_phonecall" string="Create Call in CRM" type="object" icon="gtk-new" />
</group>
</field> </field>
</record> </record>

Loading…
Cancel
Save