From 63e99ca835275c084ec6891d7fc1d773fccfc749 Mon Sep 17 00:00:00 2001 From: Sylvain GARANCHER Date: Thu, 11 Feb 2016 10:54:32 +0100 Subject: [PATCH] [FIX] Override the field to add the value instead of breaking the validation system --- report_xls/ir_report.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/report_xls/ir_report.py b/report_xls/ir_report.py index ba6fb12e..8d74d7f9 100644 --- a/report_xls/ir_report.py +++ b/report_xls/ir_report.py @@ -20,15 +20,10 @@ # ############################################################################## -from openerp import models +from openerp import models, fields class IrActionsReportXml(models.Model): _inherit = 'ir.actions.report.xml' - def _check_selection_field_value(self, cr, uid, - field, value, context=None): - if field == 'report_type' and value == 'xls': - return - return super(IrActionsReportXml, self)._check_selection_field_value( - cr, uid, field, value, context=context) + report_type = fields.Selection(selection_add=[('xls', 'XLS')])