← Back to team overview

c2c-oerpscenario team mailing list archive

Re: [Bug 861271] Re: account installer default chars too small - possibly wide ranging issue

 

Basically, the field has no size specified and on postgres v9 it is created
as default 16 characters.  THis is from line 532 or so of orm.py

f_size = reduce(lambda x, y: max(x, len(y[0])), f.selection, f.size or
16)

in how it deals with selection fields.  Now previously this was no issue as
osv_memory was different, but now because it use postgres, and no sizes are
specified, ANY chart of accounts with more than 16 characteres fails.
 Normally it is no issue for selection fields to be limited to 16
characters, but because in charts at least 8 are taken up with l10n_CC_ .  A
size of 32 is more suitable as it will be more and more common for country
specific chart variants e.g. l10n_nz_manufacturing, l10n_nz_distribution etc
etc.

To reproduce install l10n_chart_us_general.

On Fri, Sep 30, 2011 at 8:18 PM, Jignesh Rathod(OpenERP) <
861271@xxxxxxxxxxxxxxxxxx> wrote:

> Hello Graeme,
>
> I have downloaded your module and checked with latest trunk
> but I did not faced any traceback so would you please provide more
> information.
>
> Thanks and waiting for your reply.
>
> ** Changed in: openobject-addons
>       Status: New => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/861271
>
> Title:
>  account installer default chars too small - possibly wide ranging
>  issue
>
> Status in OpenERP Addons (modules):
>   Incomplete
>
> Bug description:
>  latest trunk (like today)
>
>  We have a few variations of localisations - I went to install one and
>  got chucked a nasty traceback.
>
>  [2011-09-28 09:12:57,570][?] ERROR:db.cursor:bad query: insert into
> "account_installer"
> (id,"date_stop","sale_tax","date_start","company_id","period","charts","progress","purchase_tax",create_uid,create_date)
> values
> (1,E'2012-03-31',0.0,E'2011-04-01',1,E'month',E'l10n_nz_ril_branch',11.0,0.0,1,now())
>  Traceback (most recent call last):
>    File "/home/graemeg/workspace/trunk/openerp/server/openerp/sql_db.py",
> line 215, in execute
>      res = self._obj.execute(query, params)
>  DataError: value too long for type character varying(16)
>
>  Had a look at the code and I see there is no size specified for charts
>  field, but it appears that now if a size is not specified it defaults
>  to 16.  Is a regression in that the exact same localisation installs
>  fine on 6.0.3.  Now I am wondering how many other places this is going
>  to occur.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-addons/+bug/861271/+subscriptions
>

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP Project Group.
https://bugs.launchpad.net/bugs/861271

Title:
  account installer default chars too small - possibly wide ranging
  issue

Status in OpenERP Addons (modules):
  Incomplete

Bug description:
  latest trunk (like today)

  We have a few variations of localisations - I went to install one and
  got chucked a nasty traceback.

  [2011-09-28 09:12:57,570][?] ERROR:db.cursor:bad query: insert into "account_installer" (id,"date_stop","sale_tax","date_start","company_id","period","charts","progress","purchase_tax",create_uid,create_date) values (1,E'2012-03-31',0.0,E'2011-04-01',1,E'month',E'l10n_nz_ril_branch',11.0,0.0,1,now())
  Traceback (most recent call last):
    File "/home/graemeg/workspace/trunk/openerp/server/openerp/sql_db.py", line 215, in execute
      res = self._obj.execute(query, params)
  DataError: value too long for type character varying(16)

  Had a look at the code and I see there is no size specified for charts
  field, but it appears that now if a size is not specified it defaults
  to 16.  Is a regression in that the exact same localisation installs
  fine on 6.0.3.  Now I am wondering how many other places this is going
  to occur.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/861271/+subscriptions


References