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