-
-
Notifications
You must be signed in to change notification settings - Fork 837
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
[MIG][16.0] partner_industry_parent #1835
base: 16.0
Are you sure you want to change the base?
Conversation
Currently translated at 100.0% (14 of 14 strings) Translation: partner-contact-15.0/partner-contact-15.0-partner_industry_parent Translate-URL: https://translation.odoo-community.org/projects/partner-contact-15-0/partner-contact-15-0-partner_industry_parent/es/
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.
Just 1 concern to check really. The translation bit, but I could well be wrong not my specialty. Static review. Otherwise LGTM.
_inherit = "res.partner" | ||
|
||
@api.model | ||
def _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.
This is just a minor point, I know you didn't write yourself, and purely opinion. I much prefer these overrides where only args is amended to use the idiom
def _search(args, **kwargs):
# modify args code
return super()._search(args, **kwargs)
It is loads shorter, more resistant to api changes, and cleaner for people to read as they know only args is being affected.
Then super()
@api.model | ||
def view_header_get(self, view_id, view_type): | ||
if self._context.get("industry_id"): | ||
return _( |
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.
Is this right? I don't really know translations but I thought the rule was _(<format_string>), args
not _(<format_string>, args)
No description provided.