[quote author=Joshua link=topic=16495.msg28482#msg28482 date=1405410922][quote author=wanjin6666 link=topic=16495.msg28481#msg28481 date=1405404859][quote author=Jeff link=topic=16495.msg28453#msg28453 date=1405007095]跑偏了请新建模块用继承的方式修改[/quote]你好,Jeff!请问如果通过继承来修改字段长度,下面的代码是否正确?# -- encoding: utf-8 --from osv import osv, fieldsclass product_variants(osv.osv): """ 修改产品模版表variants字段长度为1500, """ _inherit = "product.product" _columns = { 'variants': fields.char('Variants', size=1500) }product_variants()[/quote]正确,如果要改成是text不用改视图,直接:
'variants': fields.text('Variants')
[/quote]请问text能限制输入字数吗??