← Back to team overview

openerp-community team mailing list archive

Re: Problem with recreating standard-data

 

I agree with Eric

On Tue, Oct 16, 2012 at 11:32 AM, Eric Caudal <eric.caudal@xxxxxxxxxxxxxx>wrote:

>  +1
> Deletion of base information should be controlled at ORM level
>
>   [image: openerp]
>
> *Eric CAUDAL*, Elico Corp, Shanghai.eric.caudal@xxxxxxxxxxxxxx
> Cell: + 86 186 2136 1670. Skype: elico.corp*Premium Certified Training Partner - OpenERP Ready Partner.*
>
>
> [image: Premium CTP]
> http://www.openerp.net.cn
> On 10/16/2012 05:31 PM, Marvin Hass wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> The question is: why did you delete Andorra to recreate it later?
>
> Why not? I'm able to delete the objects without a warning! On the other
> hand -> what should i tell customers (as an OpenERP-Partner)? 'It's not
> recommended to delete some standard-data (which are not documentated) in
> OpenERP because we aren't able to update the server without problems'.
>
> I understand that deleting countries not typical but the problem is
> present on every object which is created while a moduleinstallation.
>
> We have the same problem with the pricelists! Costumers create his own
> pricelist and deletes the old ones.
>
> Kind regards,
>
> Marvin Hass
>
> Am 16.10.2012 10:24, schrieb Olivier Dony:
>
>  On 10/16/2012 10:05 AM, Marvin Hass wrote:
>
>  ValueError: No such external ID currently defined in the system:base.ad 2012-10-16 06:58:00,734 5905 ERROR max_61 openerp.netsvc:
> No such external ID currently defined in the system: base.ad
>
> If you want to generate this error -> follow this steps: 1. I
> deleted all countries from res.country (which are not important
> for my busseness) 2. I added Andorra (code = ad) to res.country
> 3. Start the server with --update=all
>
>  The question is: why did you delete Andorra to recreate it later?
> The list of countries is part of the base data of OpenERP, and
> several
>
>  things
>
>  depend on it (similarly to the list of currencies). That's why the
>
>  system will
>
>  try to re-create it at each update. You should not delete them,
>
>  especially to
>
>  recreate conflicting countries afterwards.
>
> If the size of the list really bothers you, look into alternative
> customizations, like setting a default value for the country field
> and
>
>  then
>
>  hiding it from the view, or adding a custom filter on these fields
> to
>
>  only let
>
>  Andorra appear (this requires some knowledge in OpenERP
> customization).
>
>
>
>  I think it is a big issue! If i delete standard-data and recreate
> the entry i'm not able to update my system anymore!
>
>  Well this is the expected behavior, and only happens because each
>
>  country is
>
>  (fortunately!) required to be unique, and the list of countries is
>
>  part of the
>
>  base data of the system, re-created at each update. You should be
> able to fix your problem by deleting the Andorra record you
> manually created, then performing the update again, to let the
> system
>
>  re-create
>
>  the countries. If you can't delete your Andorra record because
> many
>
>  documents
>
>  reference it already, you could rename it or (harder) manually
> create an 'ir.model.data' entry to make the system believe this is
> the original
>
>  'Andorra'
>
>  record. Ask for more details if you don't know how to do this.
>
> Hope this helps..
>
>
>  -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJQfSlhAAoJELPuL5Oa1N8GarwH+wU8SHeXhtJNVBaqNWDooBiV
> OdzJUHzmnvrIAoNEinbQeFeZA4uXqz+c1Lz4lJ19gAUYaE4whI8DgTPyuoHk8AP+
> 3ZR3hJuSH6OeX6gHsQPe5PoNIxSQpi3obzd94n3X87Ddx3BV9N2Om3WIK1HuOxkG
> 5hSalY4zVg4PyrsGgM6SreE2OnfkVjuh7/3kVwmwF71hJ8RJ4pa/Og5mSvtMogix
> R9SIfq5DdIpuD+TE4gH2GHR3FWGvNYR0vWQUCbHFjFe821RECo4ix9Hrrfp0zs+N
> +n4dVEj+Vci/+X14yIJ2zVrtI+NJb/cAsPS0JAUkaYrCQBfcDbQyOJk4YnRX6+0=
> =dwDA
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help   : https://help.launchpad.net/ListHelp
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to     : openerp-community@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-community
> More help   : https://help.launchpad.net/ListHelp
>
>

References