← Back to team overview

openerp-expert-framework team mailing list archive

Re: [Openerp-expert-ergonomy] Guide lines

 

Hi

2010/7/15 Albert Cervera i Areny <albert@xxxxxxxxxxx>

>  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.
-- 
Christophe Chauvet
Directeur Technique/Technical Manager
27 Avenue Jean Mantelet
61000 Alençon, France
http://www.syleam.fr/


********************************************************************************
Ce message et toutes les pièces jointes (ci-après le "message") sont établis à
l'intention exclusive de ses destinataires et sont confidentiels. Si vous
recevez ce message par erreur, merci de le détruire et d'en avertir
immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa
destination, toute diffusion ou toute publication, totale ou partielle, est
interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer
l'intégrité de ce message, SYLEAM décline toute responsabilité au titre de ce
message, dans l'hypothèse où il aurait été modifié.

This message and any attachments (the "message") is intended solely for the
addressees and is confidential. If you receive this message in error, please
delete it and immediately notify the sender. Any use not in accord with its
purpose, any dissemination or disclosure, either whole or partial, is prohibited
except formal approval. The internet can not guarantee the integrity of this
message. SYLEAM shall not therefore be liable for the message if modified.
********************************************************************************


Follow ups

References