Odoo Help

0

How can I display the chart of account that having zero balance in Profit and Loss report? Current only shows items that have value in balance only.

By
imad
on 3/8/15, 1:40 PM 473 views

code

from openerp.osv import fields, osv

class account_common_account_report(osv.osv_memory):
    _name = 'account.common.account.report'
    _description = 'Account Common Account Report'
    _inherit = "account.common.report"
    _columns = {
        'display_account': fields.selection([('all','All'), ('movement','With movements'),
                                            ('not_zero','With balance is not equal to 0'),
                                            ],'Display Accounts', required=True),

    }
    _defaults = {
        'display_account': 'movement',
    }

    def pre_print_report(self, cr, uid, ids, data, context=None):
        if context is None:
            context = {}
        data['form'].update(self.read(cr, uid, ids, ['display_account'], context=context)[0])
        return data

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 3/8/15, 1:40 PM
Seen: 473 times
Last updated: 3/16/15, 8:10 AM