中国本土应用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.9KB

  1. # -*- coding: utf-8 -*-
  2. from odoo import models, fields, api, _
  3. class ResConfigSettings(models.TransientModel):
  4. _inherit = "res.config.settings"
  5. company_id = fields.Many2one(
  6. "res.company",
  7. string="Company",
  8. required=True,
  9. default=lambda self: self.env.company,
  10. )
  11. # 显示在浏览器窗口的标题栏或状态栏上的标题名称
  12. system_name = fields.Char(
  13. string="System Name",
  14. readonly=False,
  15. config_parameter="oec.system_name",
  16. default="Open ERP China",
  17. )
  18. display_company_name = fields.Boolean(
  19. string="Display Company Name",
  20. default=True,
  21. config_parameter="oec.display_company_name",
  22. )
  23. logo = fields.Binary(related="company_id.logo", readonly=False)
  24. square_logo = fields.Binary(related="company_id.square_logo", readonly=False)
  25. favicon = fields.Binary(related="company_id.favicon", readonly=False)
  26. # 主题定制
  27. disable_theme_customizer = fields.Boolean(
  28. related="company_id.disable_theme_customizer", readonly=False
  29. )
  30. main_menu_mode = fields.Selection(
  31. related="company_id.main_menu_mode", readonly=False
  32. )
  33. main_submenu_position = fields.Selection(
  34. related="company_id.main_submenu_position", readonly=False
  35. )
  36. sidebar_display_number_of_submenus = fields.Boolean(
  37. related="company_id.sidebar_display_number_of_submenus", readonly=False
  38. )
  39. sidebar_fixed = fields.Boolean(related="company_id.sidebar_fixed", readonly=False)
  40. sidebar_show_minimize_button = fields.Boolean(
  41. related="company_id.sidebar_show_minimize_button", readonly=False
  42. )
  43. sidebar_default_minimized = fields.Boolean(
  44. related="company_id.sidebar_default_minimized", readonly=False
  45. )
  46. sidebar_hover_maximize = fields.Boolean(
  47. related="company_id.sidebar_hover_maximize", readonly=False
  48. )
  49. # 用户菜单
  50. enable_odoo_account = fields.Boolean(
  51. related="company_id.enable_odoo_account", readonly=False
  52. )
  53. enable_developer_tool = fields.Boolean(
  54. related="company_id.enable_developer_tool", readonly=False
  55. )
  56. enable_lock_screen = fields.Boolean(
  57. related="company_id.enable_lock_screen", readonly=False
  58. )
  59. lock_screen_state_storage_mode = fields.Selection(
  60. related="company_id.lock_screen_state_storage_mode", readonly=False
  61. )
  62. enable_documentation = fields.Boolean(
  63. related="company_id.enable_documentation", readonly=False
  64. )
  65. documentation_url = fields.Char(
  66. related="company_id.documentation_url", readonly=False
  67. )
  68. enable_support = fields.Boolean(related="company_id.enable_support", readonly=False)
  69. support_url = fields.Char(related="company_id.support_url", readonly=False)
  70. # 模块
  71. module_oce_backend_theme_pro = fields.Boolean("Web Theme Professional Edition")
  72. module_oec_im_wecom_base = fields.Boolean("Enterprise WeChat")
上海开阖软件有限公司 沪ICP备12045867号-1