// Format definitions

This commit is contained in:
rMalie
2011-12-13 13:41:54 +00:00
parent d189fd8ed0
commit 1506dc39b3
71 changed files with 710 additions and 1791 deletions
+7 -16
View File
@@ -53,30 +53,21 @@ class StockMvtReasonCore extends ObjectModel
'primary' => 'id_stock_mvt_reason',
'multilang' => true,
'fields' => array(
'name' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 255),
'sign' => array('type' => self::TYPE_INT),
'deleted' => array('type' => self::TYPE_BOOL),
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'),
// Lang fields
'name' => array('type' => 'FILL_ME', 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 255),
),
);
protected $webserviceParameters = array(
'objectsNodeName' => 'stock_movement_reasons',
'objectNodeName' => 'stock_movement_reason',
);
public function getFields()
{
$this->validateFields();
$fields['sign'] = (int)$this->sign;
$fields['date_add'] = pSQL($this->date_add);
$fields['date_upd'] = pSQL($this->date_upd);
$fields['deleted'] = (int)$this->deleted;
return $fields;
}
public function getTranslationsFieldsChild()
{
$this->validateFieldsLang();