Improve rec_name of carrier
review206004
This commit is contained in:
1 parent
c6f0247d5d
commit
3d4a905161
3 files changed
+16
No files matched your search
@@ -1,3 +1,5 @@
|
||||
* Improve rec_name of carrier
|
||||
|
||||
Version 2.2.0 - 2011-10-24
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
|
||||
|
||||
@@ -24,6 +24,15 @@ class Carrier(ModelSQL, ModelView):
|
||||
def default_carrier_cost_method(self):
|
||||
return 'product'
|
||||
|
||||
def get_rec_name(self, ids, name):
|
||||
if not ids:
|
||||
return {}
|
||||
names = {}
|
||||
for carrier in self.browse(ids):
|
||||
names[carrier.id] = '%s - %s' % (carrier.party.rec_name,
|
||||
carrier.carrier_product.rec_name)
|
||||
return names
|
||||
|
||||
def copy(self, ids, default=None):
|
||||
party_obj = Pool().get('party.party')
|
||||
|
||||
|
||||
@@ -75,6 +75,11 @@ this repository contains the full copyright notices and license terms. -->
|
||||
position="replace_attributes">
|
||||
<tree string="Carriers"/>
|
||||
</xpath>
|
||||
<xpath expr="/tree/field[@name='name']"
|
||||
position="after">
|
||||
<field name="carrier_product"/>
|
||||
<field name="carrier_cost_method"/>
|
||||
</xpath>
|
||||
</data>
|
||||
]]>
|
||||
</field>
|
||||
|
||||
Reference in new issue
Block a user