Use the appropriate patch for issue8413.
This commit is contained in:
parent
95a2eb85ca
commit
f228e71f5b
|
@ -1,12 +1,22 @@
|
|||
diff -r 254e4bb38458 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
|
||||
@@ -13,6 +13,8 @@
|
||||
class Carrier(ModelSQL, ModelView):
|
||||
'Carrier'
|
||||
__name__ = 'carrier'
|
||||
+ _rec_name = 'party'
|
||||
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:]),
|
||||
+ ]
|
||||
+
|
||||
party = fields.Many2One('party.party', 'Party', required=True,
|
||||
ondelete='CASCADE', help="The party which represents the carrier.")
|
||||
carrier_product = fields.Many2One('product.product', 'Carrier Product',
|
||||
def get_sale_price(self):
|
||||
'Compute carrier sale price with currency'
|
||||
User = Pool().get('res.user')
|
||||
|
|
Loading…
Reference in New Issue