Works on canvas capability
Works on custom list
This commit is contained in:
parent
322e7dac48
commit
99af90546f
@ -56,6 +56,18 @@ class ProductDefault extends Product
|
|||||||
return 'Produits';
|
return 'Produits';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Lecture des donnees dans la base
|
||||||
|
* \param id Product id
|
||||||
|
* \param ref Product ref
|
||||||
|
*/
|
||||||
|
function fetchCanvas($id='', $ref='', $action='')
|
||||||
|
{
|
||||||
|
$result = $this->fetch($id,$ref);
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fetch field list
|
* \brief Fetch field list
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -857,7 +857,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
include_once('canvas/'.$product->canvas.'/product.'.$product->canvas.'.class.php');
|
include_once('canvas/'.$product->canvas.'/product.'.$product->canvas.'.class.php');
|
||||||
$product = new $class($db);
|
$product = new $class($db);
|
||||||
|
|
||||||
$result = $product->FetchCanvas($_GET["id"],'',$_GET["action"]);
|
$result = $product->fetchCanvas($_GET["id"],'',$_GET["action"]);
|
||||||
|
|
||||||
$smarty->template_dir = DOL_DOCUMENT_ROOT.'/product/canvas/'.$product->canvas.'/templates/';
|
$smarty->template_dir = DOL_DOCUMENT_ROOT.'/product/canvas/'.$product->canvas.'/templates/';
|
||||||
|
|
||||||
|
|||||||
@ -34,6 +34,20 @@ $langs->load("products");
|
|||||||
|
|
||||||
$type=trim(isset($_GET["type"])?$_GET["type"]:$_POST["type"]);
|
$type=trim(isset($_GET["type"])?$_GET["type"]:$_POST["type"]);
|
||||||
|
|
||||||
|
// TODO for compatibility
|
||||||
|
if (!isset($_GET["canvas"]))
|
||||||
|
{
|
||||||
|
$sbarcode=isset($_GET["sbarcode"])?$_GET["sbarcode"]:$_POST["sbarcode"];
|
||||||
|
$snom=isset($_GET["snom"])?$_GET["snom"]:$_POST["snom"];
|
||||||
|
$sall=isset($_GET["sall"])?$_GET["sall"]:$_POST["sall"];
|
||||||
|
$type=isset($_GET["type"])?$_GET["type"]:$_POST["type"];
|
||||||
|
$sref=trim($sref);
|
||||||
|
$sbarcode=trim($sbarcode);
|
||||||
|
$snom=trim($snom);
|
||||||
|
$sall=trim($sall);
|
||||||
|
$type=trim($type);
|
||||||
|
}
|
||||||
|
|
||||||
$sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
|
$sortfield = isset($_GET["sortfield"])?$_GET["sortfield"]:$_POST["sortfield"];
|
||||||
$sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"];
|
$sortorder = isset($_GET["sortorder"])?$_GET["sortorder"]:$_POST["sortorder"];
|
||||||
if (! $sortfield) $sortfield="p.ref";
|
if (! $sortfield) $sortfield="p.ref";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user