← Back to team overview

openerp-community-reviewer team mailing list archive

Re: lp:~camptocamp/carriers-deliveries/7.0-add-delivery_carrier_label_postlogistics_shop_logo-yvr into lp:carriers-deliveries

 

"Add an option to define a logo per shop if no shop logo is defined" seems contradictory to me.


_generate_poste_ch_label is duplicated with the method in delivery_carrier_label_postlogistics.

You should rather allow to customize the class to use, either in a class attribute, either in a argument of the method:

    def _generate_poste_ch_label(self, cr, uid, picking, webservice_class=None, context=None):
        if webservice_class is None:
            webservice_class = PostlogisticsWebService

And then in this module:
    def _generate_poste_ch_label(self, cr, uid, picking, webservice_class=None, context=None):
        return super(stock_picking_out, self)._generate_poste_ch_label(cr, uid, picking, webservice_class=PostlogisticsWebServiceShop, context=context)

-- 
https://code.launchpad.net/~camptocamp/carriers-deliveries/7.0-add-delivery_carrier_label_postlogistics_shop_logo-yvr/+merge/196859
Your team Stock and Logistic Core Editors is subscribed to branch lp:carriers-deliveries.


References