From 09a686fa294caaba241c2b7f2dcb7de707a2b87b Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Wed, 21 Jun 2017 11:37:38 +0200 Subject: [PATCH] [FIX] sale: Duplicating a quotation without template When duplicating a quotation without template, the expiration date was duplicated even if the expiration date was already expired. The date order is not duplicated but set to now. opw:744671 --- addons/sale/sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 60ca99bf764..328f0684c24 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -117,7 +117,7 @@ class SaleOrder(models.Model): ('cancel', 'Cancelled'), ], string='Status', readonly=True, copy=False, index=True, track_visibility='onchange', default='draft') date_order = fields.Datetime(string='Order Date', required=True, readonly=True, index=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, copy=False, default=fields.Datetime.now) - validity_date = fields.Date(string='Expiration Date', readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, + validity_date = fields.Date(string='Expiration Date', readonly=True, copy=False, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, help="Manually set the expiration date of your quotation (offer), or it will set the date automatically based on the template if online quotation is installed.") create_date = fields.Datetime(string='Creation Date', readonly=True, index=True, help="Date on which sales order is created.") confirmation_date = fields.Datetime(string='Confirmation Date', readonly=True, index=True, help="Date on which the sale order is confirmed.", oldname="date_confirm")