import must not ask for _inherits field

Bug #930318 reported by Ferdinand
52
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Wishlist
OpenERP Publisher's Warranty Team

Bug Description

product_tmpl_id is pure internal and must be hidden from users

this field will never be in an import csv as users must and will not know internal ID's

Tags: maintenance
Revision history for this message
Ferdinand (office-chricar) wrote :
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Mark your field as readonly or override your field_get as befits your application domain if you do not wish for the field to be importable, the current (complete and utter lack of anything even remotely resembling an) import protocol does not give any way for the client to know the domain-specific semantics of your fields.

Changed in openerp-web:
status: New → Invalid
Revision history for this message
Ferdinand (office-chricar) wrote :

I forgot to mention - and it is not visible on the import form - it's not "my" field_get but the product import. nothing "I" can do about

Changed in openerp-web:
status: Invalid → New
Revision history for this message
Ferdinand (office-chricar) wrote :

it might well be that this message will bekome more meaningful (Name) after bug
https://bugs.launchpad.net/bugs/930313
is fixed

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : Re: [Bug 930318] Re: import must not ask for _inherits field

Hello Xavier,

I suggest we make this information - if the m2o is from an inherits or not
- available in the field information, so over RPC as it's trivial but
useful in many situations, not just here. For inatance in OOOR and
imitations, this is an information we always lack and do approximative
heuristics to deal with.

The GTK and web-client often don't have such issue because much of their
logic is driven by the fields they encounter in the views, but basing it
all from the hard- coded views is cetainly not good practise either, so I
suggest letting the clients know this information.

Hope it's clear, sorry sent from phone in airport.
On Feb 10, 2012 5:40 PM, "Ferdinand @ Camptocamp" <email address hidden>
wrote:

> I forgot to mention - and it is not visible on the import form - it's
> not "my" field_get but the product import. nothing "I" can do about
>
>
> ** Changed in: openerp-web
> Status: Invalid => New
>
> --
> You received this bug notification because you are a member of OpenERP
> Drivers, which is subscribed to OpenERP Web.
> https://bugs.launchpad.net/bugs/930318
>
> Title:
> import must not ask for _inherits field
>
> Status in OpenERP Web:
> New
>
> Bug description:
> product_tmpl_id is pure internal and must be hidden from users
>
> this field will never be in an import csv as users must and will not
> know internal ID's
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openerp-web/+bug/930318/+subscriptions
>

Revision history for this message
Ferdinand (office-chricar) wrote :

IMHO it realy must get out of the way

we have a "name" field for product name - which technically is product_product.product_tmpl_id.name

so no way to define product_tmpl_id/id in an import csv

Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

> I suggest we make this information - if the m2o is from an inherits or not - available in the field information, so over RPC as it's trivial but useful in many situations, not just here. For inatance in OOOR and imitations, this is an information we always lack and do approximative heuristics to deal with.

I'm not against such an idea at all, but this needs to be brought up to the framework and actually discussed in order to find a generally useful API for that kind of stuff, so we don't end up with yet another limited shitty ad-hoc attribute.

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Ferdinand: my remark is more: we probably should do what you suggest and
I'm just commenting on how this could technically be done by exposing the
inherits structure over RPC to the clients, cause the limitation doesn't
showa up just here.
On Feb 10, 2012 7:42 PM, "Ferdinand @ Camptocamp" <email address hidden>
wrote:

> IMHO it realy must get out of the way
>
> we have a "name" field for product name - which technically is
> product_product.product_tmpl_id.name
>
> so no way to define product_tmpl_id/id in an import csv
>
> --
> You received this bug notification because you are a member of OpenERP
> Drivers, which is subscribed to OpenERP Web.
> https://bugs.launchpad.net/bugs/930318
>
> Title:
> import must not ask for _inherits field
>
> Status in OpenERP Web:
> New
>
> Bug description:
> product_tmpl_id is pure internal and must be hidden from users
>
> this field will never be in an import csv as users must and will not
> know internal ID's
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openerp-web/+bug/930318/+subscriptions
>

Changed in openerp-web:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Wishlist
status: New → Confirmed
affects: openerp-web → openobject-server
Revision history for this message
Francois Degrave (fde-be) wrote :

Seriously? This is wishlist? It just prevents anyone to import a product without creating several objects explicitly, and this is wishlist?

Revision history for this message
Ferdinand (office-chricar) wrote :

Just want to recall that product import works with GTK

Revision history for this message
Francois Degrave (fde-be) wrote :

Ok, thanks Ferdinand... But I think that's one more reason to not considre that as "wishlist". That is clearly a dysfunction that should be corrected, not just an additional feature wished by some users.

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

I agree this is a really important usability features, and it does not deserve to be tagged "wishlist". Maybe if it affected something less frequently imported as Products, but IMO, this is an important issue.

Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

+ 1 for issue to be solved.

Changed in openobject-server:
assignee: OpenERP's Framework R&D (openerp-dev-framework) → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Hello,

related to this:
I would suggest to have the ir.model object expose what are the _inherits fields to the RPC clients. Today this information is not exposed and leads to this issue for instance. Today, OpenERP GTK adn web-client rely on the fact that those _inherits fields are carefully not included in the XML of the views (like the fact there is no product_tmpl_id in the product.product forms) but this is a kind of hardcoded workaround, a much more elegant and generic solution would be to expose to RPC clients those keys so they know how to deal with them. That would allow to fix that bug too.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

For the record, here is a workaround for the problem by way of monkey patching:
https://code.launchpad.net/~therp-nl/web-addons/6.1-import_models_with_inherits

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.