← Back to team overview

openerp-expert-framework team mailing list archive

Re: [Openerp-expert-ergonomy] Guide lines

 

On 15 Jul 2010, at 18:02, Christophe CHAUVET (SYLEAM) wrote:

> 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
> 

This doesn't work like that. You have to provide the XMLID of the view, not his ID.

But I think that the stable client doesn't update the context in the case of x2many widget, avoiding to use this feature (bug report exists: https://bugs.launchpad.net/bugs/581816)

> 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.
> ********************************************************************************
> 
> _______________________________________________
> 
> Mailing list: https://launchpad.net/~openerp-expert-framework
> Post to     : openerp-expert-framework@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openerp-expert-framework
> More help   : https://help.launchpad.net/ListHelp


--
Christophe Simonis
OpenERP sa
Chausée de Namur, 40
1367 Grand-Rosière
Tel: +32 81 81 37 00
http://openerp.com
http://odoo.com







Follow ups

References