Odoo Help

Welcome!

This community 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.

0

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

By
Aeneas Winterhalter
on 7/28/13, 7:26 PM 1,742 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.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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