From c84cafc80ff908bb6d3715e6dfde64f78828348a Mon Sep 17 00:00:00 2001 From: marinaGD Date: Thu, 20 Sep 2018 12:06:39 -0300 Subject: [PATCH] remove if in copy() --- br_stock_account/models/account_invoice.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/br_stock_account/models/account_invoice.py b/br_stock_account/models/account_invoice.py index 666746ad0..4901ea010 100644 --- a/br_stock_account/models/account_invoice.py +++ b/br_stock_account/models/account_invoice.py @@ -15,10 +15,9 @@ class AccountInvoice(models.Model): @api.multi def copy(self, default=None): new_acc_inv = super(AccountInvoice, self).copy(default) - if self.fiscal_position_type == 'import': - for i in range(len(new_acc_inv.invoice_line_ids)): - new_acc_inv.invoice_line_ids[i].import_declaration_ids = \ - self.invoice_line_ids[i].import_declaration_ids + for i in range(len(new_acc_inv.invoice_line_ids)): + new_acc_inv.invoice_line_ids[i].import_declaration_ids = \ + self.invoice_line_ids[i].import_declaration_ids return new_acc_inv @api.one