← Back to team overview

openerp-community team mailing list archive

Re: lp:~akretion-team/openerp-product-attributes/polymorphic-relations into lp:openerp-product-attributes

 

Note: you may probably wonder why that new attribute_option_wizard wizard?

Well it's here to trick the OpenObject widget framework to make it easy to pick a few references to a custom OpenERP model (the relation_model_id of the attribute) while this model can change.

We could have left the user edit the value_ref field in the option_ids tree. But polymorphic m2o widget are a big PITA to edit in OpenERP (try to search for a specific model inside the selection to understand) and it would have been tricky to warranty the consistency: all option_ids lines should belong to the same model, the one selected in the relation_model_id field. All in all, from my experience, such a wizard is the less ugly way to offer that kind of user interface.

Hope this clarified the reason why.
-- 
https://code.launchpad.net/~akretion-team/openerp-product-attributes/polymorphic-relations/+merge/150725
Your team OpenERP Community is subscribed to branch lp:openerp-product-attributes.


References