~openerp-commiter/openobject-addons/trunk-extra-addons

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?xml version="1.0"?>
<openerp>
<data>
	
	<!--
    =======================================================
    Campaign Inherited View
    =======================================================
    -->

	<record model="ir.ui.view" id="view_mail_service_campaign_form_inherit">
        <field name="name">dm.campaign.form.inherit.service</field>
        <field name="model">dm.campaign</field>
        <field name="type">form</field>
		<field name="inherit_id" ref="dm.view_campaign_form"/>
        <field name="arch" type="xml">
			<field name="mail_service_ids" position="after">
				<group colspan="4">
					<separator string="After-Sale Mail Service" colspan="4"/>
					<field name="as_mail_service_id" widget="selection" nolabel="1"/>
				</group>
			</field>
		</field>
	</record>

    <!--
    =======================================================
    AFTER-SALE VIEWS
    =======================================================
    -->
    
    <record model="ir.ui.view" id="view_after_sale_action_form1">
        <field name="name">dm.after.sale.action.form1</field>
        <field name="model">dm.after.sale.action</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="After-Sale Action">
                <group attrs="{'invisible':[('state','in',('done','reset'))]}" colspan="4">
                    <field name="segment_id" colspan="4" context="{'address_id': context.get('address_id',False)}" required="1" on_change="onchange_mail_service(segment_id)"/>
                    <field name="action_id" colspan="4" required="1"/>
                    <field name="mail_service_id" colspan="4" domain="[('media_id.name','=','Email')]" required="1"/>
                    <separator string="Report Content" colspan="4" />
                    <field name="subject" colspan="4"/>
                    <field name="as_report" widget="text_html" nolabel="1" colspan="4"/>
                    <field name="state" invisible="1" />
                </group>
                <group attrs="{'invisible':[('state','in',('draft','set','set_content'))],'readonly':[('state','==','done')]}" colspan="4">
                    <field name ='display_info'/>
                </group>
                <group colspan="4">
                <button string="Cancel" special="cancel" attrs="{'invisible':[('state','==','done')]}" />
                <button name="send_document" string="Send Document" icon='gtk-ok' type="object" attrs="{'invisible':[('state','!=','set')]}" />
                <button string="Ok" icon='gtk-ok' special="cancel" attrs="{'invisible':[('state','!=','done')]}"/>
                <button name="set_content" string="Set Content" icon='gtk-ok' type="object" attrs="{'invisible':[('state','in',('done','set','reset'))]}" />
                <button name="reset" string="Try Again!!" icon='gtk-ok' type="object" attrs="{'invisible':[('state','!=','reset')]}" />
                </group>
            </form>
        </field>
    </record>

	<record model="ir.ui.view" id="view_after_sale_action_form2">
        <field name="name">dm.after.sale.action.form2</field>
        <field name="model">dm.after.sale.action</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="After-Sale Action">
                <group attrs="{'invisible':[('state','in',('done','reset'))]}" colspan="4">
                    <field name="segment_id" colspan="4" context="{'sale_order_id': context.get('sale_order_id',False)}" required="1" on_change="onchange_mail_service(segment_id)"/>
                    <field name="action_id" colspan="4" required="1"/>
					<field name="mail_service_id" colspan="4" domain="[('media_id.name','=','Email')]" required="1"/>
                    <separator string="Report Content" colspan="4" />
                    <field name="subject" colspan="4"/>
                    <field name="as_report" widget="text_html" nolabel="1" colspan="4"/>
                    <field name="state" invisible="1" />
                </group>
                <group attrs="{'invisible':[('state','in',('draft','set','set_content'))],'readonly':[('state','==','done')]}" colspan="4">
                    <field name ='display_info'/>
                </group>
                <group colspan="4">
                <button string="Cancel" special="cancel" attrs="{'invisible':[('state','==','done')]}" />
                <button name="send_document" string="Send Document" icon='gtk-ok' type="object" attrs="{'invisible':[('state','!=','set')]}" />
                <button string="Ok" icon='gtk-ok' special="cancel" attrs="{'invisible':[('state','!=','done')]}"/>
                <button name="set_content" string="Set Content" icon='gtk-ok' type="object" attrs="{'invisible':[('state','in',('done','set','reset'))]}" />
                <button name="reset" string="Try Again!!" icon='gtk-ok' type="object" attrs="{'invisible':[('state','!=','reset')]}" />
                </group>
            </form>
        </field>
    </record>
	
<!--    <record id="dm_after_sale_action_form" model="ir.actions.act_window">-->
<!--        <field name="name">After-Sale Action</field>-->
<!--        <field name="type">ir.actions.act_window</field>-->
<!--        <field name="res_model">dm.after.sale.action</field>-->
<!--        <field name="view_type">form</field>-->
<!--        <field name="view_mode">form</field>-->
<!--        <field name="target">new</field>-->
<!--        <field name="context">{'address_id':active_id}</field>-->
<!--    </record> -->
 
    <act_window context="{'address_id': active_id}"
    			id="address_after_sale_action"
    			name="After-Sale Action"
    			res_model="dm.after.sale.action"
    			src_model="res.partner.address"
    			target="new"
    			view_mode="form"
    />
	<record model="ir.actions.act_window.view" id="action_add_ass">
        <field name="sequence" eval="1"/>
        <field name="view_mode">form</field>
        <field name="view_id" ref="view_after_sale_action_form1"/>
        <field name="act_window_id" ref="address_after_sale_action"/>
    </record>     
    <act_window context="{'sale_order_id': active_id}"
    			id="address_after_sale_action2"
    			name="After-Sale Action"
    			res_model="dm.after.sale.action"
    			src_model="sale.order"
    			target="new"
    			view_mode="form"
    />
	<record model="ir.actions.act_window.view" id="action_so_ass">
        <field name="sequence" eval="1"/>
        <field name="view_mode">form</field>
        <field name="view_id" ref="view_after_sale_action_form2"/>
        <field name="act_window_id" ref="address_after_sale_action2"/>
    </record>
</data>
</openerp>