From 38cc698aa72c1095a17b896a427b73032a44a43d Mon Sep 17 00:00:00 2001 From: Khushi Vakil Date: Tue, 4 Apr 2023 13:44:02 +0000 Subject: [PATCH] [IMP] l10n_in_edi: check ship from address name is must set Current behaviour before PR: 1.Go to Company Partner 2.Create a shipping address 3.Set this shipping address in the warehouse 4.Create a sale order with that warehouse 5.Create an Invoice Then that invoice can't be send because the address name is empty. Current behaviour after PR: If anyone creates a contact under the company as the shipping address and if the name is empty then in this case it assigns the company name Task:3259223 closes odoo/odoo#119896 X-original-commit: 2f395a9baab057293b158fab34f5108786889d7d Signed-off-by: Brice Bartoletti (bib) --- addons/l10n_in_edi/models/account_edi_format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_in_edi/models/account_edi_format.py b/addons/l10n_in_edi/models/account_edi_format.py index ce67dcb1a8d..18948c4c64c 100644 --- a/addons/l10n_in_edi/models/account_edi_format.py +++ b/addons/l10n_in_edi/models/account_edi_format.py @@ -276,7 +276,7 @@ class AccountEdiFormat(models.Model): "GSTIN": partner.vat or "URP", }) else: - partner_details.update({"Nm": partner.name}) + partner_details.update({"Nm": partner.name or partner.commercial_partner_id.name}) # For no country I would suppose it is India, so not sure this is super right if is_overseas and (not partner.country_id or partner.country_id.code != 'IN'): partner_details.update({