Export code updated

This commit is contained in:
projectsodoo 2021-02-18 13:57:46 +05:30
parent df3fb64016
commit bcad5e7606
18 changed files with 5 additions and 4 deletions

View File

@ -118,23 +118,24 @@ class AccountAnalyticLine(models.Model):
fields_name = dict(zip(fields, index))
res = super(AccountAnalyticLine, self).export_data(fields)
for index, val in enumerate(res['datas']):
if fields_name.get('date') >= 0:
#print("task_id", fields_name)
if fields_name.get('date') and fields_name.get('date') >= 0:
tdateindex = fields_name.get('date')
tdate = res['datas'][index][tdateindex]
if tdate:
res['datas'][index][tdateindex] = datetime.strftime(tdate, "%d/%m/%Y")
if fields_name.get('task_id') >= 0:
if fields_name.get('task_id') and fields_name.get('task_id') >= 0:
taskindex = fields_name.get('task_id')
ttask = res['datas'][index][taskindex]
if type(ttask) == bool:
res['datas'][index][taskindex] = ''
if fields_name.get('start_time') >= 0:
if fields_name.get('start_time') and fields_name.get('start_time') >= 0:
starttimeindex = fields_name.get('start_time')
starttime = float(res['datas'][index][starttimeindex])
if starttime:
start_time = tools.format_duration(starttime)
res['datas'][index][starttimeindex] = start_time
if fields_name.get('end_time') >= 0:
if fields_name.get('end_time') and fields_name.get('end_time') >= 0:
endtimeindex = fields_name.get('end_time')
endtime = float(res['datas'][index][endtimeindex])
if endtime:

0
mail_outbound_static/README.rst Normal file → Executable file
View File

0
mail_outbound_static/__init__.py Normal file → Executable file
View File

0
mail_outbound_static/__manifest__.py Normal file → Executable file
View File

0
mail_outbound_static/i18n/es.po Normal file → Executable file
View File

0
mail_outbound_static/i18n/mail_outbound_static.pot Normal file → Executable file
View File

0
mail_outbound_static/models/__init__.py Normal file → Executable file
View File

0
mail_outbound_static/models/ir_mail_server.py Normal file → Executable file
View File

0
mail_outbound_static/readme/CONTRIBUTORS.rst Normal file → Executable file
View File

0
mail_outbound_static/readme/DESCRIPTION.rst Normal file → Executable file
View File

0
mail_outbound_static/readme/ROADMAP.rst Normal file → Executable file
View File

0
mail_outbound_static/readme/USAGE.rst Normal file → Executable file
View File

0
mail_outbound_static/static/description/icon.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

0
mail_outbound_static/static/description/index.html Normal file → Executable file
View File

0
mail_outbound_static/tests/__init__.py Normal file → Executable file
View File

0
mail_outbound_static/tests/test.msg Normal file → Executable file
View File

0
mail_outbound_static/tests/test_ir_mail_server.py Normal file → Executable file
View File

0
mail_outbound_static/views/ir_mail_server_view.xml Normal file → Executable file
View File