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

⬆️1️⃣2️⃣ ir_config_parameter_multi_company #683

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -16,7 +16,7 @@ addons:

env:
global:
- VERSION="11.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0" UNIT_TEST="0"
- VERSION="12.0" TESTS="0" LINT_CHECK="0" TRANSIFEX="0" UNIT_TEST="0"
# * about ir_config_parameter_multi_company:
#
# ir_config_parameter_multi_company makes field *value* at ir.config_parameter company_dependent,
Expand Down
6 changes: 3 additions & 3 deletions ir_config_parameter_multi_company/README.rst
Expand Up @@ -44,12 +44,12 @@ Maintainers
Further information
===================

Demo: http://runbot.it-projects.info/demo/misc-addons/10.0
Demo: http://runbot.it-projects.info/demo/misc-addons/12.0

HTML Description: https://apps.odoo.com/apps/modules/10.0/ir_config_parameter_multi_company/
HTML Description: https://apps.odoo.com/apps/modules/12.0/ir_config_parameter_multi_company/

Usage instructions: `<doc/index.rst>`_

Changelog: `<doc/changelog.rst>`_

Tested on Odoo 11.0 8787f5acee9b5d2cad15b97804522dc04717a1c1
Tested on Odoo 12.0 80cef9e8c52ff7dc0715a7478a2288d3de7065df
2 changes: 1 addition & 1 deletion ir_config_parameter_multi_company/__init__.py
Expand Up @@ -6,7 +6,7 @@ def uninstall_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})

# remove properties
field_id = env.ref('base.field_ir_config_parameter_value').id
field_id = env.ref('base.field_ir_config_parameter__value').id
env['ir.property'].search([('fields_id', '=', field_id)]).unlink()

# update base module
Expand Down
4 changes: 2 additions & 2 deletions ir_config_parameter_multi_company/__manifest__.py
Expand Up @@ -4,7 +4,7 @@
"category": "Extra Tools",
# "live_test_url": "",
"images": [],
"version": "11.0.5.0.0",
"version": "12.0.5.0.0",
"application": False,

"author": "IT-Projects LLC, Ivan Yelizariev",
Expand All @@ -31,5 +31,5 @@
"uninstall_hook": 'uninstall_hook',

"auto_install": False,
"installable": False,
"installable": True,
}
4 changes: 2 additions & 2 deletions ir_config_parameter_multi_company/doc/index.rst
Expand Up @@ -14,7 +14,7 @@ Configuration
* Open menu ``[[ Settings ]] >> General Settings``
* Activate **[x] Multi Company - Manage multiple companies**
* Click ``[Apply]``
* Open menu ``[[ Settings ]] >> Users >> Users``
* Open menu ``[[ Settings ]] >> Users & Companies >> Users``
* Select your user
* Add some companies to **Allowed Companies** field

Expand Down Expand Up @@ -72,7 +72,7 @@ All system parameters created before module installation (as well as just create
* **param2** = *value22* (value for companyB)
* **param3** = *value3* (via default value)

For understanding how multi-website values work see Documentation of `web_website <https://apps.odoo.com/apps/modules/10.0/web_website/>`__
For understanding how multi-website values work see Documentation of `web_website <https://apps.odoo.com/apps/modules/12.0/web_website/>`__

Company Properties
------------------
Expand Down
Expand Up @@ -8,11 +8,11 @@ def migrate(cr, version):
# _update_config_parameter_value method yet
env = api.Environment(cr, SUPERUSER_ID, {})

field_id = env.ref('base.field_ir_config_parameter_value').id
field_id = env.ref('base.field_ir_config_parameter__value').id
default_values = env['ir.property'].search([
('fields_id', '=', field_id),
('company_id', '=', False)
])

field = env.ref('base.field_ir_config_parameter_value')
field = env.ref('base.field_ir_config_parameter__value')
default_values._update_db_value_website_dependent(field)
@@ -1,7 +1,7 @@
import logging

from odoo import models, fields, api, tools
from odoo.addons.base.ir.ir_config_parameter import IrConfigParameter as IrConfigParameterOriginal
from odoo.addons.base.models.ir_config_parameter import IrConfigParameter as IrConfigParameterOriginal

_logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion ir_config_parameter_multi_company/models/ir_property.py
Expand Up @@ -7,6 +7,6 @@ class IrProperty(models.Model):
@api.multi
def write(self, vals):
res = super(IrProperty, self).write(vals)
field = self.env.ref('base.field_ir_config_parameter_value')
field = self.env.ref('base.field_ir_config_parameter__value')
self._update_db_value_website_dependent(field)
return res
Expand Up @@ -77,7 +77,7 @@ <h2>Need our service?</h2>
-o-transform: rotate(-1deg);
-moz-transform: rotate(-1deg);
-ms-transform: rotate(-1deg);">
Tested on Odoo<br/>10.0 community
Tested on Odoo<br/>12.0 community
</div>
<!--<div style="margin-top: 15px;
position: relative;
Expand Down