commit
364f041914
|
@ -0,0 +1,17 @@
|
|||
Print chart of accounts
|
||||
=======================
|
||||
|
||||
This module add the menu Accounting \ Charts \ Print chart of Accounts
|
||||
and allow to print the selected chart of accounts.
|
||||
|
||||
This module is based on the old RML engine report.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Marc Cassuto (marc.cassuto@savoirfairelinux.com)
|
||||
* Mathieu Benoit (mathieu.benoit@savoirfairelinux.com)
|
||||
* Guillaume Auger (guillaume.auger@savoirfairelinux.com)
|
|
@ -25,19 +25,6 @@
|
|||
'name': 'Print chart of accounts',
|
||||
'version': '1.0',
|
||||
'category': 'Reports/pdf',
|
||||
'description': """Print chart of accounts.
|
||||
|
||||
This module add the menu Accounting \ Charts \ Print chart of Accounts
|
||||
and allow to print the selected chart of accounts.
|
||||
|
||||
This module is based on the old RML engine report.
|
||||
|
||||
Contributors
|
||||
------------
|
||||
* Marc Cassuto (marc.cassuto@savoirfairelinux.com)
|
||||
* Mathieu Benoit (mathieu.benoit@savoirfairelinux.com)
|
||||
|
||||
""",
|
||||
'author': 'Savoir-faire Linux',
|
||||
'website': 'http://www.savoirfairelinux.com',
|
||||
'depends': [
|
||||
|
@ -48,6 +35,6 @@ Contributors
|
|||
'account_report.xml',
|
||||
'wizard/account_report_chart_of_account.xml',
|
||||
],
|
||||
'installable': False,
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
}
|
|
@ -20,25 +20,23 @@
|
|||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv import fields, orm
|
||||
from openerp import fields, models, api
|
||||
|
||||
|
||||
class ChartOfAccountsReport(orm.TransientModel):
|
||||
class ChartOfAccountsReport(models.TransientModel):
|
||||
_name = 'account.print.chart.accounts.report'
|
||||
_description = 'Chart of accounts Report'
|
||||
|
||||
domain_char_account = [('parent_id', '=', False)]
|
||||
_columns = {
|
||||
'chart_account_id': fields.many2one('account.account',
|
||||
chart_account_id = fields.Many2one(
|
||||
'account.account',
|
||||
'Chart of Accounts',
|
||||
help='Select Charts of Accounts',
|
||||
required=True,
|
||||
domain=domain_char_account),
|
||||
}
|
||||
domain=([('parent_id', '=', False)]))
|
||||
|
||||
def print_report(self, cr, uid, ids, data, context=None):
|
||||
res = self.read(cr, uid, ids, context=context)[0]
|
||||
account_id = res["chart_account_id"][0]
|
||||
@api.multi
|
||||
def print_report(self, data):
|
||||
account_id = self.chart_account_id.id
|
||||
data["form"] = {"id_account": account_id}
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
Loading…
Reference in New Issue