ir_model_views.xml 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <!-- menu_create from model form -->
  4. <record id="view_model_menu_create" model="ir.ui.view">
  5. <field name="name">Create Menu</field>
  6. <field name="model">wizard.ir.model.menu.create</field>
  7. <field name="arch" type="xml">
  8. <form string="Create Menu">
  9. <group>
  10. <field name="name"/>
  11. <field name="menu_id"/>
  12. </group>
  13. <footer>
  14. <button name="menu_create" string="Create Menu" type="object" class="btn-primary" data-hotkey="q"/>
  15. <button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="z" />
  16. </footer>
  17. </form>
  18. </field>
  19. </record>
  20. <record id="act_menu_create" model="ir.actions.act_window">
  21. <field name="name">Create Menu</field>
  22. <field name="res_model">wizard.ir.model.menu.create</field>
  23. <field name="view_mode">form</field>
  24. <field name="target">new</field>
  25. <field name="context">{'model_id': active_id}</field>
  26. </record>
  27. <!-- model -->
  28. <record id="view_model_form" model="ir.ui.view">
  29. <field name="model">ir.model</field>
  30. <field name="arch" type="xml">
  31. <form string="Model Description">
  32. <header><!-- used for override --></header>
  33. <sheet>
  34. <group>
  35. <group>
  36. <field name="id" invisible="1"/>
  37. <field name="name"/>
  38. <field name="model" attrs="{'readonly': [('id', '!=', False)]}"/>
  39. <field name="order"/>
  40. <field name="transient" attrs="{'readonly': [('id', '!=', False)]}" groups="base.group_no_one"/>
  41. </group>
  42. <group>
  43. <field name="state" readonly="1" groups="base.group_no_one"/>
  44. <field name="modules" groups="base.group_no_one"/>
  45. </group>
  46. </group>
  47. <notebook>
  48. <page string="Fields" name="fields">
  49. <field name="field_id">
  50. <tree string="Fields Description">
  51. <field name="name"/>
  52. <field name="field_description"/>
  53. <field name="ttype"/>
  54. <field name="required"/>
  55. <field name="readonly"/>
  56. <field name="index" groups="base.group_no_one"/>
  57. <field name="state" groups="base.group_no_one"/>
  58. </tree>
  59. <form string="Fields Description">
  60. <group>
  61. <group>
  62. <field name="name"/>
  63. <field name="field_description"/>
  64. </group>
  65. <group>
  66. <field name="ttype"/>
  67. <field name="help"/>
  68. </group>
  69. </group>
  70. <notebook>
  71. <page name="base" string="Properties">
  72. <group string="Base Properties">
  73. <group>
  74. <field name="required"/>
  75. <field name="readonly"/>
  76. <field name="store" groups="base.group_no_one"/>
  77. <field name="index" groups="base.group_no_one"/>
  78. <field name="copied" groups="base.group_no_one"/>
  79. </group>
  80. <group>
  81. <field name="translate"
  82. attrs="{'readonly': [('ttype','not in',['char','text','html'])],
  83. 'invisible': [('ttype','not in',['char','text','html'])]}"/>
  84. <field name="size" groups="base.group_no_one"
  85. attrs="{'readonly': [('ttype','not in',['char','reference'])],
  86. 'invisible': [('ttype','not in',['char','reference'])]}"/>
  87. <field name="relation"
  88. attrs="{'required': [('ttype','in',['many2one','one2many','many2many'])],
  89. 'readonly': [('ttype','not in',['many2one','one2many','many2many'])],
  90. 'invisible': [('ttype','not in',['many2one','one2many','many2many'])]}"/>
  91. <field name="on_delete" groups="base.group_no_one"
  92. attrs="{'readonly': [('ttype','!=','many2one')],
  93. 'invisible': [('ttype','!=','many2one')]}"/>
  94. <field name="relation_field"
  95. attrs="{'required': [('ttype','=','one2many')],
  96. 'readonly': [('ttype','!=','one2many')],
  97. 'invisible': [('ttype','!=','one2many')]}"/>
  98. <field name="relation_table" groups="base.group_no_one"
  99. attrs="{'readonly': ['|', ('ttype','!=','many2many'), ('state','!=','manual')],
  100. 'invisible': ['|', ('ttype','!=','many2many'), ('state','!=','manual')]}"/>
  101. <field name="column1" groups="base.group_no_one"
  102. attrs="{'readonly': ['|', ('ttype','!=','many2many'), ('state','!=','manual')],
  103. 'invisible': ['|', ('ttype','!=','many2many'), ('state','!=','manual')]}"/>
  104. <field name="column2" groups="base.group_no_one"
  105. attrs="{'readonly': ['|', ('ttype','!=','many2many'), ('state','!=','manual')],
  106. 'invisible': ['|', ('ttype','!=','many2many'), ('state','!=','manual')]}"/>
  107. <field name="domain" groups="base.group_no_one"
  108. attrs="{'readonly': [('ttype','not in',['many2one','one2many','many2many'])],
  109. 'invisible': [('ttype','not in',['many2one','one2many','many2many'])]}"/>
  110. </group>
  111. </group>
  112. <group attrs="{'readonly': [('ttype','not in',['selection','reference'])],
  113. 'invisible': [('ttype','not in',['selection','reference'])]}">
  114. <field name="selection_ids">
  115. <tree editable="bottom">
  116. <field name="sequence" widget="handle"/>
  117. <field name="value"/>
  118. <field name="name"/>
  119. </tree>
  120. </field>
  121. </group>
  122. <group string="Advanced Properties" groups="base.group_no_one">
  123. <field name="related"/>
  124. <field name="depends" attrs="{'required': [('compute', 'not in', [False, ''])]}"/>
  125. <field name="compute" widget="ace" options="{'mode': 'python'}"/>
  126. </group>
  127. <div groups="base.group_no_one">
  128. <h3>How to define a computed field</h3>
  129. <p>Computed fields are defined with the fields
  130. <strong>Dependencies</strong> and <strong>Compute</strong>.</p>
  131. <p>The field <strong>Dependencies</strong> lists the fields that
  132. the current field depends on. It is a comma-separated list of
  133. field names, like <code>name, size</code>. You can also refer to
  134. fields accessible through other relational fields, for instance
  135. <code>partner_id.company_id.name</code>.</p>
  136. <p>The field <strong>Compute</strong> is the Python code to
  137. compute the value of the field on a set of records. The value of
  138. the field must be assigned to each record with a dictionary-like
  139. assignment.</p>
  140. <pre>
  141. for record in self:
  142. record['size'] = len(record.name)
  143. </pre>
  144. <p>The only predefined variables are</p>
  145. <ul>
  146. <li><code>self</code> (the set of records to compute)</li>
  147. <li><code>datetime</code> (Python module)</li>
  148. <li><code>dateutil</code> (Python module)</li>
  149. <li><code>time</code> (Python module)</li>
  150. </ul>
  151. <p>Other features are accessible through <code>self</code>, like
  152. <code>self.env</code>, etc.</p>
  153. </div>
  154. </page>
  155. <page name="groups" string="Access Rights">
  156. <field name="groups"/>
  157. </page>
  158. <page name="misc" string="Miscellaneous" groups="base.group_no_one">
  159. <group>
  160. <field name="state"/>
  161. <field name="modules"/>
  162. </group>
  163. </page>
  164. </notebook>
  165. </form>
  166. </field>
  167. <button groups="base.group_no_one"
  168. icon="fa-align-justify"
  169. name="%(act_menu_create)d"
  170. string="Create a Menu" type="action"
  171. target="new" />
  172. </page>
  173. <page string="Access Rights" name="access_rights">
  174. <field name="access_ids">
  175. <tree string="Access Rights" editable="top"
  176. decoration-warning="not group_id and
  177. (perm_read or perm_write or
  178. perm_create or perm_unlink)">
  179. <field name="name"/>
  180. <field name="group_id"/>
  181. <field name="perm_read"/>
  182. <field name="perm_write"/>
  183. <field name="perm_create"/>
  184. <field name="perm_unlink"/>
  185. </tree>
  186. </field>
  187. </page>
  188. <page string="Record Rules" name="record_rules">
  189. <field name="rule_ids">
  190. <tree string="Record Rules" editable="top" decoration-info="not groups">
  191. <field name="name"/>
  192. <field name="groups" widget="many2many_tags" options="{'no_create':True}"/>
  193. <field name="domain_force"/>
  194. <field name="perm_read"/>
  195. <field name="perm_write"/>
  196. <field name="perm_create"/>
  197. <field name="perm_unlink"/>
  198. </tree>
  199. </field>
  200. </page>
  201. <page string="Notes" name="notes" groups="base.group_no_one">
  202. <field name="info"/>
  203. </page>
  204. <page string="Views" name="views" groups="base.group_no_one">
  205. <field name="view_ids"/>
  206. </page>
  207. </notebook>
  208. </sheet>
  209. </form>
  210. </field>
  211. </record>
  212. <record id="view_model_tree" model="ir.ui.view">
  213. <field name="model">ir.model</field>
  214. <field name="arch" type="xml">
  215. <tree string="Model Description">
  216. <field name="model"/>
  217. <field name="name"/>
  218. <field name="state"/>
  219. <field name="transient"/>
  220. </tree>
  221. </field>
  222. </record>
  223. <record id="view_model_search" model="ir.ui.view">
  224. <field name="model">ir.model</field>
  225. <field name="arch" type="xml">
  226. <search string="Model Description">
  227. <field name="name" filter_domain="['|', ('name','ilike',self), ('model','ilike',self)]" string="Model"/>
  228. <field name="model" filter_domain="[('model','ilike',self)]" string="Technical Name"/>
  229. <filter string="Transient" name="transient" domain="[('transient', '=', True)]"/>
  230. <separator/>
  231. <filter string="Custom" name="custom" domain="[('state', '=', 'manual')]"/>
  232. <filter string="Base" name="base" domain="[('state', '=', 'base')]"/>
  233. </search>
  234. </field>
  235. </record>
  236. <record id="action_model_model" model="ir.actions.act_window">
  237. <field name="name">Models</field>
  238. <field name="res_model">ir.model</field>
  239. <field name="context">{}</field>
  240. <field name="view_id" ref="view_model_tree"/>
  241. </record>
  242. <menuitem action="action_model_model" id="ir_model_model_menu" parent="next_id_9"/>
  243. <!-- ir model fields -->
  244. <record id="view_model_fields_form" model="ir.ui.view">
  245. <field name="model">ir.model.fields</field>
  246. <field name="arch" type="xml">
  247. <form string="Fields" duplicate="false">
  248. <field name="state" invisible="1"/>
  249. <sheet>
  250. <group>
  251. <group>
  252. <field name="name"/>
  253. <field name="field_description"/>
  254. <field name="model_id" attrs="{'readonly': [('state','!=', 'manual')]}"/>
  255. </group>
  256. <group>
  257. <field name="ttype"/>
  258. <field name="help"/>
  259. </group>
  260. </group>
  261. <notebook>
  262. <page name="base" string="Properties">
  263. <group string="Base Properties">
  264. <group>
  265. <field name="required"/>
  266. <field name="readonly"/>
  267. <field name="store" groups="base.group_no_one"/>
  268. <field name="index" groups="base.group_no_one"/>
  269. <field name="copied" groups="base.group_no_one"/>
  270. </group>
  271. <group>
  272. <field name="translate"
  273. attrs="{'readonly': [('ttype','not in',['char','text','html'])],
  274. 'invisible': [('ttype','not in',['char','text','html'])]}"/>
  275. <field name="size" groups="base.group_no_one"
  276. attrs="{'readonly': [('ttype','not in',['char','reference'])],
  277. 'invisible': [('ttype','not in',['char','reference'])]}"/>
  278. <field name="relation"
  279. attrs="{'required': [('ttype','in',['many2one','one2many','many2many'])],
  280. 'readonly': [('ttype','not in',['many2one','one2many','many2many'])],
  281. 'invisible': [('ttype','not in',['many2one','one2many','many2many'])]}"/>
  282. <field name="group_expand" groups="base.group_no_one"
  283. attrs="{'readonly': [('ttype','not in', ['many2one', 'selection'])],
  284. 'invisible': [('ttype','not in', ['many2one', 'selection'])]}"/>
  285. <field name="on_delete" groups="base.group_no_one"
  286. attrs="{'readonly': [('ttype','!=','many2one')],
  287. 'invisible': [('ttype','!=','many2one')]}"/>
  288. <field name="relation_field"
  289. attrs="{'required': [('ttype','=','one2many')],
  290. 'readonly': [('ttype','!=','one2many')],
  291. 'invisible': [('ttype','!=','one2many')]}"/>
  292. <field name="relation_table" groups="base.group_no_one"
  293. attrs="{'readonly': ['|', ('ttype','!=','many2many'), ('state','!=','manual')],
  294. 'invisible': ['|', ('ttype','!=','many2many'), ('state','!=','manual')]}"/>
  295. <field name="column1" groups="base.group_no_one"
  296. attrs="{'readonly': ['|', ('ttype','!=','many2many'), ('state','!=','manual')],
  297. 'invisible': ['|', ('ttype','!=','many2many'), ('state','!=','manual')]}"/>
  298. <field name="column2" groups="base.group_no_one"
  299. attrs="{'readonly': ['|', ('ttype','!=','many2many'), ('state','!=','manual')],
  300. 'invisible': ['|', ('ttype','!=','many2many'), ('state','!=','manual')]}"/>
  301. <field name="domain" groups="base.group_no_one"
  302. attrs="{'readonly': [('ttype','not in',['many2one','one2many','many2many'])],
  303. 'invisible': [('ttype','not in',['many2one','one2many','many2many'])]}"/>
  304. </group>
  305. </group>
  306. <group attrs="{'readonly': [('ttype','not in',['selection','reference'])],
  307. 'invisible': [('ttype','not in',['selection','reference'])]}">
  308. <field name="selection_ids">
  309. <tree editable="bottom">
  310. <field name="sequence" widget="handle"/>
  311. <field name="value"/>
  312. <field name="name"/>
  313. </tree>
  314. </field>
  315. </group>
  316. <group string="Advanced Properties" groups="base.group_no_one">
  317. <field name="related"/>
  318. <field name="depends" attrs="{'required': [('compute', 'not in', [False, ''])]}"/>
  319. <field name="compute" widget="ace" options="{'mode': 'python'}"/>
  320. </group>
  321. <div groups="base.group_no_one">
  322. <h3>How to define a computed field</h3>
  323. <p>Computed fields are defined with the fields
  324. <strong>Dependencies</strong> and <strong>Compute</strong>.</p>
  325. <p>The field <strong>Dependencies</strong> lists the fields that
  326. the current field depends on. It is a comma-separated list of
  327. field names, like <code>name, size</code>. You can also refer to
  328. fields accessible through other relational fields, for instance
  329. <code>partner_id.company_id.name</code>.</p>
  330. <p>The field <strong>Compute</strong> is the Python code to
  331. compute the value of the field on a set of records. The value of
  332. the field must be assigned to each record with a dictionary-like
  333. assignment.</p>
  334. <pre>
  335. for record in self:
  336. record['size'] = len(record.name)
  337. </pre>
  338. <p>The only predefined variables are</p>
  339. <ul>
  340. <li><code>self</code> (the set of records to compute)</li>
  341. <li><code>datetime</code> (Python module)</li>
  342. <li><code>dateutil</code> (Python module)</li>
  343. <li><code>time</code> (Python module)</li>
  344. </ul>
  345. <p>Other features are accessible through <code>self</code>, like
  346. <code>self.env</code>, etc.</p>
  347. </div>
  348. </page>
  349. <page name="groups" string="Access Rights">
  350. <field name="groups"/>
  351. </page>
  352. <page name="misc" string="Miscellaneous" groups="base.group_no_one">
  353. <group>
  354. <field name="state"/>
  355. <field name="modules"/>
  356. </group>
  357. </page>
  358. </notebook>
  359. </sheet>
  360. </form>
  361. </field>
  362. </record>
  363. <record id="view_model_fields_tree" model="ir.ui.view">
  364. <field name="model">ir.model.fields</field>
  365. <field name="arch" type="xml">
  366. <tree string="Fields" duplicate="false">
  367. <field name="name"/>
  368. <field name="field_description"/>
  369. <field name="model_id"/>
  370. <field name="ttype"/>
  371. <field name="state"/>
  372. <field name="index"/>
  373. <field name="store"/>
  374. <field name="readonly"/>
  375. <field name="relation"/>
  376. </tree>
  377. </field>
  378. </record>
  379. <record id="view_model_fields_search" model="ir.ui.view">
  380. <field name="model">ir.model.fields</field>
  381. <field name="arch" type="xml">
  382. <search string="Fields">
  383. <field name="name" filter_domain="['|', ('name','ilike',self), ('field_description','ilike',self)]" string="Field"/>
  384. <filter string="Required" name="required" domain="[('required', '=', True)]"/>
  385. <separator/>
  386. <filter string="Readonly" name="readonly" domain="[('readonly', '=', True)]"/>
  387. <separator/>
  388. <filter string="Custom" name="custom" domain="[('state', '=', 'manual')]"/>
  389. <filter string="Base" name="base" domain="[('state', '=', 'base')]"/>
  390. <separator/>
  391. <filter string="Translate" name="translate" domain="[('translate', '=', True)]"/>
  392. <field name="model_id"/>
  393. <field name="ttype"/>
  394. <field name="required"/>
  395. <field name="readonly"/>
  396. <field name="relation"/>
  397. <group expand="0" string="Group By">
  398. <filter string="Model" name="group_by_object" domain="[]" context="{'group_by':'model_id'}"/>
  399. <filter string="Field Type" name="group_by_ttype" domain="[]" context="{'group_by':'ttype'}"/>
  400. </group>
  401. </search>
  402. </field>
  403. </record>
  404. <record id="action_model_fields" model="ir.actions.act_window">
  405. <field name="name">Fields</field>
  406. <field name="res_model">ir.model.fields</field>
  407. <field name="context">{}</field>
  408. <field name="view_id" ref="view_model_fields_tree"/>
  409. </record>
  410. <menuitem action="action_model_fields" id="ir_model_model_fields" parent="base.next_id_9"/>
  411. <!-- ir model fields selection -->
  412. <record id="view_model_fields_selection_form" model="ir.ui.view">
  413. <field name="model">ir.model.fields.selection</field>
  414. <field name="arch" type="xml">
  415. <form string="Fields" duplicate="false">
  416. <sheet>
  417. <group>
  418. <field name="field_id" options="{'no_create': True}"/>
  419. <field name="value" groups="base.group_no_one"/>
  420. <field name="name"/>
  421. <field name="sequence" groups="base.group_no_one"/>
  422. </group>
  423. </sheet>
  424. </form>
  425. </field>
  426. </record>
  427. <record id="view_model_fields_selection_tree" model="ir.ui.view">
  428. <field name="model">ir.model.fields.selection</field>
  429. <field name="arch" type="xml">
  430. <tree>
  431. <field name="sequence" widget="handle"/>
  432. <field name="field_id"/>
  433. <field name="value"/>
  434. <field name="name"/>
  435. </tree>
  436. </field>
  437. </record>
  438. <record id="view_model_fields_selection_search" model="ir.ui.view">
  439. <field name="model">ir.model.fields.selection</field>
  440. <field name="arch" type="xml">
  441. <search string="Fields">
  442. <field name="field_id" string="Field"/>
  443. <field name="name"
  444. filter_domain="['|', ('name','ilike',self), ('value','ilike',self)]"
  445. string="Selection" />
  446. <filter name="group_by_field"
  447. context="{'group_by':'field_id'}"
  448. string="Field"/>
  449. </search>
  450. </field>
  451. </record>
  452. <record id="action_model_fields_selection" model="ir.actions.act_window">
  453. <field name="name">Fields Selection</field>
  454. <field name="res_model">ir.model.fields.selection</field>
  455. <field name="view_id" ref="view_model_fields_selection_tree"/>
  456. </record>
  457. <menuitem action="action_model_fields_selection" id="ir_model_model_fields_selection" parent="base.next_id_9"/>
  458. <!-- ir model data -->
  459. <record model="ir.ui.view" id="view_model_data_form">
  460. <field name="model">ir.model.data</field>
  461. <field name="arch" type="xml">
  462. <form string="External Identifiers">
  463. <sheet>
  464. <h1>
  465. <field name="complete_name"/>
  466. </h1>
  467. <group>
  468. <group>
  469. <field name="module"/>
  470. <field name="name"/>
  471. <field name="noupdate"/>
  472. <field name="write_date" />
  473. <field name="create_date" />
  474. </group>
  475. <group>
  476. <field name="display_name"/>
  477. <field name="model"/>
  478. <field name="res_id"/>
  479. <field name="reference" widget="reference" string="Record"/>
  480. </group>
  481. </group>
  482. </sheet>
  483. </form>
  484. </field>
  485. </record>
  486. <record id="view_model_data_list" model="ir.ui.view">
  487. <field name="model">ir.model.data</field>
  488. <field name="arch" type="xml">
  489. <tree string="External Identifiers">
  490. <field name="complete_name"/>
  491. <field name="display_name"/>
  492. <field name="model" groups="base.group_no_one"/>
  493. <field name="module" invisible="1"/>
  494. <field name="res_id"/>
  495. </tree>
  496. </field>
  497. </record>
  498. <record id="view_model_data_search" model="ir.ui.view">
  499. <field name="model">ir.model.data</field>
  500. <field name="arch" type="xml">
  501. <search string="External Identifiers">
  502. <field name="name" filter_domain="[('name','ilike',self)]" string="External Identifier"/>
  503. <filter string="Updatable" name="updatable" domain="[('noupdate', '=', False)]"/>
  504. <field name="module"/>
  505. <field name="model"/>
  506. <field name="res_id"/>
  507. <field name="noupdate"/>
  508. <group expand="0" string="Group By">
  509. <filter string="Module" name="group_by_module" domain="[]" context="{'group_by':'module'}"/>
  510. <filter string="Model" name="group_by_object" domain="[]" context="{'group_by':'model'}"/>
  511. </group>
  512. </search>
  513. </field>
  514. </record>
  515. <record id="action_model_data" model="ir.actions.act_window">
  516. <field name="name">External Identifiers</field>
  517. <field name="res_model">ir.model.data</field>
  518. <field name="view_id" ref="view_model_data_list"/>
  519. </record>
  520. <menuitem id="next_id_5" name="Sequences &amp; Identifiers" parent="base.menu_custom" sequence="21" groups="base.group_no_one"/>
  521. <menuitem action="action_model_data" id="ir_model_data_menu" parent="base.next_id_5"
  522. groups="base.group_no_one"/>
  523. <!-- ir model contraints -->
  524. <record model="ir.ui.view" id="view_model_constraint_form">
  525. <field name="model">ir.model.constraint</field>
  526. <field name="arch" type="xml">
  527. <form string="Model Constraints">
  528. <sheet>
  529. <group col="4">
  530. <field name="type"/>
  531. <field name="name"/>
  532. <field name="module" can_create="false"/>
  533. <field name="model"/>
  534. </group>
  535. <group>
  536. <field name="message"/>
  537. </group>
  538. </sheet>
  539. </form>
  540. </field>
  541. </record>
  542. <record id="view_model_constraint_list" model="ir.ui.view">
  543. <field name="model">ir.model.constraint</field>
  544. <field name="arch" type="xml">
  545. <tree string="Model Constraints">
  546. <field name="type"/>
  547. <field name="name"/>
  548. <field name="module"/>
  549. <field name="model"/>
  550. </tree>
  551. </field>
  552. </record>
  553. <record id="view_model_constraint_search" model="ir.ui.view">
  554. <field name="model">ir.model.constraint</field>
  555. <field name="arch" type="xml">
  556. <search string="Constraints">
  557. <field name="model"/>
  558. <field name="name"/>
  559. <field name="message"/>
  560. <group expand="1" string="Group By">
  561. <filter name="module" string="Module" context="{'group_by' : 'module'}"/>
  562. <filter name="model" string="Model" context="{'group_by': 'model'}"/>
  563. <filter name="type" string="Constraint type" context="{'group_by' : 'type'}"/>
  564. </group>
  565. </search>
  566. </field>
  567. </record>
  568. <record id="action_model_constraint" model="ir.actions.act_window">
  569. <field name="name">Model Constraints</field>
  570. <field name="res_model">ir.model.constraint</field>
  571. <field name="view_id" ref="view_model_constraint_list"/>
  572. <field name="search_view_id" ref="view_model_constraint_search"/>
  573. </record>
  574. <menuitem action="action_model_constraint" id="ir_model_constraint_menu" parent="base.next_id_9"
  575. groups="base.group_no_one"/>
  576. <!-- ir model relations -->
  577. <record model="ir.ui.view" id="view_model_relation_form">
  578. <field name="model">ir.model.relation</field>
  579. <field name="arch" type="xml">
  580. <form string="ManyToMany Relations">
  581. <sheet>
  582. <group col="4">
  583. <field name="name"/>
  584. <field name="module" can_create="false"/>
  585. <field name="model"/>
  586. </group>
  587. </sheet>
  588. </form>
  589. </field>
  590. </record>
  591. <record id="view_model_relation_list" model="ir.ui.view">
  592. <field name="model">ir.model.relation</field>
  593. <field name="arch" type="xml">
  594. <tree string="ManyToMany Relations">
  595. <field name="name"/>
  596. <field name="module"/>
  597. <field name="model"/>
  598. </tree>
  599. </field>
  600. </record>
  601. <record id="action_model_relation" model="ir.actions.act_window">
  602. <field name="name">ManyToMany Relations</field>
  603. <field name="res_model">ir.model.relation</field>
  604. <field name="view_id" ref="view_model_relation_list"/>
  605. </record>
  606. <menuitem action="action_model_relation" id="ir_model_relation_menu" parent="base.next_id_9"
  607. groups="base.group_no_one"/>
  608. <!-- ir.model.access -->
  609. <record id="ir_access_view_tree" model="ir.ui.view">
  610. <field name="name">ir.model.access.view.tree</field>
  611. <field name="model">ir.model.access</field>
  612. <field name="arch" type="xml">
  613. <tree string="Access Rights"
  614. decoration-warning="not group_id and
  615. (perm_read or perm_write or
  616. perm_create or perm_unlink)">
  617. <field name="name"/>
  618. <field name="model_id"/>
  619. <field name="group_id"/>
  620. <field name="perm_read"/>
  621. <field name="perm_write"/>
  622. <field name="perm_create"/>
  623. <field name="perm_unlink"/>
  624. </tree>
  625. </field>
  626. </record>
  627. <record id="ir_access_view_tree_edition" model="ir.ui.view">
  628. <field name="name">ir.model.access.view.tree.edition</field>
  629. <field name="model">ir.model.access</field>
  630. <field name="arch" type="xml">
  631. <tree string="Access Rights" editable="top"
  632. decoration-warning="not group_id and
  633. (perm_read or perm_write or
  634. perm_create or perm_unlink)">
  635. <field name="name"/>
  636. <field name="model_id"/>
  637. <field name="group_id"/>
  638. <field name="perm_read"/>
  639. <field name="perm_write"/>
  640. <field name="perm_create"/>
  641. <field name="perm_unlink"/>
  642. </tree>
  643. </field>
  644. </record>
  645. <record id="ir_access_view_form" model="ir.ui.view">
  646. <field name="model">ir.model.access</field>
  647. <field name="arch" type="xml">
  648. <form string="Access Rights">
  649. <sheet>
  650. <div class="alert alert-warning text-center" role="alert">
  651. Please note that modifications will be applied for all users of the specified group
  652. </div>
  653. <group col="4">
  654. <field name="name"/>
  655. <field name="model_id"/>
  656. <field name="group_id"/>
  657. <field name="active" widget='boolean_toggle'/>
  658. </group>
  659. <group string="Access" col="4">
  660. <field name="perm_read"/>
  661. <field name="perm_write"/>
  662. <field name="perm_create"/>
  663. <field name="perm_unlink"/>
  664. </group>
  665. </sheet>
  666. </form>
  667. </field>
  668. </record>
  669. <record id="ir_access_view_search" model="ir.ui.view">
  670. <field name="model">ir.model.access</field>
  671. <field name="arch" type="xml">
  672. <search string="Access Rights">
  673. <field name="name" string="Access Rights"/>
  674. <filter string="Global" name="global" domain="[('group_id', '=', False)]"/>
  675. <separator/>
  676. <filter string="Full Access" name="full_access" domain="[('perm_read', '=', True), ('perm_write', '=', True), ('perm_create', '=', True), ('perm_unlink', '=', True)]"/>
  677. <filter string="Read Access" name="read_access" domain="[('perm_read', '=', True)]"/>
  678. <filter string="Write Access" name="write_access" domain="[('perm_write', '=', True)]"/>
  679. <separator/>
  680. <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
  681. <field name="model_id"/>
  682. <field name="group_id"/>
  683. <group expand="0" string="Group By" colspan="11" col="11" groups="base.group_no_one">
  684. <filter string="Group" name="group" domain="[]" context="{'group_by': 'group_id'}"/>
  685. <filter string="Model" name="group_by_object" domain="[]" context="{'group_by': 'model_id'}"/>
  686. </group>
  687. </search>
  688. </field>
  689. </record>
  690. <record id="ir_access_act" model="ir.actions.act_window">
  691. <field name="name">Access Rights</field>
  692. <field name="res_model">ir.model.access</field>
  693. <field name="view_id" ref="ir_access_view_tree_edition"/>
  694. <field name="search_view_id" ref="ir_access_view_search"/>
  695. </record>
  696. <menuitem action="ir_access_act" id="menu_ir_access_act" parent="base.menu_security"/>
  697. </odoo>