From 0aeb0132ccff86d6e417dc00d6db0b1129ac949c Mon Sep 17 00:00:00 2001 From: raman Date: Wed, 12 Nov 2025 15:42:35 +0530 Subject: [PATCH] date invoce date --- custom_addons/dashboard/models/stock_dashboard.py | 4 +++- .../src/components/pqgrid_dashboard/pqgrid_stock_dashboard.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_addons/dashboard/models/stock_dashboard.py b/custom_addons/dashboard/models/stock_dashboard.py index 8f972ba8f..f703bb9d0 100644 --- a/custom_addons/dashboard/models/stock_dashboard.py +++ b/custom_addons/dashboard/models/stock_dashboard.py @@ -148,12 +148,14 @@ class SamashtiDashboard(models.AbstractModel): customer = r['partner_id'][-1] quantity = sum(self.env['sale.order'].browse(r['id']).order_line.mapped('product_uom_qty')) weight = str(sum(self.env['sale.order'].browse(r['id']).order_line.mapped('bag_weight')))+" kg" - date = str(self.env['sale.order'].invoice_ids.invoice_date) + date = self.env['sale.order'].browse(r['id']).invoice_ids.invoice_date + invoice = self.env['sale.order'].browse(r['id']).invoice_ids.name datas.append({ 'sale_order': r['name'], 'id':r['id'], 'weight':weight, + 'invoice':invoice, 'customer':customer, 'quantity':quantity, 'cost': cost, diff --git a/custom_addons/dashboard/static/src/components/pqgrid_dashboard/pqgrid_stock_dashboard.js b/custom_addons/dashboard/static/src/components/pqgrid_dashboard/pqgrid_stock_dashboard.js index 4bfb0c888..99616935c 100644 --- a/custom_addons/dashboard/static/src/components/pqgrid_dashboard/pqgrid_stock_dashboard.js +++ b/custom_addons/dashboard/static/src/components/pqgrid_dashboard/pqgrid_stock_dashboard.js @@ -176,6 +176,7 @@ export class SamashtiDashboard extends Component { async getSaleColumns(){ return[ { title: "Sale Order", dataIndx: "sale_order", width: 100,filter: { type: 'textbox', condition: 'contain', listeners: ['keyup'] } }, + { title: "Invoice", dataIndx: "invoice", width: 100,filter: { type: 'textbox', condition: 'contain', listeners: ['keyup'] } }, { title: "Customer", dataIndx: "customer", width: 280,filter: { type: 'textbox', condition: 'contain', listeners: ['keyup'] } }, { title: "Date", dataIndx: "date", width: 150 }, { title: "Quantity", dataIndx: "quantity", width: 120, dataType: "float", format: "#,###.00",summary: { type: "sum" },align: "right" },