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

[10.0][IMP][l10n_it_fiscalcode] Add fiscalcode in partner search view #1078

Merged

Conversation

robyf70
Copy link
Contributor

@robyf70 robyf70 commented Mar 6, 2019

This PR simply add fiscalcode to partner search view.

Copy link
Member

@eLBati eLBati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml">
<search>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why didn't you use filter instead of search?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean replace search with filter?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and ... because we have only one entry?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're inheriting so there is no need to use <search>, tag <filter> is enough.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant something like:

    <record id="view_res_partner_filter_fiscalcode_data" model="ir.ui.view">
        <field name="name">res.partner.fiscalcode.filter</field>
        <field name="model">res.partner</field>
        <field name="inherit_id" ref="base.view_res_partner_filter"/>
        <field name="arch" type="xml">
            <filter name="parent_id" position="after">
                <field name="fiscalcode"/>
            </filter>
        </field>
    </record>

But your solution works just the same so 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can this work without position?

Copy link
Contributor Author

@robyf70 robyf70 Mar 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guys, what do you think if we can also add the vat field as searchable? This is one of the most requested field to be searchable in partner and I haven't really found the right place, on l10n_it_* modules, where to add it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried locally: it works and all filters seem to be kept.
I also found a similar case: https://github.com/odoo/odoo/blob/10.0/addons/website_sale/views/backend.xml#L29-L31

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml">
<search>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can this work without position?

@robyf70
Copy link
Contributor Author

robyf70 commented Mar 7, 2019

It works because default position="inside" like @SimoRubi said, but if you want to make it explicit we will go for the standard way that @tafaRU brought up. Just let me know what you prefer.

@eLBati
Copy link
Member

eLBati commented Mar 7, 2019

Thanks, didn't know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants