Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2016-06-02 11:24:24 +02:00
commit 0f53993c6f
5 changed files with 69 additions and 6 deletions

View File

@ -138,11 +138,6 @@ class modOauth extends DolibarrModules
// Clean before activation
$this->remove($options);
$sql = array(
"CREATE TABLE IF NOT EXISTS ".MAIN_DB_PREFIX."oauth_state (rowid int(11) NOT NULL AUTO_INCREMENT, service varchar(36), state varchar(128), fk_user int(11), fk_adherent int(11), entity int(11), PRIMARY KEY (rowid)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
"CREATE TABLE IF NOT EXISTS ".MAIN_DB_PREFIX."oauth_token (rowid int(11) NOT NULL AUTO_INCREMENT, service varchar(36), token text, fk_user int(11), fk_adherent int(11), entity int(11), PRIMARY KEY (rowid)) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;",
);
return $this->_init($sql,$options);
}
}

View File

@ -481,6 +481,23 @@ update llx_stock_mouvement set batch = '000000' where batch = 'Undefined';
-- At end (higher risk of error)
-- VMYSQL4.1 ALTER TABLE llx_c_type_resource CHANGE COLUMN rowid rowid integer NOT NULL AUTO_INCREMENT;
ALTER TABLE llx_product_batch ADD UNIQUE INDEX uk_product_batch (fk_product_stock, batch);
CREATE TABLE llx_oauth_token (
rowid integer AUTO_INCREMENT PRIMARY KEY,
service varchar(36),
token text,
fk_user integer,
fk_adherent integer,
entity integer
)ENGINE=InnoDB;
CREATE TABLE llx_oauth_state (
rowid integer AUTO_INCREMENT PRIMARY KEY,
service varchar(36),
state varchar(128),
fk_user integer,
fk_adherent integer,
entity integer
)ENGINE=InnoDB;

View File

@ -0,0 +1,25 @@
-- ============================================================================
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
-- ============================================================================
CREATE TABLE llx_oauth_state (
rowid integer AUTO_INCREMENT PRIMARY KEY,
service varchar(36),
state varchar(128),
fk_user integer,
fk_adherent integer,
entity integer
)ENGINE=InnoDB;

View File

@ -0,0 +1,25 @@
-- ============================================================================
-- Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
-- ============================================================================
CREATE TABLE llx_oauth_token (
rowid integer AUTO_INCREMENT PRIMARY KEY,
service varchar(36),
token text,
fk_user integer,
fk_adherent integer,
entity integer
)ENGINE=InnoDB;

View File

@ -1353,7 +1353,8 @@ class Product extends CommonObject
}
$this->buyprice = $obj->price; // deprecated
$this->fourn_pu = $obj->price / $obj->quantity; // Prix unitaire du produit pour le fournisseur $fourn_id
$this->ref_fourn = $obj->ref_fourn; // Ref supplier
$this->ref_fourn = $obj->ref_fourn; // deprecated
$this->ref_supplier = $obj->ref_fourn; // Ref supplier
$this->vatrate_supplier = $obj->tva_tx; // Vat ref supplier
$result=$obj->fk_product;
return $result;