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

[12.0][MIG] server environment ir config parameter #1378

Conversation

GillesTephaneMeyomesse
Copy link

Copy link

@acsonefho acsonefho 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 changes but seems good (about code)


@api.model
def get_param(self, key, default=False):
value = super(IrConfigParameter, self).get_param(key, default=None)

Choose a reason for hiding this comment

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

In Python 3 you can let the super() empty:
value = super().get_param(key, default=None)
It's certainly not an issue (about Python) but it's not necessary.

if serv_config.has_option(SECTION, key):
# enforce value from config file
vals = dict(vals, value=serv_config.get(SECTION, key))
return super(IrConfigParameter, self).create(vals)

Choose a reason for hiding this comment

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

Same here (about the super())

newvals = dict(vals, value=serv_config.get(SECTION, key))
else:
newvals = vals
super(IrConfigParameter, rec).write(newvals)

Choose a reason for hiding this comment

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

But here you have to keep it because you use rec and not self.

class TestEnv(common.TransactionCase):

def setUp(self):
super(TestEnv, self).setUp()

Choose a reason for hiding this comment

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

Same comment here (about super())

Copy link

@ThomasBinsfeld ThomasBinsfeld left a comment

Choose a reason for hiding this comment

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

Fix the super() and it's ok

Copy link
Member

@sbidoul sbidoul left a comment

Choose a reason for hiding this comment

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

This should go to OCA/server-env

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.

8 participants