openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #06417
[Merge] lp:~openerp-community/ocb-server/trunk-bugfix-1053511 into lp:ocb-server/6.1
Laurent Chane has proposed merging lp:~openerp-community/ocb-server/trunk-bugfix-1053511 into lp:ocb-server/6.1.
Requested reviews:
OpenERP Community Backports (ocb)
Related bugs:
Bug #1053511 in OpenERP Server: "dynamical text fields have size=64 when show dynamically in a view"
https://bugs.launchpad.net/openobject-server/+bug/1053511
For more details, see:
https://code.launchpad.net/~openerp-community/ocb-server/trunk-bugfix-1053511/+merge/225604
[FIX] Removes the limit of 64 characters from additional text fields added via the interface
https://bugs.launchpad.net/openobject-server/+bug/1053511
This change is the same as done in:
http://bazaar.launchpad.net/~openerp-dev/openobject-server/7.0-opw-582876-cbi/revision/4908
--
https://code.launchpad.net/~openerp-community/ocb-server/trunk-bugfix-1053511/+merge/225604
Your team OpenERP Community is subscribed to branch lp:~openerp-community/ocb-server/trunk-bugfix-1053511.
=== modified file 'openerp/addons/base/ir/ir.xml'
--- openerp/addons/base/ir/ir.xml 2013-09-10 14:15:41 +0000
+++ openerp/addons/base/ir/ir.xml 2014-07-04 06:33:58 +0000
@@ -1140,7 +1140,7 @@
'readonly': [('ttype','not in', ['many2one','one2many','many2many'])]}"/>
<field name="relation_field" attrs="{'required': [('ttype','=','one2many')], 'readonly': [('ttype','!=','one2many')]}"/>
<field name="selection" attrs="{'required': [('ttype','in',['selection','reference'])], 'readonly': [('ttype','not in',['selection','reference'])]}"/>
- <field name="size" attrs="{'required': [('ttype','in',['char','reference'])], 'readonly': [('ttype','not in',['char','reference'])]}"/>
+ <field name="size" attrs="{'invisible': [('ttype','not in',['char','text','reference'])]}"/>
<field name="domain" attrs="{'readonly': [('relation','=','')]}"/>
<field name="serialization_field_id" attrs="{'readonly': [('state','=','base')]}" domain = "[('ttype','=','serialized'), ('model_id', '=', model_id)]"/>
</group>
=== modified file 'openerp/addons/base/ir/ir_model.py'
--- openerp/addons/base/ir/ir_model.py 2012-03-23 09:55:11 +0000
+++ openerp/addons/base/ir/ir_model.py 2014-07-04 06:33:58 +0000
@@ -233,7 +233,6 @@
'state': lambda self,cr,uid,ctx={}: (ctx and ctx.get('manual',False)) and 'manual' or 'base',
'on_delete': 'set null',
'select_level': '0',
- 'size': 64,
'field_description': '',
'selectable': 1,
}
@@ -263,10 +262,10 @@
return True
def _size_gt_zero_msg(self, cr, user, ids, context=None):
- return _('Size of the field can never be less than 1 !')
+ return _('Size of the field can never be less than 0 !')
_sql_constraints = [
- ('size_gt_zero', 'CHECK (size>0)',_size_gt_zero_msg ),
+ ('size_gt_zero', 'CHECK (size>=0)',_size_gt_zero_msg ),
]
def unlink(self, cr, user, ids, context=None):
=== modified file 'openerp/osv/orm.py'
--- openerp/osv/orm.py 2013-09-10 14:15:41 +0000
+++ openerp/osv/orm.py 2014-07-04 06:33:58 +0000
@@ -1014,7 +1014,7 @@
'required': bool(field['required']),
'readonly': bool(field['readonly']),
'domain': eval(field['domain']) if field['domain'] else None,
- 'size': field['size'],
+ 'size': field['size'] or None,
'ondelete': field['on_delete'],
'translate': (field['translate']),
'manual': True,
Follow ups