Skip to content
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

Closed
wants to merge 4 commits into from
Closed

Conversation

luc-demeyer
Copy link

from . import wizard
from . import report

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

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

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.25%) when pulling 8c28d24 on luc-demeyer:7.0 into 9d80c2e on OCA:7.0.

def _(self, src):
lang = self.context.get('lang', 'en_US')
return translate(
self.cr, _ir_translation_name, 'report', lang, src) or src

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?

Copy link
Author

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.

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 _()

Copy link
Author

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.

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.

@yvaucher
Copy link
Member

yvaucher commented Jun 2, 2015

Added need fixing for "It would be nice to have that explained in a docstring."

@gurneyalex
Copy link
Member

could you rebase your PR to get a fresh runbot build?

@ovnicraft
Copy link
Member

@luc-demeyer will be rebased or can be closed until next update ?

@pedrobaeza
Copy link
Member

@luc-demeyer are you going to work on this?

fmdl added a commit to fmdl/account-financial-reporting that referenced this pull request May 12, 2017
fmdl added a commit to fmdl/account-financial-reporting that referenced this pull request Nov 8, 2017
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
@pedrobaeza
Copy link
Member

Closing as no answer

@pedrobaeza pedrobaeza closed this Apr 28, 2018
rconjour pushed a commit to EssentNovaTeam/account-financial-reporting that referenced this pull request Mar 16, 2020
…ate-wrong_timedelta

currency_rate_update: fix wrong use of timetuple.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants