Configurable model name_get() descriptions

v 6.1 v 7.0 v 8.0 v 9.0 Third Party 830
Download for v 6.1
Technical Name base_util_refcodes
Also available in version v 9.0 v 7.0 v 8.0
You bought this module and need support? Click here!

Configurable model name_get() descriptions. Provides two reusable python methods that simplify custom object name rendering:

Methods provided:

Given a template mask and a list of fields names, render the name_get(). All fields need to have value for the template to be applied. If not, uses the default name_ger (e.g. _rec_name)
Performs the search on a given list of fields.

Usage example:

from base_name_tools import name_tools

def name_get(self, cr, uid, ids, context=None):
return name_tools.extended_name_get(self, cr, uid, ids, '[%(ref)s] %(name)s', ['ref', 'name'], context=context) # ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ # template mask field list
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100):
return name_tools.extended_name_search(self, cr, user, name, args, operator, context=context, limit=limit,

# ^^^^^^^^^^^^^^^^^^^^ # field list to search

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.