Odoo Help


Why the debit and credit column are always 0 in account.report_vat?

Pascal Tremblay
on 6/5/16, 5:35 PM 635 views

Hello all,

In the account.report_vat, do you always have the columns debit and credit equal to 0?

Mine are always at 0.

Do you know this problem?


Edit #1

In the method _get_lines() of the file report_vat.py, we can find those lines. It is strange to see there... 'debit' : 0 and 'credit': 0.... No?

def _get_lines(self, based_on, company_id=False, parent=False, level=0, context=None):

_logger.error("_get_lines BEGIN")

period_list = self.period_ids

fiscalyear_id = self.fiscalyear_id

res = self._get_codes(based_on, company_id, parent, level, period_list, context=context)

if period_list:

res = self._add_codes(based_on, res, period_list, context=context)


if not fiscalyear_id:

self.cr.execute("select id from account_fiscalyear where company_id = %s", (company_id,))

result = self.cr.fetchall()

fy = [x[0] for x in result]


fy = [fiscalyear_id]

self.cr.execute("select id from account_period where fiscalyear_id = ANY(%s)", (fy,))

periods = self.cr.fetchall()

for p in periods:


res = self._add_codes(based_on, res, period_list, context=context)

i = 0

top_result = []

while i < len(res):

res_dict = { 'code': res[i][1]['code'],

'name': res[i][1]['name'],

'debit': 0,

'credit': 0,

'tax_amount': res[i][1]['sum_period'],

'type': 1,

'level': res[i][0],

'pos': 0


Little up here! Comments?

Pascal Tremblay
on 10/29/16, 8:19 AM

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.


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)


Asked: 6/5/16, 5:35 PM
Seen: 635 times
Last updated: 6/6/16, 4:09 PM