[IMP] l10n_in: indian integration setting in one block

Before this commit
==================
all the settings of Indian integration like E-waybill,and e-invoice were
having different setting blocks.

After this commit
=================
all the Indian integration settings will be shown in one setting block.

closes odoo/odoo#111175

Related: odoo/enterprise#36382
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
This commit is contained in:
Nishant Jain (niai)
2023-01-31 12:55:58 +01:00
parent 65fe99ccf0
commit a5465a91a2
4 changed files with 55 additions and 52 deletions
@@ -9,3 +9,4 @@ class ResConfigSettings(models.TransientModel):
group_l10n_in_reseller = fields.Boolean(implied_group='l10n_in.group_l10n_in_reseller', string="Manage Reseller(E-Commerce)")
module_l10n_in_edi = fields.Boolean('Indian Electronic Invoicing')
module_l10n_in_edi_ewaybill = fields.Boolean('Indian Electronic Waybill')
@@ -9,10 +9,19 @@
<setting help="Use this if setup with Reseller(E-Commerce)." name="ecommerce_reseller_setting" title="Manage Reseller(E-Commerce)" attrs="{'invisible': [('country_code', '!=', 'IN')]}">
<field name="group_l10n_in_reseller"/>
</setting>
<setting help="Connect to NIC (National Informatics Center) to submit invoices on posting." name="electronic_invoices_in" attrs="{'invisible': [('country_code', '!=', 'IN')]}" documentation="/applications/finance/accounting/fiscal_localizations/localizations/india.html">
<setting help="Connect to NIC (National Informatics Center) to submit invoices on posting." name="electronic_invoices_in" attrs="{'invisible': [('country_code', '!=', 'IN')]}" documentation="/applications/finance/accounting/fiscal_localizations/localizations/india.html#indian-e-invoicing">
<field name="module_l10n_in_edi" class="oe_inline" widget="upgrade_boolean"/>
</setting>
<setting help="Connect to NIC (National Informatics Center) to submit e-waybill on posting." name="electronic_waybill_in" attrs="{'invisible': [('country_code', '!=', 'IN')]}" documentation="/applications/finance/accounting/fiscal_localizations/localizations/india.html#indian-e-waybill">
<field name="module_l10n_in_edi_ewaybill" class="oe_inline" widget="upgrade_boolean"/>
</setting>
</block>
<xpath expr="//app[@name='account']" position="inside">
<div id="india_integration_section" invisible="1">
<block title="Indian Integration" id="india_localization" attrs="{'invisible':[('country_code', '!=', 'IN')]}">
</block>
</div>
</xpath>
</field>
</record>
</odoo>
@@ -1,42 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_view_form_l10n_in_inherit_l10n_in_edi" model="ir.ui.view">
<field name="name">res.config.settings.form.l10n_in.inherit.l10n_in_edi</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="l10n_in.res_config_settings_view_form_inherit_l10n_in"/>
<field name="arch" type="xml">
<setting name="electronic_invoices_in" position="replace"/>
</field>
</record>
<record id="res_config_settings_view_form_inherit_l10n_in_edi" model="ir.ui.view">
<field name="name">res.config.settings.form.inherit.l10n_in_edi</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
<field name="arch" type="xml">
<app name="account" position="inside">
<block title="Indian Electronic Invoicing" name="l10n_in_edi_iap" attrs="{'invisible': [('country_code', '!=', 'IN')]}">
<setting id="gsp_setting" string="Setup E-invoice" help="Check the documentation to get credentials" documentation="/applications/finance/accounting/fiscal_localizations/localizations/india.html" company_dependent="1">
<div class="content-group">
<div class="mt16 row">
<label for="l10n_in_edi_username" string="Username" class="col-3 col-lg-3 o_light_label"/>
<field name="l10n_in_edi_username" nolabel="1"/>
</div>
<div class="row">
<label for="l10n_in_edi_password" string="Password" class="col-3 col-lg-3 o_light_label" />
<field name="l10n_in_edi_password" password="True" nolabel="1"/>
</div>
<div class="row">
<label for="l10n_in_edi_production_env" string="Production Environment" class="col-3 col-lg-3 o_light_label"/>
<field name="l10n_in_edi_production_env" nolabel="1"/>
</div>
<div id="india_integration_section" position="attributes">
<attribute name="invisible">0</attribute>
</div>
<xpath expr="//block[@id='india_localization']" position="inside">
<setting id="gsp_setting" string="Setup E-invoice" help="Check the documentation to get credentials" documentation="/applications/finance/accounting/fiscal_localizations/localizations/india.html" company_dependent="1" >
<div class="content-group">
<div class="mt16 row">
<label for="l10n_in_edi_username" string="Username" class="col-3 col-lg-3 o_light_label"/>
<field name="l10n_in_edi_username" nolabel="1"/>
</div>
<div class='mt8'>
<button name="l10n_in_edi_test" icon="fa-arrow-right" type="object" string="Verify Username and Password" class="btn-link"/>
<div class="row">
<label for="l10n_in_edi_password" string="Password" class="col-3 col-lg-3 o_light_label"/>
<field name="l10n_in_edi_password" password="True" nolabel="1"/>
</div>
</setting>
</block>
</app>
<div class="row">
<label for="l10n_in_edi_production_env" string="Production Environment" class="col-3 col-lg-3 o_light_label"/>
<field name="l10n_in_edi_production_env" nolabel="1"/>
</div>
</div>
<div class='mt8'>
<button name="l10n_in_edi_test" icon="fa-arrow-right" type="object" string="Verify Username and Password" class="btn-link"/>
</div>
</setting>
</xpath>
</field>
</record>
</odoo>
@@ -5,29 +5,30 @@
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
<field name="arch" type="xml">
<app name="account" position="inside">
<block title="Indian Electronic Waybill" attrs="{'invisible': [('country_code', '!=', 'IN')]}">
<setting id="l10n_in_eway_iap" string="Setup Electronic Waybill" help="Check the documentation to get credentials." documentation="/applications/finance/accounting/fiscal_localizations/localizations/india.html" company_dependent="1">
<div class="content-group">
<div class="mt16 row">
<label for="l10n_in_edi_ewaybill_username" string="Username" class="col-3 col-lg-3 o_light_label"/>
<field name="l10n_in_edi_ewaybill_username" nolabel="1"/>
</div>
<div class="row">
<label for="l10n_in_edi_ewaybill_password" string="Password" class="col-3 col-lg-3 o_light_label" />
<field name="l10n_in_edi_ewaybill_password" password="True" nolabel="1"/>
</div>
<div class="row">
<label for="l10n_in_edi_production_env" string="Production Environment" class="col-3 col-lg-3 o_light_label"/>
<field name="l10n_in_edi_production_env" nolabel="1"/>
</div>
<div id="india_integration_section" position="attributes">
<attribute name="invisible">0</attribute>
</div>
<xpath expr="//block[@id='india_localization']" position="inside">
<setting id="l10n_in_eway_iap" string="Setup Electronic Waybill" help="Check the documentation to get credentials." documentation="/applications/finance/accounting/fiscal_localizations/localizations/india.html" company_dependent="1" >
<div class="content-group">
<div class="mt16 row">
<label for="l10n_in_edi_ewaybill_username" string="Username" class="col-3 col-lg-3 o_light_label"/>
<field name="l10n_in_edi_ewaybill_username" nolabel="1"/>
</div>
<div class='mt8'>
<button name="l10n_in_edi_ewaybill_test" icon="fa-arrow-right" type="object" string="Verify Username and Password" class="btn-link"/>
<div class="row">
<label for="l10n_in_edi_ewaybill_password" string="Password" class="col-3 col-lg-3 o_light_label"/>
<field name="l10n_in_edi_ewaybill_password" password="True" nolabel="1"/>
</div>
</setting>
</block>
</app>
<div class="row">
<label for="l10n_in_edi_production_env" string="Production Environment" class="col-3 col-lg-3 o_light_label"/>
<field name="l10n_in_edi_production_env" nolabel="1"/>
</div>
</div>
<div class='mt8'>
<button name="l10n_in_edi_ewaybill_test" icon="fa-arrow-right" type="object" string="Verify Username and Password" class="btn-link"/>
</div>
</setting>
</xpath>
</field>
</record>
</odoo>