[IMP] account_export_csv - remove company where it is bad frequenting
parent
fe22780d00
commit
80e02c147c
|
@ -131,7 +131,6 @@ class AccountCSVExport(orm.TransientModel):
|
||||||
fiscalyear_id,
|
fiscalyear_id,
|
||||||
period_range_ids,
|
period_range_ids,
|
||||||
journal_ids,
|
journal_ids,
|
||||||
company_id,
|
|
||||||
context=None):
|
context=None):
|
||||||
"""
|
"""
|
||||||
Return list to generate rows of the CSV file
|
Return list to generate rows of the CSV file
|
||||||
|
@ -145,7 +144,7 @@ class AccountCSVExport(orm.TransientModel):
|
||||||
group by ac.id,ac.code,ac.name
|
group by ac.id,ac.code,ac.name
|
||||||
order by ac.code
|
order by ac.code
|
||||||
""",
|
""",
|
||||||
{'fiscalyear_id': fiscalyear_id,'company_id':company_id,'period_ids':tuple(period_range_ids)}
|
{'fiscalyear_id': fiscalyear_id, 'period_ids':tuple(period_range_ids)}
|
||||||
)
|
)
|
||||||
res = cr.fetchall()
|
res = cr.fetchall()
|
||||||
|
|
||||||
|
@ -191,7 +190,6 @@ class AccountCSVExport(orm.TransientModel):
|
||||||
fiscalyear_id,
|
fiscalyear_id,
|
||||||
period_range_ids,
|
period_range_ids,
|
||||||
journal_ids,
|
journal_ids,
|
||||||
company_id,
|
|
||||||
context=None):
|
context=None):
|
||||||
"""
|
"""
|
||||||
Return list to generate rows of the CSV file
|
Return list to generate rows of the CSV file
|
||||||
|
@ -207,7 +205,7 @@ class AccountCSVExport(orm.TransientModel):
|
||||||
group by aac.id,aac.code,aac.name,ac.id,ac.code,ac.name
|
group by aac.id,aac.code,aac.name,ac.id,ac.code,ac.name
|
||||||
order by aac.code
|
order by aac.code
|
||||||
""",
|
""",
|
||||||
{'fiscalyear_id': fiscalyear_id,'company_id':company_id,'period_ids':tuple(period_range_ids)}
|
{'fiscalyear_id': fiscalyear_id, 'period_ids':tuple(period_range_ids)}
|
||||||
)
|
)
|
||||||
res = cr.fetchall()
|
res = cr.fetchall()
|
||||||
|
|
||||||
|
@ -292,7 +290,6 @@ class AccountCSVExport(orm.TransientModel):
|
||||||
fiscalyear_id,
|
fiscalyear_id,
|
||||||
period_range_ids,
|
period_range_ids,
|
||||||
journal_ids,
|
journal_ids,
|
||||||
company_id,
|
|
||||||
context=None):
|
context=None):
|
||||||
"""
|
"""
|
||||||
Create a generator of rows of the CSV file
|
Create a generator of rows of the CSV file
|
||||||
|
@ -358,7 +355,6 @@ class AccountCSVExport(orm.TransientModel):
|
||||||
form = self.browse(cr, uid, ids[0], context=context)
|
form = self.browse(cr, uid, ids[0], context=context)
|
||||||
fiscalyear_id = form.fiscalyear_id.id
|
fiscalyear_id = form.fiscalyear_id.id
|
||||||
user_obj = self.pool.get('res.users')
|
user_obj = self.pool.get('res.users')
|
||||||
company_id = user_obj.browse(cr, uid, uid).company_id.id
|
|
||||||
if form.periods:
|
if form.periods:
|
||||||
period_range_ids = [x.id for x in form.periods]
|
period_range_ids = [x.id for x in form.periods]
|
||||||
else:
|
else:
|
||||||
|
@ -376,7 +372,6 @@ class AccountCSVExport(orm.TransientModel):
|
||||||
fiscalyear_id,
|
fiscalyear_id,
|
||||||
period_range_ids,
|
period_range_ids,
|
||||||
journal_ids,
|
journal_ids,
|
||||||
company_id,
|
|
||||||
context=context)
|
context=context)
|
||||||
)
|
)
|
||||||
return rows
|
return rows
|
||||||
|
|
Loading…
Reference in New Issue