From 246d41c00a2f8e997e3faf4cd065e73d2422542b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 21 May 2009 18:55:34 +0200 Subject: [PATCH] Add default value --- company.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/company.py b/company.py index 76950ea012..a75792d3ef 100644 --- a/company.py +++ b/company.py @@ -13,4 +13,16 @@ class Company(ModelSQL, ModelView): hours_per_work_month = fields.Float("Hours per Work Month", required=True) hours_per_work_year = fields.Float("Hours per Work Year", required=True) + def default_hours_per_work_day(self, cursor, user, context=None): + return 8 + + def default_hours_per_work_week(self, cursor, user, context=None): + return 40 + + def default_hours_per_work_month(self, cursor, user, context=None): + return 160 + + def default_hours_per_work_year(self, cursor, user, context=None): + return 4800 + Company()