-
-
Notifications
You must be signed in to change notification settings - Fork 306
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
[10.0][IMP][l10n_it_fiscalcode] Add fiscalcode in partner search view #1078
Conversation
There was a problem hiding this 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> |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes!
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 👍
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works because the default for position
is inside
: https://github.com/odoo/odoo/blob/a409627602ab6c03364b492b5ba7a6fbaba6c5d6/odoo/addons/base/ir/ir_ui_view.py#L554
<field name="model">res.partner</field> | ||
<field name="inherit_id" ref="base.view_res_partner_filter"/> | ||
<field name="arch" type="xml"> | ||
<search> |
There was a problem hiding this comment.
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
?
Thanks, didn't know |
This PR simply add
fiscalcode
to partner search view.