Odoo Help

Welcome!

This community 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.

0

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

By
Pascal Tremblay
on 6/5/16, 5:35 PM 272 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?

Thanks


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)

else:

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]

else:

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:

period_list.append(p[0])

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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