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

[MIG][16.0] partner_industry_parent #1835

Open
wants to merge 15 commits into
base: 16.0
Choose a base branch
from

Conversation

len-foss
Copy link

No description provided.

Copy link
Contributor

@gdgellatly gdgellatly left a 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(
Copy link
Contributor

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 _(
Copy link
Contributor

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)

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

Successfully merging this pull request may close these issues.

7 participants