diff --git a/base_dav/models/dav_collection.py b/base_dav/models/dav_collection.py index c98e5320..f7a4d96d 100644 --- a/base_dav/models/dav_collection.py +++ b/base_dav/models/dav_collection.py @@ -7,9 +7,10 @@ import time from operator import itemgetter from urllib.parse import quote_plus -import vobject from odoo import api, fields, models, tools +import vobject + # pylint: disable=missing-import-error from ..controllers.main import PREFIX from ..radicale.collection import Collection, FileItem, Item diff --git a/base_dav/models/dav_collection_field_mapping.py b/base_dav/models/dav_collection_field_mapping.py index 8ef7e304..9f90715e 100644 --- a/base_dav/models/dav_collection_field_mapping.py +++ b/base_dav/models/dav_collection_field_mapping.py @@ -4,10 +4,11 @@ import datetime +from odoo import api, fields, models, tools + import dateutil import vobject from dateutil import tz -from odoo import api, fields, models, tools class DavCollectionFieldMapping(models.Model): @@ -34,6 +35,10 @@ class DavCollectionFieldMapping(models.Model): required=True, help="Field of the model the values are mapped to", ) + model_id = fields.Many2one( + 'ir.model', + related='collection_id.model_id', + ) import_code = fields.Text( help="Code to import the value from a vobject. Use the variable " "result for the output of the value and item as input" diff --git a/base_dav/views/dav_collection.xml b/base_dav/views/dav_collection.xml index d0cbfb21..dcea3414 100644 --- a/base_dav/views/dav_collection.xml +++ b/base_dav/views/dav_collection.xml @@ -51,9 +51,10 @@
+ - + @@ -73,5 +74,4 @@ action="action_dav_collection" sequence="100" /> -