Created
April 30, 2019 05:38
-
-
Save akevinieron/85d4da26887d2b81b909f9adef22e027 to your computer and use it in GitHub Desktop.
[PATCH] Adding html field to list of fields to avoid html field
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From f78a2758c5d26f82aa91e2793f16b4d8036584a7 Mon Sep 17 00:00:00 2001 | |
| From: Kevin Jimenez <[email protected]> | |
| Date: Tue, 30 Apr 2019 04:58:23 +0000 | |
| Subject: [PATCH] Adding html field to list of fields to avoid html field | |
| company_dependent error | |
| --- | |
| odoo/addons/base/res/ir_property.py | 5 ++++- | |
| 1 file changed, 4 insertions(+), 1 deletion(-) | |
| diff --git a/odoo/addons/base/res/ir_property.py b/odoo/addons/base/res/ir_property.py | |
| index ddf8696a6..55a157520 100644 | |
| --- a/odoo/addons/base/res/ir_property.py | |
| +++ b/odoo/addons/base/res/ir_property.py | |
| @@ -13,6 +13,7 @@ TYPE2FIELD = { | |
| 'boolean': 'value_integer', | |
| 'integer': 'value_integer', | |
| 'text': 'value_text', | |
| + 'html': 'value_text', | |
| 'binary': 'value_binary', | |
| 'many2one': 'value_reference', | |
| 'date': 'value_datetime', | |
| @@ -27,6 +28,7 @@ TYPE2CLEAN = { | |
| 'char': lambda val: val or False, | |
| 'text': lambda val: val or False, | |
| 'selection': lambda val: val or False, | |
| + 'html': lambda val: val or False, | |
| 'binary': lambda val: val or False, | |
| 'date': lambda val: val or False, | |
| 'datetime': lambda val: val or False, | |
| @@ -51,6 +53,7 @@ class Property(models.Model): | |
| ('boolean', 'Boolean'), | |
| ('integer', 'Integer'), | |
| ('text', 'Text'), | |
| + ('html', 'Html'), | |
| ('binary', 'Binary'), | |
| ('many2one', 'Many2One'), | |
| ('date', 'Date'), | |
| @@ -110,7 +113,7 @@ class Property(models.Model): | |
| @api.multi | |
| def get_by_record(self): | |
| self.ensure_one() | |
| - if self.type in ('char', 'text', 'selection'): | |
| + if self.type in ('char', 'text','html' ,'selection'): | |
| return self.value_text | |
| elif self.type == 'float': | |
| return self.value_float | |
| -- | |
| 2.11.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment