Use the appropriate patch for issue8413.
This commit is contained in:
parent
95a2eb85ca
commit
f228e71f5b
|
@ -1,12 +1,22 @@
|
||||||
diff -r 254e4bb38458 carrier.py
|
Index: carrier.py
|
||||||
--- a/trytond/trytond/modules/carrier/carrier.py Mon May 06 15:01:12 2019 +0200
|
===================================================================
|
||||||
+++ b/trytond/trytond/modules/carrier/carrier.py Mon Jun 10 10:00:08 2019 +0200
|
--- a/trytond/trytond/modules/carrier/carrier.py
|
||||||
@@ -13,6 +13,8 @@
|
+++ b/trytond/trytond/modules/carrier/carrier.py
|
||||||
class Carrier(ModelSQL, ModelView):
|
@@ -32,6 +32,17 @@
|
||||||
'Carrier'
|
def get_rec_name(self, name):
|
||||||
__name__ = 'carrier'
|
return '%s - %s' % (self.party.rec_name, self.carrier_product.rec_name)
|
||||||
+ _rec_name = 'party'
|
|
||||||
|
+ @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:]),
|
||||||
|
+ ]
|
||||||
+
|
+
|
||||||
party = fields.Many2One('party.party', 'Party', required=True,
|
def get_sale_price(self):
|
||||||
ondelete='CASCADE', help="The party which represents the carrier.")
|
'Compute carrier sale price with currency'
|
||||||
carrier_product = fields.Many2One('product.product', 'Carrier Product',
|
User = Pool().get('res.user')
|
||||||
|
|
Loading…
Reference in New Issue