Odoo Help

0

DataError: value too long for type character varying(16)

By
Aeneas Winterhalter
on 7/28/13, 7:26 PM 2,063 views

I wrote an addon which adds a second mail field. But i always got this error when i give my field more than 16 chars.

"DataError: value too long for type character varying(16)"

i dont find a solution, any ideas?

*.py:

from osv import osv, fields from tools.translate import _

class res_partner(osv.osv): _inherit = 'res.partner'

_columns = {
    'thirdmail': fields.char('Private Mailadresse', size=40, help='MoreMail'),
    }

res_partner()

*.xml

<openerp> <data>

    <record id="view_partner_form" model="ir.ui.view">
        <field name="name">res.partner.form</field>
        <field name="model">res.partner</field>
        <field name="type">form</field>
        <field name="inherit_id" ref="base.view_partner_form" />
        <field name="arch" type="xml">
            <field name="email" position="after">
                <field name="thirdmail" />
          </field>
        </field>
    </record>   

</data> </openerp>
0
Ethan Furman
On 1/9/14, 2:24 PM

This is only a guess, but try shortening "Private Mailadresse" to 16 or less and see if that works.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 7/28/13, 7:26 PM
Seen: 2063 times
Last updated: 3/16/15, 8:10 AM