From 4b64380c6d79dd347d3225dc44db702285d4dc05 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Fri, 11 Jul 2014 17:26:06 +0200 Subject: [PATCH] [PEP8] base_optional_quick_create --- base_optional_quick_create/__openerp__.py | 7 +++++-- base_optional_quick_create/model.py | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/base_optional_quick_create/__openerp__.py b/base_optional_quick_create/__openerp__.py index 24c08b0e7..81c33ab24 100644 --- a/base_optional_quick_create/__openerp__.py +++ b/base_optional_quick_create/__openerp__.py @@ -24,8 +24,11 @@ 'category': 'Tools', 'summary': "Avoid 'quick create' on m2o fields, on a 'by model' basis", 'description': """ -This module allows to avoid to 'quick create' new records, through many2one fields, for a specific model. -You can configure which models should allow 'quick create'. When specified, the 'quick create' option will always open the standard create form. +This module allows to avoid to 'quick create' new records, through many2one +fields, for a specific model. +You can configure which models should allow 'quick create'. +When specified, the 'quick create' option will always open the standard create +form. Got the idea from https://twitter.com/nbessi/status/337869826028605441 """, diff --git a/base_optional_quick_create/model.py b/base_optional_quick_create/model.py index fc15593a7..470659443 100644 --- a/base_optional_quick_create/model.py +++ b/base_optional_quick_create/model.py @@ -22,10 +22,11 @@ from openerp.osv import orm, fields from openerp import SUPERUSER_ID from openerp.tools.translate import _ + class ir_model(orm.Model): _inherit = 'ir.model' - + _columns = { 'avoid_quick_create': fields.boolean('Avoid quick create'), }