Commit ecf3f470 authored by Cédric Krier's avatar Cédric Krier
Browse files

Add reference in record name of sale opportunity

Closes #3641
parent d4c18ea3f86b
Pipeline #61730 passed with stages
in 12 minutes and 46 seconds
......@@ -302,6 +302,25 @@
'default_customer_payment_term', **pattern)
return if payment_term else None
def get_rec_name(self, name):
items = [self.number]
if self.reference:
return ' '.join(items)
def search_rec_name(cls, name, clause):
_, operator, value = clause
if operator.startswith('!') or operator.startswith('not '):
bool_op = 'AND'
bool_op = 'OR'
domain = [bool_op,
('number', operator, value),
('reference', operator, value),
return domain
def view_attributes(cls):
return super().view_attributes() + [
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment