Use related model_id field to build domain

This commit is contained in:
fkantelberg
2020-07-13 08:52:44 +02:00
parent 355eeef83b
commit 2e5e17acb7
3 changed files with 10 additions and 4 deletions

View File

@@ -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"