67 lines
4.7 KiB
XML
67 lines
4.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<record id="view_company_form" model="ir.ui.view">
|
|
<field name="name">res.company.form.inherit.account</field>
|
|
<field name="model">res.company</field>
|
|
<field name="inherit_id" ref="base.view_company_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//sheet/*" position="before">
|
|
<div class="alert alert-warning" role="alert"
|
|
invisible="not (country_code == 'AT' and not l10n_at_is_odoo_managed_org and l10n_at_fiskaly_api_key and l10n_at_fiskaly_api_secret)">
|
|
Fiskaly credentials are now managed by Odoo. Please regenerate your credentials for this company.
|
|
</div>
|
|
<div class="alert alert-warning" role="alert"
|
|
invisible="not (country_code == 'AT' and l10n_at_is_odoo_managed_org and not l10n_at_fiskaly_access_token and l10n_at_fiskaly_api_key and l10n_at_fiskaly_api_secret)">
|
|
Your Fiskaly credentials are configured, but you are not authenticated. Please try to authenticate again.
|
|
</div>
|
|
</xpath>
|
|
<page name="general_info" position="after">
|
|
<page string="Fiskaly" name="fiskaly" invisible="country_code != 'AT'">
|
|
<group>
|
|
<group groups="base.group_no_one" >
|
|
<field name="l10n_at_pos_test_mode" widget="boolean_toggle" help="Enable this to use fiskaly services for testing purpose" invisible="l10n_at_fiskaly_organization_id"/>
|
|
</group>
|
|
</group>
|
|
<group>
|
|
<group string="Fiskaly Credentials">
|
|
<field name="l10n_at_fiskaly_api_key" string="API Key" readonly="1"/>
|
|
<field name="l10n_at_fiskaly_api_secret" string="API Secret" password="1" readonly="1"/>
|
|
|
|
<div colspan="2" class="d-flex gap-1">
|
|
<button name="action_auth_fiskaly_credentials"
|
|
groups="base.group_erp_manager"
|
|
string="Authenticate Keys" type="object" class="btn-primary"
|
|
invisible="not (l10n_at_is_odoo_managed_org and not l10n_at_fiskaly_access_token and l10n_at_fiskaly_api_key and l10n_at_fiskaly_api_secret)"/>
|
|
<button name="action_generate_fiskaly_credentials"
|
|
groups="base.group_erp_manager"
|
|
string="Generate Credentials" type="object" class="btn-primary"
|
|
confirm="It will generate a new API key and secret or retrieve an existing one if unavailable in the system. Would you like to proceed?"
|
|
invisible="l10n_at_is_odoo_managed_org and l10n_at_fiskaly_api_key and l10n_at_fiskaly_api_secret"/>
|
|
<button name="action_generate_fiskaly_credentials"
|
|
groups="base.group_no_one"
|
|
string="Generate Credentials" type="object" class="btn-secondary"
|
|
confirm="It will generate a new API key and secret or retrieve an existing one if unavailable in the system. Would you like to proceed?"
|
|
invisible="not (l10n_at_is_odoo_managed_org and l10n_at_fiskaly_api_key and l10n_at_fiskaly_api_secret)"/>
|
|
</div>
|
|
</group>
|
|
<group string="FON Credentials" invisible="not l10n_at_fiskaly_access_token">
|
|
<field name="l10n_at_fon_participant_id"/>
|
|
<field name="l10n_at_fon_user_id"/>
|
|
<field name="l10n_at_fon_user_pin" password="1"/>
|
|
<button name="action_l10n_at_authenticate_fon_credentials" groups="base.group_erp_manager" string="Authenticate FON" type="object"
|
|
class="btn-primary" invisible="not l10n_at_fon_participant_id or not l10n_at_fon_user_id or not l10n_at_fon_user_pin"/>
|
|
</group>
|
|
</group>
|
|
</page>
|
|
</page>
|
|
<field name="currency_id" position="after">
|
|
<field name="l10n_at_pos_is_tax_exempted"/>
|
|
</field>
|
|
<xpath expr="//field[@name='country_id']" position="attributes">
|
|
<attribute name="readonly">l10n_at_fiskaly_access_token</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|