Skip to content

[MIG] server_environment: Migration to 13.0 - #29

Merged
OCA-git-bot merged 43 commits into
OCA:13.0from
grindtildeath:13.0-mig-server_environment
Oct 11, 2019
Merged

OCA-git-bot merged 43 commits into
OCA:13.0from
grindtildeath:13.0-mig-server_environment

Conversation

@grindtildeath

Copy link
Copy Markdown
Contributor

No description provided.

jgrandguillaume and others added 7 commits October 9, 2019 13:02
(lp:c2c-addons/6.1  rev 11)
(lp:c2c-addons/6.1  rev 28.1.1)
…t is the blessed target.

(lp:c2c-addons/6.1  rev 40.2.1)
(lp:c2c-addons/6.1  rev 45.1.4)
…TK client, because for 6.1 the web client is the blessed target.

(lp:c2c-addons/6.1  rev 116)
@oca-clabot

Copy link
Copy Markdown

Hey @grindtildeath, 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

and init some properties

"""
ModelClass = super(ServerConfiguration, cls)._build_model(pool, cr)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
ModelClass = super(ServerConfiguration, cls)._build_model(pool, cr)
ModelClass = super()._build_model(pool, cr)

def fields_view_get(self, view_id=None, view_type='form', toolbar=False,
submenu=False):
"""Overwrite the default method to render the custom view."""
res = super(ServerConfiguration, self).fields_view_get(view_id,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
res = super(ServerConfiguration, self).fields_view_get(view_id,
res = super().fields_view_get(view_id, view_type, toolbar)

@pedrobaeza pedrobaeza added this to the 13.0 milestone Oct 10, 2019
@OCA-git-bot OCA-git-bot mentioned this pull request Oct 10, 2019
4 tasks
Comment thread server_environment/__init__.py Outdated
Comment thread server_environment/models/server_env_mixin.py
Comment thread server_environment/models/server_env_mixin.py
@gurneyalex gurneyalex mentioned this pull request Oct 10, 2019
1 task
@gurneyalex

Copy link
Copy Markdown
Member

@grindtildeath can you squash the fixup commits (including the old ones before your own from this migration)?

pedrobaeza and others added 21 commits October 11, 2019 09:33
* [IMP] load server environment options from odoo rcfile

This allows delivering the code with default configuration options for
all environments in the server_environment_file module, but letting
the administrator override some configuration entries in the regular
odoo configuration file.

* server_environment_file: update README
To trigger rebuild following change in setup.py
Add SERVER_ENV_CONFIG_SECRET alongside SERVER_ENV_CONFIG

Allows to isolate the secrets in your deployment

Improve documentation regarding variables

Add a server environment mixin

To automatically convert fields into fields reading values from the
environment. Until now, every module reimplements the same computed
field.

Read default values from database when no config is provided

Automatically add <field_name>_env_default for every field transformed
to a "computed from env" field, so a default value can be set. It will
be used when the configuration is not set in a configuration file
(when the key is absent, not empty).

Allow to edit default values for env-computed fields

When they don't have any key in the environment configuration files.
In the UI, when a field is set in a configuration file, the field is
readonly, if not the field is editable. Which means you can selectively
choose which fields depend on the environment and which can use a
"default" value stored in database.

Fix a few small issues in mixin

Use a dictionary to configure the fields

Add global section

Disable prefetch on env-computed fields

As in the inverse field that write the value into the <field>_env_default
we have to browse the record, the prefetch has the effect of calling
compute on the env-computed field which resets the value to it's
previous state before we have the occasion to store it.

Use global section name as first part of the section

Allow to edit all fields on creation

Make server_environment_files optional

Allow integration with keychain

By adding options to change the compute and inverse methods for default
fields

Update documentation of server_environment, bump

Add SERVER_ENV_CONFIG_SECRET alongside SERVER_ENV_CONFIG

Allows to isolate the secrets in your deployment

Reinforce server_environment base tests

Add tests for the server env mixin

Infer configparser getter from field type

Fixes for review feedbacks

Add tests and support of _inherits

Use SavepointCase instead of TransactionCase

It means less records to create for each test

Fix iteration on records
… users

New security group restricting access to server config
Admin is part of the group by default
@grindtildeath
grindtildeath force-pushed the 13.0-mig-server_environment branch from dbbc7c1 to bb73c66 Compare October 11, 2019 07:33
@grindtildeath

Copy link
Copy Markdown
Contributor Author

@gurneyalex Done ;)

@gurneyalex

Copy link
Copy Markdown
Member

/ocabot merge

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 13.0-ocabot-merge-pr-29-by-gurneyalex-bump-no, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Oct 11, 2019
Signed-off-by gurneyalex
@OCA-git-bot
OCA-git-bot merged commit bb73c66 into OCA:13.0 Oct 11, 2019
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 75b3811. Thanks a lot for contributing to OCA. ❤️

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.