2 Star 0 Fork 0

oca-github/server-tools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
admin_technical_features
attachment_base_synchronize
auditlog
auth_admin_passkey
auth_brute_force
auth_from_http_basic
auth_from_http_basic_logout
auth_from_http_remote_user
auth_oauth_multi_token
auth_session_timeout
auth_signup_verify_email
auth_supplier
auth_totp
auth_totp_password_security
auth_user_case_insensitive
auto_backup
base_cron_exclusion
base_custom_info
base_directory_file_download
base_exception
base_export_manager
base_export_security
base_external_dbsource
base_external_dbsource_firebird
base_external_dbsource_mssql
base_external_dbsource_mysql
base_external_dbsource_odbc
base_external_dbsource_oracle
base_external_dbsource_sqlite
base_external_system
base_fontawesome
base_import_default_enable_tracking
base_import_match
base_import_odoo
base_import_security_group
base_jsonify
base_kanban_stage
base_kanban_stage_state
base_locale_uom_default
base_manifest_extension
base_multi_image
base_onchange_rule
base_optional_quick_create
base_report_auto_create_qweb
base_search_fuzzy
base_suspend_security
base_technical_features
base_technical_user
base_tier_validation
base_user_gravatar
base_user_role
base_view_inheritance_extension
company_country/i18n
configuration_helper
database_cleanup
date_range
datetime_formatter
i18n
models
static/description
tests
README.rst
__init__.py
__manifest__.py
dbfilter_from_header
dead_mans_switch_client
disable_odoo_online
email_template_template
fetchmail_attach_from_folder
fetchmail_notify_error_to_sender
html_image_url_extractor
html_text
import_odbc
ir_config_parameter_viewer
keychain
language_path_mixin
letsencrypt
mail_environment
mail_log_message_to_process
mass_editing
mass_sorting
menu_technical_info
module_auto_update
module_prototyper
onchange_helper
password_security
res_config_settings_enterprise_remove
scheduler_error_mailer
security_protector
sentry
sequence_check_digit
sequence_date_range
server_env_base_external_referentials
server_environment
server_environment_files_sample
server_environment_ir_config_parameter
setup
sql_export
sql_request_abstract
subscription_action
super_calendar
test_configuration_helper
test_onchange_helper
user_immutable
user_threshold
users_ldap_groups
users_ldap_mail
users_ldap_populate
webhook
.editorconfig
.gitignore
.travis.yml
LICENSE
README.md
requirements.txt
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
License: AGPL-3

Date & Time Formatter

This module was written to extend the functionality of Odoo language engine to support formatting Date, Time and Datetime fields easily and allow you to print them in the best format for the user.

Usage

This module adds a technical programming feature, and it should be used by addon developers, not by end users. This means that you must not expect to see any changes if you are a user and install this, but if you find you have it already installed, it's probably because you have another modules that depend on this one.

If you are a developer, to use this module, you need to:

  • Call anywhere in your code:

    formatted_string = self.env["res.lang"].datetime_formatter(datetime_value)
    
  • If you use Qweb:

    <t t-esc="env['res.lang'].datetime_formatter(datetime_value)"/>
    
  • If you call it from a record that has a lang field:

    formatted_string = record.lang.datetime_formatter(record.datetime_field)
    
  • models.ResLang.datetime_formatter docstring explains its usage.

Try me on Runbot

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.

Credits

Contributors

Maintainer

Odoo Community Association

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

To contribute to this module, please visit http://odoo-community.org.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/oca-github/server-tools.git
git@gitee.com:oca-github/server-tools.git
oca-github
server-tools
server-tools
10.0

搜索帮助