[*] BO: Add an option to choose to not import the behavior of taxes displaying for the groups in localization pack import

This commit is contained in:
Rémi Gaillard
2013-10-23 18:22:53 +02:00
parent b38073ad72
commit e1887425fa
3 changed files with 13 additions and 2 deletions
+7 -1
View File
@@ -52,6 +52,7 @@ class LocalizationPackCore
$res &= $this->installConfiguration($xml); $res &= $this->installConfiguration($xml);
$res &= $this->installModules($xml); $res &= $this->installModules($xml);
$res &= $this->_installLanguages($xml, $install_mode); $res &= $this->_installLanguages($xml, $install_mode);
$res &= $this->updateDefaultGroupDisplayMethod($xml);
if ($res && isset($this->iso_code_lang)) if ($res && isset($this->iso_code_lang))
{ {
@@ -240,7 +241,7 @@ class LocalizationPackCore
} }
} }
} }
return $this->updateDefaultGroupDisplayMethod($xml); return true;
} }
protected function _installCurrencies($xml, $install_mode = false) protected function _installCurrencies($xml, $install_mode = false)
@@ -389,6 +390,11 @@ class LocalizationPackCore
return true; return true;
} }
protected function _installGroups($xml)
{
return $this->updateDefaultGroupDisplayMethod($xml);
}
protected function updateDefaultGroupDisplayMethod($xml) protected function updateDefaultGroupDisplayMethod($xml)
{ {
if (isset($xml->group_default)) if (isset($xml->group_default))
+1 -1
View File
@@ -930,7 +930,7 @@ class ValidateCore
*/ */
public static function isLocalizationPackSelection($data) public static function isLocalizationPackSelection($data)
{ {
return ($data === 'states' || $data === 'taxes' || $data === 'currencies' || $data === 'languages' || $data === 'units'); return in_array((string)$data, array('states', 'taxes', 'currencies', 'languages', 'units', 'groups'));
} }
/** /**
@@ -236,6 +236,11 @@ class AdminLocalizationControllerCore extends AdminController
'id' => 'units', 'id' => 'units',
'val' => 'units', 'val' => 'units',
'name' => $this->l('Units (e.g. weight, volume, distance)') 'name' => $this->l('Units (e.g. weight, volume, distance)')
),
array(
'id' => 'groups',
'val' => 'groups',
'name' => $this->l('Change the behavior of the taxes display for the groups')
) )
); );