c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #16890
Re: [Bug 709201] Re: No "code" field in "res.currency" object
On 21. 02. 11 10:43, Olivier Dony (OpenERP) wrote:
> Everyone, please calm down, here is the rationale:
>
> It is a convention in OpenERP that all objects that are likely to be linked via a many2one relationship should have a 'name' (or _rec_name) column. For res.currency, we used to have "name", "code", and "symbol". The result was that in many cases, name was equal to code, and any module that needed to refer to a currency had to choose which one to take.. and they did not all pick the same one. But how many different fields do we actually need to describe a currency?
> As the bug description is saying, the only way of referring to a unique currency is to use the ISO code. We wanted to avoid the confusion (the "name" was only used as label when selecting a currency) so in v6 the "code" field has been removed, and "name" is now meant to hold the code, while "symbol" is still used to hold the short currency representation to be used in print, usually the currency sign (http://en.wikipedia.org/wiki/Currency_sign).
> For example: name="USD", symbol="$" - which should be sufficient for most purposes. This is similar to sale.order's name which is the SO sequence number - the main unique reference to it.
>
> So basically, as part of the migration to v6, modules that used to
> depend on the "code" of res.currency should now reference the name
> instead (and those using the name can just stay as they were). If this
> is what was done for c2c_currency_rate_update, then it's correct.
>
> Therefore this bug should in fact be closed, unless you truly believe
> that a third field is really needed for describing a currency in
> OpenERP's core. Maybe we should also convert this bug to a FAQ if you
> think this is going to confuse many module authors...
>
> PS: we will add a help/tooltip on the "name" field to indicate that it's
> really meant to hold the code, and double-check all currencies that are
> shipped with OpenERP to make sure the name really is the ISO code (as
> not 100% of the currencies had name==code, some codes need to be
> restored properly).
>
> ** Changed in: openobject-addons
> Importance: Wishlist => Undecided
>
> ** Changed in: openobject-addons
> Status: Confirmed => Invalid
>
> ** Changed in: openobject-addons
> Assignee: OpenERP R&D Addons Team 3 (openerp-dev-addons3) => (unassigned)
>
I would dare to say that while you made it confusing, you took out
something which can/could still be useful.
symbol: $
[ISO] code : USD
name: US Dollar. or should I say _(US Dollar) ??
while in my example you might not see the use, just think about chinese,
russian, arabic, hebrew and so on...
not sure that the symbol is "that" useful though... but is nice to have :-)
regards,
bogdan
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/709201
Title:
No "code" field in "res.currency" object
Status in Aeroo Reports for Open ERP:
Confirmed
Status in OpenERP Modules (addons):
Invalid
Status in OpenOffice.org Reporting Engine for OpenObject:
Confirmed
Bug description:
There is no code field in the res.currency object, which used to hold
ISO 4217 (http://en.wikipedia.org/wiki/ISO_4217) code for the
currency. ISO code is the only referable code for a currency, any
other name is just user friendly representation and may vary from
country to country, still they are not official names of the currency.
Please do not disregard this defect as many modules depend on this
code do find correct currency in a system.
This defect is present in whole OpenERP's 6th version branch.
References