# -*- coding: utf-8 -*-
# Created on 2017-11-05
# author: 广州尚鹏,http://www.sunpop.cn
# email: 300883@qq.com
# resource of Sunpop
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# Odoo在线中文用户手册(长期更新)
# http://www.sunpop.cn/documentation/user/10.0/zh_CN/index.html
# Odoo10离线中文用户手册下载
# http://www.sunpop.cn/odoo10_user_manual_document_offline/
# Odoo10离线开发手册下载-含python教程,jquery参考,Jinja2模板,PostgresSQL参考(odoo开发必备)
# http://www.sunpop.cn/odoo10_developer_document_offline/
# description:
# base on 'author': "Gilvan Leal",
# website': "https://gilvanleal.github.io/odoowidgets/",
{
'name': "App widget extra(Inputmask Widget)",
'author': "Sunpop.cn",
'website': 'http://www.sunpop.cn',
'currency': 'EUR',
'price': 38,
'summary': """
A Widget to make masks on form fields""",
'description': """
================
Inputmask Widget
================
Based on jquery.inputmask 3.x `Docs in GitHub
`_.
| An Inputmask Widget helps the user with the input by ensuring a predefined format.
| This can be useful for dates, numerics, phone numbers, ...
Instructions:
-------------
- Just add attribute *widget="mask"* and *data-inputmask[-]=""* to **** on form, tree and kanban
Some examples::
Or::
**Note:** Use *contenteditable="true"* for apply mask in others HTML tags: span, div, etc. **Improve**
- Just add attribute *widget="mask_regex"* and *data-inputmask[-regex]=""* to ****
With the regex extension you can use any regular expression as a mask. Currently this does only input restriction. There is no further masking visualization.
Example email validation::
- Masking definition:
:9: Numeric value
:a: Alphabetical value
:\*: Alphanumeric value
:A: Alphabetical uppercasing
:&: Alfanumeric uppercasing - (Use **&** for escape **&** in XML file)
:#: Hexadecimal
- Attributes:
:mask: The mask to use.
:repeat: Mask repeat function. Repeat the mask definition x-times.
:greedy: Toggle to allocate as much possible or the opposite. Non-greedy repeat function.
:placeholder: Change the mask placeholder. Default: "_"
:autounmask: Automatically unmask the value when retrieved. Default: false.
:removemaskonsubmit: Remove the mask before submitting the form.Default: false
:clearmaskonlostfocus: Remove the empty mask on blur or when not empty removes the optional trailing part Default: true
:insertmode: Toggle to insert or overwrite input. Default: true.
:clearincomplete: Clear the incomplete input on blur.
:alias: The alias to use.
- Aliases:
Some aliases found in the extensions are: email, currency, decimal, integer, date, datetime, dd/mm/yyyy, url, ip, etc.
Docs:
* `Date and Datetime `_
* `Numeric `_
* `Regex `_
* `Phone `_
* `Other `_""",
# Categories can be used to filter modules in modules listing
# Check https://github.com/odoo/odoo/blob/master/openerp/addons/base/module/module_data.xml
# for the full list
'category': 'Extra Tools',
'version': '1.0',
# any module necessary for this one to work correctly
'depends': ['web'],
# always loaded
"data": ['views/inputmask_templates.xml'],
"qweb": ['static/src/xml/*.xml'],
'images': ['static/description/main_screenshot.png']
}