[FIX] fields: enable default on company-dependent field
The ORM overrides the default defined programmatically on the field, and set a default function that retrieves the value in `ir.property`. closes odoo/odoo#36545 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
This commit is contained in:
+1
-1
@@ -420,7 +420,7 @@ class Field(MetaField('DummyField', (object,), {})):
|
||||
# by default, company-dependent fields are not stored and not copied
|
||||
attrs['store'] = False
|
||||
attrs['copy'] = attrs.get('copy', False)
|
||||
attrs['default'] = self._default_company_dependent
|
||||
attrs['default'] = attrs.get('default', self._default_company_dependent)
|
||||
attrs['compute'] = self._compute_company_dependent
|
||||
if not attrs.get('readonly'):
|
||||
attrs['inverse'] = self._inverse_company_dependent
|
||||
|
||||
Reference in New Issue
Block a user