openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #05237
option in delivery method
Hi yannick, all,
Here
http://bazaar.launchpad.net/~stock-logistic-core-editors/carriers-deliveries/7.0/view/head:/base_delivery_carrier_label/delivery.py
is defined a clever system to manage options and their availability to
delivery methods.
these options types are :
('mandatory', 'Mandatory'),('default_option', 'Optional by
Default'),('option', 'Optional'),
All is there.
But when you develop a set of options available for some methods, you need
to prevent to change some settings.
If an option is mandatory, the user must not can change it. Some fields
must be readonly in views at least.
But for the case 'default_option', the developer can't know if the option
must be 'option' (allowed) or 'default_option'. It's the admin (or
functionnal consultant, tuning guy) who know that.
For this use case I propose 2 things :
* add a boolean 'readonly_record' (defined to False by default) to allow to
freeze in readonly some fields in 'delivery.carrier.template.option' and in
'delivery.carrier' too
* delete 'default_option' value in state selection field and add a boolean
'add_default_option' not linked with 'readonly_record' to switch from
option <-> option_default behavior
Thanks for your answer, I can do a merge proposal for
base_delivery_carrier_label, asap
David BEAL
Akretion
OpenERP Development - Integration
+33 (0)6 67 22 86 89
+33 (0)4 82 53 84 60
Follow ups