[FIX] account: Allow to duplicate supplier invoices

As there's a check for unique supplier reference numbers, you can't duplicate them as the field is copied on the duplicated record. This patch removes the copy for emptying the error.

@Tecnativa
This commit is contained in:
Pedro M. Baeza
2017-12-07 09:08:17 +01:00
committed by qdp-odoo
parent bf119dcff6
commit cd31e82689
+1 -1
View File
@@ -213,7 +213,7 @@ class AccountInvoice(models.Model):
move_name = fields.Char(string='Journal Entry Name', readonly=False,
default=False, copy=False,
help="Technical field holding the number given to the invoice, automatically set when the invoice is validated then stored to set the same number again if the invoice is cancelled, set to draft and re-validated.")
reference = fields.Char(string='Vendor Reference',
reference = fields.Char(string='Vendor Reference', copy=False,
help="The partner reference of this invoice.", readonly=True, states={'draft': [('readonly', False)]})
reference_type = fields.Selection('_get_reference_type', string='Payment Reference',
required=True, readonly=True, states={'draft': [('readonly', False)]},