[IMP]: Updated stock ageing report

This commit is contained in:
Bhumika Trivedi 2018-08-21 12:24:37 +05:30
parent 82089dc1d3
commit ec9f101624
2 changed files with 9 additions and 3 deletions

View File

@ -58,7 +58,9 @@ class StockAgeingReport(models.AbstractModel):
product, location_id, branch_id, company_id, final_dates) product, location_id, branch_id, company_id, final_dates)
product_dict = {'product_id': product.name_get()[0][1], product_dict = {'product_id': product.name_get()[0][1],
'qty_period_list': qty_period_list, 'qty_period_list': qty_period_list,
'qty_available': sum(qty_period_list)} 'qty_available': sum(qty_period_list),
'total_amount': sum(qty_period_list) *
product.list_price}
product_list.append(product_dict) product_list.append(product_dict)
return product_list return product_list

View File

@ -22,7 +22,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td><b>Brnach: </b></td> <td><b>Branch: </b></td>
<td t-foreach="data['branch']" t-as="branch_id"> <td t-foreach="data['branch']" t-as="branch_id">
<span t-esc="branch_id.name"/> <span t-esc="branch_id.name"/>
</td> </td>
@ -62,7 +62,8 @@
<th t-foreach="data['period_list']" t-as="period"> <th t-foreach="data['period_list']" t-as="period">
<span t-esc="period"/> <span t-esc="period"/>
</th> </th>
<th>Total</th> <th>Total Qty</th>
<th>Total Cost</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -76,6 +77,9 @@
<td> <td>
<span t-esc="product['qty_available']"/> <span t-esc="product['qty_available']"/>
</td> </td>
<td>
<span t-esc="product['total_amount']"/>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>