Files
enterprise-addons/pos_blackbox_be/views/res_company_views.xml
T

33 lines
1.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<record id="blackbox_res_company_form_view" model="ir.ui.view">
<field name="name">blackbox.res.company.form.view</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 context.get('company_address_required') and not context.get('company_vat_required')">
In order to open a certified POS session, you need to <span class="alert-link">fill your company address and tax ID</span>.
</div>
</xpath>
<xpath expr="//field[@name='street']" position="attributes">
<attribute name="required">context.get('company_address_required')</attribute>
</xpath>
<xpath expr="//field[@name='city']" position="attributes">
<attribute name="required">context.get('company_address_required')</attribute>
</xpath>
<xpath expr="//field[@name='zip']" position="attributes">
<attribute name="required">context.get('company_address_required')</attribute>
</xpath>
<xpath expr="//field[@name='country_id']" position="attributes">
<attribute name="required">context.get('company_address_required')</attribute>
</xpath>
<xpath expr="//field[@name='vat']" position="attributes">
<attribute name="required">context.get('company_vat_required')</attribute>
</xpath>
</field>
</record>
</data>
</odoo>