2019-10-24 16:38:14 +02:00
|
|
|
Index: carrier.py
|
|
|
|
===================================================================
|
|
|
|
--- a/trytond/trytond/modules/carrier/carrier.py
|
|
|
|
+++ b/trytond/trytond/modules/carrier/carrier.py
|
|
|
|
@@ -32,6 +32,17 @@
|
|
|
|
def get_rec_name(self, name):
|
|
|
|
return '%s - %s' % (self.party.rec_name, self.carrier_product.rec_name)
|
|
|
|
|
|
|
|
+ @classmethod
|
|
|
|
+ def search_rec_name(cls, name, clause):
|
|
|
|
+ if clause[1].startswith('!') or clause[1].startswith('not '):
|
|
|
|
+ bool_op = 'AND'
|
|
|
|
+ else:
|
|
|
|
+ bool_op = 'OR'
|
|
|
|
+ return [bool_op,
|
|
|
|
+ ('party.rec_name',) + tuple(clause[1:]),
|
|
|
|
+ ('carrier_product.rec_name',) + tuple(clause[1:]),
|
|
|
|
+ ]
|
2019-06-10 10:02:15 +02:00
|
|
|
+
|
2019-10-24 16:38:14 +02:00
|
|
|
def get_sale_price(self):
|
|
|
|
'Compute carrier sale price with currency'
|
|
|
|
User = Pool().get('res.user')
|