Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[17.0][MIG] l10n_do_rnc_validation: Migration to 17.0 #194

Merged
merged 2 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion l10n_do_rnc_validation/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"views/res_config_settings_views.xml",
"data/ir_config_parameter_data.xml",
],
"installable": False,
"installable": True,
}
15 changes: 1 addition & 14 deletions l10n_do_rnc_validation/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,7 @@

class ResPartner(models.Model):
_inherit = "res.partner"

@api.model
def name_search(self, name, args=None, operator="ilike", limit=100):
res = super(ResPartner, self).name_search(
name, args=args, operator=operator, limit=100
)
if not res and name:
if len(name) in (9, 11):
partners = self.search([("vat", "=", name)])
else:
partners = self.search([("vat", "ilike", name)])
if partners:
res = partners.name_get()
return res
_rec_names_search = ['name', 'vat']

@api.model
def get_contact_data(self, vat):
Expand Down
10 changes: 5 additions & 5 deletions l10n_do_rnc_validation/views/res_config_settings_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
<field name="priority" eval="1000"/>
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='integration']" position="inside">
<div class="col-12 col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<xpath expr="//block[@name='integration']" position="inside">
<setting class="col-12 col-lg-6">
<div>
<field name="l10_do_can_validate_rnc"/>
</div>
<div class="o_setting_right_pane">
<div>
<label for="l10_do_can_validate_rnc" string="Indexa API RNC data"/>
<div class="text-muted">
Get Contact data from Indexa API
</div>
</div>
</div>
</setting>
</xpath>
</field>
</record>
Expand Down
Loading