Browse Source

Dirty hack to make the wizard views displayed OK in Windows Gtk Client.

5.0
Alexis de Lattre 11 years ago
parent
commit
ba3f4dca03
  1. 59
      asterisk_click2dial/wizard/open_calling_partner_view.xml
  2. 13
      asterisk_click2dial_crm/wizard/create_crm_phonecall_view.xml
  3. 2
      asterisk_click2dial_crm/wizard/open_calling_partner_view.xml

59
asterisk_click2dial/wizard/open_calling_partner_view.xml

@ -15,37 +15,42 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Open calling partner">
<field name="calling_number" colspan="4"/>
<group attrs="{'invisible':[('partner_id','=',False)]}" colspan="4">
<field name="partner_address_id" />
<field name="partner_id" />
</group>
<newline />
<group colspan="4" attrs="{'invisible':[('partner_id','=',False)]}">
<button name="open_partner" icon="gtk-go-forward" string="Partner form" type="object" />
<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" name="cancel1"/>
<group col="5" name="fix-width-gtk-client-v50-windows">
<field name="calling_number" colspan="4" />
<group attrs="{'invisible':[('partner_id','=',False)]}" colspan="4">
<field name="partner_address_id" />
<field name="partner_id" />
</group>
<newline />
<!-- TODO : try to reimplement the scenario where the partner_address exist but not the partner ; cf the 6.1 branch -->
</group>
<group colspan="4" attrs="{'invisible':[('partner_id','=',False)]}">
<button name="open_partner" icon="gtk-go-forward" string="Partner form" type="object" />
<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" name="cancel1"/>
<newline />
<label string=" " /> <!-- Hack to have the full view of the Cancel button on GTK Client v50 for Windows -->
<!-- TODO : try to reimplement the scenario where the partner_address exist but not the partner ; cf the 6.1 branch -->
</group>
<group attrs="{'invisible':[('partner_address_id','!=',False)]}" colspan="4" col="8">
<label string="No partner contact found in OpenERP with this number" colspan="8" />
<separator string="Create a new contact" colspan="8" />
<button name="create_partner_address_phone" icon="gtk-new" string="with calling number as phone" type="object" colspan="4"/>
<button name="create_partner_address_mobile" icon="gtk-new" string="with calling number as mobile" type="object" colspan="4"/>
<newline />
<group attrs="{'invisible':[('partner_address_id','!=',False)]}" colspan="4" col="8">
<label string="No partner contact found in OpenERP with this number" colspan="8" />
<separator string="Create a new contact" colspan="8" />
<button name="create_partner_address_phone" icon="gtk-new" string="with calling number as phone" type="object" colspan="4"/>
<button name="create_partner_address_mobile" icon="gtk-new" string="with calling number as mobile" type="object" colspan="4"/>
<newline />
<separator string="Update an existing contact" colspan="8" />
<field name="to_update_partner_address_id" colspan="8" on_change="onchange_to_update_partner_address(to_update_partner_address_id)"/>
<field name="current_phone" colspan="6"/>
<button name="update_partner_address_phone" icon="gtk-convert" string="Update phone" type="object" colspan="2"/>
<field name="current_mobile" colspan="6"/>
<button name="update_partner_address_mobile" icon="gtk-convert" string="Update mobile" type="object" colspan="2"/>
<newline />
<separator string="Update an existing contact" colspan="8" />
<field name="to_update_partner_address_id" colspan="8" on_change="onchange_to_update_partner_address(to_update_partner_address_id)"/>
<field name="current_phone" colspan="6"/>
<button name="update_partner_address_phone" icon="gtk-convert" string="Update phone" type="object" colspan="2"/>
<field name="current_mobile" colspan="6"/>
<button name="update_partner_address_mobile" icon="gtk-convert" string="Update mobile" type="object" colspan="2"/>
<newline />
<button special="cancel" icon="gtk-cancel" string="Cancel" colspan="8" />
<button special="cancel" icon="gtk-cancel" string="Cancel" colspan="8" />
<newline />
<label string=" " /> <!-- Hack to have the full view of the Cancel button on GTK Client v50 for Windows -->
</group>
</group>
<!-- I repeat the cancel button for layout reasons -->
</form>

13
asterisk_click2dial_crm/wizard/create_crm_phonecall_view.xml

@ -15,11 +15,14 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="CRM phone call">
<field name="name" invisible="True"/>
<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" />
<group name="fix-width-gtk-v50-windows" col="2">
<field name="name" invisible="True" />
<newline />
<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"/>
</group>
</form>
</field>
</record>

2
asterisk_click2dial_crm/wizard/open_calling_partner_view.xml

@ -19,7 +19,7 @@
<button name="open_invoices" position="after">
<button name="create_incoming_phonecall" icon="gtk-new" string="Create call in CRM" type="object" />
<newline/>
<button special="cancel" icon="gtk-cancel" string="Cancel" name="cancel2" colspan="4"/>
<button special="cancel" icon="gtk-cancel" string="Cancel" colspan="4"/>
</button>
<button name="cancel1" position="replace">
</button>

Loading…
Cancel
Save