mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[IMP] account_payment_order: don't requiere reference_type anymore
This commit is contained in:
@@ -57,7 +57,7 @@ class AccountMoveLine(models.Model):
|
||||
communication = self.ref or self.name
|
||||
# change these default values if move line is linked to an invoice
|
||||
if self.move_id.is_invoice():
|
||||
if self.move_id.reference_type != "none":
|
||||
if (self.move_id.reference_type or "none") != "none":
|
||||
communication = self.move_id.ref
|
||||
ref2comm_type = aplo.invoice_reference_type2communication_type()
|
||||
communication_type = ref2comm_type[self.move_id.reference_type]
|
||||
|
||||
@@ -45,9 +45,9 @@
|
||||
<field name="payment_reference" position="before">
|
||||
<field
|
||||
name="reference_type"
|
||||
required="1"
|
||||
attrs="{'readonly':[('state','!=','draft')],
|
||||
'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))]}"
|
||||
'invisible': [('move_type', 'not in', ('out_invoice', 'out_refund'))],
|
||||
'required': [('move_type', 'in', ('out_invoice', 'out_refund'))]}"
|
||||
/>
|
||||
</field>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user