From 708f2c49523bb23bcc3bde7a4be83d391476fa42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 10 Sep 2012 15:28:40 +0200 Subject: [PATCH] Merge all kind of buttons review483002 --- forecast.py | 7 +++++++ forecast.xml | 10 ++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/forecast.py b/forecast.py index 32f4f94135..5c5ee6e172 100644 --- a/forecast.py +++ b/forecast.py @@ -87,6 +87,9 @@ class Forecast(Workflow, ModelSQL, ModelView): 'confirm': { 'invisible': Eval('state') != 'draft', }, + 'complete': { + 'readonly': Eval('state') != 'draft', + }, }) def init(self, module_name): @@ -196,6 +199,10 @@ class Forecast(Workflow, ModelSQL, ModelView): def cancel(self, ids): pass + @ModelView.button_action('stock_forecast.wizard_forecast_complete') + def complete(self, ids): + pass + def create_moves(self, forecast_ids): 'Create stock moves for the forecast ids' line_obj = Pool().get('stock.forecast.line') diff --git a/forecast.xml b/forecast.xml index 4faf460f79..427debd509 100644 --- a/forecast.xml +++ b/forecast.xml @@ -39,9 +39,7 @@ this repository contains the full copyright notices and license terms. -->