[IMP] l10n_in_edi(_ewaybill): e-invoice bydefault set to false in journal

Before This Commit:
Currently, the e-invoice is bydefault set to true in journal.
Also there is an option to enable e-waybill in journal.

After This Commit:
Now, the e-invoice will be bydefault set to false in journal.
Also there is no need to have option of e-waybill in journal as we have separate
button to submit the e-waybill.

Task - 3617047

closes odoo/odoo#144128

Related: odoo/enterprise#51737
Signed-off-by: Josse Colpaert <jco@odoo.com>
This commit is contained in:
Nishant Jain
2023-11-30 14:48:15 +00:00
parent 391eac2447
commit 1e4c53871d
3 changed files with 4 additions and 3 deletions
-1
View File
@@ -33,6 +33,5 @@ For the creation of API username and password please ref this document: <https:/
"demo/demo_company.xml",
],
"installable": True,
# only applicable for taxpayers turnover higher than Rs.50 crore so auto_install is False
"license": "LGPL-3",
}
@@ -27,7 +27,8 @@ class AccountEdiFormat(models.Model):
def _is_enabled_by_default_on_journal(self, journal):
self.ensure_one()
if self.code == "in_einvoice_1_03":
return journal.company_id.country_id.code == 'IN'
# only applicable for taxpayers turnover higher than Rs.5 crore so default on journal is False
return False
return super()._is_enabled_by_default_on_journal(journal)
def _get_l10n_in_base_tags(self):
@@ -35,7 +35,8 @@ class AccountEdiFormat(models.Model):
def _is_compatible_with_journal(self, journal):
if self.code == "in_ewaybill_1_03":
return journal.type in ("sale", "purchase")
# In the Invoice we have a button to send Ewaybill so not required to send it automatically.
return False
return super()._is_compatible_with_journal(journal)
def _is_enabled_by_default_on_journal(self, journal):