From 9cfa8face88cd5afd34e794778095930506c5086 Mon Sep 17 00:00:00 2001 From: Valentin Chemiere Date: Thu, 12 Mar 2015 18:30:54 +0100 Subject: [PATCH] Some errors at install --- external_file_location/__openerp__.py | 2 +- external_file_location/attachment_view.xml | 9 +-------- external_file_location/location.py | 4 ++-- external_file_location/task.py | 13 +++++++------ 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/external_file_location/__openerp__.py b/external_file_location/__openerp__.py index 04c1063f..c45965a7 100644 --- a/external_file_location/__openerp__.py +++ b/external_file_location/__openerp__.py @@ -35,8 +35,8 @@ 'ir_attachment_metadata', ], 'data': [ - 'attachment_view.xml', 'menu.xml', + 'attachment_view.xml', 'location_view.xml', 'task_view.xml', 'cron.xml', diff --git a/external_file_location/attachment_view.xml b/external_file_location/attachment_view.xml index d545c346..0f083efa 100644 --- a/external_file_location/attachment_view.xml +++ b/external_file_location/attachment_view.xml @@ -70,19 +70,12 @@ ir.actions.act_window ir.attachment form - kanban,tree,form + tree,form [('task_id', '!=', False)] - - - kanban - - - - tree diff --git a/external_file_location/location.py b/external_file_location/location.py index 1205a5d2..1a625956 100644 --- a/external_file_location/location.py +++ b/external_file_location/location.py @@ -21,8 +21,8 @@ ############################################################################### from openerp import models, fields -from knowledge.external_file_location.abstract_task import AbstractTask -from knowledge.external_file_location.helper import itersubclasses +from .abstract_task import AbstractTask +from .helper import itersubclasses class Location(models.Model): _name = 'external.file.location' diff --git a/external_file_location/task.py b/external_file_location/task.py index 023faae1..655e98ee 100644 --- a/external_file_location/task.py +++ b/external_file_location/task.py @@ -21,8 +21,8 @@ ############################################################################### from openerp import models, fields, api -from knowledge.external_file_location.helper import itersubclasses -from knowledge.external_file_location.abstract_task import AbstractTask +from .helper import itersubclasses +from .abstract_task import AbstractTask class Task(models.Model): @@ -52,10 +52,11 @@ class Task(models.Model): @api.onchange('method') def onchage_method(self): - if 'import' in self.method: - self.method_type = 'import' - elif 'export' in self.method: - self.method_type = 'export' + if self.method: + if 'import' in self.method: + self.method_type = 'import' + elif 'export' in self.method: + self.method_type = 'export' @api.model def _run(self, domain=None):