Changes:
As everybody knows that context plays a vital role in translations,we needed the translated values to be searched for functional fields.
1. bin/osv/fields.py
class function(_column) --> def search(self, cr, uid, obj, name, args) has a new argument context.
Which appears now as def search(self, cr, uid, obj, name, args, context=None).
This context will help the search method to translate the keyword.
Example:
Follow these steps:
1. Install a minimal profile with demo data.
2. Load French language.
3. Switch to French environment(i.e.,User/Preferences to be set to fr_FR.
4. Go to Partners. (Belgium appears as belgique[translated value]) .
5. If we search belgiq, we won't find any records.
6. Reason : The keyword 'belgiq' was directly compared with DB values. It has to be the comparision between keyword and DISPLAYED value(we were in fr environment).
7. Pass context to your method and have a try. (fnct_search=Method would appear in your class definition of _columns.)
account/account_move_line.py has fnct_search=_invoice_search.
so, def _invoice_search(self, cursor, user, obj, name, args) is now
def _invoice_search(self, cursor, user, obj, name, args, context).
Programmers are requested to update the corresponding fnct_search methods with context argument appended to the method.
Thanks, Regards, Jay Vora, E-Mail : jvo@tinyerp.com (Not miles, just an e-mail away...) |
Thanks for this post, it well explains the changes.
ReplyDeleteThanks for the post it will really going to help a lot. online business software
ReplyDeleteOur offering of Business software / ERP software integrated with your eCommerce website make simpler your operations and selling of goods and services.
DeleteOnline ERP Demo
Thank you so much sharing your info at here. I found it very interesting to read. I would like to share this article with my circle. Keep sharing your ideas with us.
ReplyDeleteERP software
As everybody knows that context plays a vital role in translations,we needed the translated values to be searched for functional fields.
ReplyDeleteoracle ebs r12
This blog provide very useful information and very effective.
ReplyDeleteHosted Dynamics
Acetech who have been one of the leading software development company in Delhi giving creative custom software development to meet interesting business challenges for the absolute most distinguished organizations and associations in the country.
ReplyDelete