diff options
Diffstat (limited to 'fixco_custom/models/purchase_order.py')
| -rw-r--r-- | fixco_custom/models/purchase_order.py | 3 |
1 files changed, 2 insertions, 1 deletions
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, |
