c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #04109
[Bug 606819] Re: missing reference of views in m2o
The email you are quoting is in fact incorrect, the reference that must
be passed is the XML ID of the view, because of course the database ID
would not make sense in the XML source of a module.
** Changed in: openobject-server
Importance: Wishlist => Undecided
** Changed in: openobject-server
Status: Confirmed => Invalid
--
missing reference of views in m2o
https://bugs.launchpad.net/bugs/606819
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
Status in OpenObject Server: Invalid
Bug description:
from expert list
A Dijous, 15 de juliol de 2010, Olivier Dony va escriure:
> > 7) I believe it's still not possible in a many2one view, to select the
> > view that would popup in the search list view or from record
> > creation/visualization view.
> > Currently we should code for this and override fields_view get and use
> > the context, but I think it would be better to support this natively
> > and declaratively using an attribute parameter.
> > (we do that hack in the fleet_maintenance module for instance).
>
> Hmm, ugly hack indeed. How about doing it the other way around and
> making this view the highest priority form view (thus the one used in
> the m2o), and then specifying another form view explicitly in the action
> that opens your regular list/form views.
That does not work in the case of invoices, for example. If you have a many2one widget to a customer invoice it will open up suppliers view. If you made customer invoice view the default, you'd have the same problem with many2one widgets referring to supplier invoices.
This problem happens in several cases.
For this i use in the context
<field name="my_m2o" context="{'form_view_ref': 134, 'tree_view_ref': 256}"/>
134 and 256 is the id for form and tree views that i want
Regards,
Christophe.
I suggest to make use of the view name - it's unique and portable, IMHO the id's are not .