Browse Source

publish muk_branding - 12.0

pull/30/head
MuK IT GmbH 5 years ago
parent
commit
6a8b2c4d1f
  1. 6
      muk_branding/__init__.py
  2. 2
      muk_branding/__manifest__.py
  3. 8
      muk_branding/models/res_config_settings.py
  4. 14
      muk_branding/views/res_config_settings_view.xml

6
muk_branding/__init__.py

@ -40,8 +40,12 @@ def _patch_system():
#----------------------------------------------------------
def _install_debrand_system(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
for lang in env['res.lang'].search([('active','=',True)]).mapped('code'):
env['base.language.install'].create({'lang': lang}).lang_install()
env['base.update.translations'].create({'lang': lang}).act_update()
env['ir.translation'].clear_caches
if version_info[5] != 'e':
env = api.Environment(cr, SUPERUSER_ID, {})
env['ir.module.module'].search([('to_buy', '=', True)]).unlink()
def _uninstall_rebrand_system(cr, registry):

2
muk_branding/__manifest__.py

@ -23,7 +23,7 @@
{
"name": "MuK Branding",
"summary": """Branding and Debranding""",
"version": "12.0.2.0.1",
"version": "12.0.2.0.2",
"category": "Extra Tools",
"license": "LGPL-3",
"website": "http://www.mukit.at",

8
muk_branding/models/res_config_settings.py

@ -105,4 +105,10 @@ class ResConfigSettings(models.TransientModel):
'muk_branding.store': self.branding_store or '',
'muk_branding.share': self.branding_share or '',
})
return res
return res
def translations_reload(self):
for lang in self.env['res.lang'].sudo().search([('active','=',True)]).mapped('code'):
self.env['base.language.install'].sudo().create({'lang': lang}).lang_install()
env['base.update.translations'].sudo().create({'lang': lang}).act_update()
self.sudo().env['ir.translation'].clear_caches

14
muk_branding/views/res_config_settings_view.xml

@ -108,12 +108,14 @@
<div class="text-muted">
Set the system website
</div>
<div class="content-group">
<div class="mt16 row">
<label for="branding_website" string="Website" class="col-lg-3 o_light_label" />
<field name="branding_website" widget="url" class="oe_inline" />
</div>
</div>
<div class="mt8">
<field name="branding_website" widget="url" class="o_light_label"/>
</div>
<div class="mt8">
<button name="translations_reload"
string="Reload Translations"
type="object" icon="fa-refresh"/>
</div>
</div>
</div>
</div>

Loading…
Cancel
Save