From 6cc1479e5ae160b24d1b682162aa4d818c8fa85c Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 8 Jan 2026 13:08:56 +0700 Subject: push bill date --- fixco_custom/models/purchase_order.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fixco_custom/models/purchase_order.py') diff --git a/fixco_custom/models/purchase_order.py b/fixco_custom/models/purchase_order.py index 746ee89..4bc9d11 100644 --- a/fixco_custom/models/purchase_order.py +++ b/fixco_custom/models/purchase_order.py @@ -57,6 +57,7 @@ class PurchaseOrder(models.Model): soo_discount = fields.Float('SOO Discount', copy=False) soo_tax = fields.Float('SOO Tax', copy=False) discount_total = fields.Float('Discount Total', help = 'Total Discount for Each Product', copy=False, default=0.0) + bill_date = fields.Date('Bill Date', copy=False) def _prepare_invoice(self): """Prepare the dict of values to create the new invoice for a purchase order. @@ -72,7 +73,7 @@ class PurchaseOrder(models.Model): invoice_vals = { 'ref': self.partner_ref or '', 'move_type': move_type, - 'invoice_date': datetime.utcnow(), + 'invoice_date': self.bill_date, 'purchase_order_id': self.id, 'narration': self.notes, 'currency_id': self.currency_id.id, -- cgit v1.2.3