Skip to Content
Menu
This question has been flagged

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

}

Avatar
Discard
Author

Little up here! Comments?

Related Posts Replies Views Activity
1
May 23
1325
1
Oct 16
8994
1
Nov 24
121
1
Mar 15
3942
2
Dec 24
1556