[IMP] l10n_ar: UI clean up
This commit aims at changing some tooltip, labels and changing the place of some fields. Also adding some invisible tags to avoid the fields to be displayed on other companies task: 3270458 Part-of: odoo/odoo#134617
This commit is contained in:
@@ -10,7 +10,9 @@ class AccountJournal(models.Model):
|
||||
|
||||
l10n_ar_afip_pos_system = fields.Selection(
|
||||
selection='_get_l10n_ar_afip_pos_types_selection', string='AFIP POS System',
|
||||
compute='_compute_l10n_ar_afip_pos_system', store=True, readonly=False)
|
||||
compute='_compute_l10n_ar_afip_pos_system', store=True, readonly=False,
|
||||
help="Argentina: Specify which type of system will be used to create the electronic invoice. This will depend on the type of invoice to be created.",
|
||||
)
|
||||
l10n_ar_afip_pos_number = fields.Integer(
|
||||
'AFIP POS Number', help='This is the point of sale number assigned by AFIP in order to generate invoices')
|
||||
company_partner = fields.Many2one('res.partner', related='company_id.partner_id')
|
||||
@@ -19,7 +21,10 @@ class AccountJournal(models.Model):
|
||||
domain="['|', ('id', '=', company_partner), '&', ('id', 'child_of', company_partner), ('type', '!=', 'contact')]"
|
||||
)
|
||||
l10n_ar_is_pos = fields.Boolean(
|
||||
compute="_compute_l10n_ar_is_pos", store=True, readonly=False, string="Is AFIP POS?")
|
||||
compute="_compute_l10n_ar_is_pos", store=True, readonly=False,
|
||||
string="Is AFIP POS?",
|
||||
help="Argentina: Specify if this Journal will be used to send electronic invoices to AFIP.",
|
||||
)
|
||||
|
||||
@api.depends('country_code', 'type', 'l10n_latam_use_documents')
|
||||
def _compute_l10n_ar_is_pos(self):
|
||||
|
||||
@@ -22,7 +22,7 @@ class ResPartner(models.Model):
|
||||
l10n_ar_gross_income_number = fields.Char('Gross Income Number')
|
||||
l10n_ar_gross_income_type = fields.Selection(
|
||||
[('multilateral', 'Multilateral'), ('local', 'Local'), ('exempt', 'Exempt')],
|
||||
'Gross Income Type', help='Type of gross income: exempt, local, multilateral')
|
||||
'Gross Income Type', help='Argentina: Type of gross income: exempt, local, multilateral.')
|
||||
l10n_ar_afip_responsibility_type_id = fields.Many2one(
|
||||
'l10n_ar.afip.responsibility.type', string='AFIP Responsibility Type', index='btree_not_null', help='Defined by AFIP to'
|
||||
' identify the type of responsibilities that a person or a legal entity could have and that impacts in the'
|
||||
|
||||
@@ -6,4 +6,4 @@ class Uom(models.Model):
|
||||
|
||||
_inherit = 'uom.uom'
|
||||
|
||||
l10n_ar_afip_code = fields.Char('AFIP Code', help='This code will be used on electronic invoice')
|
||||
l10n_ar_afip_code = fields.Char('Code', help='Argentina: This code will be used on electronic invoice.')
|
||||
|
||||
@@ -21,14 +21,12 @@
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<group id="other_tab_group" position="inside">
|
||||
<group name="afip_group" string="AFIP" invisible="country_code != 'AR'">
|
||||
<field name='l10n_ar_afip_concept' invisible="not l10n_latam_use_documents"/>
|
||||
<label for="l10n_ar_afip_service_start" invisible="l10n_ar_afip_concept not in ['2', '3', '4']" string="Service Date"/>
|
||||
<div invisible="l10n_ar_afip_concept not in ['2', '3', '4']">
|
||||
<field name="l10n_ar_afip_service_start" class="oe_inline" readonly="state != 'draft'"/> to <field name="l10n_ar_afip_service_end" class="oe_inline" readonly="state != 'draft'"/>
|
||||
</div>
|
||||
</group>
|
||||
<group name="sale_info_group" position="inside">
|
||||
<field name='l10n_ar_afip_concept' invisible="not l10n_latam_use_documents or country_code != 'AR'"/>
|
||||
<label for="l10n_ar_afip_service_start" invisible="l10n_ar_afip_concept not in ('2', '3', '4') or country_code != 'AR'" string="Service Date"/>
|
||||
<div invisible="l10n_ar_afip_concept not in ('2', '3', '4') or country_code != 'AR'">
|
||||
<field name="l10n_ar_afip_service_start" class="oe_inline" readonly="state != 'draft'"/> to <field name="l10n_ar_afip_service_end" class="oe_inline" readonly="state != 'draft'"/>
|
||||
</div>
|
||||
</group>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
<field name="inherit_id" ref="l10n_latam_base.view_partner_latam_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='vat']/.." position="after">
|
||||
<field name="l10n_ar_afip_responsibility_type_id" options="{'no_open': True, 'no_create': True}" readonly="parent_id"/>
|
||||
<field name="l10n_ar_afip_responsibility_type_id"
|
||||
invisible="'AR' not in fiscal_country_codes"
|
||||
options="{'no_open': True, 'no_create': True}"
|
||||
readonly="parent_id"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
@@ -25,8 +28,8 @@
|
||||
</xpath>
|
||||
|
||||
<field name="property_account_position_id" position="after">
|
||||
<label for="l10n_ar_gross_income_number" string="Gross Income"/>
|
||||
<div name="gross_income">
|
||||
<label for="l10n_ar_gross_income_type" string="Gross Income" invisible="'AR' not in fiscal_country_codes"/>
|
||||
<div name="gross_income" invisible="'AR'not in fiscal_country_codes">
|
||||
<field name="l10n_ar_gross_income_type" class="oe_inline"/>
|
||||
<field name="l10n_ar_gross_income_number" placeholder="Number..." class="oe_inline" invisible="l10n_ar_gross_income_type not in ['multilateral', 'local']" required="l10n_ar_gross_income_type in ['multilateral', 'local']"/>
|
||||
</div>
|
||||
@@ -41,7 +44,7 @@
|
||||
<field name="inherit_id" ref="base.view_res_partner_filter"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="category_id" position="after">
|
||||
<field name="l10n_ar_afip_responsibility_type_id"/>
|
||||
<field name="l10n_ar_afip_responsibility_type_id" invisible="'AR' not in fiscal_country_codes"/>
|
||||
</field>
|
||||
<filter name="salesperson" position="before">
|
||||
<filter string="AFIP Responsibility Type" name="l10n_ar_afip_responsibility_type_id_filter" context="{'group_by': 'l10n_ar_afip_responsibility_type_id'}"/>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="inherit_id" ref="uom.product_uom_tree_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="l10n_ar_afip_code"/>
|
||||
<field name="l10n_ar_afip_code" optional="hide"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -29,7 +29,7 @@
|
||||
<field name="inherit_id" ref="uom.product_uom_categ_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="rounding" position="after">
|
||||
<field name="l10n_ar_afip_code"/>
|
||||
<field name="l10n_ar_afip_code" optional="hide"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user