From 5b9d4e1c76cd7f48ca29c80563f883490c422191 Mon Sep 17 00:00:00 2001 From: "Atik Agewan (OpenERP)" Date: Thu, 28 Jul 2011 15:10:42 +0530 Subject: [PATCH] [IMP]purchase: Change Expected Date in Purchase order . bzr revid: aag@tinyerp.com-20110728094042-8k06xmajr9xp1w5x --- addons/purchase/test/purchase_from_order.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/addons/purchase/test/purchase_from_order.yml b/addons/purchase/test/purchase_from_order.yml index 3acc68cb51b..cb2fe88f841 100644 --- a/addons/purchase/test/purchase_from_order.yml +++ b/addons/purchase/test/purchase_from_order.yml @@ -51,6 +51,17 @@ I confirm the purchase order for iPod. - !workflow {model: purchase.order, action: purchase_confirm, ref: purchase_order_po0} +- + I changed Expected Date to Next Day. +- + !python {model: purchase.order}: | + from tools.translate import _ + import time + from datetime import datetime + from dateutil.relativedelta import relativedelta + next_day = datetime.today() + relativedelta(days=1) + purod_id=self.browse(cr, uid, ref("purchase_order_po0")) + self._set_minimum_planned_date(cr, uid, purod_id.id, 'minimum_planned_date', next_day.strftime('%Y-%m-%d'),None ) - I check that the order which was initially in the draft state has transit to confirm state. -