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] [11.0] Migrate hr_employee_firstname to 11.0 #406

Merged
merged 33 commits into from
Jan 27, 2018

Conversation

feketemihai
Copy link
Member

No description provided.

@feketemihai feketemihai added this to the 11.0 milestone Nov 14, 2017
Copy link

@LoisRForgeFlow LoisRForgeFlow left a comment

Choose a reason for hiding this comment

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

Thanks for the migration.

Tested on runbot -- Just a comment.

return ' ' if self.env.context.get('module') else False

firstname = fields.Char(
"Firstname", default=_firstname_default)

Choose a reason for hiding this comment

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

I would add the required=True attribute here, without it I can create a user with firstname and then edit it to delete the first name. (while the displayed name still have that deleted first name)

Copy link
Member Author

Choose a reason for hiding this comment

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

@lreficent required=True will brake the init_hook on already existing datas...it was required in history (see 196e0db#diff-0d3e28c86aee91593e80482604cd462d)

Choose a reason for hiding this comment

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

Ok, it's not a big deal.

@LoisRForgeFlow
Copy link

Also, Could you squash the transifex commits together?

@feketemihai
Copy link
Member Author

@lreficent I would like to keep all the commits as history, if ok, we can squash all when we merge...

@LoisRForgeFlow
Copy link

@feketemihai I think that the idea is to keep the previos versions history of the modules on migration. But, Transifex commits are not very important and they introduce too much noise in some cases, for instnace in this PR you can see two series of 5 and 3 transifex commits that could be harmless squashed. This way we respect the history and keep it the smallest possible.

Copy link
Member

@etobella etobella left a comment

Choose a reason for hiding this comment

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

LGTM 👍

def _firstname_default(self):
return ' ' if self.env.context.get('module') else False

firstname = fields.Char(
Copy link
Member

Choose a reason for hiding this comment

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

Could you change the order of fields and functions following the conventions?
I think it is weird to see the fields so below.
https://github.com/OCA/maintainer-tools/blob/master/CONTRIBUTING.md#models

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@feketemihai
Copy link
Member Author

@lreficent @etobella @OCA/human-resources-maintainers Can i have a last review...

@etobella
Copy link
Member

etobella commented Dec 8, 2017

LGTM 👍


@api.model
def split_name(self, name):
clean_name = u" ".join(name.split(None)) if name else name

Choose a reason for hiding this comment

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

u"" is not needed for py3.5

Copy link

@moylop260 moylop260 left a comment

Choose a reason for hiding this comment

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

👍

@feketemihai feketemihai merged commit 8f43883 into OCA:11.0 Jan 27, 2018
feketemihai added a commit to feketemihai/hr that referenced this pull request Jan 28, 2018
…tname

[MIG] [11.0] Migrate hr_employee_firstname to 11.0

Add invalidate cache to test.
sambarros pushed a commit to sambarros/hr that referenced this pull request Jul 26, 2018
@emagdalenaC2i emagdalenaC2i mentioned this pull request Dec 28, 2018
71 tasks
Mraimou pushed a commit to camptocamp/hr that referenced this pull request Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants