-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
[12.0][MIG] operating_unit #144
Conversation
…per the OCA guidelines.
* [MIG] operating_unit to v10.0
<field name="category_id" ref="module_operating_units"/> | ||
</record> | ||
|
||
<record id="group_manager_operating_unit" model="res.groups"> |
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 like this new group added in this version. I think we can propose this to previous versions. That will solve #129
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 is easy said than done. Applying those changes to v11/v10 will man to make global rules to a simple group rules and cause many errors in database with the modules installed. I changed my mind, and better to keep this from v12 onwards.
d5c3374
to
10cdf9c
Compare
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.
Improve Code
operating_unit/__manifest__.py
Outdated
@@ -0,0 +1,29 @@ | |||
# Copyright 2015-2017 Eficent | |||
# - Jordi Ballester Alomar | |||
# Copyright 2015-2017 Serpent Consulting Services Pvt. Ltd. - Sudhir Arya |
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.
@ageficent Replace all Copyright 2015-TODAY Serpent Consulting Services Pvt. Ltd.
operating_unit/__init__.py
Outdated
@@ -0,0 +1,5 @@ | |||
# Copyright 2015-2017 Eficent |
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.
@ageficent Remove copyright
from all __init__
file.
operating_unit/tests/__init__.py
Outdated
@@ -0,0 +1 @@ | |||
from . import test_operating_unit |
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.
@ageficent add blank new line
1c5f2e2
to
1a97943
Compare
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.
👍 Functional + code review
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.
Code Review LGTM
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.
Small comments inline, thanks for adding tests!
To configure this module, you need to: | ||
|
||
* Assign *Multi Operating Unit* group to user. | ||
* Go to *Settings / Users & Companies / Operating Units* and create Operating Units. |
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 needs to be added to a new fragment CONFIGURE.rst. See https://github.com/OCA/maintainer-tools/tree/master/template/module/readme
# Create | ||
self._create_operating_unit(self.user2.id, "Test", "TEST") | ||
# Write | ||
self.b2b.sudo(self.user2.id).write({'code': 'B2B_changed'}) |
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 shold be a different assertRaises because the previous line already raised the error, so you are not testing this really.
1a97943
to
2895df8
Compare
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.
Great 👍
@pedrobaeza @jbeficent Can you please review and move forward. |
Sorry, but I'm not a qualified reviewer for this repository. |
Ok @pedrobaeza ,Wait If Done after |
@aheficent remember to keep up to date migration issue checking the mark for merged modules (I have already done it for this one). |
@pedrobaeza Thank you! I will keep the issue updated. |
BTW, the default branch to 12.0 is updated automatically? |
No, that should be done manually now when you consider that branch is completed enough. |
Migration of operating_unit to v12.0