summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrien Widart <awt@odoo.com>2020-11-26 15:44:28 +0000
committerAdrien Widart <awt@odoo.com>2020-11-26 15:53:33 +0000
commit978e1168dddabebc31076eaebb5e20739bed4147 (patch)
treeea5c1fa0b6c9a7963a19d3f0704f7f4d83ecd732
parent1262dfbaea13899147ed47ca35edfc387d21489c (diff)
[FIX] l10n_id_efaktur: generate efaktur
When generating an efaktur, an error is raised To reproduce the error: (Use empty DB) 1. Set the company's country to Indonesia 2. Install Accounting (account_accountant) 3. Accounting > Customers > e-Faktur 4. Create & Save 5. Accounting > Customers > Customers 6. Create a customer - Set country to Indonesia - Add a TVA number 7. Accounting > Customers > Invoices 8. Create one for this customer - Add a product 9. Save & Confirm 10. In Action, "Download e-faktur" => An error is raised. OPW-2387843 closes odoo/odoo#62435 Signed-off-by: adwid <adwid@users.noreply.github.com>
-rw-r--r--addons/l10n_id_efaktur/models/account_move.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/l10n_id_efaktur/models/account_move.py b/addons/l10n_id_efaktur/models/account_move.py
index 9639d950691..481235b6209 100644
--- a/addons/l10n_id_efaktur/models/account_move.py
+++ b/addons/l10n_id_efaktur/models/account_move.py
@@ -280,7 +280,7 @@ class AccountMove(models.Model):
def _generate_efaktur(self, delimiter):
if self.filtered(lambda x: not x.l10n_id_kode_transaksi):
raise UserError(_('Some documents don\'t have a transaction code'))
- if self.filtered(lambda x: x.type != 'out_invoice'):
+ if self.filtered(lambda x: x.move_type != 'out_invoice'):
raise UserError(_('Some documents are not Customer Invoices'))
output_head = self._generate_efaktur_invoice(delimiter)