New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add account_trial_balance_period_xls #13
Conversation
from . import wizard | ||
from . import report | ||
|
||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't include vim lines
def _(self, src): | ||
lang = self.context.get('lang', 'en_US') | ||
return translate( | ||
self.cr, _ir_translation_name, 'report', lang, src) or src |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this and the localcontext stuff in init(). Could you provide a docstring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure that a docstring will be more clear than the code : I override the standard "_" method by a more specific one to avoid that the wrong translation terms are returned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not what it's doing that would be nice to be in the docstring, but why it's overwritten.
As in why does this _()
definition have to be here and what's wrong with the default _()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default _() returns unreliable translations:
If you analyse the code,you'll see that it calls:
res = pool.get('ir.translation')._get_source(cr, SUPERUSER_ID, None, ('code','sql_constraint'), lang, source)
the _get_source on its turn just returns a matching term (trad = res and res[0] or u'')
If you want reliable translations whereby you want the report to return the terms that is in the module's i18n file and not defined somewhere else in different context, than an override of the _() is a way to do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the explanation.
It would be nice to have that explained in a docstring.
Added need fixing for "It would be nice to have that explained in a docstring." |
could you rebase your PR to get a fresh runbot build? |
@luc-demeyer will be rebased or can be closed until next update ? |
@luc-demeyer are you going to work on this? |
6ca1a80 Merge pull request OCA#32 from fmdl/full_sql e14d2b2 FIX security 499e1fd Fix security 47eaf5a Merge pull request OCA#31 from fmdl/full_sql 1390f53 [FIX] e9a7979 [Update] readme aefed9e Merge pull request OCA#30 from fmdl/full_sql a85fdfc [FIX] 1cba49e [FIX] double creation 999999 a656297 [FIX] d476877 Merge pull request OCA#29 from fmdl/full_sql 677a629 [FIX] 5deabf9 Merge pull request OCA#28 from fmdl/full_sql 0b9f230 [PEP8] [TRAVIS] 46d23ce [IMP] a2e02f1 Merge pull request OCA#27 from fmdl/full_sql 4063e43 [FIX] remove zero line 8998def [FIX] add INIT if init c8277c3 [TYPO] rem unused file cebb8a8 [IMP] report, add grand total f0fe668 [IMP] paper format 601dc00 [MIG] 8956342 Merge pull request OCA#26 from fmdl/full_sql d3a661d [IMP] 7f6cc35 Merge pull request OCA#25 from fmdl/full_sql ecec373 [FIX] read_group bfe4571 [IMP] super total 3860ea5 [IMP] add read_group b66115a [IMP] view 0688abe [IMP] cbf6e86 [IMP] report 04fdbbc [IMP] 4e442c2 [IMP] ab58c2e [IMP] 587caa5 [IMP] 30ec70a [IMP] aged balance 6919c79 [IMP] add journal ledger 13f16ab [FIX] open 8999bbf [IMP] unify total 9a6c732 [IMP] add name on report object 4005b63 [IMP] include inside report object 2c386f3 [IMP] 03477d8 [IMP] add progress 334bd02 [IMP] order d012d5e [IMP] 5b99907 IMP SQL 7d03125 IMP SQL d5677c5 [REM] some unused fields b6403ae Merge pull request OCA#24 from fmdl/master c93a503 [FIX] e6f6fa5 [FIX] add result of last year 97a438d [IMP] simplify init balance history 06b436e [FIX] typo ac020cf [IMP] add balance aged 64ca3f2 Merge pull request OCA#23 from fmdl/master 1cd49d8 [IMP] compacted account cb48fa8 Merge pull request OCA#22 from fmdl/master 7d7aa91 [TYPO] change centralized to compared 87c8b6c Merge pull request OCA#21 from fmdl/master 4bd6eda [FIX] to long name 19055f4 Typo baad051 Merge pull request OCA#20 from fmdl/master a517166 [IMP] add month select 3b27632 [IMP] add excel with total 776be39 [IMP] add centralisation, add reset inter period ac90426 [FIX] when compute the init is not include 69ac010 Merge pull request OCA#19 from fmdl/master 7986fa1 [IMP] simplify c0f0ede Merge pull request OCA#18 from fmdl/master 8608b10 [I18n] d1820f0 Merge pull request OCA#17 from fmdl/master 7d6f1a6 [I18n] 3d9c60b Merge pull request OCA#16 from fmdl/master 7dc6418 [FIX] report name 2bb0c3e [PEP8] 3f8e6bf Merge pull request OCA#15 from fmdl/master 2f36c19 [IMP] f91c77a Merge pull request OCA#14 from fmdl/master f314993 [FIX] sql injection d55606e Merge pull request OCA#13 from fmdl/master 9cafb63 [PEP]8 git-subtree-dir: account_standard_report git-subtree-split: 6ca1a80
Closing as no answer |
…ate-wrong_timedelta currency_rate_update: fix wrong use of timetuple.
cf. https://github.com/luc-demeyer/account-financial-reporting/blob/7.0/account_trial_balance_period_xls/doc/doc.rst
for functional description.