Show Account Number(Partial or Semi Visible Number) Formatting in OpenERP 7.0
Here I am in a situation to display either a charecter or integer field which is capable to store a 10 digit value,
and need to display it in semi password/ semi visible format.
I mean if the account number is 9876543210123, i just want to show 987*******123 in the list or tree view.
Can anyone help me to do the above formatting, Is there any default widget available.
Also any suggestions for creating a custom widget or any other way to acheive the above need is appeciable.
Thanks In Advance.
Komala Kiran Kumar,
If you want the whole text as *, use widget="password", or password='1'.
You can override the read method which can do the job better.
See the example:
vals = super(account_voucher, self).read(cr, uid, ids, fields, context, load)
for val in vals:
if val.get('cc_number', False) :
dec_data = rsa_encrypt.decrypt(val.get('cc_number', False), val.get('key', False))
val['cc_number'] = dec_data
if context.get('cc_no', '') != 'no_mask':
i = len(val['cc_number']) - 4
val['cc_number'] = 'X' * i + val['cc_number'][-4:len(val['cc_number'])]
if not is_list:
vals = vals
- What documentation is available for odoo?
- The different "openerp model inheritance" mechanisms: what's the difference between them, and when should they be used ?
- How can I activate the developer mode?
- How i can create module openerp 7 / Odoo 8 ?
- What is the different between col and colspan?
- How css and js inheritance works on Odoo v8?
- How to run tests
- How to display database name without debug mode?
- How to disable developer mode or debugging feature in openerp 7
- How to show Thumbnail image in list view?
- Relative Date (today, this month, e.g.) in Filter
- Please define these Python Fetch types
- Hide menu for existing group
- What is the _track proprerty of mail.thread model used for ?
- why dummy field used in product.product
- How to add a custom css?
- How to move around workflow states back and forth?
- Anyone has realized a locking functionality?
- How to override a global function?
- Setting up rules' Access Right in xml,csv files
- how to override name_get method in new api
- How to extend fields.selection options without overwriting them?
- How to enable a security group for all users?
- How to detect which modules are installed
- Details and examples on the accounting API?
- How to handle reading and writing to read-only fields
- How to debug Odoo in Eclipse under Winows?
- Whats the difference between inherit and inherits?
- What should onchange methods do and return?