Skip to content

[MIG] Port base_user_role to 10.0 - #684

Merged
lasley merged 6 commits into
OCA:10.0from
acsone:10.0-mig-base_user_role-ape
Feb 17, 2017
Merged

[MIG] Port base_user_role to 10.0#684
lasley merged 6 commits into
OCA:10.0from
acsone:10.0-mig-base_user_role-ape

Conversation

@adrienpeiffer

Copy link
Copy Markdown

No description provided.

sebalix and others added 4 commits January 2, 2017 18:08
…CA#608)

* [ADD] New module 'base_user_role'

* [FIX] base_user_role - Review

* [FIX] base_user_role - Review s/is_active/is_enabled/

* [FIX] base_user_role - Review s/is_active/is_enabled/

* [IMP] base_user_role - Translations updated (template + FR)

* [FIX] base_user_role - Lint
[IMP] base_user_role - Replace '<openerp>' tags by '<odoo>' + Remove useless '<data>' tags + Reindent XML content

[FIX] base_user_role - Fix noupdate declaration

[REM] base_user_role - Remove old migration script
@pedrobaeza pedrobaeza mentioned this pull request Jan 2, 2017
63 tasks

@sebalix sebalix left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for the migration! Minor changes to the unit tests about variable names and list comprehensions to remove, but non-blocking. 👍

self.group_no_one_id = self.imd_model.get_object_reference(
self.cr, self.uid, 'base', 'group_no_one')[1]
self.group_user_id = self.env.ref('base.group_user')
self.group_no_one_id = self.env.ref('base.group_no_one')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/group_user_id/group_user/
s/group_no_one_id/group_no_one/

self.cr, self.uid, 'base', 'group_sale_manager')[1]
self.group_multi_currency_id = self.env.ref(
'base.group_multi_currency')
self.group_settings_id = self.env.ref('base.group_system')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/group_settings_id/group_settings/

self.user_model = self.env['res.users']
self.role_model = self.env['res.users.role']

self.user_id = self.user_model.create(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/user_id/user/

role1_group_ids = role1.implied_ids.ids
role1_group_ids.append(role1.group_id.id)
user_group_ids = sorted(set(
[group.id for group in self.user_id.groups_id]))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

user_group_ids = sorted(set(self.user.groups_id.ids))

Comment thread base_user_role/tests/test_user_role.py Outdated
'name': u"ROLE_1",
'implied_ids': [6, 0, [self.group_user_id, self.group_no_one_id]],
'implied_ids': [6, 0, [self.group_user_id.id,
self.group_no_one_id.id]],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[self.group_user.id, self.group_no_one.id]

self.group_no_one_id.id]],
}
self.role1_id = self.role_model.create(self.cr, self.uid, vals)
self.role1_id = self.role_model.create(vals)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/role1_id/role1/

self.group_settings_id.id]],
}
self.role2_id = self.role_model.create(self.cr, self.uid, vals)
self.role2_id = self.role_model.create(vals)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/role2_id/role2/

self.user_id.write(
{'role_line_ids': [(0, 0, {'role_id': self.role2_id.id})]})
user_group_ids = sorted(set(
[group.id for group in self.user_id.groups_id]))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

user_group_ids = sorted(set(self.user_id.groups_id.ids))

self.user_id.write(
{'role_line_ids': [(0, 0, {'role_id': self.role1_id.id})]})
user_group_ids = sorted(set(
[group.id for group in self.user_id.groups_id]))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

user_group_ids = sorted(set(self.user.groups_id.ids))

@lasley lasley added this to the 10.0 milestone Jan 15, 2017

@jcdrubay jcdrubay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Only 2 small comments. Thanks for the contribution. I hope it can be merged soon. :)

Comment thread base_user_role/i18n/am.po Outdated
# OCA Transbot <transbot@odoo-community.org>, 2016
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like it is a wrong version here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm fairly certain this won't be an issue. Something something, automation is amazing

Comment thread base_user_role/views/role.xml Outdated
<field name="name">res.users.role.form</field>
<field name="model">res.users.role</field>
<field name="arch" type="xml">
<form string="Role" version="7.0">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It should be time to remove the version="7.0"

@lasley lasley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @adrienpeiffer

Can you please remove the version as noted by @jcdrubay & squash the commits? Good for merge after those tiny details 👍

Comment thread base_user_role/i18n/am.po Outdated
# OCA Transbot <transbot@odoo-community.org>, 2016
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 9.0c\n"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm fairly certain this won't be an issue. Something something, automation is amazing

@adrienpeiffer
adrienpeiffer force-pushed the 10.0-mig-base_user_role-ape branch from 5c5282d to 27bc2c5 Compare February 9, 2017 18:02
@adrienpeiffer

Copy link
Copy Markdown
Author

@lasley @jcdrubay Thanks for the review !

@lasley

lasley commented Feb 10, 2017

Copy link
Copy Markdown
Contributor

@adrienpeiffer - Dang, looks like the last round of edits made CI 🔴 - https://travis-ci.org/OCA/server-tools/jobs/200071164#L720

@adrienpeiffer

Copy link
Copy Markdown
Author

It should be better now 💚

@rousseldenis

Copy link
Copy Markdown
Contributor

Ready to be merged ?

@adrienpeiffer

Copy link
Copy Markdown
Author

GO 😃

@lasley
lasley force-pushed the 10.0-mig-base_user_role-ape branch from 3eb409e to d2a6e8e Compare February 17, 2017 16:04
@lasley
lasley merged commit 49b6e9c into OCA:10.0 Feb 17, 2017
@sbidoul
sbidoul deleted the 10.0-mig-base_user_role-ape branch February 17, 2017 16:07
SiesslPhillip pushed a commit to grueneerde/OCA-server-tools that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/server-tools (8.0)
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.

7 participants