Browse Source

[IMP] Now Analytic lines is aware of the option 'Entries to Include'

pull/7/merge
Humberto Arocha 11 years ago
parent
commit
14af492ba1
  1. 3
      account_financial_report/model/account_financial_report.py
  2. 6
      account_financial_report/report/parser.py
  3. 3
      account_financial_report/wizard/wizard.py

3
account_financial_report/model/account_financial_report.py

@ -53,7 +53,8 @@ class account_financial_report(osv.osv):
'lab_str': fields.char('Description', help='Description for the Summary', size=128), 'lab_str': fields.char('Description', help='Description for the Summary', size=128),
'target_move': fields.selection([('posted', 'All Posted Entries'), 'target_move': fields.selection([('posted', 'All Posted Entries'),
('all', 'All Entries'), ('all', 'All Entries'),
], 'Target Moves', help='Print All Accounting Entries or just Posted Accounting Entries'),
], 'Entries to Include', required=True,
help='Print All Accounting Entries or just Posted Accounting Entries'),
#~ Deprecated fields #~ Deprecated fields
'filter': fields.selection([('bydate', 'By Date'), ('byperiod', 'By Period'), ('all', 'By Date and Period'), ('none', 'No Filter')], 'Date/Period Filter'), 'filter': fields.selection([('bydate', 'By Date'), ('byperiod', 'By Period'), ('all', 'By Date and Period'), ('none', 'No Filter')], 'Date/Period Filter'),

6
account_financial_report/report/parser.py

@ -181,7 +181,8 @@ class account_balance(report_sxw.rml_parse):
#~ periods = str(tuple(ctx['periods'])) #~ periods = str(tuple(ctx['periods']))
where = """where aml.period_id in (%s) and aa.id = %s and aml.state <> 'draft'""" % ( where = """where aml.period_id in (%s) and aa.id = %s and aml.state <> 'draft'""" % (
periods, account['id']) periods, account['id'])
if ctx.get('state','posted')=='posted':
where += "AND am.state = 'posted'"
sql_detalle = """select aml.id as id, aj.name as diario, aa.name as descripcion, sql_detalle = """select aml.id as id, aj.name as diario, aa.name as descripcion,
(select name from res_partner where aml.partner_id = id) as partner, (select name from res_partner where aml.partner_id = id) as partner,
aa.code as cuenta, aml.name as name, aa.code as cuenta, aml.name as name,
@ -321,7 +322,8 @@ class account_balance(report_sxw.rml_parse):
def z(n): def z(n):
return abs(n) < 0.005 and 0.0 or n return abs(n) < 0.005 and 0.0 or n
self.context['state'] = form['target_move']
self.context['state'] = form['target_move'] or 'posted'
self.from_currency_id = self.get_company_currency(form['company_id'] and type(form[ self.from_currency_id = self.get_company_currency(form['company_id'] and type(form[
'company_id']) in (list, tuple) and form['company_id'][0] or form['company_id']) 'company_id']) in (list, tuple) and form['company_id'][0] or form['company_id'])
if not form['currency_id']: if not form['currency_id']:

3
account_financial_report/wizard/wizard.py

@ -56,7 +56,8 @@ class wizard_report(osv.osv_memory):
'target_move': fields.selection([('posted', 'All Posted Entries'), 'target_move': fields.selection([('posted', 'All Posted Entries'),
('all', 'All Entries'), ('all', 'All Entries'),
], 'Target Moves', help='Print All Accounting Entries or just Posted Accounting Entries'),
], 'Entries to Include', required=True,
help='Print All Accounting Entries or just Posted Accounting Entries'),
#~ Deprecated fields #~ Deprecated fields
'filter': fields.selection([('bydate', 'By Date'), ('byperiod', 'By Period'), ('all', 'By Date and Period'), ('none', 'No Filter')], 'Date/Period Filter'), 'filter': fields.selection([('bydate', 'By Date'), ('byperiod', 'By Period'), ('all', 'By Date and Period'), ('none', 'No Filter')], 'Date/Period Filter'),
'date_to': fields.date('End date'), 'date_to': fields.date('End date'),

Loading…
Cancel
Save