[-] BO: Fix manufacturer addresses duplication #PSCFV-9601

This commit is contained in:
Rémi Gaillard
2013-06-28 10:18:49 +02:00
parent c025024b40
commit ec3095ac32
2 changed files with 14 additions and 5 deletions

View File

@@ -546,7 +546,7 @@ abstract class ObjectModelCore
$object_id = Db::getInstance()->Insert_ID();
if ($definition['multilang'])
if (isset($definition['multilang']) && $definition['multilang'])
{
$res = Db::getInstance()->executeS('
SELECT *

View File

@@ -189,7 +189,7 @@ class AdminManufacturersControllerCore extends AdminController
$this->_join .= '
LEFT JOIN `'._DB_PREFIX_.'manufacturer` m
ON (a.`id_manufacturer` = m.`id_manufacturer`)';
$this->_where = 'AND a.`id_customer` = 0 AND a.`id_supplier` = 0 AND a.`id_warehouse` = 0';
$this->_where = 'AND a.`id_customer` = 0 AND a.`id_supplier` = 0 AND a.`id_warehouse` = 0 AND a.`deleted`=0';
$this->context->smarty->assign('title_list', $this->l('Manufacturers addresses:'));
@@ -406,6 +406,12 @@ class AdminManufacturersControllerCore extends AdminController
'type' => 'hidden',
'name' => 'alias',
);
$form['input'][] = array(
'type' => 'hidden',
'name' => 'id_address',
);
$form['input'][] = array(
'type' => 'text',
'label' => $this->l('Last name:'),
@@ -712,6 +718,9 @@ class AdminManufacturersControllerCore extends AdminController
return $res;
}
}
protected function beforeDelete($object)
{
return true;
}
}