-
Notifications
You must be signed in to change notification settings - Fork 19
/
ebay_message_view.xml
189 lines (181 loc) · 10.7 KB
/
ebay_message_view.xml
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<menuitem id="menu_ebay_message_management" name="Messages" parent="menu_ebay_top" sequence="40"/>
<record id="view_ebay_message_form" model="ir.ui.view">
<field name="name">ebay message tree form</field>
<field name="model">ebay.message</field>
<field name="arch" type="xml">
<form string="eBay Message" create="false" version="7.0">
<header>
<button class="oe_highlight" name="action_reply" states="Unanswered,Answered" string="Reply" type="object" groups="ebay.group_ebay_manager"/>
<button class="oe_highlight" name="action_send" states="Draft" string="Send" type="object" groups="ebay.group_ebay_manager"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<field name="type" invisible="1"/>
<h2>
<field name="name" placeholder="Subject" attrs="{'readonly': ['|', ('type','=','in'), ('state', '=','Sent')]}"/>
</h2>
<group>
<group>
<field name="recipient_or_sender_id"/>
<field name="partner_id" domain="[('customer','=',True)]" context="{'search_default_customer':1, 'show_address': 1}" options='{"always_reload": True}'/>
<field name="order_id"/>
<field name="last_modified_date"/>
<field name="message_type" attrs="{'invisible': [('type','!=','in')]}"/>
<field name="question_type" attrs="{'readonly': ['|', ('type','=','in'), ('state', '=','Sent')]}"/>
</group>
<group>
<field name="ebay_user_id" class="oe_inline"/>
<field name="item_id"/>
<field name="title"/>
<field name="current_price"/>
<field name="start_time" invisible="1"/>
<field name="end_time"/>
</group>
</group>
<group>
<field name="body" attrs="{'readonly': ['|', ('type','=','in'), ('state', '=','Sent')]}"/>
</group>
<div class="oe_edit_only">
<label for="media_ids"/>
</div>
<field name="media_ids" attrs="{'readonly': [('type','=','in')]}" mode="kanban">
<kanban>
<field name="name"/>
<field name="has_image"/>
<field name="picture_format"/>
<field name="use_by_date"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_vignette">
<a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">Delete</a>
<a type="open">
<t t-if="record.has_image.raw_value === true and (!record.image or record.image.raw_value === false)">
<img t-att-src="kanban_image('ebay.message.media', 'image', record.id.value, {'preview_image': 'image_small'})" class="oe_avatar oe_kanban_image"/>
</t>
<t t-if="record.image and record.image.raw_value !== false">
<img t-att-src="'data:image/png;base64,'+record.image.raw_value" class="oe_avatar oe_kanban_image"/>
</t>
</a>
<div class="oe_kanban_details">
<h4 class="oe_partner_heading"><a type="open"><field name="name"/></a></h4>
</div>
<ul>
<li t-if="record.picture_format.raw_value"><field name="picture_format"/></li>
<li t-if="record.use_by_date.raw_value"><field name="use_by_date"/></li>
</ul>
</div>
</t>
</templates>
</kanban>
<form string="Message Media" version="7.0">
<sheet>
<group>
<field name="full_url" widget="url"/>
<field name="name" default_focus="1" />
</group>
<field name="image" widget='image' class="oe_avatar oe_left" options='{"preview_image": "image", "size": [500, 500]}'/>
</sheet>
</form>
</field>
</sheet>
<div class="oe_chatter">
<field name="chat"/>
</div>
</form>
</field>
</record>
<record id="view_ebay_message_tree" model="ir.ui.view">
<field name="name">ebay message tree</field>
<field name="model">ebay.message</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="ebay message tree" create="false" colors="blue:state in ('Unanswered', 'Draft')">
<field name="recipient_or_sender_id"/>
<field name="name"/>
<field name="last_modified_date"/>
<field name="state" invisible="1"/>
<field name="type" invisible="1"/>
</tree>
</field>
</record>
<record id="view_ebay_message_filter" model="ir.ui.view">
<field name="name">ebay message select</field>
<field name="model">ebay.message</field>
<field name="arch" type="xml">
<search string="Search Message">
<filter icon="terp-document-new" string="Unanswered" name="draft" domain="[('state','in',('Unanswered',))]"/>
<filter icon="terp-check" string="Answered" domain="[('state','in',('Answered',))]"/>
<separator/>
<field name="partner_id" filter_domain="[('partner_id', 'child_of', self)]"/>
<field name="recipient_or_sender_id"/>
<field name="state"/>
<group expand="0" string="Group By...">
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
</group>
</search>
</field>
</record>
<record id="action_ebay_message_inbox_tree" model="ir.actions.act_window">
<field name="name">Inbox</field>
<field name="res_model">ebay.message</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('type','=','in')]</field>
<field name="context">{'default_type':'in'}</field>
</record>
<menuitem id="menu_ebay_message_inbox" action="action_ebay_message_inbox_tree" sequence="20" parent="menu_ebay_message_management"/>
<record id="action_ebay_message_sent_tree" model="ir.actions.act_window">
<field name="name">Sent</field>
<field name="res_model">ebay.message</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('type','=','out')]</field>
<field name="context">{'default_type':'out'}</field>
</record>
<menuitem id="menu_ebay_message_sent" action="action_ebay_message_sent_tree" sequence="30" parent="menu_ebay_message_management"/>
<!-- wizard view -->
<record model="ir.ui.view" id="ebay_get_message_view">
<field name="name">Get eBay Message</field>
<field name="model">ebay.message.synchronize</field>
<field name="arch" type="xml">
<form string="ebay get message" version="7.0">
<separator string="Send / Retrieve messages(feedbacks) for the authenticated seller"/>
<field name="state" invisible="1"/>
<p class="oe_grey" states="option">
Specifies the number of days (24-hour periods) in the past to search for messages(feedbacks).
</p>
<group states="exception">
<field name="exception"/>
</group>
<group states="option">
<field name="after_service_message"/>
<field name="number_of_days"/>
<field name="message_status" attrs="{'invisible': [('after_service_message','=',True)]}"/>
<field name="ignoe_order_before" attrs="{'invisible': [('after_service_message','=',False)]}"/>
<field name="sandbox_user_included"/>
</group>
<footer states="option">
<button name="action_sync" string="Sync" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
<footer states="exception">
<button special="cancel" string="Close" type="object"/>
</footer>
</form>
</field>
</record>
<record id="action_ebay_get_message_view" model="ir.actions.act_window">
<field name="name">Send / Recieve</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">ebay.message.synchronize</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem id="menu_ebay_message_synchronize" action="action_ebay_get_message_view" sequence="40" parent="menu_ebay_message_management" groups="ebay.group_ebay_manager"/>
</data>
</openerp>