res_lang_views.xml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <data>
  4. <record id="res_lang_tree" model="ir.ui.view">
  5. <field name="name">res.lang.tree</field>
  6. <field name="model">res.lang</field>
  7. <field name="arch" type="xml">
  8. <tree string="Languages" limit="200">
  9. <header>
  10. <button name="action_activate_langs" type="object" string="Activate"/>
  11. </header>
  12. <field name="name"/>
  13. <field name="code" groups="base.group_no_one"/>
  14. <field name="iso_code" groups="base.group_no_one"/>
  15. <field name="url_code" groups="base.group_no_one" invisible="1"/>
  16. <field name="direction" groups="base.group_no_one"/>
  17. <field name="active"/>
  18. <button name="%(base.action_view_base_language_install)d"
  19. string="Activate"
  20. type="action"
  21. icon="fa-check"
  22. attrs="{'invisible': [('active', '=', True)]}"/>
  23. <button name="%(base.action_view_base_language_install)d"
  24. string="Update"
  25. type="action"
  26. icon="fa-refresh"
  27. attrs="{'invisible': [('active', '!=', True)]}"/>
  28. <button name="action_archive"
  29. string="Disable"
  30. type="object"
  31. icon="fa-times"
  32. attrs="{'invisible': [('active', '!=', True)]}"/>
  33. </tree>
  34. </field>
  35. </record>
  36. <record id="res_lang_form" model="ir.ui.view">
  37. <field name="name">res.lang.form</field>
  38. <field name="model">res.lang</field>
  39. <field name="arch" type="xml">
  40. <form string="Languages">
  41. <sheet>
  42. <div class="oe_button_box" name="button_box">
  43. <button string="Activate and Translate"
  44. name="%(base.action_view_base_language_install)d"
  45. type="action"
  46. class="oe_stat_button"
  47. icon="fa-refresh" />
  48. </div>
  49. <field name="flag_image" widget="image" class="oe_avatar"/>
  50. <div class="oe_title">
  51. <label for="name"/>
  52. <h1><field name="name" placeholder="e.g. French"/></h1>
  53. </div>
  54. <group >
  55. <group>
  56. <field name="code"/>
  57. <field name="iso_code"/>
  58. <field name="url_code" invisible="1" required="0"/>
  59. <field name="active" widget="boolean_toggle"/>
  60. </group>
  61. <group>
  62. <field name="direction"/>
  63. <field name="grouping"/>
  64. <field name="decimal_point"/>
  65. <field name="thousands_sep"/>
  66. <field name="date_format"/>
  67. <field name="time_format"/>
  68. <field name="week_start"/>
  69. </group>
  70. </group>
  71. <div class="row">
  72. <div class="col-md-8 row">
  73. <div class="col-12">
  74. <div class="o_horizontal_separator mb-3 mt-4 text-uppercase fw-bolder small">Legends for supported Date and Time Formats</div>
  75. </div>
  76. <div class="col-sm">
  77. <div>%a - Abbreviated day of the week.</div>
  78. <div>%A - Full day of the week.</div>
  79. <div>%b - Abbreviated month name.</div>
  80. <div>%B - Full month name."</div>
  81. <div>%d - Day of the month [01,31]."</div>
  82. <div>%j - Day of the year [001,366]."</div>
  83. <div>%H - Hour (24-hour clock) [00,23]."</div>
  84. <div>%I - Hour (12-hour clock) [01,12]."</div>
  85. </div>
  86. <div class="col-sm">
  87. <div>%M - Minute [00,59]."</div>
  88. <div>%p - Equivalent of either AM or PM."</div>
  89. <div>%S - Seconds [00,61]."</div>
  90. <div>%w - Day of the week number [0(Sunday),6]."</div>
  91. <div>%y - Year without century [00,99]."</div>
  92. <div>%Y - Year with century."</div>
  93. <div>%m - Month number [01,12]."</div>
  94. </div>
  95. </div>
  96. <div class="col-md-4 text-info">
  97. <div class="o_horizontal_separator mb-3 mt-4 text-uppercase fw-bolder small">Examples</div>
  98. <div>1. %b, %B ==> Dec, December</div>
  99. <div>2. %a ,%A ==> Fri, Friday</div>
  100. <div>3. %y, %Y ==> 08, 2008</div>
  101. <div>4. %d, %m ==> 05, 12</div>
  102. <div>5. %H:%M:%S ==> 18:25:20</div>
  103. <div>6. %I:%M:%S %p ==> 06:25:20 PM</div>
  104. <div>7. %j ==> 340</div>
  105. <div>8. %S ==> 20</div>
  106. <div>9. %w ==> 5 ( Friday is the 6th day)</div>
  107. </div>
  108. </div>
  109. </sheet>
  110. </form>
  111. </field>
  112. </record>
  113. <record id="res_lang_search" model="ir.ui.view">
  114. <field name="name">res.lang.search</field>
  115. <field name="model">res.lang</field>
  116. <field name="arch" type="xml">
  117. <search string="Languages">
  118. <field name="name"
  119. filter_domain="['|', '|', ('name', 'ilike', self), ('code', 'ilike', self), ('iso_code', 'ilike', self)]"
  120. string="Language"/>
  121. <field name="direction"/>
  122. <separator/>
  123. <filter string="Active" name="active" domain="[('active', '=', True)]"/>
  124. </search>
  125. </field>
  126. </record>
  127. <record id="res_lang_act_window" model="ir.actions.act_window">
  128. <field name="name">Languages</field>
  129. <field name="res_model">res.lang</field>
  130. <field name="context">{'active_test': False}</field>
  131. <field name="search_view_id" ref="res_lang_search"/>
  132. </record>
  133. <menuitem action="res_lang_act_window" id="menu_res_lang_act_window" parent="menu_translation" sequence="1"/>
  134. </data>
  135. </odoo>