res_partner_views.xml 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data>
  4. <!-- Partner Titles -->
  5. <record id="view_partner_title_tree" model="ir.ui.view">
  6. <field name="name">res.partner.title.tree</field>
  7. <field name="model">res.partner.title</field>
  8. <field name="arch" type="xml">
  9. <tree string="Partner Titles" editable="bottom">
  10. <field name="name"/>
  11. <field name="shortcut"/>
  12. </tree>
  13. </field>
  14. </record>
  15. <record id="view_partner_title_form" model="ir.ui.view">
  16. <field name="name">res.partner.title.form</field>
  17. <field name="model">res.partner.title</field>
  18. <field name="arch" type="xml">
  19. <form string="Partner Titles">
  20. <sheet>
  21. <group col="4">
  22. <field name="name"/>
  23. <field name="shortcut"/>
  24. </group>
  25. </sheet>
  26. </form>
  27. </field>
  28. </record>
  29. <record id="action_partner_title_contact" model="ir.actions.act_window">
  30. <field name="name">Contact Titles</field>
  31. <field name="type">ir.actions.act_window</field>
  32. <field name="res_model">res.partner.title</field>
  33. <field name="domain">[]</field>
  34. <field name="context">{}</field>
  35. <field name="help" type="html">
  36. <p class="o_view_nocontent_smiling_face">
  37. Create a Title
  38. </p><p>
  39. Manage Contact Titles as well as their abbreviations (e.g. "Mr.", "Mrs.", etc).
  40. </p>
  41. </field>
  42. </record>
  43. <!-- PARTNER TREE VIEW + MUTI_EDIT: VISIBLE FIELDS WITH ONCHANGE ON BASE/PARTNER
  44. VIEW WON'T BE EDITABLE ON "MULTI_EDIT" MODE:
  45. - parent_id
  46. - country_id
  47. - state_id
  48. - company_type
  49. - company_id
  50. -->
  51. <!-- Partner -->
  52. <record id="view_partner_tree" model="ir.ui.view">
  53. <field name="name">res.partner.tree</field>
  54. <field name="model">res.partner</field>
  55. <field eval="8" name="priority"/>
  56. <field name="arch" type="xml">
  57. <tree string="Contacts" sample="1" multi_edit="1">
  58. <field name="display_name" string="Name"/>
  59. <field name="function" invisible="1"/>
  60. <field name="phone" class="o_force_ltr" optional="show"/>
  61. <field name="email" optional="show"/>
  62. <field name="user_id" optional="show" widget="many2one_avatar_user" domain="[('share', '=', False)]"/>
  63. <field name="city" optional="show"/>
  64. <field name="state_id" optional="hide" readonly="1"/>
  65. <field name="country_id" optional="show" readonly="1"/>
  66. <field name="vat" optional="hide" readonly="1"/>
  67. <field name="category_id" optional="hide" widget="many2many_tags" options="{'color_field': 'color'}"/>
  68. <field name="company_id" groups="base.group_multi_company" readonly="1"/>
  69. <field name="is_company" invisible="1"/>
  70. <field name="parent_id" invisible="1" readonly="1"/>
  71. <field name="active" invisible="1"/>
  72. </tree>
  73. </field>
  74. </record>
  75. <record id="view_partner_simple_form" model="ir.ui.view">
  76. <field name="name">res.partner.simplified.form</field>
  77. <field name="model">res.partner</field>
  78. <field name="arch" type="xml">
  79. <form string="Contact">
  80. <field name="is_company" invisible="1"/>
  81. <field name="type" invisible="1"/>
  82. <field name="avatar_128" invisible="1"/>
  83. <field name="user_id" invisible="1"/>
  84. <field name="image_1920" widget='image' class="oe_avatar" options='{"preview_image": "avatar_128"}'/>
  85. <div class="oe_title">
  86. <field name="company_type" options="{'horizontal': true}" widget="radio" groups="base.group_no_one"/>
  87. <h1>
  88. <field id="company" name="name" default_focus="1" placeholder="e.g. Lumber Inc" attrs="{'required' : [('type', '=', 'contact'),('is_company','=', True)], 'invisible': [('is_company','=', False)]}"/>
  89. <field id="individual" name="name" default_focus="1" placeholder="e.g. Brandom Freeman" attrs="{'required' : [('type', '=', 'contact'),('is_company','=', False)], 'invisible': [('is_company','=', True)]}"/>
  90. </h1>
  91. <field name="parent_id"
  92. widget="res_partner_many2one"
  93. placeholder="Company Name..."
  94. domain="[('is_company', '=', True)]" context="{'default_is_company': True, 'show_vat': True, 'default_user_id': user_id}"
  95. attrs="{'invisible': [('is_company','=', True)]}"/>
  96. </div>
  97. <group>
  98. <field name="function" placeholder="e.g. Sales Director" attrs="{'invisible': [('is_company','=', True)]}"/>
  99. <field name="user_ids" invisible="1"/>
  100. <field name="email" widget="email" context="{'gravatar_image': True}" required="context.get('force_email', False)" attrs="{'required': [('user_ids','!=', [])]}"/>
  101. <field name="phone" widget="phone" options="{'enable_sms': false}"/>
  102. <field name="mobile" widget="phone" options="{'enable_sms': false}"/>
  103. </group>
  104. </form>
  105. </field>
  106. </record>
  107. <!-- Open partner address -->
  108. <record id="view_partner_address_form" model="ir.ui.view">
  109. <field name="name">res.partner.form.address</field>
  110. <field name="model">res.partner</field>
  111. <field name="priority" eval="20"/>
  112. <field name="arch" type="xml">
  113. <form string="Partner">
  114. <field name="avatar_128" invisible="1"/>
  115. <field name="image_1920" widget='image' class="oe_avatar" options='{"preview_image": "avatar_128"}' readonly="1"/>
  116. <div class="oe_title">
  117. <h1>
  118. <field name="name" readonly="1"/>
  119. </h1>
  120. </div>
  121. <field name="parent_id" invisible="1"/>
  122. <group>
  123. <group>
  124. <label for="type" attrs="{'invisible': [('parent_id','=', False)]}" groups="base.group_no_one"/>
  125. <div attrs="{'invisible': [('parent_id','=', False)]}" name="div_type" groups="base.group_no_one">
  126. <field name="type" class="oe_inline"/>
  127. </div>
  128. <label for="street" string="Address"/>
  129. <div class="o_address_format">
  130. <field name="street" placeholder="Street..." class="o_address_street"/>
  131. <field name="street2" placeholder="Street 2..." class="o_address_street"/>
  132. <field name="city" placeholder="City" class="o_address_city"/>
  133. <field name="state_id" class="o_address_state" placeholder="State" options="{'no_open': True, 'no_quick_create': True}" context="{'default_country_id': country_id}"/>
  134. <field name="zip" placeholder="ZIP" class="o_address_zip"/>
  135. <field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'/>
  136. </div>
  137. <field name="website" string="Website" widget="url" placeholder="e.g. https://www.odoo.com"/>
  138. </group>
  139. <group>
  140. </group>
  141. </group>
  142. </form>
  143. </field>
  144. </record>
  145. <record id="view_partner_form" model="ir.ui.view">
  146. <field name="name">res.partner.form</field>
  147. <field name="model">res.partner</field>
  148. <field name="priority" eval="1"/>
  149. <field name="arch" type="xml">
  150. <form string="Partners">
  151. <div class="alert alert-warning oe_edit_only" role="alert" attrs="{'invisible': [('same_vat_partner_id', '=', False)]}">
  152. A partner with the same <span><span class="o_vat_label">Tax ID</span></span> already exists (<field name="same_vat_partner_id"/>), are you sure to create a new one?
  153. </div>
  154. <div class="alert alert-warning oe_edit_only" role="alert" attrs="{'invisible': [('same_company_registry_partner_id', '=', False)]}">
  155. A partner with the same <span><span class="o_vat_label">Company Registry</span></span> already exists (<field name="same_company_registry_partner_id"/>), are you sure to create a new one?
  156. </div>
  157. <sheet>
  158. <div class="oe_button_box" name="button_box"/>
  159. <widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
  160. <field name="avatar_128" invisible="1"/>
  161. <field name="image_1920" widget='image' class="oe_avatar" options='{"preview_image": "avatar_128"}'/>
  162. <div class="oe_title mb24">
  163. <field name="is_company" invisible="1"/>
  164. <field name="commercial_partner_id" invisible="1"/>
  165. <field name="active" invisible="1"/>
  166. <field name="company_id" invisible="1"/>
  167. <field name="country_code" invisible="1"/>
  168. <field name="company_type" widget="radio" options="{'horizontal': true}"/>
  169. <h1>
  170. <field id="company" class="text-break" name="name" default_focus="1" placeholder="e.g. Lumber Inc" attrs="{'required' : [('type', '=', 'contact')], 'invisible': [('is_company','=', False)]}"/>
  171. <field id="individual" class="text-break" name="name" default_focus="1" placeholder="e.g. Brandom Freeman" attrs="{'required' : [('type', '=', 'contact')], 'invisible': [('is_company','=', True)]}"/>
  172. </h1>
  173. <div class="o_row">
  174. <field name="parent_id"
  175. widget="res_partner_many2one"
  176. placeholder="Company Name..."
  177. domain="[('is_company', '=', True)]" context="{'default_is_company': True, 'show_vat': True, 'default_user_id': user_id}"
  178. attrs="{'invisible': ['|', '&amp;', ('is_company','=', True),('parent_id', '=', False),('company_name', '!=', False),('company_name', '!=', '')]}"/>
  179. <field name="company_name" attrs="{'invisible': ['|', '|', ('company_name', '=', False), ('company_name', '=', ''), ('is_company', '=', True)]}"/>
  180. <button name="create_company" icon="fa-plus-square" string="Create company"
  181. type="object" class="oe_edit_only btn-link"
  182. attrs="{'invisible': ['|', '|', ('is_company','=', True), ('company_name', '=', ''), ('company_name', '=', False)]}"/>
  183. </div>
  184. </div>
  185. <group>
  186. <group>
  187. <span class="o_form_label o_td_label" name="address_name">
  188. <field name="type" attrs="{'invisible': [('is_company','=', True)], 'required': [('is_company','!=', True)], 'readonly': [('user_ids', '!=', [])]}" class="fw-bold"/>
  189. <b attrs="{'invisible': [('is_company', '=', False)]}">Address</b>
  190. </span>
  191. <div class="o_address_format">
  192. <field name="street" placeholder="Street..." class="o_address_street"
  193. attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
  194. <field name="street2" placeholder="Street 2..." class="o_address_street"
  195. attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
  196. <field name="city" placeholder="City" class="o_address_city"
  197. attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
  198. <field name="state_id" class="o_address_state" placeholder="State" options="{'no_open': True, 'no_quick_create': True}"
  199. attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" context="{'country_id': country_id, 'default_country_id': country_id, 'zip': zip}"/>
  200. <field name="zip" placeholder="ZIP" class="o_address_zip"
  201. attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
  202. <div name="partner_address_country" class="d-flex justify-content-between">
  203. <field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'
  204. attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
  205. </div>
  206. </div>
  207. <field name="vat" placeholder="e.g. BE0477472701" attrs="{'readonly': [('parent_id','!=',False)]}"/>
  208. </group>
  209. <group>
  210. <field name="function" placeholder="e.g. Sales Director"
  211. attrs="{'invisible': [('is_company','=', True)]}"/>
  212. <field name="phone" widget="phone"/>
  213. <field name="mobile" widget="phone"/>
  214. <field name="user_ids" invisible="1"/>
  215. <field name="email" widget="email" context="{'gravatar_image': True}" attrs="{'required': [('user_ids','!=', [])]}"/>
  216. <field name="website" string="Website" widget="url" placeholder="e.g. https://www.odoo.com"/>
  217. <field name="title" options='{"no_open": True}' placeholder="e.g. Mister"
  218. attrs="{'invisible': [('is_company', '=', True)]}"/>
  219. <field name="active_lang_count" invisible="1"/>
  220. <field name="lang" attrs="{'invisible': [('active_lang_count', '&lt;=', 1)]}"/>
  221. <field name="category_id" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}"
  222. placeholder='e.g. "B2B", "VIP", "Consulting", ...'/>
  223. </group>
  224. </group>
  225. <notebook colspan="4">
  226. <page string="Contacts &amp; Addresses" name="contact_addresses" autofocus="autofocus">
  227. <field name="child_ids" mode="kanban" context="{'default_parent_id': active_id, 'default_street': street, 'default_street2': street2, 'default_city': city, 'default_state_id': state_id, 'default_zip': zip, 'default_country_id': country_id, 'default_lang': lang, 'default_user_id': user_id, 'default_type': 'other'}">
  228. <kanban>
  229. <field name="id"/>
  230. <field name="color"/>
  231. <field name="name"/>
  232. <field name="title"/>
  233. <field name="type"/>
  234. <field name="email"/>
  235. <field name="parent_id"/>
  236. <field name="is_company"/>
  237. <field name="function"/>
  238. <field name="phone"/>
  239. <field name="street"/>
  240. <field name="street2"/>
  241. <field name="zip"/>
  242. <field name="city"/>
  243. <field name="country_id"/>
  244. <field name="mobile"/>
  245. <field name="state_id"/>
  246. <field name="image_128"/>
  247. <field name="avatar_128"/>
  248. <field name="lang"/>
  249. <!-- fields in form x2many view to diminish requests -->
  250. <field name="comment"/>
  251. <field name="display_name"/>
  252. <templates>
  253. <t t-name="kanban-box">
  254. <t t-set="color" t-value="kanban_color(record.color.raw_value)"/>
  255. <div t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '') + ' oe_kanban_global_click'">
  256. <div class="o_kanban_image">
  257. <img alt="Contact image" t-att-src="kanban_image('res.partner', 'avatar_128', record.id.raw_value)"/>
  258. </div>
  259. <div class="oe_kanban_details">
  260. <field name="name"/>
  261. <div t-if="record.function.raw_value"><field name="function"/></div>
  262. <div t-if="record.email.raw_value"><field name="email" widget="email"/></div>
  263. <div t-if="record.type.raw_value != 'contact'">
  264. <div>
  265. <field name="zip"/><t t-if="record.city"> </t>
  266. <field name="city"/>
  267. </div>
  268. <field t-if="record.state_id.raw_value" name="state_id"/><t t-if="record.country_id"> </t>
  269. <field name="country_id"/>
  270. </div>
  271. <div t-if="record.phone.raw_value">Phone: <t t-esc="record.phone.value"/></div>
  272. <div t-if="record.mobile.raw_value">Mobile: <t t-esc="record.mobile.value"/></div>
  273. </div>
  274. </div>
  275. </t>
  276. </templates>
  277. </kanban>
  278. <form string="Contact / Address">
  279. <sheet>
  280. <field name="type" required="1" widget="radio" options="{'horizontal': true}"/>
  281. <field name="parent_id" invisible="1"/>
  282. <div class="text-muted oe_edit_only">
  283. <p class="mb-0" attrs="{'invisible': [('type', '!=', 'contact')]}">
  284. <span>Use this to organize the contact details of employees of a given company (e.g. CEO, CFO, ...).</span>
  285. </p>
  286. <p class="mb-0" attrs="{'invisible': [('type', '!=', 'invoice')]}">
  287. <span>Preferred address for all invoices. Selected by default when you invoice an order that belongs to this company.</span>
  288. </p>
  289. <p class="mb-0" attrs="{'invisible': [('type', '!=', 'delivery')]}">
  290. <span>Preferred address for all deliveries. Selected by default when you deliver an order that belongs to this company.</span>
  291. </p>
  292. <p class="mb-0" attrs="{'invisible': [('type', '!=', 'private')]}">
  293. <span>Private addresses are only visible by authorized users and contain sensitive data (employee home addresses, ...).</span>
  294. </p>
  295. <p class="mb-0" attrs="{'invisible': [('type', '!=', 'other')]}">
  296. <span>Other address for the company (e.g. subsidiary, ...)</span>
  297. </p>
  298. </div>
  299. <hr/>
  300. <group>
  301. <group>
  302. <field name="name" string="Contact Name" attrs="{'required' : [('type', '=', 'contact')]}"/>
  303. <field name="title" options="{'no_open': True}" placeholder="e.g. Mr."
  304. attrs="{'invisible': [('type','!=', 'contact')]}"/>
  305. <field name="function" placeholder="e.g. Sales Director"
  306. attrs="{'invisible': [('type','!=', 'contact')]}"/>
  307. <label for="street" string="Address" attrs="{'invisible': [('type','=', 'contact')]}"/>
  308. <div attrs="{'invisible': [('type','=', 'contact')]}">
  309. <div class="o_address_format" name="div_address">
  310. <field name="street" placeholder="Street..." class="o_address_street"/>
  311. <field name="street2" placeholder="Street 2..." class="o_address_street"/>
  312. <field name="city" placeholder="City" class="o_address_city"/>
  313. <field name="state_id" class="o_address_state" placeholder="State" options="{'no_open': True, 'no_quick_create': True}" context="{'country_id': country_id, 'default_country_id': country_id, 'zip': zip}"/>
  314. <field name="zip" placeholder="ZIP" class="o_address_zip"/>
  315. <field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'/>
  316. </div>
  317. </div>
  318. </group>
  319. <group>
  320. <field name="email" widget="email"/>
  321. <field name="phone" widget="phone"/>
  322. <field name="mobile" widget="phone"/>
  323. <field name="company_id" invisible="1"/>
  324. </group>
  325. </group>
  326. <group>
  327. <field name="comment" placeholder="Internal notes..." nolabel="1" colspan="2"/>
  328. </group>
  329. <field name="lang" invisible="True"/>
  330. <field name="user_id" invisible="True"/>
  331. </sheet>
  332. </form>
  333. </field>
  334. </page>
  335. <page name='sales_purchases' string="Sales &amp; Purchase">
  336. <group name="container_row_2">
  337. <group string="Sales" name="sale" priority="1">
  338. <field name="user_id" widget="many2one_avatar_user" domain="[('share', '=', False)]"/>
  339. </group>
  340. <group string="Purchase" name="purchase" priority="2">
  341. </group>
  342. <group name="misc" string="Misc">
  343. <field name="company_registry" attrs="{'invisible': [('parent_id','!=',False)]}"/>
  344. <field name="ref" string="Reference"/>
  345. <field name="company_id" groups="base.group_multi_company" options="{'no_create': True}" attrs="{'readonly': [('parent_id', '!=', False)]}" force_save="1"/>
  346. <field name="industry_id" attrs="{'invisible': [('is_company', '=', False)]}" options="{'no_create': True}"/>
  347. </group>
  348. </group>
  349. </page>
  350. <page name='internal_notes' string="Internal Notes">
  351. <field name="comment" placeholder="Internal notes..."/>
  352. </page>
  353. </notebook>
  354. </sheet>
  355. </form>
  356. </field>
  357. </record>
  358. <!-- Special restricted view for private address, with limited "named" info that
  359. can be traced back to the employee -->
  360. <record id="res_partner_view_form_private" model="ir.ui.view">
  361. <field name="name">res.partner.view.form.private</field>
  362. <field name="model">res.partner</field>
  363. <field name="priority" eval="300"/>
  364. <field name="arch" type="xml">
  365. <form string="Private Address Form">
  366. <sheet>
  367. <field name="type" invisible="1"/>
  368. <field name="parent_id" invisible="1"/>
  369. <label for="name" class="oe_edit_only"/>
  370. <field name="name" required="0"/>
  371. <group>
  372. <group>
  373. <label for="street" string="Address"/>
  374. <div>
  375. <div class="o_address_format" name="div_address">
  376. <field name="street" placeholder="Street..." class="o_address_street"/>
  377. <field name="street2" placeholder="Street 2..." class="o_address_street"/>
  378. <field name="city" placeholder="City" class="o_address_city"/>
  379. <field name="state_id" class="o_address_state" placeholder="State" options="{'no_open': True, 'no_quick_create': True}" context="{'country_id': country_id, 'default_country_id': country_id, 'zip': zip}"/>
  380. <field name="zip" placeholder="ZIP" class="o_address_zip"/>
  381. <field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'/>
  382. </div>
  383. </div>
  384. </group>
  385. <group>
  386. <field name="phone" widget="phone" options="{'enable_sms': false}"/>
  387. <field name="mobile" widget="phone" options="{'enable_sms': false}"/>
  388. <field name="email"/>
  389. <field name="lang"/>
  390. </group>
  391. </group>
  392. <group string="Bank Accounts">
  393. <field name="bank_ids">
  394. <tree editable="bottom">
  395. <field name="bank_id"/>
  396. <field name="acc_number"/>
  397. <field name="acc_holder_name" invisible="1"/>
  398. </tree>
  399. </field>
  400. </group>
  401. </sheet>
  402. </form>
  403. </field>
  404. </record>
  405. <record id="view_res_partner_filter" model="ir.ui.view">
  406. <field name="name">res.partner.select</field>
  407. <field name="model">res.partner</field>
  408. <field name="arch" type="xml">
  409. <search string="Search Partner">
  410. <field name="name"
  411. filter_domain="['|', '|', '|', '|', ('display_name', 'ilike', self), ('ref', '=', self), ('email', 'ilike', self), ('vat', 'ilike', self), ('company_registry', 'ilike', self)]"/>
  412. <field name="parent_id" domain="[('is_company', '=', True)]" operator="child_of"/>
  413. <field name="email" filter_domain="[('email', 'ilike', self)]"/>
  414. <field name="phone" filter_domain="['|', ('phone', 'ilike', self), ('mobile', 'ilike', self)]"/>
  415. <field name="category_id" string="Tag" filter_domain="[('category_id', 'child_of', self)]"/>
  416. <field name="user_id"/>
  417. <separator/>
  418. <filter string="Individuals" name="type_person" domain="[('is_company', '=', False)]"/>
  419. <filter string="Companies" name="type_company" domain="[('is_company', '=', True)]"/>
  420. <separator/>
  421. <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
  422. <separator/>
  423. <group expand="0" name="group_by" string="Group By">
  424. <filter name="salesperson" string="Salesperson" domain="[]" context="{'group_by' : 'user_id'}" />
  425. <filter name="group_company" string="Company" context="{'group_by': 'parent_id'}"/>
  426. <filter name="group_country" string="Country" context="{'group_by': 'country_id'}"/>
  427. </group>
  428. </search>
  429. </field>
  430. </record>
  431. <!-- Partner Kanban View -->
  432. <record model="ir.ui.view" id="res_partner_kanban_view">
  433. <field name="name">res.partner.kanban</field>
  434. <field name="model">res.partner</field>
  435. <field name="arch" type="xml">
  436. <kanban class="o_res_partner_kanban" sample="1">
  437. <field name="id"/>
  438. <field name="color"/>
  439. <field name="display_name"/>
  440. <field name="title"/>
  441. <field name="email"/>
  442. <field name="parent_id"/>
  443. <field name="is_company"/>
  444. <field name="function"/>
  445. <field name="phone"/>
  446. <field name="street"/>
  447. <field name="street2"/>
  448. <field name="zip"/>
  449. <field name="city"/>
  450. <field name="country_id"/>
  451. <field name="mobile"/>
  452. <field name="state_id"/>
  453. <field name="category_id"/>
  454. <field name="avatar_128"/>
  455. <field name="type"/>
  456. <field name="active"/>
  457. <templates>
  458. <t t-name="kanban-box">
  459. <div class="oe_kanban_global_click o_kanban_record_has_image_fill o_res_partner_kanban">
  460. <t t-if="!record.is_company.raw_value">
  461. <t t-set="background_image" t-value="kanban_image('res.partner', 'avatar_128', record.id.raw_value)"/>
  462. <div class="o_kanban_image_fill_left d-none d-md-block" t-attf-style="background-image:url('#{background_image}')">
  463. <img class="o_kanban_image_inner_pic" t-if="record.parent_id.raw_value" t-att-alt="record.parent_id.value" t-att-src="kanban_image('res.partner', 'avatar_128', record.parent_id.raw_value)"/>
  464. </div>
  465. <div class="o_kanban_image d-md-none" t-attf-style="background-image: url(#{background_image})">
  466. <img class="o_kanban_image_inner_pic" t-if="record.parent_id.raw_value" t-att-alt="record.parent_id.value" t-att-src="kanban_image('res.partner', 'avatar_128', record.parent_id.raw_value)"/>
  467. </div>
  468. </t>
  469. <t t-else="">
  470. <div class="o_kanban_image_fill_left o_kanban_image_full" t-attf-style="background-image: url(#{kanban_image('res.partner', 'avatar_128', record.id.raw_value)})" role="img"/>
  471. </t>
  472. <div class="ribbon ribbon-top-right" attrs="{'invisible': [('active', '=', True)]}">
  473. <span class="bg-danger">Archived</span>
  474. </div>
  475. <div class="oe_kanban_details d-flex flex-column justify-content-between">
  476. <div>
  477. <strong class="o_kanban_record_title oe_partner_heading"><field name="display_name"/></strong>
  478. <div class="o_kanban_tags_section oe_kanban_partner_categories"/>
  479. <ul>
  480. <li t-if="record.parent_id.raw_value and !record.function.raw_value"><field name="parent_id"/></li>
  481. <li t-elif="!record.parent_id.raw_value and record.function.raw_value"><field name="function"/></li>
  482. <li t-elif="record.parent_id.raw_value and record.function.raw_value"><field name="function"/> at <field name="parent_id"/></li>
  483. <li t-if="record.city.raw_value or record.country_id.raw_value">
  484. <t t-if="record.city.raw_value"><field name="city"/><t t-if="record.country_id.raw_value">, </t></t>
  485. <t t-if="record.country_id.raw_value"><field name="country_id"/></t>
  486. </li>
  487. <li t-if="record.email.raw_value" class="o_text_overflow"><field name="email"/></li>
  488. </ul>
  489. </div>
  490. <div class="o_kanban_record_bottom">
  491. <div class="oe_kanban_bottom_left"/>
  492. <div class="oe_kanban_bottom_right"/>
  493. </div>
  494. </div>
  495. </div>
  496. </t>
  497. </templates>
  498. </kanban>
  499. </field>
  500. </record>
  501. <record id="action_partner_form" model="ir.actions.act_window">
  502. <field name="name">Customers</field>
  503. <field name="type">ir.actions.act_window</field>
  504. <field name="res_model">res.partner</field>
  505. <field name="view_mode">kanban,tree,form</field>
  506. <field name="context">{'res_partner_search_mode': 'customer'}</field>
  507. <field name="search_view_id" ref="view_res_partner_filter"/>
  508. <field name="help" type="html">
  509. <p class="o_view_nocontent_smiling_face">
  510. Create a Contact in your address book
  511. </p><p>
  512. Odoo helps you track all activities related to your contacts.
  513. </p>
  514. </field>
  515. </record>
  516. <record id="action_partner_form_view1" model="ir.actions.act_window.view">
  517. <field eval="0" name="sequence"/>
  518. <field name="view_mode">kanban</field>
  519. <field name="view_id" ref="res_partner_kanban_view"/>
  520. <field name="act_window_id" ref="action_partner_form"/>
  521. </record>
  522. <record id="action_partner_form_view2" model="ir.actions.act_window.view">
  523. <field eval="2" name="sequence"/>
  524. <field name="view_mode">form</field>
  525. <field name="view_id" ref="view_partner_form"/>
  526. <field name="act_window_id" ref="action_partner_form"/>
  527. </record>
  528. <record id="action_partner_tree_view1" model="ir.actions.act_window.view">
  529. <field name="sequence" eval="1"/>
  530. <field name="view_mode">tree</field>
  531. <field name="view_id" ref="view_partner_tree"/>
  532. <field name="act_window_id" ref="action_partner_form"/>
  533. </record>
  534. <record id="action_partner_customer_form" model="ir.actions.act_window">
  535. <field name="name">Customers</field>
  536. <field name="type">ir.actions.act_window</field>
  537. <field name="res_model">res.partner</field>
  538. <field name="view_mode">kanban,tree,form</field>
  539. <field name="domain">[]</field>
  540. <field name="context">{'res_partner_search_mode': 'customer', 'default_is_company': True}</field>
  541. <field name="filter" eval="True"/>
  542. <field name="help" type="html">
  543. <p class="o_view_nocontent_smiling_face">
  544. Create a new customer in your address book
  545. </p><p>
  546. Odoo helps you easily track all activities related to a customer.
  547. </p>
  548. </field>
  549. </record>
  550. <record id="action_partner_customer_form_view1" model="ir.actions.act_window.view">
  551. <field eval="1" name="sequence"/>
  552. <field name="view_mode">kanban</field>
  553. <field name="view_id" ref="res_partner_kanban_view"/>
  554. <field name="act_window_id" ref="action_partner_customer_form"/>
  555. </record>
  556. <record id="action_partner_customer_form_view2" model="ir.actions.act_window.view">
  557. <field eval="2" name="sequence"/>
  558. <field name="view_mode">tree</field>
  559. <field name="view_id" ref="view_partner_tree"/>
  560. <field name="act_window_id" ref="action_partner_customer_form"/>
  561. </record>
  562. <record id="action_partner_customer_form_view3" model="ir.actions.act_window.view">
  563. <field eval="3" name="sequence"/>
  564. <field name="view_mode">form</field>
  565. <field name="view_id" ref="view_partner_form"/>
  566. <field name="act_window_id" ref="action_partner_customer_form"/>
  567. </record>
  568. <record id="action_partner_supplier_form" model="ir.actions.act_window">
  569. <field name="name">Vendors</field>
  570. <field name="type">ir.actions.act_window</field>
  571. <field name="res_model">res.partner</field>
  572. <field name="domain">[]</field>
  573. <field name="view_mode">kanban,tree,form</field>
  574. <field name="context">{'res_partner_search_mode': 'supplier', 'default_is_company': True}</field>
  575. <field name="filter" eval="True"/>
  576. <field name="help" type="html">
  577. <p class="o_view_nocontent_smiling_face">
  578. Create a new vendor in your address book
  579. </p><p>
  580. Odoo helps you easily track all activities related to a vendor.
  581. </p>
  582. </field>
  583. </record>
  584. <record id="action_partner_vendor_form_view1" model="ir.actions.act_window.view">
  585. <field eval="1" name="sequence"/>
  586. <field name="view_mode">kanban</field>
  587. <field name="view_id" ref="res_partner_kanban_view"/>
  588. <field name="act_window_id" ref="action_partner_supplier_form"/>
  589. </record>
  590. <record id="action_partner_vendor_form_view2" model="ir.actions.act_window.view">
  591. <field eval="2" name="sequence"/>
  592. <field name="view_mode">tree</field>
  593. <field name="view_id" ref="view_partner_tree"/>
  594. <field name="act_window_id" ref="action_partner_supplier_form"/>
  595. </record>
  596. <record id="action_partner_vendor_form_view3" model="ir.actions.act_window.view">
  597. <field eval="3" name="sequence"/>
  598. <field name="view_mode">form</field>
  599. <field name="view_id" ref="view_partner_form"/>
  600. <field name="act_window_id" ref="action_partner_supplier_form"/>
  601. </record>
  602. <!-- Categories -->
  603. <record id="view_partner_category_form" model="ir.ui.view">
  604. <field name="name">Contact Tags</field>
  605. <field name="model">res.partner.category</field>
  606. <field name="arch" type="xml">
  607. <form string="Contact Tag">
  608. <sheet>
  609. <group col="4">
  610. <field name="name" placeholder='e.g. "Consulting Services"'/>
  611. <field name="color" widget="color_picker"/>
  612. <field name="parent_id"/>
  613. <field name="active" widget="boolean_toggle"/>
  614. </group>
  615. </sheet>
  616. </form>
  617. </field>
  618. </record>
  619. <record id="view_partner_category_list" model="ir.ui.view">
  620. <field name="name">Contact Tags</field>
  621. <field name="model">res.partner.category</field>
  622. <field eval="6" name="priority"/>
  623. <field name="arch" type="xml">
  624. <tree string="Contact Tags">
  625. <field name="display_name"/>
  626. <field name="color" widget="color_picker"/>
  627. </tree>
  628. </field>
  629. </record>
  630. <record id="res_partner_category_view_search" model="ir.ui.view">
  631. <field name="name">res.partner.category.view.search</field>
  632. <field name="model">res.partner.category</field>
  633. <field name="arch" type="xml">
  634. <search string="Search Partner Category">
  635. <field name="name"/>
  636. <field name="display_name"/>
  637. <separator/>
  638. <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
  639. </search>
  640. </field>
  641. </record>
  642. <record id="action_partner_category_form" model="ir.actions.act_window">
  643. <field name="name">Contact Tags</field>
  644. <field name="type">ir.actions.act_window</field>
  645. <field name="res_model">res.partner.category</field>
  646. <field name="search_view_id" ref="res_partner_category_view_search"/>
  647. <field name="help" type="html">
  648. <p class="o_view_nocontent_smiling_face">
  649. Create a Contact Tag
  650. </p><p>
  651. Assign tags to your contacts to organize, filter and track them.
  652. </p>
  653. </field>
  654. </record>
  655. <!-- Industry -->
  656. <record id="res_partner_industry_view_form" model="ir.ui.view">
  657. <field name="name">Industry</field>
  658. <field name="model">res.partner.industry</field>
  659. <field name="arch" type="xml">
  660. <form string="Industry">
  661. <sheet>
  662. <group col="4">
  663. <field name="name"/>
  664. <field name="full_name"/>
  665. <field name="active" widget="boolean_toggle"/>
  666. </group>
  667. </sheet>
  668. </form>
  669. </field>
  670. </record>
  671. <record id="res_partner_industry_view_tree" model="ir.ui.view">
  672. <field name="name">Industry</field>
  673. <field name="model">res.partner.industry</field>
  674. <field eval="6" name="priority"/>
  675. <field name="arch" type="xml">
  676. <tree string="Industry" editable="bottom">
  677. <field name="name"/>
  678. <field name="full_name"/>
  679. <field name="active" invisible="1"/>
  680. </tree>
  681. </field>
  682. </record>
  683. <record id="res_partner_industry_view_search" model="ir.ui.view">
  684. <field name="name">res.partner.industry.view.search</field>
  685. <field name="model">res.partner.industry</field>
  686. <field name="arch" type="xml">
  687. <search string="Search Partner Industry">
  688. <field name="name"/>
  689. <field name="full_name"/>
  690. <separator/>
  691. <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
  692. </search>
  693. </field>
  694. </record>
  695. <record id="res_partner_industry_action" model="ir.actions.act_window">
  696. <field name="name">Industries</field>
  697. <field name="type">ir.actions.act_window</field>
  698. <field name="res_model">res.partner.industry</field>
  699. <field name="view_mode">tree,form</field>
  700. <field name="search_view_id" ref="res_partner_industry_view_search"/>
  701. <field name="help" type="html">
  702. <p class="o_view_nocontent_smiling_face">
  703. Create an Industry
  704. </p><p>
  705. Specify industries to classify your contacts and draw up reports.
  706. </p>
  707. </field>
  708. </record>
  709. </data>
  710. </odoo>