From 2ce1f69998fbddc939da3d49a40b54dc88af511f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 16 Jan 2015 16:14:32 +0100 Subject: [PATCH] Add default company on period --- period.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/period.py b/period.py index 6557c5a863..1961e54a3d 100644 --- a/period.py +++ b/period.py @@ -52,6 +52,10 @@ class Period(Workflow, ModelSQL, ModelView): }, }) + @staticmethod + def default_company(): + return Transaction().context.get('company') + @staticmethod def default_state(): return 'draft'