For the communication field, if self.move_id.ref is False, fallback on self.move_id.name

This commit is contained in:
Alexis de Lattre
2016-07-23 00:36:56 +02:00
committed by Enric Tobella
parent 6f4c9990d7
commit 1039c8c1be

View File

@@ -23,7 +23,7 @@ class AccountMoveLine(models.Model):
aplo = self.env['account.payment.line']
# default values for communication_type and communication
communication_type = 'normal'
communication = self.move_id.ref or '-'
communication = self.move_id.ref or self.move_id.name
# change these default values if move line is linked to an invoice
if self.invoice_id:
if self.invoice_id.reference_type != 'none':