Merge branch 'master-gst' into 'master'

[IMP] Gst Summary report changes

See merge request flectra-hq/flectra!117
This commit is contained in:
Parthiv Patel 2018-07-23 13:27:36 +00:00
commit 488bb3d8e6
1 changed files with 7 additions and 6 deletions

View File

@ -81,11 +81,12 @@ class GSTR1Report(models.AbstractModel):
def _update_inv_line_details(self, line, inv, document_type):
line.update({
'inv_no': inv.number,
'refund_invoice_id': inv.refund_invoice_id.id,
'refund_inv_no': inv.refund_invoice_id.number,
'refund_date_invoice': datetime.strptime(
'refund_invoice_id': inv.refund_invoice_id.id or '',
'refund_inv_no': inv.refund_invoice_id.number or '',
'refund_date_invoice': inv.refund_invoice_id and datetime.strptime(
inv.refund_invoice_id.date_invoice, '%Y-%m-%d').strftime(
'%d %b %y'), 'document_type': document_type,
'%d %b %y') or '',
'document_type': document_type,
'reason': inv.name or '',
'pre_gst': inv.date <= inv.company_id.gst_introduce_date and
'Y' or 'N',
@ -1176,8 +1177,8 @@ class GSTR1Report(models.AbstractModel):
'format': cell_format['regular_cell_format']},
{'value': inv['refund_inv_no'],
'format': cell_format['regular_cell_format']},
{'value': datetime.strptime(inv['refund_date_invoice'],
'%d %b %y'),
{'value': inv['refund_date_invoice'] and datetime.strptime(inv['refund_date_invoice'],
'%d %b %y') or '',
'format': cell_format['regular_cell_format_date']},
{'value': inv['inv_no'],
'format': cell_format['regular_cell_format']},