← Back to team overview

openerp-community team mailing list archive

Re: option in delivery method

 

For the records,

About allowed options in case of postlogistics, there are sub options
available depending on which base options are used.
To solve filter options a function field available_ids is used in order to
give a filtered list of options to the functional guy who
has to define carriers.

Thus some options of the carrier partner won't be displayed on purpose when
creating a carrier.

Cheers,


On Wed, Mar 12, 2014 at 2:31 PM, David Beal <david.beal@xxxxxxxxxxxx> wrote:

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



-- 
Yannick Vaucher
Business Solutions Software Developer

Camptocamp SA
PSE A, CH-1015 Lausanne
Phone: +41 21 619 10 30
Office: +41 21 619 10 10
http://www.camptocamp.com/

References