Skip to content
Snippets Groups Projects
Commit 2c93b994 authored by Pratima Gupta's avatar Pratima Gupta Committed by Ravi Gohil
Browse files

[IMP] l10n_xx: use country_code field


l10n_latam_country_code field is no more needed for account.move
object thanks to commit 7edb5c11

Also, since country_code field has been defined in view_move_form,
no need to redefine it when it is inherited in l10n_cn module.

closes odoo/odoo#48719

Task: 2228210
Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
parent 6f1bb039
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@
<field name="arch" type="xml">
<group id="other_tab_group" position="inside">
<group name="afip_group" string="AFIP">
<field name='l10n_ar_afip_concept' attrs="{'invisible': ['|', ('l10n_latam_country_code', '!=', 'AR'), ('l10n_latam_use_documents', '=', False)]}"/>
<field name='l10n_ar_afip_concept' attrs="{'invisible': ['|', ('country_code', '!=', 'AR'), ('l10n_latam_use_documents', '=', False)]}"/>
<label for="l10n_ar_afip_service_start" attrs="{'invisible':[('l10n_ar_afip_concept','not in',['2', '3', '4'])]}" string="Service Date"/>
<div attrs="{'invisible':[('l10n_ar_afip_concept','not in',['2', '3', '4'])]}">
<field name="l10n_ar_afip_service_start" class="oe_inline"/> to <field name="l10n_ar_afip_service_end" class="oe_inline"/>
......
......@@ -7,7 +7,6 @@
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='ref']" position="after">
<field name="country_code" invisible='1'/>
<field name="move_type" invisible='1'/>
<field name="fapiao" attrs="{'invisible': ['|', ('country_code','!=', 'CN'),
('move_type', 'not in', ['out_invoice', 'out_refund', 'in_invoice', 'in_refund'])]}"/>
......
......@@ -18,8 +18,6 @@ class AccountMove(models.Model):
'l10n_latam.document.type', string='Document Type', readonly=False, auto_join=True, index=True,
states={'posted': [('readonly', True)]}, compute='_compute_l10n_latam_document_type', store=True)
l10n_latam_use_documents = fields.Boolean(related='journal_id.l10n_latam_use_documents')
l10n_latam_country_code = fields.Char(
related='company_id.country_id.code', help='Technical field used to hide/show fields regarding the localization')
@api.model
def _deduce_sequence_number_reset(self, name):
......
......@@ -37,7 +37,6 @@
<form>
<field name="l10n_latam_available_document_type_ids" invisible="1"/>
<field name="l10n_latam_use_documents" invisible="1"/>
<field name="l10n_latam_country_code" invisible="1"/>
</form>
<field name="journal_id" position="after">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment