diff --git a/carrier.py b/carrier.py index ed84f5da92..ab13c6e698 100644 --- a/carrier.py +++ b/carrier.py @@ -10,7 +10,6 @@ __all__ = ['Carrier'] class Carrier(ModelSQL, ModelView): 'Carrier' __name__ = 'carrier' - _inherits = {'party.party': 'party'} party = fields.Many2One('party.party', 'Party', required=True, ondelete='CASCADE') carrier_product = fields.Many2One('product.product', 'Carrier Product', @@ -29,21 +28,6 @@ class Carrier(ModelSQL, ModelView): def get_rec_name(self, name): return '%s - %s' % (self.party.rec_name, self.carrier_product.rec_name) - @classmethod - def copy(self, carriers, default=None): - Party = Pool().get('party.party') - - if default is None: - default = {} - default = default.copy() - new_carriers = [] - for carrier in carriers: - party, = Party.copy([carrier.party]) - default['party'] = party.id - new_carriers.extend(super(Carrier, self).copy([carrier], - default=default)) - return new_carriers - def get_sale_price(self): 'Compute carrier sale price with currency' User = Pool().get('res.user') diff --git a/carrier.xml b/carrier.xml index bfdcb27288..85f90e1a21 100644 --- a/carrier.xml +++ b/carrier.xml @@ -20,33 +20,17 @@ this repository contains the full copyright notices and license terms. --> carrier form - 10 carrier_form - - carrier - form - 20 - carrier_form2 - - carrier tree - 10 carrier_tree - - carrier - tree - 20 - carrier_tree2 - - Carriers carrier @@ -54,13 +38,13 @@ this repository contains the full copyright notices and license terms. --> - + - + - - -
- - - - - - + +