[*] Bo : #PSTEST-1095 : Remove id_address of the table table supplier and add a new fixture in the installer for the table address

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14287 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lLefevre
2012-03-27 09:20:01 +00:00
parent 0b9ae5fef8
commit 5feafff137
4 changed files with 25 additions and 16 deletions
-7
View File
@@ -59,12 +59,6 @@ class SupplierCore extends ObjectModel
/** @var boolean active */
public $active;
/**
* @since 1.5.0
* @var int address
* */
public $id_address;
/**
* @see ObjectModel::$definition
*/
@@ -74,7 +68,6 @@ class SupplierCore extends ObjectModel
'multilang' => true,
'fields' => array(
'name' => array('type' => self::TYPE_STRING, 'validate' => 'isCatalogName', 'required' => true, 'size' => 64),
'id_address' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'),
'active' => array('type' => self::TYPE_BOOL),
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
@@ -214,8 +214,12 @@ class AdminSuppliersControllerCore extends AdminController
// loads current address for this supplier - if possible
$address = null;
if ($obj->id_address > 0)
$address = new Address($obj->id_address);
$id_address = Address::getAddressIdBySupplierId($obj->id);
if ($id_address > 0)
$address = new Address((int)$id_address);
// force specific fields values (address)
if ($address != null)
{
+18 -6
View File
@@ -29,11 +29,23 @@
<city>Cupertino</city>
<other/>
</address>
<address id="Mon_adresse" id_country="FR" id_state="" id_customer="John" id_manufacturer="" id_supplier="" id_warehouse="0" alias="Mon adresse" company="My Company" lastname="DOE" firstname="John" postcode="75002" phone="0102030405" phone_mobile="" vat_number="" dni="" active="1">
<address1>16, Main street</address1>
<address2>2nd floor</address2>
<city>Paris </city>
<other/>
</address>
<address id="Mon_adresse" id_country="FR" id_state="" id_customer="John" id_manufacturer="" id_supplier="" id_warehouse="0" alias="Mon adresse" company="My Company" lastname="DOE" firstname="John" postcode="75002" phone="0102030405" phone_mobile="" vat_number="" dni="" active="1">
<address1>16, Main street</address1>
<address2>2nd floor</address2>
<city>Paris </city>
<other/>
</address>
<address id="supplier" id_country="US" id_state="NY" id_customer="" id_manufacturer="" id_supplier="AppleStore" id_warehouse="0" alias="supplier" company="Apple" lastname="supplier" firstname="supplier" postcode="10153" phone="(212) 336-1440" phone_mobile="" vat_number="" dni="" active="1">
<address1>767 Fifth Ave.</address1>
<address2/>
<city>New York</city>
<other/>
</address>
<address id="supplier" id_country="US" id_state="IL" id_customer="" id_manufacturer="" id_supplier="Shure_Online_Store" id_warehouse="0" alias="supplier" company="Shure" lastname="supplier" firstname="supplier" postcode="60714" phone="800-434-3350" phone_mobile="" vat_number="" dni="" active="1">
<address1>5800 W. Touhy Ave</address1>
<address2/>
<city>Niles</city>
<other/>
</address>
</entities>
</entity_address>
+1 -1
View File
@@ -1 +1 @@
/* PHP:module_blockwishlist_multishop(); */;
/* PHP:module_blockwishlist_multishop(); */;