diff options
| author | Andrea Grazioso (agr-odoo) <agr@odoo.com> | 2021-04-09 10:12:31 +0000 |
|---|---|---|
| committer | Andrea Grazioso (agr-odoo) <agr@odoo.com> | 2021-04-09 10:45:35 +0000 |
| commit | d5075308131f82020702c6650a1869ffd93fb85e (patch) | |
| tree | 783fd5e12c698e1ac54fde3f2ea26b37db02a99c | |
| parent | 0650862c7adcbe4113e071778a66053b88e004ef (diff) | |
[FIX] l10n_it_edi: only send e-invoice in IT companies
Have 2 companies, one in FR (with l10n_fr), one in IT (with l10n_it_edi)
From the French company create an invoice for a french customer.
Confirm.
The message ' E-Invoice check failed. You can modify the
invoice, and resend it.' related to italian e-invoicing will appear
opw-2481035
closes odoo/odoo#69030
Signed-off-by: Josse Colpaert <jco@openerp.com>
| -rw-r--r-- | addons/l10n_it_edi/models/account_invoice.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/l10n_it_edi/models/account_invoice.py b/addons/l10n_it_edi/models/account_invoice.py index 2103f8eb7d6..8abd7fe981b 100644 --- a/addons/l10n_it_edi/models/account_invoice.py +++ b/addons/l10n_it_edi/models/account_invoice.py @@ -260,7 +260,7 @@ class AccountMove(models.Model): # OVERRIDE posted = super()._post(soft=soft) - for move in posted.filtered(lambda m: m.l10n_it_send_state == 'to_send' and m.move_type == 'out_invoice'): + for move in posted.filtered(lambda m: m.l10n_it_send_state == 'to_send' and m.move_type == 'out_invoice' and m.company_id.country_id.code == 'IT'): move.send_pec_mail() return posted |
