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

[11.0][MIG] hr_job_category #538

Merged
merged 16 commits into from
Jan 16, 2019

Conversation

i-vyshnevska
Copy link
Member

Migration of module hr_job_categories to v11

@oca-clabot
Copy link

Hey @i-vyshnevska, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here: http://odoo-community.org/page/cla
Here is a list of the users:

Appreciation of efforts,
OCA CLAbot

@pedrobaeza
Copy link
Member

Please preserve commit history following technical method explained in https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-11.0

Copy link
Member

@nikul-serpentcs nikul-serpentcs left a comment

Choose a reason for hiding this comment

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

Improve Code

hr_job_categories/__init__.py Outdated Show resolved Hide resolved
hr_job_categories/__manifest__.py Outdated Show resolved Hide resolved
hr_job_categories/__manifest__.py Outdated Show resolved Hide resolved
hr_job_categories/models/__init__.py Outdated Show resolved Hide resolved
hr_job_categories/models/hr.py Outdated Show resolved Hide resolved
hr_job_categories/models/hr.py Outdated Show resolved Hide resolved
Copy link

@simahawk simahawk left a comment

Choose a reason for hiding this comment

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

pls squash these commits together
image

also, pls include module name in your commits, like [XYZ] hr_job_categories: do something

job = self.env['hr.job'].browse(job_id)
_logger.debug('Removing employee tags if tag exists on contract '
'job: %s', empl_tags)
for tag in job.category_ids:
Copy link

Choose a reason for hiding this comment

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

Refactoring is out of the scope of the PR but pls add a TODO comment to refactor these methods to write only once.

@i-vyshnevska i-vyshnevska force-pushed the 11.0-mig-hr_job_categories branch 2 times, most recently from 98b4a89 to b3745cd Compare January 4, 2019 13:55
@simahawk
Copy link

simahawk commented Jan 8, 2019

@nikul-serpentcs can you update your review?

Copy link
Member

@nikul-serpentcs nikul-serpentcs left a comment

Choose a reason for hiding this comment

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

Code review LGTM 👍

@i-vyshnevska using oca-gen-addon-readme and create Readme file

https://github.com/OCA/maintainer-tools/tree/master/template/module/readme

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

The name should be in singular. For example, hr_job_multi_category, and README should be at least in new format (but README by fragments is recommended).

@i-vyshnevska i-vyshnevska changed the title [11.0][MIG] hr_job_categories [11.0][MIG] hr_job_category Jan 8, 2019
@simahawk
Copy link

simahawk commented Jan 9, 2019

@i-vyshnevska am I wrong or the README is outgenerated but the the readme folder is not here?

@simahawk
Copy link

simahawk commented Jan 9, 2019

@pedrobaeza sounds good now


To install this module, you need to:

* clone the branch 8.0 of the repository https://github.com/OCA/hr
Copy link
Member

Choose a reason for hiding this comment

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

Outdated instructions, but this shouldn't even be there as they are generic instructions.

Copy link

Choose a reason for hiding this comment

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

@pedrobaeza I don't see it in the fragment.
Although, there's no reason to explain the cloning etc.

Copy link
Member Author

Choose a reason for hiding this comment

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

@pedrobaeza @simahawk sorry guys, my bad,
seems ok now

Copy link
Member

Choose a reason for hiding this comment

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

Then don't touch yourself the file, but generate it with the OCA/maintainer-tools script.

Copy link
Member

@nikul-serpentcs nikul-serpentcs left a comment

Choose a reason for hiding this comment

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

Minor change

@@ -0,0 +1,20 @@

Copy link
Member

Choose a reason for hiding this comment

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

@i-vyshnevska Add license/Copyright

@@ -0,0 +1,57 @@

Copy link
Member

Choose a reason for hiding this comment

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

same here

@@ -0,0 +1,72 @@

Copy link
Member

Choose a reason for hiding this comment

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

here also

Copy link

@Tonow-c2c Tonow-c2c left a comment

Choose a reason for hiding this comment

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

Just minor already asked but after that code LGTM

@@ -0,0 +1,2 @@

Choose a reason for hiding this comment

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

in init file you can remove the fist line

the next time you can use find . -name "*.py" -exec sed -i "/#.*coding\: /d" {} \; to help you it's on section https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-11.0#tasks-to-do-in-the-migration

def write(self, vals):
prev_data = self.read(['job_id'])

res = super(HRContract, self).write(vals)

Choose a reason for hiding this comment

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

In python3 I think no need HRContract, self in super but it's works well to

Copy link
Member Author

Choose a reason for hiding this comment

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

travis somehow better works with self )

Copy link
Member

Choose a reason for hiding this comment

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

@i-vyshnevska this is not something of Travis, but Python version syntax.

Copy link
Member Author

Choose a reason for hiding this comment

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

@pedrobaeza sorry for so much pain from my PR, it seems ok now

@i-vyshnevska i-vyshnevska force-pushed the 11.0-mig-hr_job_categories branch 2 times, most recently from 7ef16e4 to 0f42c8c Compare January 10, 2019 09:46
@simahawk
Copy link

gentlemen, all good now?

@pedrobaeza pedrobaeza added this to the 11.0 milestone Jan 14, 2019
@gurneyalex gurneyalex merged commit 1371ecb into OCA:11.0 Jan 16, 2019
@OCA-git-bot OCA-git-bot mentioned this pull request Jan 16, 2019
32 tasks
@oca-clabot
Copy link

Hey @i-vyshnevska,
We acknowledge that the following users have signed our Contributor License Agreement:

Appreciation of efforts,
OCA CLAbot

@jarroyomorales jarroyomorales mentioned this pull request Sep 26, 2019
71 tasks
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.

None yet